mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Merge MDEV-8496 into 10.1
This commit is contained in:
commit
13dbb6fa9e
3 changed files with 68 additions and 1 deletions
|
@ -381,6 +381,39 @@ a
|
|||
50
|
||||
SET GLOBAL slave_exec_mode=@old_slave_mode;
|
||||
SET GLOBAL gtid_strict_mode=@old_strict;
|
||||
*** MDEV-8496: gtid_ignore_duplicates treats gtid_seq_no as 32-bit ***
|
||||
SET @old_domain= @@SESSION.gtid_domain_id;
|
||||
SET SESSION gtid_domain_id=102;
|
||||
SET SESSION gtid_seq_no=4294967294;
|
||||
INSERT INTO t1 VALUES (60);
|
||||
INSERT INTO t1 VALUES (61);
|
||||
INSERT INTO t1 VALUES (62);
|
||||
SET SESSION gtid_domain_id= @old_domain;
|
||||
include/save_master_gtid.inc
|
||||
include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
|
||||
a
|
||||
60
|
||||
61
|
||||
62
|
||||
SET default_master_connection = "c2b";
|
||||
include/sync_with_master_gtid.inc
|
||||
SET default_master_connection = "a2b";
|
||||
include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
|
||||
a
|
||||
60
|
||||
61
|
||||
62
|
||||
SET default_master_connection = "b2c";
|
||||
include/sync_with_master_gtid.inc
|
||||
SET default_master_connection = "a2c";
|
||||
include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
|
||||
a
|
||||
60
|
||||
61
|
||||
62
|
||||
SET GLOBAL gtid_domain_id=0;
|
||||
STOP ALL SLAVES;
|
||||
Warnings:
|
||||
|
|
|
@ -366,6 +366,40 @@ SET GLOBAL slave_exec_mode=@old_slave_mode;
|
|||
SET GLOBAL gtid_strict_mode=@old_strict;
|
||||
|
||||
|
||||
--echo *** MDEV-8496: gtid_ignore_duplicates treats gtid_seq_no as 32-bit ***
|
||||
|
||||
--connection server_1
|
||||
SET @old_domain= @@SESSION.gtid_domain_id;
|
||||
SET SESSION gtid_domain_id=102;
|
||||
SET SESSION gtid_seq_no=4294967294;
|
||||
INSERT INTO t1 VALUES (60);
|
||||
INSERT INTO t1 VALUES (61);
|
||||
INSERT INTO t1 VALUES (62);
|
||||
# The bug was an overflow, the seq_no value 4294967296 (2**32) was treated
|
||||
# as 0, causing the last transaction to be ignored.
|
||||
SET SESSION gtid_domain_id= @old_domain;
|
||||
--source include/save_master_gtid.inc
|
||||
|
||||
--connection server_4
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
|
||||
|
||||
--connection server_2
|
||||
SET default_master_connection = "c2b";
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SET default_master_connection = "a2b";
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
|
||||
|
||||
--connection server_3
|
||||
SET default_master_connection = "b2c";
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SET default_master_connection = "a2c";
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 WHERE a >= 60 ORDER BY a;
|
||||
|
||||
|
||||
|
||||
# Clean up.
|
||||
--connection server_1
|
||||
SET GLOBAL gtid_domain_id=0;
|
||||
|
|
|
@ -117,7 +117,7 @@ int
|
|||
rpl_slave_state::check_duplicate_gtid(rpl_gtid *gtid, rpl_group_info *rgi)
|
||||
{
|
||||
uint32 domain_id= gtid->domain_id;
|
||||
uint32 seq_no= gtid->seq_no;
|
||||
uint64 seq_no= gtid->seq_no;
|
||||
rpl_slave_state::element *elem;
|
||||
int res;
|
||||
bool did_enter_cond= false;
|
||||
|
|
Loading…
Add table
Reference in a new issue