mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-4688: empty @@gtid_slave_pos during slave commit.
In record_gtid(), too many rows were deleted from the slave position hash - we need to always keep on to the most recent committed row, so we have a valid slave position at all times.
This commit is contained in:
@@ -90,23 +90,28 @@ a
|
||||
2
|
||||
3
|
||||
4
|
||||
*** Test slave requesting a GTID that is not present in the master's binlog ***
|
||||
*** MDEV-4688: Empty value of @@GLOBAL.gtid_slave_pos ***
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL gtid_slave_pos = "0-1-3";
|
||||
START SLAVE;
|
||||
SET sql_log_bin=0;
|
||||
CALL mtr.add_suppression("Got fatal error .* from master when reading data from binary log: 'Error: connecting slave requested to start from GTID .*, which is not in the master's binlog'");
|
||||
SET sql_log_bin=1;
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Slave_IO_State = ''
|
||||
Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Error: connecting slave requested to start from GTID 0-1-3, which is not in the master's binlog''
|
||||
Using_Gtid = 'Current_Pos'
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL gtid_slave_pos = "0-1-2";
|
||||
START SLAVE;
|
||||
include/wait_for_slave_to_start.inc
|
||||
INSERT INTO t1 VALUES (5);
|
||||
SET @old_dbug= @@GLOBAL.debug_dbug;
|
||||
SET GLOBAL debug_dbug="+d,dummy_disable_default_dbug_output";
|
||||
SET GLOBAL debug_dbug="+d,gtid_fail_after_record_gtid";
|
||||
SET sql_log_bin=0;
|
||||
CALL mtr.add_suppression('Got error 131 "Command not supported by database" during COMMIT');
|
||||
SET sql_log_bin=1;
|
||||
START SLAVE;
|
||||
include/wait_for_slave_sql_error.inc [errno=1180]
|
||||
SELECT @@GLOBAL.gtid_slave_pos;
|
||||
@@GLOBAL.gtid_slave_pos
|
||||
0-1-2
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
SET GLOBAL debug_dbug= @old_dbug;
|
||||
START SLAVE SQL_THREAD;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
@@ -114,6 +119,31 @@ a
|
||||
3
|
||||
4
|
||||
5
|
||||
*** Test slave requesting a GTID that is not present in the master's binlog ***
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL gtid_slave_pos = "0-1-4";
|
||||
START SLAVE;
|
||||
SET sql_log_bin=0;
|
||||
CALL mtr.add_suppression("Got fatal error .* from master when reading data from binary log: 'Error: connecting slave requested to start from GTID .*, which is not in the master's binlog'");
|
||||
SET sql_log_bin=1;
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Slave_IO_State = ''
|
||||
Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Error: connecting slave requested to start from GTID 0-1-4, which is not in the master's binlog''
|
||||
Using_Gtid = 'Current_Pos'
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL gtid_slave_pos = "0-1-3";
|
||||
START SLAVE;
|
||||
include/wait_for_slave_to_start.inc
|
||||
INSERT INTO t1 VALUES (6);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
*** MDEV-4278: Slave does not detect that master is not GTID-aware ***
|
||||
include/stop_slave.inc
|
||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
||||
@@ -121,7 +151,7 @@ SET GLOBAL debug_dbug="+d,simulate_non_gtid_aware_master";
|
||||
START SLAVE;
|
||||
include/wait_for_slave_io_error.inc [errno=1233]
|
||||
SET GLOBAL debug_dbug= @old_dbug;
|
||||
INSERT INTO t1 VALUES (6);
|
||||
INSERT INTO t1 VALUES (7);
|
||||
START SLAVE;
|
||||
SET sql_log_bin=0;
|
||||
CALL mtr.add_suppression("The slave I/O thread stops because master does not support MariaDB global transaction id");
|
||||
|
Reference in New Issue
Block a user