diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-08-31 09:28:59 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-08-31 09:30:40 +0300 |
commit | a36c369bda753b66660ffe61f566639665af89d8 (patch) | |
tree | 20d8fcead2302b9688627c0742b2b2889ca0ab71 /mysql-test/mysql-test-run.pl | |
parent | eca238aea7925b3f165db7c8a0e03c5b3b179cf9 (diff) | |
parent | b29f26d774033d9dda6c1a519657f1092c964f12 (diff) | |
download | mariadb-git-a36c369bda753b66660ffe61f566639665af89d8.tar.gz |
Merge 10.1 into 10.2
For running the Galera tests, the variable my_disable_leak_check
was set to true in order to avoid assertions due to memory leaks
at shutdown.
Some adjustments due to MDEV-13625 (merge InnoDB tests from MySQL 5.6)
were performed. The most notable behaviour changes from 10.0 and 10.1
are the following:
* innodb.innodb-table-online: adjustments for the DROP COLUMN
behaviour change (MDEV-11114, MDEV-13613)
* innodb.innodb-index-online-fk: the removal of a (1,NULL) record
from the result; originally removed in MySQL 5.7 in the
Oracle Bug #16244691 fix
https://github.com/mysql/mysql-server/commit/377774689bf6a16af74182753fe950d514c2c6dd
* innodb.create-index-debug: disabled due to MDEV-13680
(the MySQL Bug #77497 fix was not merged from 5.6 to 5.7.10)
* innodb.innodb-alter-autoinc: MariaDB 10.2 behaves like MySQL 5.6/5.7,
while MariaDB 10.0 and 10.1 assign different values when
auto_increment_increment or auto_increment_offset are used.
Also MySQL 5.6/5.7 exhibit different behaviour between
LGORITHM=INPLACE and ALGORITHM=COPY, so something needs to be tested
and fixed in both MariaDB 10.0 and 10.2.
* innodb.innodb-wl5980-alter: disabled because it would trigger an
InnoDB assertion failure (MDEV-13668 may need additional effort in 10.2)
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 181 |
1 files changed, 96 insertions, 85 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 95c5967d463..f3f206e29c7 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -197,6 +197,7 @@ my @DEFAULT_SUITES= qw( unit- vcol- wsrep- + galera- ); my $opt_suites; @@ -3090,14 +3091,16 @@ sub mysql_install_db { mtr_add_arg($args, "--bootstrap"); mtr_add_arg($args, "--basedir=%s", $install_basedir); mtr_add_arg($args, "--datadir=%s", $install_datadir); + mtr_add_arg($args, "--plugin-dir=%s", $plugindir); mtr_add_arg($args, "--default-storage-engine=myisam"); - mtr_add_arg($args, "--skip-plugin-$_") for @optional_plugins; + mtr_add_arg($args, "--loose-skip-plugin-$_") for @optional_plugins; # starting from 10.0 bootstrap scripts require InnoDB mtr_add_arg($args, "--loose-innodb"); mtr_add_arg($args, "--loose-innodb-log-file-size=5M"); mtr_add_arg($args, "--disable-sync-frm"); mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/"); mtr_add_arg($args, "--core-file"); + mtr_add_arg($args, "--console"); if ( $opt_debug ) { @@ -3116,13 +3119,6 @@ sub mysql_install_db { mtr_add_arg($args, $extra_opt); } } - # InnoDB options can come not only from the command line, but also - # from option files or combinations - foreach my $extra_opt ( @$extra_opts ) { - if ($extra_opt =~ /--innodb/) { - mtr_add_arg($args, $extra_opt); - } - } # If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g., # configure --disable-grant-options), mysqld will not recognize the @@ -3137,98 +3133,108 @@ sub mysql_install_db { # ---------------------------------------------------------------------- $ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args); - + # Extra options can come not only from the command line, but also + # from option files or combinations. We want them on a command line + # that is executed now, because otherwise the datadir might be + # incompatible with the test settings, but not on the general + # $MYSQLD_BOOTSTRAP_CMD line + foreach my $extra_opt ( @$extra_opts ) { + mtr_add_arg($args, $extra_opt); + } # ---------------------------------------------------------------------- # Create the bootstrap.sql file # ---------------------------------------------------------------------- - my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql"; + my $bootstrap_sql_file= "$opt_vardir/log/bootstrap.sql"; - if ($opt_boot_gdb) { - gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(), - $bootstrap_sql_file); - } - if ($opt_boot_dbx) { - dbx_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(), - $bootstrap_sql_file); - } - if ($opt_boot_ddd) { - ddd_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(), - $bootstrap_sql_file); - } - - my $path_sql= my_find_file($install_basedir, - ["mysql", "sql/share", "share/mariadb", - "share/mysql", "share", "scripts"], - "mysql_system_tables.sql", - NOT_REQUIRED); - - if (-f $path_sql ) + if (! -e $bootstrap_sql_file) { - my $sql_dir= dirname($path_sql); - # Use the mysql database for system tables - mtr_tofile($bootstrap_sql_file, "use mysql;\n"); - - # Add the offical mysql system tables - # for a production system - mtr_appendfile_to_file("$sql_dir/mysql_system_tables.sql", - $bootstrap_sql_file); + if ($opt_boot_gdb) { + gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(), + $bootstrap_sql_file); + } + if ($opt_boot_dbx) { + dbx_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(), + $bootstrap_sql_file); + } + if ($opt_boot_ddd) { + ddd_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(), + $bootstrap_sql_file); + } - # Add the performance tables - # for a production system - mtr_appendfile_to_file("$sql_dir/mysql_performance_tables.sql", - $bootstrap_sql_file); + my $path_sql= my_find_file($install_basedir, + ["mysql", "sql/share", "share/mariadb", + "share/mysql", "share", "scripts"], + "mysql_system_tables.sql", + NOT_REQUIRED); - # Add the mysql system tables initial data - # for a production system - mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql", - $bootstrap_sql_file); + if (-f $path_sql ) + { + my $sql_dir= dirname($path_sql); + # Use the mysql database for system tables + mtr_tofile($bootstrap_sql_file, "use mysql;\n"); + + # Add the offical mysql system tables + # for a production system + mtr_appendfile_to_file("$sql_dir/mysql_system_tables.sql", + $bootstrap_sql_file); + + # Add the performance tables + # for a production system + mtr_appendfile_to_file("$sql_dir/mysql_performance_tables.sql", + $bootstrap_sql_file); + + # Add the mysql system tables initial data + # for a production system + mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql", + $bootstrap_sql_file); + + # Add test data for timezone - this is just a subset, on a real + # system these tables will be populated either by mysql_tzinfo_to_sql + # or by downloading the timezone table package from our website + mtr_appendfile_to_file("$sql_dir/mysql_test_data_timezone.sql", + $bootstrap_sql_file); + + # Fill help tables, just an empty file when running from bk repo + # but will be replaced by a real fill_help_tables.sql when + # building the source dist + mtr_appendfile_to_file("$sql_dir/fill_help_tables.sql", + $bootstrap_sql_file); + + # mysql.gtid_slave_pos was created in InnoDB, but many tests + # run without InnoDB. Alter it to MyISAM now + mtr_tofile($bootstrap_sql_file, "ALTER TABLE gtid_slave_pos ENGINE=MyISAM;\n"); + } + else + { + # Install db from init_db.sql that exist in early 5.1 and 5.0 + # versions of MySQL + my $init_file= "$install_basedir/mysql-test/lib/init_db.sql"; + mtr_report(" - from '$init_file'"); + my $text= mtr_grab_file($init_file) or + mtr_error("Can't open '$init_file': $!"); + + mtr_tofile($bootstrap_sql_file, + sql_to_bootstrap($text)); + } - # Add test data for timezone - this is just a subset, on a real - # system these tables will be populated either by mysql_tzinfo_to_sql - # or by downloading the timezone table package from our website - mtr_appendfile_to_file("$sql_dir/mysql_test_data_timezone.sql", - $bootstrap_sql_file); + # Remove anonymous users + mtr_tofile($bootstrap_sql_file, + "DELETE FROM mysql.user where user= '';\n"); - # Fill help tables, just an empty file when running from bk repo - # but will be replaced by a real fill_help_tables.sql when - # building the source dist - mtr_appendfile_to_file("$sql_dir/fill_help_tables.sql", - $bootstrap_sql_file); + # Create mtr database + mtr_tofile($bootstrap_sql_file, + "CREATE DATABASE mtr CHARSET=latin1;\n"); - # mysql.gtid_slave_pos was created in InnoDB, but many tests - # run without InnoDB. Alter it to MyISAM now - mtr_tofile($bootstrap_sql_file, "ALTER TABLE gtid_slave_pos ENGINE=MyISAM;\n"); - } - else - { - # Install db from init_db.sql that exist in early 5.1 and 5.0 - # versions of MySQL - my $init_file= "$install_basedir/mysql-test/lib/init_db.sql"; - mtr_report(" - from '$init_file'"); - my $text= mtr_grab_file($init_file) or - mtr_error("Can't open '$init_file': $!"); + # Add help tables and data for warning detection and supression + mtr_tofile($bootstrap_sql_file, + sql_to_bootstrap(mtr_grab_file("include/mtr_warnings.sql"))); + # Add procedures for checking server is restored after testcase mtr_tofile($bootstrap_sql_file, - sql_to_bootstrap($text)); + sql_to_bootstrap(mtr_grab_file("include/mtr_check.sql"))); } - # Remove anonymous users - mtr_tofile($bootstrap_sql_file, - "DELETE FROM mysql.user where user= '';\n"); - - # Create mtr database - mtr_tofile($bootstrap_sql_file, - "CREATE DATABASE mtr CHARSET=latin1;\n"); - - # Add help tables and data for warning detection and supression - mtr_tofile($bootstrap_sql_file, - sql_to_bootstrap(mtr_grab_file("include/mtr_warnings.sql"))); - - # Add procedures for checking server is restored after testcase - mtr_tofile($bootstrap_sql_file, - sql_to_bootstrap(mtr_grab_file("include/mtr_check.sql"))); - # Log bootstrap command my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log"; mtr_tofile($path_bootstrap_log, @@ -5153,6 +5159,11 @@ sub mysqld_start ($$) { # Remember options used when starting $mysqld->{'started_opts'}= $extra_opts; + # "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start. + # Use it to restart the server at testing a failing server start (e.g + # due to incompatible options). + $ENV{'MYSQLD_LAST_CMD'}= "$exe @$args"; + return; } |