List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:August 2 2010 12:00pm
Subject:bzr push into mysql-5.1-mtr branch (bjorn.bunch:2918 to 2920) Bug#55597
View as plain text  
 2920 Bjorn Munch	2010-08-02 [merge]
      Bug #55597 MTR: Restart the server, from within the test case, with new CLI options.
      The expect file can now include "restart:<server options>"
      Also drop check-testcase if this has been done
      Added comment explaining the restart: syntax

    modified:
      mysql-test/mysql-test-run.pl
 2919 Bjorn Munch	2010-07-23
      Bug #55503 MTR fails to filter LEAK SUMMARY from valgrind report of restarted servers
      Was not covered by "skip" pattern
      Replace with a more generic pattern for SUMMARY

    modified:
      mysql-test/mysql-test-run.pl
 2918 Bjorn Munch	2010-06-17 [merge]
      merge from 5.1 up to rev 3408

    removed:
      mysql-test/include/show_slave_status2.inc
      mysql-test/suite/rpl/r/rpl_000015.result
      mysql-test/suite/rpl/t/rpl_000015-slave.opt
      mysql-test/suite/rpl/t/rpl_000015.cnf
      mysql-test/suite/rpl/t/rpl_000015.test
    added:
      mysql-test/include/check_concurrent_insert.inc
      mysql-test/include/check_no_concurrent_insert.inc
      mysql-test/include/check_no_row_lock.inc
      mysql-test/include/check_shared_row_lock.inc
      mysql-test/include/check_slave_is_running.inc
      mysql-test/include/check_slave_no_error.inc
      mysql-test/include/check_slave_param.inc
      mysql-test/include/get_relay_log_pos.inc
      mysql-test/r/innodb_mysql_lock2.result
      mysql-test/r/lock_sync.result
      mysql-test/suite/innodb/r/innodb_bug48024.result
      mysql-test/suite/innodb/r/innodb_bug49164.result
      mysql-test/suite/innodb/r/innodb_multi_update.result
      mysql-test/suite/innodb/t/innodb_bug48024.test
      mysql-test/suite/innodb/t/innodb_bug49164.test
      mysql-test/suite/innodb/t/innodb_multi_update.test
      mysql-test/suite/innodb_plugin/r/innodb_bug48024.result
      mysql-test/suite/innodb_plugin/r/innodb_bug49164.result
      mysql-test/suite/innodb_plugin/r/innodb_bug53290.result
      mysql-test/suite/innodb_plugin/r/innodb_bug53591.result
      mysql-test/suite/innodb_plugin/r/innodb_bug53592.result
      mysql-test/suite/innodb_plugin/r/innodb_multi_update.result
      mysql-test/suite/innodb_plugin/t/disabled.def
      mysql-test/suite/innodb_plugin/t/innodb_bug48024.test
      mysql-test/suite/innodb_plugin/t/innodb_bug49164.test
      mysql-test/suite/innodb_plugin/t/innodb_bug53290.test
      mysql-test/suite/innodb_plugin/t/innodb_bug53591.test
      mysql-test/suite/innodb_plugin/t/innodb_bug53592.test
      mysql-test/suite/innodb_plugin/t/innodb_multi_update.test
      mysql-test/t/innodb_mysql_lock2.test
      mysql-test/t/lock_sync.test
    modified:
      BUILD/SETUP.sh
      BUILD/build_mccge.sh
      BUILD/compile-amd64-valgrind-max
      BUILD/compile-pentium-icc-valgrind-max
      BUILD/compile-pentium-valgrind-max
      BUILD/compile-pentium-valgrind-max-no-ndb
      BUILD/compile-pentium64-valgrind-max
      configure.in
      include/m_string.h
      include/my_global.h
      include/my_sys.h
      mysql-test/collections/default.experimental
      mysql-test/extra/binlog_tests/binlog.test
      mysql-test/extra/binlog_tests/blackhole.test
      mysql-test/extra/rpl_tests/rpl_deadlock.test
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
      mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
      mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
      mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
      mysql-test/extra/rpl_tests/rpl_insert_delayed.test
      mysql-test/extra/rpl_tests/rpl_log.test
      mysql-test/extra/rpl_tests/rpl_max_relay_size.test
      mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
      mysql-test/extra/rpl_tests/rpl_reset_slave.test
      mysql-test/extra/rpl_tests/rpl_row_basic.test
      mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
      mysql-test/include/rpl_stmt_seq.inc
      mysql-test/include/show_binlog_events.inc
      mysql-test/include/show_rpl_debug_info.inc
      mysql-test/include/show_slave_status.inc
      mysql-test/include/test_fieldsize.inc
      mysql-test/include/wait_for_binlog_event.inc
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/include/wait_for_slave_param.inc
      mysql-test/include/wait_for_slave_sql_error.inc
      mysql-test/include/wait_for_slave_sql_error_and_skip.inc
      mysql-test/include/wait_for_status_var.inc
      mysql-test/include/wait_until_count_sessions.inc
      mysql-test/r/alter_table-big.result
      mysql-test/r/bug39022.result
      mysql-test/r/create-big.result
      mysql-test/r/ctype_cp932_binlog_stm.result
      mysql-test/r/flush_block_commit_notembedded.result
      mysql-test/r/innodb_mysql.result
      mysql-test/r/join_outer.result
      mysql-test/r/multi_update.result
      mysql-test/r/partition_error.result
      mysql-test/r/renamedb.result
      mysql-test/r/sp_trans_log.result
      mysql-test/r/type_time.result
      mysql-test/r/upgrade.result
      mysql-test/suite/binlog/r/binlog_innodb.result
      mysql-test/suite/binlog/r/binlog_row_binlog.result
      mysql-test/suite/binlog/r/binlog_stm_binlog.result
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result
      mysql-test/suite/binlog/t/binlog_innodb.test
      mysql-test/suite/binlog/t/binlog_killed.test
      mysql-test/suite/binlog/t/binlog_stm_binlog.test
      mysql-test/suite/bugs/r/rpl_bug12691.result
      mysql-test/suite/bugs/r/rpl_bug36391.result
      mysql-test/suite/bugs/t/rpl_bug12691.test
      mysql-test/suite/bugs/t/rpl_bug36391.test
      mysql-test/suite/engines/funcs/r/rpl_000015.result
      mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result
      mysql-test/suite/engines/funcs/r/rpl_change_master.result
      mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result
      mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result
      mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result
      mysql-test/suite/engines/funcs/r/rpl_log_pos.result
      mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result
      mysql-test/suite/engines/funcs/r/rpl_row_drop.result
      mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result
      mysql-test/suite/engines/funcs/r/rpl_row_max_relay_size.result
      mysql-test/suite/engines/funcs/r/rpl_row_reset_slave.result
      mysql-test/suite/engines/funcs/r/rpl_row_until.result
      mysql-test/suite/engines/funcs/r/rpl_server_id1.result
      mysql-test/suite/engines/funcs/r/rpl_server_id2.result
      mysql-test/suite/engines/funcs/r/rpl_slave_status.result
      mysql-test/suite/engines/funcs/r/rpl_stm_max_relay_size.result
      mysql-test/suite/engines/funcs/r/rpl_stm_reset_slave.result
      mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
      mysql-test/suite/engines/funcs/t/rpl_000015.test
      mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test
      mysql-test/suite/engines/funcs/t/rpl_change_master.test
      mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test
      mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test
      mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test
      mysql-test/suite/engines/funcs/t/rpl_log_pos.test
      mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test
      mysql-test/suite/engines/funcs/t/rpl_row_drop.test
      mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test
      mysql-test/suite/engines/funcs/t/rpl_row_until.test
      mysql-test/suite/engines/funcs/t/rpl_server_id1.test
      mysql-test/suite/engines/funcs/t/rpl_server_id2.test
      mysql-test/suite/engines/funcs/t/rpl_slave_status.test
      mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test
      mysql-test/suite/innodb/r/innodb.result
      mysql-test/suite/innodb/t/disabled.def
      mysql-test/suite/innodb/t/innodb.test
      mysql-test/suite/innodb_plugin/r/innodb.result
      mysql-test/suite/innodb_plugin/t/innodb.test
      mysql-test/suite/manual/r/rpl_replication_delay.result
      mysql-test/suite/manual/t/rpl_replication_delay.test
      mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result
      mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result
      mysql-test/suite/parts/r/rpl_partition.result
      mysql-test/suite/parts/t/rpl_partition.test
      mysql-test/suite/rpl/include/rpl_mixed_ddl.inc
      mysql-test/suite/rpl/include/rpl_mixed_dml.inc
      mysql-test/suite/rpl/r/rpl_binlog_grant.result
      mysql-test/suite/rpl/r/rpl_bug33931.result
      mysql-test/suite/rpl/r/rpl_change_master.result
      mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
      mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
      mysql-test/suite/rpl/r/rpl_empty_master_crash.result
      mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
      mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
      mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
      mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
      mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
      mysql-test/suite/rpl/r/rpl_flushlog_loop.result
      mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
      mysql-test/suite/rpl/r/rpl_grant.result
      mysql-test/suite/rpl/r/rpl_incident.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
      mysql-test/suite/rpl/r/rpl_replicate_do.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
      mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
      mysql-test/suite/rpl/r/rpl_row_colSize.result
      mysql-test/suite/rpl/r/rpl_row_create_table.result
      mysql-test/suite/rpl/r/rpl_row_drop.result
      mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
      mysql-test/suite/rpl/r/rpl_row_log.result
      mysql-test/suite/rpl/r/rpl_row_log_innodb.result
      mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
      mysql-test/suite/rpl/r/rpl_row_reset_slave.result
      mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
      mysql-test/suite/rpl/r/rpl_row_until.result
      mysql-test/suite/rpl/r/rpl_skip_error.result
      mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
      mysql-test/suite/rpl/r/rpl_slave_skip.result
      mysql-test/suite/rpl/r/rpl_sp.result
      mysql-test/suite/rpl/r/rpl_ssl.result
      mysql-test/suite/rpl/r/rpl_ssl1.result
      mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
      mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result
      mysql-test/suite/rpl/r/rpl_stm_log.result
      mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
      mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
      mysql-test/suite/rpl/r/rpl_stm_until.result
      mysql-test/suite/rpl/r/rpl_temporary_errors.result
      mysql-test/suite/rpl/t/rpl_binlog_grant.test
      mysql-test/suite/rpl/t/rpl_bug33931.test
      mysql-test/suite/rpl/t/rpl_change_master.test
      mysql-test/suite/rpl/t/rpl_critical_errors.test
      mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
      mysql-test/suite/rpl/t/rpl_empty_master_crash.test
      mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
      mysql-test/suite/rpl/t/rpl_flushlog_loop.test
      mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
      mysql-test/suite/rpl/t/rpl_grant.test
      mysql-test/suite/rpl/t/rpl_incident.test
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
      mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
      mysql-test/suite/rpl/t/rpl_log_pos.test
      mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
      mysql-test/suite/rpl/t/rpl_replicate_do.test
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
      mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
      mysql-test/suite/rpl/t/rpl_row_create_table.test
      mysql-test/suite/rpl/t/rpl_row_drop.test
      mysql-test/suite/rpl/t/rpl_row_until.test
      mysql-test/suite/rpl/t/rpl_skip_error.test
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
      mysql-test/suite/rpl/t/rpl_slave_skip.test
      mysql-test/suite/rpl/t/rpl_sp.test
      mysql-test/suite/rpl/t/rpl_ssl.test
      mysql-test/suite/rpl/t/rpl_ssl1.test
      mysql-test/suite/rpl/t/rpl_stm_until.test
      mysql-test/suite/rpl/t/rpl_temporary_errors.test
      mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
      mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
      mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result
      mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test
      mysql-test/suite/sys_vars/r/tx_isolation_func.result
      mysql-test/suite/sys_vars/t/tx_isolation_func.test
      mysql-test/t/alter_table-big.test
      mysql-test/t/bug39022.test
      mysql-test/t/create-big.test
      mysql-test/t/ctype_cp932_binlog_stm.test
      mysql-test/t/disabled.def
      mysql-test/t/flush_block_commit_notembedded.test
      mysql-test/t/innodb_mysql.test
      mysql-test/t/join_outer.test
      mysql-test/t/multi_update.test
      mysql-test/t/partition_error.test
      mysql-test/t/ps_3innodb.test
      mysql-test/t/renamedb.test
      mysql-test/t/sp_trans_log.test
      mysql-test/t/type_time.test
      mysql-test/t/upgrade.test
      mysql-test/valgrind.supp
      mysys/safemalloc.c
      sql/field.cc
      sql/ha_partition.cc
      sql/mysql_priv.h
      sql/net_serv.cc
      sql/sql_base.cc
      sql/sql_parse.cc
      sql/sql_select.cc
      sql/sql_table.cc
      sql/sql_update.cc
      sql/table.cc
      sql/table.h
      storage/innobase/buf/buf0flu.c
      storage/innobase/dict/dict0dict.c
      storage/innobase/fsp/fsp0fsp.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/ha_innodb.h
      storage/innobase/include/db0err.h
      storage/innobase/include/dict0dict.h
      storage/innobase/include/mach0data.ic
      storage/innobase/include/row0mysql.h
      storage/innobase/include/trx0trx.h
      storage/innobase/include/univ.i
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0sel.c
      storage/innobase/srv/srv0srv.c
      storage/innobase/srv/srv0start.c
      storage/innobase/trx/trx0trx.c
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/btr/btr0btr.c
      storage/innodb_plugin/btr/btr0cur.c
      storage/innodb_plugin/buf/buf0buddy.c
      storage/innodb_plugin/buf/buf0buf.c
      storage/innodb_plugin/buf/buf0flu.c
      storage/innodb_plugin/buf/buf0lru.c
      storage/innodb_plugin/dict/dict0boot.c
      storage/innodb_plugin/dict/dict0crea.c
      storage/innodb_plugin/dict/dict0dict.c
      storage/innodb_plugin/fil/fil0fil.c
      storage/innodb_plugin/fsp/fsp0fsp.c
      storage/innodb_plugin/handler/ha_innodb.cc
      storage/innodb_plugin/handler/ha_innodb.h
      storage/innodb_plugin/handler/handler0alter.cc
      storage/innodb_plugin/include/buf0buf.ic
      storage/innodb_plugin/include/buf0lru.h
      storage/innodb_plugin/include/dict0boot.h
      storage/innodb_plugin/include/dict0dict.h
      storage/innodb_plugin/include/fil0fil.h
      storage/innodb_plugin/include/ha_prototypes.h
      storage/innodb_plugin/include/mach0data.ic
      storage/innodb_plugin/include/rem0cmp.h
      storage/innodb_plugin/include/row0mysql.h
      storage/innodb_plugin/include/trx0trx.h
      storage/innodb_plugin/include/univ.i
      storage/innodb_plugin/page/page0zip.c
      storage/innodb_plugin/rem/rem0cmp.c
      storage/innodb_plugin/row/row0merge.c
      storage/innodb_plugin/row/row0mysql.c
      storage/innodb_plugin/row/row0sel.c
      storage/innodb_plugin/setup.sh
      storage/innodb_plugin/srv/srv0srv.c
      storage/innodb_plugin/sync/sync0arr.c
      storage/innodb_plugin/trx/trx0i_s.c
      storage/innodb_plugin/trx/trx0trx.c
      tests/mysql_client_test.c
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2010-06-15 11:37:53 +0000
+++ b/mysql-test/mysql-test-run.pl	2010-08-02 10:43:28 +0000
@@ -3006,7 +3006,8 @@ sub check_testcase($$)
   my %started;
   foreach my $mysqld ( mysqlds() )
   {
-    if ( defined $mysqld->{'proc'} )
+    # Skip if server has been restarted with additional options
+    if ( defined $mysqld->{'proc'} && ! exists $mysqld->{'restart_opts'} )
     {
       my $proc= start_check_testcase($tinfo, $mode, $mysqld);
       $started{$proc->pid()}= $proc;
@@ -3791,7 +3792,8 @@ sub extract_warning_lines ($$) {
     if ($opt_valgrind_mysqld) {
       # Skip valgrind summary from tests where server has been restarted
       # Should this contain memory leaks, the final report will find it
-      $skip_valgrind= 1 if $line =~ /^==\d+== ERROR SUMMARY:/;
+      # Use a generic pattern for summaries
+      $skip_valgrind= 1 if $line =~ /^==\d+== [A-Z ]+ SUMMARY:/;
       $skip_valgrind= 0 unless $line =~ /^==\d+==/;
       next if $skip_valgrind;
     }
@@ -4001,6 +4003,16 @@ sub check_expected_crash_and_restart {
 	  next;
 	}
 
+	# If last line begins "restart:", the rest of the line is read as
+        # extra command line options to add to the restarted mysqld.
+        # Anything other than 'wait' or 'restart:' (with a colon) will
+        # result in a restart with original mysqld options.
+	if ($last_line =~ /restart:(.+)/) {
+	  my @rest_opt= split(' ', $1);
+	  $mysqld->{'restart_opts'}= \@rest_opt;
+	} else {
+	  delete $mysqld->{'restart_opts'};
+	}
 	unlink($expect_file);
 
 	# Start server with same settings as last time
@@ -4345,7 +4357,13 @@ sub mysqld_start ($$) {
   }
 
   mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
-  mysqld_arguments($args,$mysqld,$extra_opts);
+
+  # Add any additional options from an in-test restart
+  my @all_opts= @$extra_opts;
+  if (exists $mysqld->{'restart_opts'}) {
+    push (@all_opts, @{$mysqld->{'restart_opts'}});
+  }
+  mysqld_arguments($args,$mysqld,\@all_opts);
 
   if ( $opt_debug )
   {
@@ -4526,7 +4544,10 @@ sub server_need_restart {
     my $extra_opts= get_extra_opts($server, $tinfo);
     my $started_opts= $server->{'started_opts'};
 
-    if (!My::Options::same($started_opts, $extra_opts) )
+    # Also, always restart if server had been restarted with additional
+    # options within test.
+    if (!My::Options::same($started_opts, $extra_opts) ||
+        exists $server->{'restart_opts'})
     {
       my $use_dynamic_option_switch= 0;
       if (!$use_dynamic_option_switch)


Attachment: [text/bzr-bundle] bzr/bjorn.bunch@oracle.com-20100802104328-o0ahgbl5dedm7xzz.bundle
Thread
bzr push into mysql-5.1-mtr branch (bjorn.bunch:2918 to 2920) Bug#55597Bjorn Munch2 Aug