mariadb/mysql-test/extra/rpl_tests
Davi Arnaut 7d64c36486 Bug#56096: STOP SLAVE hangs if executed in parallel with user sleep
The root of the problem is that to interrupt a slave SQL thread
wait, the STOP SLAVE implementation uses thd->awake(THD::NOT_KILLED).
This appears as a spurious wakeup (e.g. from a sleep on a
condition variable) to the code that the slave SQL thread is
executing at the time of the STOP. If the code is not written
to be spurious-wakeup safe, unexpected behavior can occur. For
the reported case, this problem led to an infinite loop around
the interruptible_wait() function in item_func.cc (SLEEP()
function implementation).  The loop was not being properly
restarted and, consequently, would not come to an end. Since the
SLEEP function sleeps on a timed event in order to be killable
and to perform periodic checks until the requested time has
elapsed, the spurious wake up was causing the requested sleep
time to be reset every two seconds.

The solution is to calculate the requested absolute time only
once and to ensure that the thread only sleeps until this
time is elapsed. In case of a spurious wake up, the sleep is
restarted using the previously calculated absolute time. This
restores the behavior present in previous releases. If a slave
thread is executing a SLEEP function, a STOP SLAVE statement
will wait until the time requested in the sleep function
has elapsed.
2010-10-13 22:54:07 -03:00
..
check_type.inc WL#5151: Conversion between different types when replicating 2009-12-14 12:04:55 +01:00
create_recursive_construct.inc Bug #54579 Wrong unsafe warning for INSERT DELAYED in SBR 2010-08-30 14:03:28 +08:00
rpl_auto_increment.test BUG#45999 Row based replication fails when auto_increment field = 0 2009-09-10 18:05:53 +08:00
rpl_auto_increment_insert_view.test Bug #45677 Slave stops with Duplicate entry for key PRIMARY when using trigger 2009-10-01 07:19:36 +08:00
rpl_auto_increment_invoke_trigger.test Bug #45677 Slave stops with Duplicate entry for key PRIMARY when using trigger 2009-10-01 07:19:36 +08:00
rpl_autoinc_func_invokes_trigger.test Bug #45677 Slave stops with Duplicate entry for key PRIMARY when using trigger 2009-10-01 07:19:36 +08:00
rpl_binlog_max_cache_size.test Manual merge 2010-10-09 18:18:16 +08:00
rpl_blackhole.test Bug #38360: BLACKHOLE replication with RBR is broken 2008-10-02 21:13:15 +02:00
rpl_charset.test WL#4738 streamline/simplify @@variable creation process 2009-12-22 10:35:56 +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#54935 2010-07-16 21:25:00 +03:00
rpl_ddl.test Upmerge 5.0 -> 5.1 of fix for 2008-08-25 15:09:51 +02:00
rpl_deadlock.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08: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_drop_create_temp_table.inc BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with 2010-08-20 03:59:58 +01:00
rpl_drop_create_temp_table.test BUG#53452 Inconsistent behavior of binlog_direct_non_transactional_updates with 2010-08-20 03:59:58 +01: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 Manual merge 2010-05-26 22:34:25 +08:00
rpl_extraSlave_Col.test Manual merge 2010-05-26 22:34:25 +08:00
rpl_failed_optimize.test BUG#44661: rpl_ndb.rpl_ndb_circular_simplex fails because of 2009-09-27 23:03:05 +01:00
rpl_flsh_tbls.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_foreign_key.test BUG#39934: Slave stops for engine that only support row-based logging 2009-07-14 21:31:19 +02:00
rpl_get_master_version_and_clock.test Postfix for BUG#49741 2010-05-28 10:57:45 +08:00
rpl_implicit_commit_binlog.test BUG#51894 Replication failure with SBR on DROP TEMPORARY TABLE inside a 2010-04-20 10:10:43 +01:00
rpl_innodb.test Part of fix for bug#52044 "FLUSH TABLES WITH READ LOCK and 2010-08-06 15:29:37 +04:00
rpl_insert_delayed.test Postfix for bug49741 2010-06-08 10:27:34 +08:00
rpl_insert_id.test BUG#50670: Slave stops with error code 1644 2010-04-28 14:47:49 +02: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 WL#2687 WL#5072 BUG#40278 BUG#47175 2009-11-03 19:02:56 +00:00
rpl_loaddata.test Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile 2010-08-03 10:22:19 +08:00
rpl_loadfile.test BUG#39701: Mixed binlog format does not switch to row mode on 2009-03-24 18:27:33 +00:00
rpl_log.test Manual merge 2010-05-26 22:34:25 +08:00
rpl_max_relay_size.test Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
rpl_mixing_engines.inc BUG#46364 MyISAM transbuffer problems (NTM problem) 2010-01-20 19:08:16 +00:00
rpl_mixing_engines.test BUG#50670: Slave stops with error code 1644 2010-04-28 14:47:49 +02: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 WL#1012: All changes as one single changeset. 2005-12-22 06:39:02 +01:00
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 Manual merge 2010-05-26 22:34:25 +08:00
rpl_not_null.test BUG#48091 valgrind errors when slave has double not null and master has double null 2009-10-22 01:19:52 +01:00
rpl_partition.test Bug#18436 (RBR: Replication to partition engine triggers assertion on slave): 2006-03-27 14:58:37 +02:00
rpl_record_compare.test BUG#52868: Wrong handling of NULL value during update, replication out 2010-04-21 13:47:55 +01:00
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 Manual merge 2010-05-26 22:34:25 +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 Manual merge 2010-05-26 22:34:25 +08:00
rpl_row_blob.test Backport for WL#4416 2009-11-27 02:32:01 +03: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 Manual merge from mysql-trunk-merge. 2010-01-19 19:36:14 +03: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 Backport for WL#4416 2009-11-27 02:32:01 +03:00
rpl_row_sp006.test Backport fixes for the follow tests 2009-10-02 17:24:21 +08:00
rpl_row_sp007.test WL#1012: All changes as one single changeset. 2005-12-22 06:39:02 +01:00
rpl_row_tabledefs.test Manual merge 2010-05-26 22:34:25 +08:00
rpl_row_UUID.test BUG#28722 (Multi-engine statements on has_own_binlogging engine): 2007-06-22 01:39:23 +02:00
rpl_set_null.test BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete: 2010-01-21 17:20:24 +00:00
rpl_show_relaylog_events.inc Manual merge 2010-05-26 22:34:25 +08:00
rpl_start_stop_slave.test Bug#56096: STOP SLAVE hangs if executed in parallel with user sleep 2010-10-13 22:54:07 -03:00
rpl_stm_000001.test BUG#50670: Slave stops with error code 1644 2010-04-28 14:47:49 +02: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_stop_middle_group.test BUG#50670: Slave stops with error code 1644 2010-04-28 14:47:49 +02:00
rpl_sv_relay_space.test Bug#16993 (ALTER TABLE ZEROFILL AUTO_INCREMENT not replicated correctly): 2006-04-19 15:29:49 +02:00
rpl_tmp_table_and_DDL.test Bug #49132 Replication failure on temporary table + DDL 2010-01-22 17:38:21 +08:00
rpl_trig004.test Backport for WL#4416 2009-11-27 02:32:01 +03:00
rpl_truncate.test Bug #36763 2009-02-06 17:06:41 +01:00
rpl_truncate_helper.test Bug #36763 2009-02-06 17:06:41 +01:00
type_conversions.test BUG#49836: Replication of geometric fields is broken after WL#5151 2009-12-24 01:07:35 +00:00