mariadb/mysql-test/suite/binlog_encryption
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
..
binlog_incident.combinations MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
binlog_incident.result fix binlog_encryption.binlog_incident test 2016-12-06 09:45:51 +01:00
binlog_incident.test Move mysql-test-run/extra/binlog to suite/binlog/include 2018-03-29 13:59:44 +03:00
binlog_index-master.opt MDEV-31404 Implement binlog_space_limit 2024-02-14 15:02:21 +01:00
binlog_index.result MDEV-34504 PURGE BINARY LOGS not working anymore 2024-07-10 18:50:08 +03:00
binlog_index.test Move mysql-test-run/extra/binlog to suite/binlog/include 2018-03-29 13:59:44 +03:00
binlog_ioerr.result MDEV-31273: Precompute binlog checksums 2023-10-27 19:57:43 +02:00
binlog_ioerr.test Move mysql-test-run/extra/binlog to suite/binlog/include 2018-03-29 13:59:44 +03:00
binlog_mdev_20574_old_binlog.result MDEV-19801: Change defaults for CHANGE MASTER TO so that GTID-based replication is used by default if master supports it 2022-07-26 13:31:27 -06:00
binlog_mdev_20574_old_binlog.test MDEV-19801: Change defaults for CHANGE MASTER TO so that GTID-based replication is used by default if master supports it 2022-07-26 13:31:27 -06:00
binlog_mysqlbinlog-cp932-master.opt MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
binlog_mysqlbinlog-cp932.result MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
binlog_mysqlbinlog-cp932.test Move mysql-test-run/extra/binlog to suite/binlog/include 2018-03-29 13:59:44 +03:00
binlog_row_annotate-master.opt MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
binlog_row_annotate.combinations Follow-up for MDEV-11065 - add tests for compressed+encrypted binlog 2017-01-23 01:06:15 +02:00
binlog_row_annotate.result Merge branch '10.6' into 10.11 2024-07-22 15:14:50 +02:00
binlog_row_annotate.test Move mysql-test-run/extra/binlog to suite/binlog/include 2018-03-29 13:59:44 +03:00
binlog_write_error.result Revert MDEV-25292 Atomic CREATE OR REPLACE TABLE 2022-10-27 23:13:41 +02:00
binlog_write_error.test cleanup: renames, no need to create a new .inc file 2021-03-08 15:00:45 +01:00
binlog_xa_recover.result MDEV-34504 PURGE BINARY LOGS not working anymore 2024-07-10 18:50:08 +03:00
binlog_xa_recover.test cleanup: renames, no need to create a new .inc file 2021-02-22 19:43:08 +01:00
disabled.def fix binlog_encryption.binlog_incident test 2016-12-06 09:45:51 +01:00
encrypted_master.result search_pattern_in_file.inc changes 2017-03-31 19:28:58 +02:00
encrypted_master.test Add --source include/long_test.inc to some tests 2025-03-15 11:15:54 +01:00
encrypted_master_lost_key.result MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
encrypted_master_lost_key.test search_pattern_in_file.inc changes 2017-03-31 19:28:58 +02:00
encrypted_master_switch_to_unencrypted_coords.cnf MDEV-28798: Previously Binlog Encrypted Master Segfaults on Binlog Dump with Using_Gtid=Slave_Pos 2023-04-24 15:07:15 -06:00
encrypted_master_switch_to_unencrypted_coords.result Merge branch '10.6' into 10.11 2023-12-18 11:19:04 +01:00
encrypted_master_switch_to_unencrypted_coords.test Merge branch '10.6' into 10.11 2023-12-18 11:19:04 +01:00
encrypted_master_switch_to_unencrypted_gtid.cnf MDEV-28798: Previously Binlog Encrypted Master Segfaults on Binlog Dump with Using_Gtid=Slave_Pos 2023-04-24 15:07:15 -06:00
encrypted_master_switch_to_unencrypted_gtid.result MDEV-36424: binlog_encryption.encrypted_master_switch_to_unencrypted_gtid Fails in BB 11.4+ 2025-03-28 19:20:16 +01:00
encrypted_master_switch_to_unencrypted_gtid.test MDEV-36424: binlog_encryption.encrypted_master_switch_to_unencrypted_gtid Fails in BB 11.4+ 2025-03-28 19:20:16 +01:00
encrypted_slave.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
encrypted_slave.result search_pattern_in_file.inc changes 2017-03-31 19:28:58 +02:00
encrypted_slave.test Allow tests to work with cmake -DPLUGIN_PARTITION=NO 2018-05-29 17:14:34 +03:00
encryption_algorithms.combinations MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
encryption_algorithms.inc MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
encryption_combo.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
encryption_combo.result search_pattern_in_file.inc changes 2017-03-31 19:28:58 +02:00
encryption_combo.test search_pattern_in_file.inc changes 2017-03-31 19:28:58 +02:00
multisource.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
multisource.result MDEV-31857 enable --ssl-verify-server-cert by default in the internal client 2024-02-04 22:19:19 +01:00
multisource.test Move mysql-test-run/extra/rpl_tests to suite/rpl/include 2018-03-29 13:59:44 +03:00
my.cnf test.cnf files should !include default_my.cnf 2024-02-03 11:22:20 +01:00
mysqlbinlog.combinations Follow-up for MDEV-11065 - add tests for compressed+encrypted binlog 2017-01-23 01:06:15 +02:00
mysqlbinlog.result MDEV-20574 Position of events reported by mysqlbinlog is wrong with encrypted binlogs, SHOW BINLOG EVENTS reports the correct one. 2019-10-08 14:35:34 +05:30
mysqlbinlog.test MDEV-20574 Position of events reported by mysqlbinlog is wrong with encrypted binlogs, SHOW BINLOG EVENTS reports the correct one. 2019-10-08 14:35:34 +05:30
restart_server.inc MDEV-16944 Fix file sharing issues on Windows in mysqltest 2024-04-17 16:52:37 +02:00
rpl_binlog_errors.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_binlog_errors.result MDEV-34705: Binlog-in-engine: Protect against concurrent RESET MASTER and dump threads 2025-07-03 14:44:52 +02:00
rpl_binlog_errors.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_cant_read_event_incident.result MDEV-19801: Change defaults for CHANGE MASTER TO so that GTID-based replication is used by default if master supports it 2022-07-26 13:31:27 -06:00
rpl_cant_read_event_incident.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_checksum.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_checksum.result MDEV-34705: Binlog-in-engine: Protect against concurrent RESET MASTER and dump threads 2025-07-03 14:44:52 +02:00
rpl_checksum.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_checksum_cache.result MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_checksum_cache.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_corruption.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_corruption.result MDEV-19801: Change defaults for CHANGE MASTER TO so that GTID-based replication is used by default if master supports it 2022-07-26 13:31:27 -06:00
rpl_corruption.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_gtid_basic.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_gtid_basic.combinations Follow-up for MDEV-11065 - add tests for compressed+encrypted binlog 2017-01-23 01:06:15 +02:00
rpl_gtid_basic.result MDEV-34705: Binlog-in-engine: Protect against concurrent RESET MASTER and dump threads 2025-07-03 14:44:52 +02:00
rpl_gtid_basic.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_incident.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_incident.result MDEV-21360 debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
rpl_incident.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_init_slave_errors.result MDEV-21360 debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
rpl_init_slave_errors.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_loaddata_local.result Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
rpl_loaddata_local.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_loadfile.result cleanup: get rid of a SQL warning in a test 2018-10-31 16:06:16 +01:00
rpl_loadfile.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_mixed_binlog_max_cache_size.result Merge branch '10.6' into 10.11 2023-12-18 11:19:04 +01:00
rpl_mixed_binlog_max_cache_size.test Renaming a few mysql-test/suite/rpl/include/*.test files into *.inc 2024-07-09 08:46:40 +04:00
rpl_packet.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_packet.result MDEV-34705: Binlog-in-engine: Protect against concurrent RESET MASTER and dump threads 2025-07-03 14:44:52 +02:00
rpl_packet.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_parallel_analyze_table_hang.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_analyze_table_hang.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_deadlock_corrupt_binlog.result Merge branch '10.4' into 10.5 2022-05-09 22:04:06 +02:00
rpl_parallel_deadlock_corrupt_binlog.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_domain.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_domain.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_domain_slave_single_grp.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_domain_slave_single_grp.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_free_deferred_event.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_free_deferred_event.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_gco_wait_kill.result MDEV-515 Reduce InnoDB undo logging for insert into empty table 2021-01-25 18:41:27 +02:00
rpl_parallel_gco_wait_kill.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_gtid_slave_pos_update_fail.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_gtid_slave_pos_update_fail.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_ignore_error_on_rotate.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_ignore_error_on_rotate.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_ignored_errors.result Merge branch '10.5' into 10.6 2023-12-17 11:20:43 +01:00
rpl_parallel_ignored_errors.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_parallel_incorrect_relay_pos.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_incorrect_relay_pos.test MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_innodb_lock_conflict.result Fix sporadic failure of rpl.rpl_parallel_innodb_lock_conflict 2025-02-19 11:28:47 +00:00
rpl_parallel_innodb_lock_conflict.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_missed_error_handling.result Merge branch '10.4' into 10.5 2023-12-02 01:02:50 +01:00
rpl_parallel_missed_error_handling.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_mode.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_mode.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_partial_binlog_trans.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_partial_binlog_trans.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_record_gtid_wakeup.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_record_gtid_wakeup.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_retry_deadlock.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_retry_deadlock.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_rollback_assert.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_rollback_assert.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_show_binlog_events_purge_logs.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_parallel_show_binlog_events_purge_logs.result Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
rpl_parallel_show_binlog_events_purge_logs.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_parallel_single_grpcmt.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_single_grpcmt.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_slave_bgc_kill.result sporadic failures of binlog_encryption.rpl_parallel_slave_bgc_kill 2024-04-21 01:17:31 +02:00
rpl_parallel_slave_bgc_kill.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_stop_on_con_kill.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_stop_on_con_kill.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_stop_slave.result Merge 10.5 into 10.6 2024-03-18 17:07:32 +02:00
rpl_parallel_stop_slave.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_wrong_binlog_order.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_wrong_binlog_order.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_parallel_wrong_exec_master_pos.result MDEV-18648: slave_parallel_mode= optimistic default in 10.5 2019-12-23 17:48:01 +05:30
rpl_parallel_wrong_exec_master_pos.test MDEV-30421 rpl_parallel_*.test cleanup 2023-03-23 22:31:55 +03:00
rpl_relayrotate-slave.opt MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_relayrotate.result Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
rpl_relayrotate.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_semi_sync.result MDEV-34705: Binlog-in-engine: Protect against concurrent RESET MASTER and dump threads 2025-07-03 14:44:52 +02:00
rpl_semi_sync.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_skip_replication.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_skip_replication.result MDEV-29668 SUPER should not allow actions that have fine-grained dedicated privileges 2023-02-06 14:31:48 +01:00
rpl_skip_replication.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_special_charset.opt MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_special_charset.result cleanup: get rid of a SQL warning in a test 2018-10-31 16:06:16 +01:00
rpl_special_charset.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_sporadic_master-master.opt MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_sporadic_master.result Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
rpl_sporadic_master.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_ssl.result MDEV-31857 enable --ssl-verify-server-cert by default in the internal client 2024-02-04 22:19:19 +01:00
rpl_ssl.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_stm_relay_ign_space-slave.opt MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_stm_relay_ign_space.result cleanup: get rid of a SQL warning in a test 2018-10-31 16:06:16 +01:00
rpl_stm_relay_ign_space.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_switch_stm_row_mixed.result UUID() function should return UUID, not VARCHAR(36) 2021-10-29 18:29:02 +02:00
rpl_switch_stm_row_mixed.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_sync-master.opt MDEV-29983 Deprecate innodb_file_per_table 2023-01-11 17:55:56 +02:00
rpl_sync-slave.opt MDEV-29983 Deprecate innodb_file_per_table 2023-01-11 17:55:56 +02:00
rpl_sync.result Merge 10.5 into 10.6 2021-04-21 11:45:00 +03:00
rpl_sync.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_temporal_format_default_to_default.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_temporal_format_default_to_default.result Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
rpl_temporal_format_default_to_default.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_temporal_format_mariadb53_to_mysql56.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_temporal_format_mariadb53_to_mysql56.result Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
rpl_temporal_format_mariadb53_to_mysql56.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_temporal_format_mysql56_to_mariadb53.cnf MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
rpl_temporal_format_mysql56_to_mariadb53.result Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
rpl_temporal_format_mysql56_to_mariadb53.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
rpl_typeconv.result Merge 10.2 into 10.3 2018-10-17 19:37:05 +03:00
rpl_typeconv.test MDEV-30421 more tests cleaned up 2023-03-23 21:07:32 +03:00
suite.pm MDEV-9038 Binlog encryption tests 2016-12-05 20:19:01 +02:00
testdata.inc Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00