diff options
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 323 |
1 files changed, 186 insertions, 137 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index a9a1d46079c..30ac61c80e8 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -158,9 +158,9 @@ our $path_client_bindir; our $path_language; our $path_timefile; our $path_snapshot; -our $path_manager_log; # Used by mysqldadmin our $path_slave_load_tmpdir; # What is this?! our $path_mysqltest_log; +our $path_current_test_log; our $path_my_basedir; our $opt_vardir; # A path but set directly on cmd line our $opt_vardir_trace; # unix formatted opt_vardir for trace files @@ -191,6 +191,7 @@ our $exe_mysqltest; our $exe_slave_mysqld; our $exe_im; our $exe_my_print_defaults; +our $lib_udf_example; our $opt_bench= 0; our $opt_small_bench= 0; @@ -207,7 +208,6 @@ our $opt_sp_protocol; our $opt_cursor_protocol; our $opt_view_protocol; -our $opt_current_test; our $opt_debug; our $opt_do_test; our @opt_cases; # The test cases names in argv @@ -250,9 +250,6 @@ our $opt_ndbconnectstring; our $opt_ndbcluster_port_slave; our $opt_ndbconnectstring_slave; -our $opt_no_manager; # Does nothing now, we never use manager -our $opt_manager_port; # Does nothing now, we never use manager - our $opt_old_master; our $opt_record; @@ -262,6 +259,7 @@ our $opt_result_ext; our $opt_skip; our $opt_skip_rpl; +our $use_slaves; our $opt_skip_test; our $opt_skip_im; @@ -321,6 +319,8 @@ our $opt_with_ndbcluster_slave; our $opt_with_ndbcluster_all= 0; our $opt_with_ndbcluster_only= 0; our $opt_ndb_extra_test= 0; +our $opt_skip_master_binlog= 0; +our $opt_skip_slave_binlog= 0; our $exe_ndb_mgm; our $path_ndb_tools_dir; @@ -341,11 +341,13 @@ our @data_dir_lst; sub main (); sub initial_setup (); sub command_line_setup (); +sub snapshot_setup (); sub executable_setup (); sub environment_setup (); sub kill_running_server (); sub kill_and_cleanup (); sub check_ssl_support (); +sub check_running_as_root(); sub check_ndbcluster_support (); sub rm_ndbcluster_tables ($); sub ndbcluster_install (); @@ -355,7 +357,7 @@ sub ndbcluster_install_slave (); sub ndbcluster_start_slave ($); sub ndbcluster_stop_slave (); sub run_benchmarks ($); -sub run_tests (); +sub initialize_servers (); sub mysql_install_db (); sub install_db ($$); sub run_testcase ($); @@ -386,8 +388,9 @@ sub main () { command_line_setup(); executable_setup(); - check_ndbcluster_support(); + check_ndbcluster_support(); # We check whether to actually use it later check_ssl_support(); + check_running_as_root(); environment_setup(); signal_setup(); @@ -402,49 +405,37 @@ sub main () { gprof_prepare(); } - if ( ! $glob_use_running_server ) - { - if ( $opt_start_dirty ) - { - kill_running_server(); - } - else - { - kill_and_cleanup(); - mysql_install_db(); - if ( $opt_force ) - { - save_installed_db(); - } - } - } - - if ( $opt_start_dirty ) - { - if ( ndbcluster_start($opt_with_ndbcluster) ) - { - mtr_error("Can't start ndbcluster"); - } - if ( mysqld_start('master',0,[],[],$using_ndbcluster_master) ) - { - mtr_report("Servers started, exiting"); - } - else - { - mtr_error("Can't start the mysqld server"); - } - } - elsif ( $opt_bench ) + if ( $opt_bench ) { + initialize_servers(); run_benchmarks(shift); # Shift what? Extra arguments?! } elsif ( $opt_stress ) { + initialize_servers(); run_stress_test() } else { - run_tests(); + # Figure out which tests we are going to run + my $tests= collect_test_cases($opt_suite); + + # Turn off NDB and other similar options if no tests use it + my ($need_ndbcluster,$need_im); + foreach my $test (@$tests) + { + $need_ndbcluster||= $test->{ndb_test}; + $need_im||= $test->{component_id} eq 'im'; + $use_slaves||= $test->{slave_num}; + } + $opt_with_ndbcluster= $opt_with_ndbcluster_slave= 0 + unless $need_ndbcluster; + $opt_skip_im= 1 unless $need_im; + + snapshot_setup(); + initialize_servers(); + + run_suite($opt_suite, $tests); } mtr_exit(0); @@ -587,7 +578,6 @@ sub command_line_setup () { 'compress' => \$opt_compress, 'bench' => \$opt_bench, 'small-bench' => \$opt_small_bench, - 'no-manager' => \$opt_no_manager, # Currently not used # Control what test suites or cases to run 'force' => \$opt_force, @@ -599,6 +589,8 @@ sub command_line_setup () { 'with-ndbcluster-all' => \$opt_with_ndbcluster_all, 'with-ndbcluster-only' => \$opt_with_ndbcluster_only, 'ndb-extra-test' => \$opt_ndb_extra_test, + 'skip-master-binlog' => \$opt_skip_master_binlog, + 'skip-slave-binlog' => \$opt_skip_slave_binlog, 'do-test=s' => \$opt_do_test, 'start-from=s' => \$opt_start_from, 'suite=s' => \$opt_suite, @@ -612,7 +604,6 @@ sub command_line_setup () { 'slave_port=i' => \$opt_slave_myport, 'ndbcluster-port|ndbcluster_port=i' => \$opt_ndbcluster_port, 'ndbcluster-port-slave=i' => \$opt_ndbcluster_port_slave, - 'manager-port=i' => \$opt_manager_port, # Currently not used 'im-port=i' => \$im_port, # Instance Manager port. 'im-mysqld1-port=i' => \$im_mysqld1_port, # Port of mysqld, controlled by IM 'im-mysqld2-port=i' => \$im_mysqld2_port, # Port of mysqld, controlled by IM @@ -746,11 +737,6 @@ sub command_line_setup () { $opt_tmpdir= "$opt_vardir/tmp" unless $opt_tmpdir; $opt_tmpdir =~ s,/+$,,; # Remove ending slash if any - # FIXME maybe not needed? - $path_manager_log= "$opt_vardir/log/manager.log" - unless $path_manager_log; - $opt_current_test= "$opt_vardir/log/current_test" - unless $opt_current_test; # -------------------------------------------------------------------------- # Do sanity checks of command line arguments @@ -990,22 +976,32 @@ sub command_line_setup () { $path_timefile= "$opt_vardir/log/mysqltest-time"; $path_mysqltest_log= "$opt_vardir/log/mysqltest.log"; + $path_current_test_log= "$opt_vardir/log/current_test"; $path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/"; +} + +sub snapshot_setup () { # Make a list of all data_dirs @data_dir_lst = ( $master->[0]->{'path_myddir'}, - $master->[1]->{'path_myddir'}, - $slave->[0]->{'path_myddir'}, - $slave->[1]->{'path_myddir'}, - $slave->[2]->{'path_myddir'}); + $master->[1]->{'path_myddir'}); - foreach my $instance (@{$instance_manager->{'instances'}}) + if ($use_slaves) { - push(@data_dir_lst, $instance->{'path_datadir'}); + push @data_dir_lst, ($slave->[0]->{'path_myddir'}, + $slave->[1]->{'path_myddir'}, + $slave->[2]->{'path_myddir'}); } + unless ($opt_skip_im) + { + foreach my $instance (@{$instance_manager->{'instances'}}) + { + push(@data_dir_lst, $instance->{'path_datadir'}); + } + } } @@ -1087,6 +1083,8 @@ sub executable_setup () { "/usr/bin/false"); $path_ndb_tools_dir= mtr_path_exists("$glob_basedir/storage/ndb/tools"); $exe_ndb_mgm= "$glob_basedir/storage/ndb/src/mgmclient/ndb_mgm"; + $lib_udf_example= + mtr_file_exists("$glob_basedir/sql/.libs/udf_example.so"); } else { @@ -1184,7 +1182,7 @@ sub environment_setup () { # Add the path where mysqld will find udf_example.so # -------------------------------------------------------------------------- $ENV{'LD_LIBRARY_PATH'}= - "$glob_basedir/sql/.libs" . + ($lib_udf_example ? dirname($lib_udf_example) : "") . ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); @@ -1211,6 +1209,7 @@ sub environment_setup () { $ENV{'NDBCLUSTER_PORT'}= $opt_ndbcluster_port; $ENV{'NDBCLUSTER_PORT_SLAVE'}=$opt_ndbcluster_port_slave; + $ENV{'NDB_STATUS_OK'}= "YES"; $ENV{'IM_PATH_PID'}= $instance_manager->{path_pid}; $ENV{'IM_PORT'}= $instance_manager->{port}; @@ -1250,6 +1249,7 @@ sub signal_setup () { $SIG{INT}= \&handle_int_signal; } + sub handle_int_signal () { $SIG{INT}= 'DEFAULT'; # If we get a ^C again, we die... mtr_warning("got INT signal, cleaning up....."); @@ -1369,6 +1369,33 @@ sub kill_and_cleanup () { } +sub check_running_as_root () { + # Check if running as root + # i.e a file can be read regardless what mode we set it to + my $test_file= "test_running_as_root.txt"; + mtr_tofile($test_file, "MySQL"); + chmod(oct("0000"), $test_file); + + my $result=""; + if (open(FILE,"<",$test_file)) + { + $result= join('', <FILE>); + close FILE; + } + + chmod(oct("0755"), $test_file); + unlink($test_file); + + $ENV{'MYSQL_TEST_ROOT'}= "NO"; + if ($result eq "MySQL") + { + mtr_warning("running this script as _root_ will cause some " . + "tests to be skipped"); + $ENV{'MYSQL_TEST_ROOT'}= "YES"; + } +} + + sub check_ssl_support () { @@ -1436,7 +1463,7 @@ sub check_ndbcluster_support () { return; } - mtr_report("Using ndbcluster, mysqld supports it"); + mtr_report("Using ndbcluster if necessary, mysqld supports it"); $opt_with_ndbcluster= 1; if ( $opt_ndbconnectstring ) { @@ -1467,7 +1494,6 @@ sub check_ndbcluster_support () { return; } -# FIXME why is there a different start below?! sub ndbcluster_install () { @@ -1497,6 +1523,7 @@ sub ndbcluster_install () { return 0; } + sub ndbcluster_start ($) { my $use_ndbcluster= shift; @@ -1520,6 +1547,7 @@ sub ndbcluster_start ($) { if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster", ["--port=$opt_ndbcluster_port", "--data-dir=$opt_vardir", + "--character-sets-dir=$path_charsetsdir", "--verbose=2", "--core"], "", "/dev/null", "", "") ) @@ -1723,12 +1751,9 @@ sub run_benchmarks ($) { # FIXME how to specify several suites to run? Comma separated list? -sub run_tests () { - run_suite($opt_suite); -} sub run_suite () { - my $suite= shift; + my ($suite, $tests)= @_; mtr_print_thick_line(); @@ -1736,8 +1761,6 @@ sub run_suite () { mtr_timer_start($glob_timers,"suite", 60 * $opt_suite_timeout); - my $tests= collect_test_cases($suite); - mtr_report("Starting Tests in the '$suite' suite"); mtr_print_header(); @@ -1779,14 +1802,37 @@ sub run_suite () { # ############################################################################## +sub initialize_servers () { + if ( ! $glob_use_running_server ) + { + if ( $opt_start_dirty ) + { + kill_running_server(); + } + else + { + kill_and_cleanup(); + mysql_install_db(); + if ( $opt_force ) + { + save_installed_db(); + } + } + } +} + sub mysql_install_db () { # FIXME not exactly true I think, needs improvements install_db('master', $master->[0]->{'path_myddir'}); install_db('master', $master->[1]->{'path_myddir'}); - install_db('slave', $slave->[0]->{'path_myddir'}); - install_db('slave', $slave->[1]->{'path_myddir'}); - install_db('slave', $slave->[2]->{'path_myddir'}); + + if ( $use_slaves ) + { + install_db('slave', $slave->[0]->{'path_myddir'}); + install_db('slave', $slave->[1]->{'path_myddir'}); + install_db('slave', $slave->[2]->{'path_myddir'}); + } if ( ! $opt_skip_im ) { @@ -1801,6 +1847,7 @@ sub mysql_install_db () { mtr_report("ndbcluster_install failed, continuing without cluster"); $opt_with_ndbcluster= 0; $flag_ndb_status_ok= 0; + $ENV{'NDB_STATUS_OK'}= "NO"; } else { @@ -1840,7 +1887,7 @@ sub install_db ($$) { my $init_db_sql_tmp= "/tmp/init_db.sql$$"; my $args; - mtr_report("Installing \u$type Databases"); + mtr_report("Installing \u$type Database"); open(IN, $init_db_sql) or mtr_error("Can't open $init_db_sql: $!"); @@ -1884,8 +1931,15 @@ sub install_db ($$) { mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir); } + # Log bootstrap command + my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log"; + mtr_tofile($path_bootstrap_log, + "$exe_mysqld " . join(" ", @$args) . "\n"); + if ( mtr_run($exe_mysqld, $args, $init_db_sql_tmp, - $path_manager_log, $path_manager_log, "") != 0 ) + $path_bootstrap_log, $path_bootstrap_log, + "", { append_log_file => 1 }) != 0 ) + { unlink($init_db_sql_tmp); mtr_error("Error executing mysqld --bootstrap\n" . @@ -1907,15 +1961,15 @@ sub im_create_passwd_file($) { my $instance_manager = shift; my $pwd_file_path = $instance_manager->{'password_file'}; - + mtr_report("Creating IM password file ($pwd_file_path)"); - + open(OUT, ">", $pwd_file_path) or mtr_error("Can't write to $pwd_file_path: $!"); - + print OUT $instance_manager->{'admin_login'}, ":", $instance_manager->{'admin_sha1'}, "\n"; - + close(OUT); } @@ -1927,7 +1981,7 @@ sub im_create_defaults_file($) { open(OUT, ">", $defaults_file) or mtr_error("Can't write to $defaults_file: $!"); - + print OUT <<EOF [mysql] @@ -2009,7 +2063,7 @@ sub run_testcase ($) { my $ndbcluster_opt; - mtr_tonewfile($opt_current_test,"$tname\n"); # Always tell where we are + mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are # output current test to ndbcluster log file to enable diagnostics mtr_tofile($file_ndb_testrun_log,"CURRENT TEST $tname\n"); @@ -2088,7 +2142,7 @@ sub run_testcase ($) { # ---------------------------------------------------------------------- stop_slaves(); - } + } # ---------------------------------------------------------------------- # Prepare to start masters. Even if we use embedded, we want to run @@ -2105,9 +2159,9 @@ sub run_testcase ($) { mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n"); } -# FIXME test cases that depend on each other, prevent this from -# being at this location. -# do_before_start_master($tname,$tinfo->{'master_sh'}); + # FIXME test cases that depend on each other, prevent this from + # being at this location. + # do_before_start_master($tname,$tinfo->{'master_sh'}); # ---------------------------------------------------------------------- # If any mysqld servers running died, we have to know @@ -2157,6 +2211,14 @@ sub run_testcase ($) { if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} ) { # Test needs cluster, start an extra mysqld connected to cluster + # First wait for first mysql server to have created ndb system tables ok + if ( ! sleep_until_file_created("$master->[0]->{'path_myddir'}/cluster/apply_status.ndb", + $master->[0]->{'start_timeout'}, + $master->[0]->{'pid'})) + { + report_failure_and_restart($tinfo); + return; + } mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n"); $master->[1]->{'pid'}= mysqld_start('master',1,$tinfo->{'master_opt'},[], @@ -2230,10 +2292,11 @@ sub run_testcase ($) { } # ---------------------------------------------------------------------- - # If --start-and-exit given, stop here to let user manually run tests + # If --start-and-exit or --start-dirty given, stop here to let user manually + # run tests # ---------------------------------------------------------------------- - if ( $opt_start_and_exit ) + if ( $opt_start_and_exit or $opt_start_dirty ) { mtr_report("\nServers started, exiting"); exit(0); @@ -2299,25 +2362,6 @@ sub run_testcase ($) { } } -sub copy_dir($$) { - my $from_dir= shift; - my $to_dir= shift; - - mkpath("$to_dir"); - opendir(DIR, "$from_dir") - or mtr_error("Can't find $from_dir$!"); - for(readdir(DIR)) { - next if "$_" eq "." or "$_" eq ".."; - if ( -d "$from_dir/$_" ) - { - copy_dir("$from_dir/$_", "$to_dir/$_"); - next; - } - copy("$from_dir/$_", "$to_dir/$_"); - } - closedir(DIR); - -} # # Save a snapshot of the installed test db(s) @@ -2331,7 +2375,7 @@ sub save_installed_db () { foreach my $data_dir (@data_dir_lst) { my $name= basename($data_dir); - copy_dir("$data_dir", "$path_snapshot/$name"); + mtr_copy_dir("$data_dir", "$path_snapshot/$name"); } } @@ -2355,6 +2399,7 @@ sub save_files_before_restore($$) { } } + # # Restore snapshot of the installed test db(s) # if the snapshot exists @@ -2373,7 +2418,7 @@ sub restore_installed_db ($) { my $name= basename($data_dir); save_files_before_restore($test_name, $data_dir); rmtree("$data_dir"); - copy_dir("$path_snapshot/$name", "$data_dir"); + mtr_copy_dir("$path_snapshot/$name", "$data_dir"); } if ($opt_with_ndbcluster) { @@ -2430,9 +2475,9 @@ sub report_failure_and_restart ($) { # ############################################################################## + # The embedded server needs the cleanup so we do some of the start work # but stop before actually running mysqld or anything. - sub do_before_start_master ($$) { my $tname= shift; my $init_script= shift; @@ -2465,13 +2510,14 @@ sub do_before_start_master ($$) { if ( $ret != 0 ) { # FIXME rewrite those scripts to return 0 if successful -# mtr_warning("$init_script exited with code $ret"); + # mtr_warning("$init_script exited with code $ret"); } } # for gcov FIXME needed? If so we need more absolute paths -# chdir($glob_basedir); + # chdir($glob_basedir); } + sub do_before_start_slave ($$) { my $tname= shift; my $init_script= shift; @@ -2499,7 +2545,7 @@ sub do_before_start_slave ($$) { if ( $ret != 0 ) { # FIXME rewrite those scripts to return 0 if successful -# mtr_warning("$init_script exited with code $ret"); + # mtr_warning("$init_script exited with code $ret"); } } @@ -2509,6 +2555,7 @@ sub do_before_start_slave ($$) { } } + sub mysqld_arguments ($$$$$$) { my $args= shift; my $type= shift; # master/slave/bootstrap @@ -2555,8 +2602,11 @@ sub mysqld_arguments ($$$$$$) { { my $id= $idx > 0 ? $idx + 101 : 1; - mtr_add_arg($args, "%s--log-bin=%s/log/master-bin%s", $prefix, - $opt_vardir, $sidx); + if (! $opt_skip_master_binlog) + { + mtr_add_arg($args, "%s--log-bin=%s/log/master-bin%s", $prefix, + $opt_vardir, $sidx); + } mtr_add_arg($args, "%s--pid-file=%s", $prefix, $master->[$idx]->{'path_mypid'}); mtr_add_arg($args, "%s--port=%d", $prefix, @@ -2597,9 +2647,12 @@ sub mysqld_arguments ($$$$$$) { # FIXME slave get this option twice?! mtr_add_arg($args, "%s--exit-info=256", $prefix); mtr_add_arg($args, "%s--init-rpl-role=slave", $prefix); - mtr_add_arg($args, "%s--log-bin=%s/log/slave%s-bin", $prefix, - $opt_vardir, $sidx); # FIXME use own dir for binlogs - mtr_add_arg($args, "%s--log-slave-updates", $prefix); + if (! $opt_skip_slave_binlog) + { + mtr_add_arg($args, "%s--log-bin=%s/log/slave%s-bin", $prefix, + $opt_vardir, $sidx); # FIXME use own dir for binlogs + mtr_add_arg($args, "%s--log-slave-updates", $prefix); + } # FIXME option duplicated for slave mtr_add_arg($args, "%s--log=%s", $prefix, $slave->[$idx]->{'path_mylog'}); @@ -2747,14 +2800,6 @@ sub mysqld_arguments ($$$$$$) { return $args; } -# FIXME -# if ( $type eq 'master' and $glob_use_embedded_server ) -# { -# # Add a -A to each argument to pass it to embedded server -# my @mysqltest_opt= map {("-A",$_)} @args; -# $opt_extra_mysqltest_opt= \@mysqltest_opt; -# return; -# } ############################################################################## # @@ -2854,6 +2899,7 @@ sub mysqld_start ($$$$$) { return 0; } + sub stop_masters_slaves () { print "Ending Tests\n"; @@ -2863,7 +2909,7 @@ sub stop_masters_slaves () { print "Shutting-down Instance Manager\n"; im_stop($instance_manager); } - + print "Shutting-down MySQL daemon\n\n"; stop_masters(); print "Master(s) shutdown finished\n"; @@ -2871,6 +2917,7 @@ sub stop_masters_slaves () { print "Slave(s) shutdown finished\n"; } + sub stop_masters () { my @args; @@ -2900,6 +2947,7 @@ sub stop_masters () { mtr_stop_mysqld_servers(\@args); } + sub stop_slaves () { my $force= shift; @@ -2954,7 +3002,7 @@ sub im_start($$) { mtr_add_arg($args, $opt); } - $instance_manager->{'pid'} = + $instance_manager->{'pid'} = mtr_spawn( $exe_im, # path to the executable $args, # cmd-line args @@ -2970,7 +3018,7 @@ sub im_start($$) { mtr_report('Could not start Instance Manager'); return; } - + # Instance Manager can be run in daemon mode. In this case, it creates # several processes and the parent process, created by mtr_spawn(), exits just # after start. So, we have to obtain Instance Manager PID from the PID file. @@ -2988,6 +3036,7 @@ sub im_start($$) { mtr_get_pid_from_file($instance_manager->{'path_pid'}); } + sub im_stop($) { my $instance_manager = shift; @@ -3022,12 +3071,13 @@ sub im_stop($) { # Kill processes. mtr_kill_processes(\@pids); - + stop_reap_all(); $instance_manager->{'pid'} = undef; } + # # Run include/check-testcase.test # Before a testcase, run in record mode, save result file to var @@ -3076,6 +3126,7 @@ sub run_check_testcase ($) { } } + sub run_mysqltest ($) { my $tinfo= shift; @@ -3169,11 +3220,6 @@ sub run_mysqltest ($) { "--port=$master->[0]->{'path_myport'} " . "--socket=$master->[0]->{'path_mysock'}"; - - - # FIXME really needing a PATH??? - # $ENV{'PATH'}= "/bin:/usr/bin:/usr/local/bin:/usr/bsd:/usr/X11R6/bin:/usr/openwin/bin:/usr/bin/X11:$ENV{'PATH'}"; - $ENV{'MYSQL'}= $cmdline_mysql; $ENV{'MYSQL_CHECK'}= $cmdline_mysqlcheck; $ENV{'MYSQL_DUMP'}= $cmdline_mysqldump; @@ -3186,9 +3232,11 @@ sub run_mysqltest ($) { $ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test; $ENV{'CHARSETSDIR'}= $path_charsetsdir; $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults; + $ENV{'UDF_EXAMPLE_LIB'}= + ($lib_udf_example ? basename($lib_udf_example) : ""); - $ENV{'NDB_STATUS_OK'}= $flag_ndb_status_ok; - $ENV{'NDB_SLAVE_STATUS_OK'}= $flag_ndb_slave_status_ok; + $ENV{'NDB_STATUS_OK'}= $flag_ndb_status_ok ? "YES" : "NO"; + $ENV{'NDB_SLAVE_STATUS_OK'}= $flag_ndb_slave_status_ok ? "YES" : "NO"; $ENV{'NDB_EXTRA_TEST'}= $opt_ndb_extra_test; $ENV{'NDB_MGM'}= $exe_ndb_mgm; $ENV{'NDB_BACKUP_DIR'}= $path_ndb_data_dir; @@ -3441,6 +3489,7 @@ sub gdb_arguments { $$exe= "xterm"; } + # # Modify the exe and args so that program is run in ddd # @@ -3472,8 +3521,7 @@ sub ddd_arguments { "break mysql_parse\n" . "commands 1\n" . "disable 1\n" . - "end\n" . - "run"); + "end"); } if ( $opt_manual_ddd ) @@ -3561,7 +3609,7 @@ sub valgrind_arguments { if ( $opt_valgrind_options ) { - mtr_add_arg($args, split(' ', $opt_valgrind_options)); + mtr_add_arg($args, '%s', $_) for (split(' ', $opt_valgrind_options)); } @@ -3681,11 +3729,12 @@ Misc options comment=STR Write STR to the output notimer Don't show test case execution time script-debug Debug this script itself - start-and-exit Only initiate and start the "mysqld" servers, use - the startup settings for the specified test case if any - start-dirty Only start the "mysqld" servers without initiation - fast Don't try to cleanup from earlier runs - reorder Reorder tests to get less server restarts + start-and-exit Only initialize and start the servers, using the + startup settings for the specified test case (if any) + start-dirty Only start the servers (without initialization) for + the specified test case (if any) + fast Don't try to clean up from earlier runs + reorder Reorder tests to get fewer server restarts help Get this help text unified-diff | udiff When presenting differences, use unified diff |