mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-4650: show variables; ERROR 1946 (HY000): Failed to load replication slave GTID position
The bug was that if mysql.slave_gtid_pos was missing, operations on variables gtid_slave_pos, gtid_binlog_pos, and gtid_current_pos would fail, and continue to fail even after the table was fixed, until server restart. Now setting the variables retry loading the table, succeeding if it has been restored. And querying the variables when the table is not there acts as if the table was there and was empty. Also, attempt to fix a race in the rpl.rpl_gtid_basic test case.
This commit is contained in:
@ -191,11 +191,15 @@ SET GLOBAL gtid_binlog_state = @old_state;
|
||||
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
--save_master_pos
|
||||
--let $master_pos= `SELECT @@GLOBAL.gtid_binlog_pos`
|
||||
|
||||
--connection server_2
|
||||
--source include/start_slave.inc
|
||||
--sync_with_master
|
||||
# We cannot just use sync_with_master as we've done RESET MASTER, so
|
||||
# slave old-style position is wrong.
|
||||
# So sync on gtid position instead.
|
||||
--let $wait_condition= SELECT @@GLOBAL.gtid_binlog_pos = '$master_pos'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
|
Reference in New Issue
Block a user