[Commits] 9135fd8: Add support for "mariadb_old" - MariaDB using old histogram code
revision-id: 9135fd8745b3a2d8da14a07475a5f70ad564f203 () parent(s): bad764d536839a7bc27072809bbb16f3263ac59d author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2021-10-21 18:49:57 +0300 message: Add support for "mariadb_old" - MariaDB using old histogram code --- README.md | 2 +- database-config.pl | 4 ++++ histogram-test.pl | 18 +++++++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 30637cf..2011cda 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Edit the `database-config.pl` and set the database connection parameters accordi For example: ``` -./histogram-test.pl --jira-tables --db=mariadb,mysql,postgresql ./03-common-and-uncommon.pl +./histogram-test.pl --jira-tables --db=mariadb_old,mariadb,mysql,postgresql ./03-common-and-uncommon.pl ``` will produce this output: diff --git a/database-config.pl b/database-config.pl index afae622..f3234fa 100644 --- a/database-config.pl +++ b/database-config.pl @@ -3,6 +3,10 @@ $conn_str_mariadb="dbi:mysql:test:127.0.0.1:3319"; $conn_user_mariadb='root'; $conn_password_mariadb=''; +$conn_str_mariadb_old="dbi:mysql:test:127.0.0.1:3319"; +$conn_user_mariadb_old='root'; +$conn_password_mariadb_old=''; + $conn_str_mysql= "dbi:mysql:test:127.0.0.1:3312"; $conn_user_mysql='root'; $conn_password_mysql=''; diff --git a/histogram-test.pl b/histogram-test.pl index 54294eb..d91c2d2 100755 --- a/histogram-test.pl +++ b/histogram-test.pl @@ -7,7 +7,7 @@ do './database-config.pl'; # Parse the parameters ... sub usage() { print "\n"; - print " Usage: $0 [--jira-tables] --db=mysql,mariadb,postgresql test_name \n"; + print " Usage: $0 [--jira-tables] --db=mysql,mariadb,mariadb_old,postgresql test_name\n"; print "\n"; } @@ -37,7 +37,11 @@ do $test_name; @mariadb_analyze_cmds= ( " set histogram_type=json_hb", -# " set histogram_type=double_prec_hb", + " analyze table t1 persistent for all" +); + +@mariadb_old_analyze_cmds= ( + " set histogram_type=double_prec_hb", " analyze table t1 persistent for all" ); @@ -65,6 +69,8 @@ sub prepare_dataset { my @analyze_cmds= (); if ($database_type eq "mariadb") { @analyze_cmds= @mariadb_analyze_cmds; + } elsif ($database_type eq "mariadb_old") { + @analyze_cmds= @mariadb_old_analyze_cmds; } elsif ($database_type eq "mysql") { @analyze_cmds= @mysql_analyze_cmds; } elsif ($database_type eq "postgresql") { @@ -126,7 +132,8 @@ sub find_estimate_postgresql { sub find_estimate { my $cond= shift; - if ($database_type eq "mariadb" || + if ($database_type eq "mariadb" || + $database_type eq "mariadb_old" || $database_type eq "mysql") { return find_estimate_mariadb($cond); } elsif ($database_type eq "postgresql") { @@ -174,6 +181,11 @@ foreach (@databases) { $conn_user=$conn_user_mariadb; $conn_password=$conn_password_mariadb; + } elsif ($database_type eq "mariadb_old") { + $conn_str= $conn_str_mariadb_old; + $conn_user=$conn_user_mariadb_old; + $conn_password=$conn_password_mariadb_old; + } elsif ($database_type eq "mysql") { $conn_str= $conn_str_mysql; $conn_user=$conn_user_mysql;
participants (1)
-
psergey