mariadb/mysql-test/suite/multi_source/reset_slave.test
Brandon Nesterenko 9b1ea69049 Revert "MDEV-7850: Extend GTID Binlog Events with Thread Id"
This reverts commit c37b2087b4.

In c37b20887, when re-binlogging a GTID event on a replica,
it will overwrite the thread_id from the primary to be the
value of the slave applier (SQL thread or parallel worker).

This should be the value of the original thread_id on the
master connection though, to both help track temporary
tables, and be consistent with Query_log_event.

Reverting the commit to re-target 11.5, so we can re-test
with the corrected thread_id.
2024-02-05 05:56:53 -07:00

74 lines
1.7 KiB
Text

#
# Check RESET SLAVE [name] [ALL] for multi-source replication
#
--source include/not_embedded.inc
--source include/binlog_start_pos.inc
--let $rpl_server_count= 0
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
--replace_result $SERVER_MYPORT_1 MYPORT_1
eval change master 'master1' to
master_port=$SERVER_MYPORT_1,
master_host='127.0.0.1', master_ssl_verify_server_cert=0,
master_user='root';
start slave 'master1';
set default_master_connection = 'master1';
--source include/wait_for_slave_to_start.inc
--connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1)
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (i int) engine=MyISAM;
insert into t1 values (1),(2);
--save_master_pos
--connection slave
--sync_with_master 0,'master1'
stop slave 'master1';
--wait_for_slave_to_stop
--let $datadir = `SELECT @@datadir`
let read_master_log_pos=`select $binlog_start_pos + 608`;
let relay_log_pos=`select 2*$binlog_start_pos + 652`;
let relay_log_space=`select 3*$binlog_start_pos + 714`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space <relay_log_space>
show slave 'master1' status;
--list_files $datadir mysqld*
reset slave 'master1';
--replace_result $SERVER_MYPORT_1 MYPORT_1 $relay_log_pos <relay_log_pos> $relay_log_space <relay_log_space>
show slave 'master1' status;
--list_files $datadir mysqld*
reset slave 'master1' all;
--error WARN_NO_MASTER_INFO
show slave 'master1' status;
--list_files $datadir mysqld*
# Cleanup
drop table t1;
--source include/reset_master_slave.inc
--disconnect slave
--connection master1
drop table t1;
--source include/reset_master_slave.inc
--disconnect master1