mariadb/mysql-test/extra/rpl_tests
Sven Sandberg d20aba9409 BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild
Problem 1: The test waits for an error in the slave sql thread,
then resolves the error and issues 'start slave'. However, there
is a gap between when the error is reported and the slave sql
thread stops. If this gap was long, the slave would still be
running when 'start slave' happened, so 'start slave' would fail
and cause a test failure.
Fix 1: Made wait_for_slave_sql_error wait for the slave to stop
instead of wait for error in the IO thread. After stopping, the
error code is verified. If the error code is wrong, debug info
is printed. To print debug info, the debug printing code in
wait_for_slave_param.inc was moved out to a new file,
show_rpl_debug_info.inc.
Problem 2: rpl_stm_mystery22 is a horrible name, the comments in
the file didn't explain anything useful, the test was generally
hard to follow, and the test was essentially duplicated between
rpl_stm_mystery22 and rpl_row_mystery22.
Fix 2: The test is about conflicts in the slave SQL thread,
hence I renamed the tests to rpl_{stm,row}_conflicts. Refactored
the test so that the work is done in
extra/rpl_tests/rpl_conflicts.inc, and
rpl.rpl_{row,stm}_conflicts merely sets some variables and then
sourced extra/rpl_tests/rpl_conflicts.inc.
The tests have been rewritten and comments added.
Problem 3: When calling wait_for_slave_sql_error.inc, you always
want to verify that the sql thread stops because of the expected
error and not because of some other error. Currently,
wait_for_slave_sql_error.inc allows the caller to omit the error
code, in which case all error codes are accepted.
Fix 3: Made wait_for_slave_sql_error.inc fail if no error code
is given. Updated rpl_filter_tables_not_exist accordingly.
Problem 4: rpl_filter_tables_not_exist had a typo, the dollar
sign was missing in a 'let' statement.
Fix 4: Added dollar sign.
Problem 5: When replicating from other servers than the one named
'master', the wait_for_slave_* macros were unable to print debug
info on the master.
Fix 5: Replace parameter $slave_keep_connection by
$master_connection.


mysql-test/extra/rpl_tests/rpl_conflicts.test:
  rpl_stm_mystery22 and rpl_row_mystery22 have now been refactored and renamed:
  The two test cases rpl.rpl_stm_conflicts.test and rpl.rpl_row_conflicts.test
  just set some parameters, and then source include/rpl_tests/rpl_conflicts.test.
  Also, cleaned up the test case a bit, and fixed BUG#37718.
mysql-test/include/show_rpl_debug_info.inc:
  Factored out the debug printing code from wait_for_slave_param.inc to
  a new file, show_rpl_debug_info.inc.
  Also removed the $slave_keep_connection parameter, and replaced it by
  $master_connection. This allows printing debug info on the master, no
  matter what the name of the master connection is.
mysql-test/include/start_slave.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/stop_slave.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/sync_slave_io_with_master.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_io_to_start.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_io_to_stop.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_param.inc:
  Factored out the debug printing code from wait_for_slave_param.inc to
  a new file, show_rpl_debug_info.inc.
  Also removed the $slave_keep_connection parameter, and replaced it by
  $master_connection. This allows printing debug info on the master, no
  matter what the name of the master connection is.
  Had to move the printing of debug info out of the while loop because
  of BUG number 41913.
mysql-test/include/wait_for_slave_sql_error.inc:
  Made it wait until the slave sql thread has stopped. This
  takes very short time and avoids race condition bugs in
  test cases (e.g., fixes BUG#37718).
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_sql_error_and_skip.inc:
  Since wait_for_slave_sql_error now waits for the slave sql
  thread to stop too, wait_for_slave_sql_error_and_skip does not
  have to wait for the slave sql thread to stop.
  Also, since wait_for_slave_sql_error now requires the parameter
  $slave_sql_errno to be set, wait_for_slave_sql_error_and_skip
  requires that as well: updated the usage instructions.
mysql-test/include/wait_for_slave_sql_to_start.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_sql_to_stop.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_to_start.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_to_stop.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/suite/rpl/r/rpl_row_conflicts.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_conflicts.result:
  update result file
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test:
  Set $slave_sql_errno, since it is now required.
  Add dollar sign to $show_sql_error (without dollar sign,
  mtr makes it an environment variable).
mysql-test/suite/rpl/t/rpl_row_conflicts.test:
  rpl_stm_mystery22 and rpl_row_mystery22 have now been refactored and renamed:
  The two test cases rpl.rpl_stm_conflicts.test and rpl.rpl_row_conflicts.test
  just set some parameters, and then source include/rpl_tests/rpl_conflicts.test.
  Also, cleaned up the test case a bit, and fixed BUG#37718.
mysql-test/suite/rpl/t/rpl_row_mystery22.test:
  rpl_stm_mystery22 and rpl_row_mystery22 have now been refactored and renamed:
  The two test cases rpl.rpl_stm_conflicts.test and rpl.rpl_row_conflicts.test
  just set some parameters, and then source include/rpl_tests/rpl_conflicts.test.
  Also, cleaned up the test case a bit, and fixed BUG#37718.
mysql-test/suite/rpl/t/rpl_stm_conflicts.test:
  rpl_stm_mystery22 and rpl_row_mystery22 have now been refactored and renamed:
  The two test cases rpl.rpl_stm_conflicts.test and rpl.rpl_row_conflicts.test
  just set some parameters, and then source include/rpl_tests/rpl_conflicts.test.
  Also, cleaned up the test case a bit, and fixed BUG#37718.
2009-01-09 15:12:31 +01:00
..
rpl_auto_increment.test Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1 2007-06-06 10:57:07 -07:00
rpl_blackhole.test Bug #38360: BLACKHOLE replication with RBR is broken 2008-10-02 21:13:15 +02:00
rpl_charset.test Fix after merge 2008-02-28 18:55:46 +01:00
rpl_commit_after_flush.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_conflicts.test BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
rpl_ddl.test Upmerge 5.0 -> 5.1 of fix for 2008-08-25 15:09:51 +02:00
rpl_deadlock.test Test case fix to replication team tree. 2007-06-21 14:39:40 +02:00
rpl_delete_no_where.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_EE_err.test Merging 5.1 main into 5.1-rpl 2008-10-23 21:27:09 +02:00
rpl_extraMaster_Col.test BUG#37975: wait_for_slave_* should increase the timeout 2008-07-10 18:09:39 +02:00
rpl_extraSlave_Col.test BUG#37975: wait_for_slave_* should increase the timeout 2008-07-10 18:09:39 +02:00
rpl_failed_optimize.test Don't use row level logging on optimize or repair table. 2006-05-05 20:08:40 +03:00
rpl_flsh_tbls.test Bug#41108: It is a testcase timeout bug so the patch fixes test code in places 2008-12-12 14:34:18 +03:00
rpl_foreign_key.test Bug#31552 Replication breaks when deleting rows from out-of-sync table 2007-12-12 12:14:59 +02:00
rpl_insert_delayed.test fixing the 5.1-opt merge of the fix for bug 29571: 2007-07-27 17:29:48 +03:00
rpl_insert_id.test Bug #32124: crash if prepared statements refer to variables in the where clause 2008-10-08 14:23:53 +03:00
rpl_insert_id_pk.test Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1 2007-06-06 10:57:07 -07:00
rpl_insert_ignore.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_loaddata.test BUG#38350: Many tests don't clean up after themselves on exit. 2008-11-13 20:19:00 +01:00
rpl_log.test Post-merge fixes to fix test cases. 2008-10-29 18:38:18 +01:00
rpl_max_relay_size.test Fix for versional test 2008-01-14 15:38:02 +08:00
rpl_multi_query.test Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl 2007-03-29 21:38:03 +02:00
rpl_multi_update.test
rpl_multi_update2.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_multi_update3.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_ndb_2multi_basic.test BUG#21842 (Cluster fails to replicate to innodb or myisam with err 134 2007-08-26 14:31:10 +02:00
rpl_ndb_2multi_eng.test Problem: pushbuild has sporadic errors during startup of 2008-02-11 15:14:24 +01:00
rpl_ndb_apply_status.test correct merge error 2008-02-14 00:02:25 +01:00
rpl_partition.test
rpl_relayrotate.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_reset_slave.test Fix for versional test 2008-01-14 15:38:02 +08:00
rpl_row_001.test Use absolute path to allow tets to be run also when datadir differs 2007-12-19 09:42:31 +01:00
rpl_row_basic.test bug#38230 2008-11-06 19:10:09 +02:00
rpl_row_blob.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_row_delayed_ins.test BUG#29020 (Event results not correctly replicated to slave in RBR): 2008-03-28 13:16:41 +01:00
rpl_row_func003.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_row_sp002.test Bug #32307 mysqltest - does not detect illegal if syntax 2008-08-04 12:38:50 +02:00
rpl_row_sp003.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_row_sp006.test fixes Bug #25305 (and several other similar test tailures with the same symptom) 2007-06-18 15:36:10 +02:00
rpl_row_sp007.test
rpl_row_tabledefs.test Bug #34654 RESET SLAVE and STOP SLAVE/START SLAVE does not clear Last_XYZ_Errno 2008-03-14 21:02:52 +01:00
rpl_row_UUID.test BUG#28722 (Multi-engine statements on has_own_binlogging engine): 2007-06-22 01:39:23 +02:00
rpl_stm_000001.test WL#4189 2007-12-12 18:19:24 +01:00
rpl_stm_EE_err2.test BUG#38350: Many tests don't clean up after themselves on exit. 2008-11-13 20:19:00 +01:00
rpl_sv_relay_space.test
rpl_trig004.test Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1 2007-06-06 10:57:07 -07:00
rpl_truncate.test WL#3618 - Remove HAVE_ROW_BASED_REPLICATION from source code. 2006-12-07 09:18:35 -05:00
rpl_truncate_helper.test BUG#38350: Many tests don't clean up after themselves on exit. 2008-11-13 20:19:00 +01:00