mariadb/mysql-test/suite/binlog/r
Kristian Nielsen b03469a9cf MDEV-34705: Binlog-in-engine: Protect against concurrent RESET MASTER and dump threads
This is actually an existing problem in the old binlog implementation, and
this patch is applicable to old binlog also. The problem is that RESET
MASTER can run concurrently with binlog dump threads / connected slaves.
This will remove the binlog from under the feet of the reader, which can
cause all sorts of strange behaviour.

This patch fixes the problem by disallowing to run RESET MASTER when dump
threads (or other RESET MASTER or SHOW BINARY LOGS) are running. An error is
thrown in this case, user must stop slaves and/or kill dump threads to make
the RESET MASTER go through. A slave that connects in the middle of RESET
MASTER will wait for it to complete.

Fix a lot of test cases to kill any lingering dump threads before doing
RESET MASTER, mostly just by sourcing include/kill_binlog_dump_threads.inc.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-07-03 14:44:52 +02:00
..
backup.result Fix that BACKUP STAGE BLOCK_COMMIT flushes binary log 2019-11-01 10:22:30 +02:00
binlog_1pc.result MDEV-28948 FLUSH BINARY LOGS waits/hangs on mysql_mutex_unlock(&LOCK_index) 2022-07-26 10:46:01 +03:00
binlog_admin_cmd_kill.result MDEV-22530: Aborting OPTIMIZE TABLE still logs in binary log and replicates to the Slave server. 2021-05-19 14:21:49 +05:30
binlog_autocommit_off_no_hang.result DBAAS-7828: Primary/replica: configuration change of autocommit=0 can not be applied 2022-03-24 12:00:40 -06:00
binlog_base64_flag.result Merge 10.10 into 10.11 2023-03-29 16:53:37 +03:00
binlog_bug23533.result Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
binlog_bug36391.result WL#5867, reorganize test cases of bugs suite 2011-04-14 00:18:08 +04:00
binlog_checkpoint.result MDEV-34705: Binlog-in-engine: Protect against concurrent RESET MASTER and dump threads 2025-07-03 14:44:52 +02:00
binlog_checkpoint_flush_logs.result Merge 10.3 into 10.4 2021-04-22 07:51:33 +03:00
binlog_checksum.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_commit_wait.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_database.result MDEV-9077 Use sys schema in bootstrapping, incl. mtr 2021-03-18 08:02:48 +01:00
binlog_delete_and_flush_index.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_dmls_on_tmp_tables_readonly.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
binlog_drop_if_exists.result Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
binlog_empty_xa_prepared.result MDEV-32257 dangling XA-rollback in binlog from emtpy XA in pseudo_slave_mode 2023-09-29 15:54:09 +03:00
binlog_expire_logs_seconds.result MDEV-19371: Implement binlog_expire_logs_seconds for purging of binary logs 2021-05-17 12:48:37 +05:30
binlog_expire_warnings.result MDEV-19371: Implement binlog_expire_logs_seconds for purging of binary logs 2021-05-10 09:36:40 +05:30
binlog_flush_binlogs_delete_domain.result MDEV-34504 PURGE BINARY LOGS not working anymore 2024-07-10 18:50:08 +03:00
binlog_format_switch_in_tmp_table.result Bug #45855 row events in binlog after switch from binlog_fmt=mix to stmt with open tmp tbl 2010-01-26 17:41:15 +08:00
binlog_gis_user_var_stm.result MDEV-27666 User variable not parsed as geometry variable in geometry function 2024-01-16 18:53:23 +04:00
binlog_grant.result MDEV-29668 SUPER should not allow actions that have fine-grained dedicated privileges 2023-02-06 14:31:48 +01:00
binlog_gtid_delete_domain_debug.result never add new error messages to old GA releases! 2017-11-19 14:43:17 +01:00
binlog_gtid_index.result MDEV-4991: GTID binlog indexing 2024-01-27 12:09:54 +01:00
binlog_gtid_index_crash.result MDEV-4991: GTID binlog indexing 2024-01-27 12:09:54 +01:00
binlog_implicit_commit.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_incident.result
binlog_index.result MDEV-34504 PURGE BINARY LOGS not working anymore 2024-07-10 18:50:08 +03:00
binlog_innodb.result MDEV-11937: InnoDB flushes redo log too often 2017-08-07 18:23:55 +02:00
binlog_innodb_row.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_innodb_stm.result MDEV-18466 Unsafe to log updates on tables referenced by foreign keys with triggers in statement format 2019-03-27 22:51:37 +01:00
binlog_invalid_read_in_rotate.result After-merge fix: Actually apply the changes 2020-01-08 17:09:31 +05:30
binlog_ioerr.result MDEV-31273: Precompute binlog checksums 2023-10-27 19:57:43 +02:00
binlog_killed.result MDEV-14822 binlog.binlog_killed fails with wrong result 2018-01-10 14:41:10 +02:00
binlog_killed_simulate.result cleanup: binlog.binlog_killed_simulate 2016-12-29 13:23:42 +01:00
binlog_max_binlog_stmt_cache_size.result Mdev-4774- Fix tests cases 2017-01-31 10:12:22 +05:30
binlog_max_extension.result enforce no trailing \n in Diagnostic_area messages 2025-01-07 16:31:39 +01:00
binlog_mdev342.result MDEV-515 Reduce InnoDB undo logging for insert into empty table 2021-01-25 18:41:27 +02:00
binlog_mdev717.result Merge branch '10.1' into 10.2 2019-05-04 17:04:55 +02:00
binlog_mdev25611.result MDEV-25611: RESET MASTER causes the server to hang 2024-09-27 15:10:06 +02:00
binlog_mixed.result BINLOG with LOCK TABLES and SAVEPOINT could cause a crash in debug bin 2020-06-14 19:39:43 +03:00
binlog_mixed_cache_stat.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_mixed_load_data.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_mysqlbinlog-cp932.result BUG#14659685 - main.mysqlbinlog_row_myisam and 2012-10-30 10:40:07 +05:30
binlog_mysqlbinlog2.result MDEV-29732 mysqlbinlog produces syntactically incorrect output with system_versioning_insert_history 2022-10-26 15:30:38 +02:00
binlog_mysqlbinlog_base64.result BUG#14659685 - main.mysqlbinlog_row_myisam and 2012-10-30 10:40:07 +05:30
binlog_mysqlbinlog_do_server_ids.result MDEV-20119: Implement the --do-domain-ids, --ignore-domain-ids, and --ignore-server-ids options for mysqlbinlog 2022-04-19 11:09:24 -06:00
binlog_mysqlbinlog_glle_ordered.result MDEV-4989: Support for GTID in mysqlbinlog 2022-01-31 09:30:23 -07:00
binlog_mysqlbinlog_gtid_strict_mode.result MDEV-4989: Support for GTID in mysqlbinlog 2022-01-31 09:30:23 -07:00
binlog_mysqlbinlog_gtid_window.result MDEV-4989: Support for GTID in mysqlbinlog 2022-01-31 09:30:23 -07:00
binlog_mysqlbinlog_raw_flush.result Merge remote-tracking branch '11.3' into 11.4 2023-12-21 15:40:55 +01:00
binlog_mysqlbinlog_row.result Merge branch '11.1' into 11.2 2024-08-03 09:50:16 +02:00
binlog_mysqlbinlog_row_frag.result Merge 10.3 into 10.4 2020-05-19 21:18:15 +03:00
binlog_mysqlbinlog_row_innodb.result Merge branch '11.1' into 11.2 2024-08-03 09:50:16 +02:00
binlog_mysqlbinlog_row_myisam.result Merge branch '11.1' into 11.2 2024-08-03 09:50:16 +02:00
binlog_mysqlbinlog_row_trans.result Merge branch '11.1' into 11.2 2024-08-03 09:50:16 +02:00
binlog_mysqlbinlog_start_alter_verbose.result MDEV-11675. Convert the new session var to bool type and test changes 2022-01-31 22:57:39 +02:00
binlog_mysqlbinlog_stop_never.result MDEV-11154: Write_on_release_cache(log_event.cc) function will not write "COMMIT", if use "mysqlbinlog ... | mysql ..." 2019-07-15 13:30:10 +05:30
binlog_mysqlbinlog_suppress_O_TMPFILE.result MDEV-23846: O_TMPFILE error in mysqlbinlog stream output breaks restore 2020-11-23 12:16:45 +05:30
binlog_mysqlbinlog_warn_stop_datetime.result MDEV-34705: Binlog-in-engine: Protect against concurrent RESET MASTER and dump threads 2025-07-03 14:44:52 +02:00
binlog_mysqlbinlog_warn_stop_position.result MDEV-35528: mariadb-binlog cannot process more than 1 logfiles when --stop-datetime is specified 2025-01-12 11:03:10 -07:00
binlog_no_uniqfile_crash.result enforce no trailing \n in Diagnostic_area messages 2025-01-07 16:31:39 +01:00
binlog_parallel_replication_ddl.result MDEV-27365 CREATE-or-REPLACE SEQUENCE is binlogged without DDL flag 2022-01-03 17:39:23 +02:00
binlog_parallel_replication_marks_row.result Revert "MDEV-7850: Extend GTID Binlog Events with Thread Id" 2024-02-05 05:56:53 -07:00
binlog_parallel_replication_marks_stm_mix.result Revert "MDEV-7850: Extend GTID Binlog Events with Thread Id" 2024-02-05 05:56:53 -07:00
binlog_query_filter_rules.result BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
binlog_recover_checksum_error.result Merge 10.3 into 10.4 2020-10-22 13:27:18 +03:00
binlog_rotate_perf.result MDEV-19117 Don't keep binary log index file locked during show binary logs 2019-04-01 19:47:24 +03:00
binlog_row_annotate.result Merge branch '10.6' into 10.11 2024-07-22 15:14:50 +02:00
binlog_row_binlog.result Revert MDEV-25292 Atomic CREATE OR REPLACE TABLE 2022-10-27 23:13:41 +02:00
binlog_row_cache_stat.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_row_ctype_cp932.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
binlog_row_ctype_ucs.result Merge branch '11.1' into 11.2 2024-08-03 09:50:16 +02:00
binlog_row_drop_tbl.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_row_drop_tmp_tbl.result Merge 10.1 into 10.2 2019-08-28 15:23:21 +03:00
binlog_row_img.result Merge branch '11.2' into 11.4 2024-05-21 19:38:51 +02:00
binlog_row_insert_select.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_row_mix_innodb_myisam.result Merge 10.1 into 10.2 2019-07-25 12:14:27 +03:00
binlog_row_mysqlbinlog_db_filter.result
binlog_row_mysqlbinlog_options.result Merge branch '10.6' into 10.11 2024-07-22 15:14:50 +02:00
binlog_row_mysqlbinlog_verbose.result BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
binlog_server_id.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_sf.result BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
binlog_show_binlog_event_random_pos.result enforce no trailing \n in Diagnostic_area messages 2025-01-07 16:31:39 +01:00
binlog_show_binlog_events_invalid_offset_silent.result MDEV-32628: Cryptic ERROR message & inconsistent behavior on incorrect SHOW BINLOG EVENTS FROM ... 2023-11-17 09:43:56 -08:00
binlog_spurious_ddl_errors.result MDEV-33658 1/2 Refactoring: extract Key length initialization 2025-01-26 16:15:46 +01:00
binlog_sql_mode.result MDEV-19265 Server should throw warning if event is created and event_scheduler = OFF 2019-04-28 12:49:59 +02:00
binlog_start_comment.result
binlog_statement_insert_delayed.result MDEV-25363 binlog_stm_datetime_ranges_mdev15289 failed in bb 2021-04-14 09:15:41 +02:00
binlog_stm_binlog.result Merge 10.5 into 10.6 2022-12-13 16:58:58 +02:00
binlog_stm_blackhole.result MDEV-7317: Make an index ignorable to the optimizer 2021-03-04 22:50:00 +05:30
binlog_stm_cache_stat.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog_stm_ctype_cp932.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
binlog_stm_ctype_ucs.result Merge branch '11.1' into 11.2 2024-08-03 09:50:16 +02:00
binlog_stm_datetime_ranges_mdev15289.result MDEV 28970: Add RESET MASTER to clear possible remaining binlog from previous test 2022-11-09 16:34:55 +00:00
binlog_stm_do_db.result MDEV-21921 Make transaction_isolation and transaction_read_only into system variables 2023-04-12 11:04:29 +10:00
binlog_stm_drop_tbl.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_stm_drop_tmp_tbl.result Merge 10.1 into 10.2 2019-08-28 15:23:21 +03:00
binlog_stm_insert_select.result Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
binlog_stm_mix_innodb_myisam.result Remove end . from error messages to get them consistent 2016-10-05 01:11:08 +03:00
binlog_stm_mysqlbinlog_collate_implicit.result MDEV-30164 System variable for default collations 2023-07-17 14:56:17 +04:00
binlog_stm_ps.result MDEV-14467 Item_param: replace {INT|DECIMAL|REAL|STRING|TIME}_VALUE with Type_handler 2017-11-29 10:03:51 +04:00
binlog_stm_row.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_stm_sp.result MDEV-16020 SP variables inside GROUP BY..WITH ROLLUP break replication 2018-04-27 22:11:18 +04:00
binlog_stm_sp_type_row.result MDEV-12291 Allow ROW variables as SELECT INTO targets 2017-04-05 15:03:00 +04:00
binlog_stm_unsafe_warning.result MDEV-24617 OPTIMIZE on a sequence causes unexpected ER_BINLOG_UNSAFE_STATEMENT 2022-03-10 13:38:07 +02:00
binlog_stm_user_variables.result MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
binlog_switch_inside_trans.result Bug #15868071 USING SET GLOBAL SQL_LOG_BIN SHOULD NOT BE ALLOWED 2014-09-24 09:44:48 +08:00
binlog_table_map_optional_metadata.result Merge 10.9 into 10.10 2022-09-21 10:59:56 +03:00
binlog_table_map_optional_metadata_binary.result MDEV-29866: Add RESET MASTER to clear possible remaining binlog from previous test 2022-11-09 17:36:42 +00:00
binlog_table_map_optional_metadata_ucs2.result MDEV-29866: Add RESET MASTER to clear possible remaining binlog from previous test 2022-11-09 17:36:42 +00:00
binlog_table_map_optional_metadata_utf32.result MDEV-29866: Add RESET MASTER to clear possible remaining binlog from previous test 2022-11-09 17:36:42 +00:00
binlog_tmp_table.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_tmp_table_row.result MDEV-9266 Creating index on temporaray table breaks replication 2018-07-18 17:13:24 +05:30
binlog_trigger.result Ensure that one can drop a trigger with an orphan .TRN file 2021-05-19 22:54:13 +02:00
binlog_truncate_active_log.result MDEV-33465: an option to enable semisync recovery 2024-07-05 19:53:57 -06:00
binlog_truncate_innodb.result MDEV-22008 rpl.rpl_semi_sync fails in bb, MDEV-24418 reenable binlog_truncate_innodb and binlog_spurious_ddl_errors, rpl_parallel_retry fails in bb 2020-12-18 19:31:51 +01:00
binlog_truncate_kill.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
binlog_truncate_multi_engine.result Merge remote-tracking branch 'origin/10.6' into 10.11 2024-07-08 21:52:08 +04:00
binlog_truncate_multi_log.result MDEV-33465: an option to enable semisync recovery 2024-07-05 19:53:57 -06:00
binlog_truncate_multi_log_unsafe.result MDEV-25962: binlog.binlog_truncate_multi_log_unsafe test fails in buildbot 2021-08-13 14:01:26 +05:30
binlog_truncate_myisam.result MDEV-7635: Part 1 2017-02-10 06:30:42 -05:00
binlog_unsafe.result MDEV-30256 Wrong result (missing rows) upon join with empty table 2023-02-10 12:58:50 +02:00
binlog_variables_log_bin.result test suite for compressed binlog event 2016-10-19 20:20:47 +02:00
binlog_variables_log_bin_index.result test suite for compressed binlog event 2016-10-19 20:20:47 +02:00
binlog_variables_relay_log.result MDEV-7110 : Add missing MySQL variable log_bin_basename and log_bin_index 2015-06-09 13:38:29 -04:00
binlog_variables_relay_log_index.result MDEV-7110 : Add missing MySQL variable log_bin_basename and log_bin_index 2015-06-09 13:38:29 -04:00
binlog_verbose_compressed_fields.result MDEV-25277: mysqlbinlog --verbose cannot read row events with compressed columns: Don't know how to handle column type: 140 2023-01-11 10:37:49 -07:00
binlog_write_error.result Revert MDEV-25292 Atomic CREATE OR REPLACE TABLE 2022-10-27 23:13:41 +02:00
binlog_xa_checkpoint.result MDEV-742 XA PREPAREd transaction survive disconnect/server restart 2020-03-14 22:45:48 +02:00
binlog_xa_handling.result MDEV-27536 incremental commit to correct regression test. 2022-01-27 13:44:39 +02:00
binlog_xa_prepared.result MDEV-742 XA PREPAREd transaction survive disconnect/server restart 2020-03-14 22:45:48 +02:00
binlog_xa_prepared_disconnect.result MDEV-515 Reduce InnoDB undo logging for insert into empty table 2021-01-25 18:41:27 +02:00
binlog_xa_recover.result MDEV-34504 PURGE BINARY LOGS not working anymore 2024-07-10 18:50:08 +03:00
binlog_xa_recover_using_new_server_id.result MDEV-27342: Fix issue of recovery failure using new server id 2022-03-14 19:57:10 -07:00
flashback-largebinlog.result Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
flashback.result Merge branch '11.2' into 11.4 2024-08-04 17:27:48 +02:00
foreign_key.result Added support for replication for S3 2020-03-24 21:00:02 +02:00
innodb_autoinc_lock_mode_binlog.result MDEV 28970: Add RESET MASTER to clear possible remaining binlog from previous test 2022-11-09 16:34:55 +00:00
innodb_rc_insert_before_delete.result MariaDB 10.5.19 release 2023-02-06 17:55:01 +02:00
load_data_stm_view.result Cleanups 2017-12-08 11:38:22 +02:00
max_binlog_total_size.result MDEV-31404 Implement binlog_space_limit 2024-02-14 15:02:21 +01:00
mysqladmin.result MDEV-12612 mysqladmin --local flush... to use FLUSH LOCAL 2017-05-24 11:59:04 +02:00
read_only.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
read_only_statement.result MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
show_concurrent_rotate.result MDEV-20215: binlog.show_concurrent_rotate failed in buildbot with wrong result 2021-08-13 10:53:19 -06:00
start_alter_mysqlbinlog_replay.result MDEV-11675. Convert the new session var to bool type and test changes 2022-01-31 22:57:39 +02:00
temptable_uservar_disconnect-7938.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00