Loading mysql-test/lib/init_db.sql +88 −5 Original line number Diff line number Diff line Loading @@ -16,6 +16,11 @@ CREATE TABLE db ( Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM Loading @@ -23,8 +28,8 @@ CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges'; INSERT INTO db VALUES ('%','test' ,'','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y'); INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y'); INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N'); INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N'); CREATE TABLE host ( Loading @@ -42,6 +47,8 @@ CREATE TABLE host ( Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin Loading Loading @@ -73,6 +80,10 @@ CREATE TABLE user ( Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, Loading @@ -80,15 +91,16 @@ CREATE TABLE user ( max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'; INSERT INTO user VALUES ('localhost' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); INSERT INTO user VALUES ('@HOSTNAME@%','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); INSERT INTO user VALUES ('localhost' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO user VALUES ('@HOSTNAME@%' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO user (host,user) VALUES ('localhost',''); INSERT INTO user (host,user) VALUES ('@HOSTNAME@%',''); Loading Loading @@ -468,3 +480,74 @@ INSERT INTO time_zone_leap_second ( ,(662688015, 16) ,(709948816, 17) ,(741484817, 18) ,(773020818, 19) ,(820454419, 20) ,(867715220, 21) ,(915148821, 22); CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp(14), Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Routine_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges'; CREATE TABLE proc ( db char(64) binary DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob DEFAULT '' NOT NULL, returns char(64) DEFAULT '' NOT NULL, body blob DEFAULT '' NOT NULL, definer char(77) binary DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT 0 NOT NULL, comment char(64) binary DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) comment='Stored Procedures'; mysql-test/lib/mtr_cases.pl +18 −15 Original line number Diff line number Diff line Loading @@ -63,21 +63,24 @@ sub collect_test_cases ($) { # To speed things up, we sort first in if the test require a restart # or not, second in alphanumeric order. # @$cases = sort { # if ( $a->{'master_restart'} and $b->{'master_restart'} or # ! $a->{'master_restart'} and ! $b->{'master_restart'} ) # { # return $a->{'name'} cmp $b->{'name'}; # } # if ( $a->{'master_restart'} ) # { # return 1; # Is greater # } # else # { # return -1; # Is less # } # } @$cases; if ( $::opt_reorder ) { @$cases = sort { if ( $a->{'master_restart'} and $b->{'master_restart'} or ! $a->{'master_restart'} and ! $b->{'master_restart'} ) { return $a->{'name'} cmp $b->{'name'}; } if ( $a->{'master_restart'} ) { return 1; # Is greater } else { return -1; # Is less } } @$cases; } return $cases; } Loading mysql-test/lib/mtr_report.pl +5 −6 Original line number Diff line number Diff line Loading @@ -89,12 +89,11 @@ sub mtr_report_test_passed ($) { my $tinfo= shift; my $timer= ""; # FIXME # if ( $::opt_timer and -f "$::glob_mysql_test_dir/var/log/timer" ) # { # $timer= `cat var/log/timer`; # $timer= sprintf "%13s", $timer; # } if ( $::opt_timer and -f "$::glob_mysql_test_dir/var/log/timer" ) { $timer= mtr_fromfile("$::glob_mysql_test_dir/var/log/timer"); $timer= sprintf "%12s", $timer; } $tinfo->{'result'}= 'MTR_RES_PASSED'; print "[ pass ] $timer\n"; } Loading mysql-test/mysql-test-run.pl +21 −9 Original line number Diff line number Diff line Loading @@ -214,6 +214,7 @@ our $opt_embedded_server; our $opt_extern; our $opt_fast; our $opt_force; our $opt_reorder; our $opt_gcov; our $opt_gcov_err; Loading Loading @@ -525,6 +526,7 @@ sub command_line_setup () { 'local-master' => \$opt_local_master, 'netware' => \$opt_netware, 'old-master' => \$opt_old_master, 'reorder' => \$opt_reorder, 'script-debug' => \$opt_script_debug, 'sleep=i' => \$opt_sleep, 'socket=s' => \$opt_socket, Loading Loading @@ -1365,7 +1367,10 @@ sub run_testcase ($) { mtr_report_test_name($tinfo); mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n"); 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 Loading Loading @@ -1397,6 +1402,8 @@ sub run_testcase ($) { } if ( ! $master->[0]->{'pid'} ) { # FIXME not correct location for do_before_start_master() do_before_start_master($tname,$tinfo->{'master_sh'}); $master->[0]->{'pid'}= mysqld_start('master',0,$tinfo->{'master_opt'},[]); if ( ! $master->[0]->{'pid'} ) Loading Loading @@ -1532,9 +1539,10 @@ sub do_before_start_master ($$) { $tname ne "rpl_crash_binlog_ib_3b") { # FIXME we really want separate dir for binlogs # FIXME replace 'rm' in backticks with portable Perl function `rm -f $glob_mysql_test_dir/var/log/master-bin*`; # unlink("$glob_mysql_test_dir/var/log/master-bin*"); foreach my $bin ( glob("$glob_mysql_test_dir/var/log/master*-bin.*") ) { unlink($bin); } } # Remove old master.info and relay-log.info files Loading Loading @@ -1568,9 +1576,10 @@ sub do_before_start_slave ($$) { $tname ne "rpl_crash_binlog_ib_3b" ) { # FIXME we really want separate dir for binlogs # FIXME replace 'rm' in backticks with portable Perl function `rm -fr $glob_mysql_test_dir/var/log/slave*-bin.*`; # unlink("$glob_mysql_test_dir/var/log/slave*-bin.*"); # FIXME idx??? foreach my $bin ( glob("$glob_mysql_test_dir/var/log/slave*-bin.*") ) { unlink($bin); } # FIXME really master?! unlink("$glob_mysql_test_dir/var/slave-data/master.info"); unlink("$glob_mysql_test_dir/var/slave-data/relay-log.info"); Loading Loading @@ -1656,13 +1665,15 @@ sub mysqld_arguments ($$$$$) { mtr_add_arg($args, "%s--datadir=%s", $prefix, $slave->[$idx]->{'path_myddir'}); % 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/var/log/slave%s-bin", $prefix, $glob_mysql_test_dir, $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_myerr'}); $slave->[$idx]->{'path_mylog'}); mtr_add_arg($args, "%s--master-retry-count=10", $prefix); mtr_add_arg($args, "%s--pid-file=%s", $prefix, $slave->[$idx]->{'path_mypid'}); Loading Loading @@ -2043,7 +2054,7 @@ sub run_mysqltest ($$) { if ( $opt_timer ) { mtr_add_arg($args, "--timer-file=var/log/timer"); mtr_add_arg($args, "--timer-file=%s/var/log/timer", $glob_mysql_test_dir); } if ( $opt_big_test ) Loading Loading @@ -2172,6 +2183,7 @@ Misc options timer Show test case execution time start-and-exit Only initiate and start the "mysqld" servers fast Don't try to cleanup from earlier runs reorder Reorder tests to get less server restarts help Get this help text unified-diff | udiff When presenting differences, use unified diff Loading Loading
mysql-test/lib/init_db.sql +88 −5 Original line number Diff line number Diff line Loading @@ -16,6 +16,11 @@ CREATE TABLE db ( Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM Loading @@ -23,8 +28,8 @@ CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges'; INSERT INTO db VALUES ('%','test' ,'','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y'); INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y'); INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N'); INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N'); CREATE TABLE host ( Loading @@ -42,6 +47,8 @@ CREATE TABLE host ( Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin Loading Loading @@ -73,6 +80,10 @@ CREATE TABLE user ( Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, Loading @@ -80,15 +91,16 @@ CREATE TABLE user ( max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'; INSERT INTO user VALUES ('localhost' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); INSERT INTO user VALUES ('@HOSTNAME@%','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); INSERT INTO user VALUES ('localhost' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO user VALUES ('@HOSTNAME@%' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO user (host,user) VALUES ('localhost',''); INSERT INTO user (host,user) VALUES ('@HOSTNAME@%',''); Loading Loading @@ -468,3 +480,74 @@ INSERT INTO time_zone_leap_second ( ,(662688015, 16) ,(709948816, 17) ,(741484817, 18) ,(773020818, 19) ,(820454419, 20) ,(867715220, 21) ,(915148821, 22); CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp(14), Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Routine_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges'; CREATE TABLE proc ( db char(64) binary DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob DEFAULT '' NOT NULL, returns char(64) DEFAULT '' NOT NULL, body blob DEFAULT '' NOT NULL, definer char(77) binary DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT 0 NOT NULL, comment char(64) binary DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) comment='Stored Procedures';
mysql-test/lib/mtr_cases.pl +18 −15 Original line number Diff line number Diff line Loading @@ -63,21 +63,24 @@ sub collect_test_cases ($) { # To speed things up, we sort first in if the test require a restart # or not, second in alphanumeric order. # @$cases = sort { # if ( $a->{'master_restart'} and $b->{'master_restart'} or # ! $a->{'master_restart'} and ! $b->{'master_restart'} ) # { # return $a->{'name'} cmp $b->{'name'}; # } # if ( $a->{'master_restart'} ) # { # return 1; # Is greater # } # else # { # return -1; # Is less # } # } @$cases; if ( $::opt_reorder ) { @$cases = sort { if ( $a->{'master_restart'} and $b->{'master_restart'} or ! $a->{'master_restart'} and ! $b->{'master_restart'} ) { return $a->{'name'} cmp $b->{'name'}; } if ( $a->{'master_restart'} ) { return 1; # Is greater } else { return -1; # Is less } } @$cases; } return $cases; } Loading
mysql-test/lib/mtr_report.pl +5 −6 Original line number Diff line number Diff line Loading @@ -89,12 +89,11 @@ sub mtr_report_test_passed ($) { my $tinfo= shift; my $timer= ""; # FIXME # if ( $::opt_timer and -f "$::glob_mysql_test_dir/var/log/timer" ) # { # $timer= `cat var/log/timer`; # $timer= sprintf "%13s", $timer; # } if ( $::opt_timer and -f "$::glob_mysql_test_dir/var/log/timer" ) { $timer= mtr_fromfile("$::glob_mysql_test_dir/var/log/timer"); $timer= sprintf "%12s", $timer; } $tinfo->{'result'}= 'MTR_RES_PASSED'; print "[ pass ] $timer\n"; } Loading
mysql-test/mysql-test-run.pl +21 −9 Original line number Diff line number Diff line Loading @@ -214,6 +214,7 @@ our $opt_embedded_server; our $opt_extern; our $opt_fast; our $opt_force; our $opt_reorder; our $opt_gcov; our $opt_gcov_err; Loading Loading @@ -525,6 +526,7 @@ sub command_line_setup () { 'local-master' => \$opt_local_master, 'netware' => \$opt_netware, 'old-master' => \$opt_old_master, 'reorder' => \$opt_reorder, 'script-debug' => \$opt_script_debug, 'sleep=i' => \$opt_sleep, 'socket=s' => \$opt_socket, Loading Loading @@ -1365,7 +1367,10 @@ sub run_testcase ($) { mtr_report_test_name($tinfo); mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n"); 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 Loading Loading @@ -1397,6 +1402,8 @@ sub run_testcase ($) { } if ( ! $master->[0]->{'pid'} ) { # FIXME not correct location for do_before_start_master() do_before_start_master($tname,$tinfo->{'master_sh'}); $master->[0]->{'pid'}= mysqld_start('master',0,$tinfo->{'master_opt'},[]); if ( ! $master->[0]->{'pid'} ) Loading Loading @@ -1532,9 +1539,10 @@ sub do_before_start_master ($$) { $tname ne "rpl_crash_binlog_ib_3b") { # FIXME we really want separate dir for binlogs # FIXME replace 'rm' in backticks with portable Perl function `rm -f $glob_mysql_test_dir/var/log/master-bin*`; # unlink("$glob_mysql_test_dir/var/log/master-bin*"); foreach my $bin ( glob("$glob_mysql_test_dir/var/log/master*-bin.*") ) { unlink($bin); } } # Remove old master.info and relay-log.info files Loading Loading @@ -1568,9 +1576,10 @@ sub do_before_start_slave ($$) { $tname ne "rpl_crash_binlog_ib_3b" ) { # FIXME we really want separate dir for binlogs # FIXME replace 'rm' in backticks with portable Perl function `rm -fr $glob_mysql_test_dir/var/log/slave*-bin.*`; # unlink("$glob_mysql_test_dir/var/log/slave*-bin.*"); # FIXME idx??? foreach my $bin ( glob("$glob_mysql_test_dir/var/log/slave*-bin.*") ) { unlink($bin); } # FIXME really master?! unlink("$glob_mysql_test_dir/var/slave-data/master.info"); unlink("$glob_mysql_test_dir/var/slave-data/relay-log.info"); Loading Loading @@ -1656,13 +1665,15 @@ sub mysqld_arguments ($$$$$) { mtr_add_arg($args, "%s--datadir=%s", $prefix, $slave->[$idx]->{'path_myddir'}); % 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/var/log/slave%s-bin", $prefix, $glob_mysql_test_dir, $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_myerr'}); $slave->[$idx]->{'path_mylog'}); mtr_add_arg($args, "%s--master-retry-count=10", $prefix); mtr_add_arg($args, "%s--pid-file=%s", $prefix, $slave->[$idx]->{'path_mypid'}); Loading Loading @@ -2043,7 +2054,7 @@ sub run_mysqltest ($$) { if ( $opt_timer ) { mtr_add_arg($args, "--timer-file=var/log/timer"); mtr_add_arg($args, "--timer-file=%s/var/log/timer", $glob_mysql_test_dir); } if ( $opt_big_test ) Loading Loading @@ -2172,6 +2183,7 @@ Misc options timer Show test case execution time start-and-exit Only initiate and start the "mysqld" servers fast Don't try to cleanup from earlier runs reorder Reorder tests to get less server restarts help Get this help text unified-diff | udiff When presenting differences, use unified diff Loading