forked from MariaDB/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-10518: Large wsrep_gtid_domain_id may break IST
wsrep_gtid_domain_id was incorrectly being parsed and stored as a signed long number on the joiner node.
- Loading branch information
Nirbhay Choubey
committed
Aug 23, 2016
1 parent
3ac0721
commit 2024cdd
Showing
4 changed files
with
147 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# On node_1 | ||
list of GTID variables : | ||
gtid_domain_id 1 | ||
gtid_binlog_pos | ||
gtid_binlog_state | ||
gtid_current_pos | ||
gtid_slave_pos | ||
wsrep_gtid_domain_id 4294967295 | ||
wsrep_gtid_mode 1 | ||
# On node_2 | ||
list of GTID variables : | ||
gtid_domain_id 2 | ||
gtid_binlog_pos | ||
gtid_binlog_state | ||
gtid_current_pos | ||
gtid_slave_pos | ||
wsrep_gtid_domain_id 4294967295 | ||
wsrep_gtid_mode 1 | ||
# On node_1 | ||
CREATE TABLE t1(i INT) ENGINE=INNODB; | ||
CREATE TABLE t2(i INT) ENGINE=MEMORY; | ||
INSERT INTO t1 VALUES(1); | ||
SELECT * FROM t1; | ||
i | ||
1 | ||
SELECT * FROM t2; | ||
i | ||
list of GTID variables : | ||
gtid_domain_id 1 | ||
gtid_binlog_pos 4294967295-1-3 | ||
gtid_binlog_state 4294967295-1-3 | ||
gtid_current_pos 4294967295-1-3 | ||
gtid_slave_pos | ||
wsrep_gtid_domain_id 4294967295 | ||
wsrep_gtid_mode 1 | ||
# On node_2 | ||
SELECT * FROM t1; | ||
i | ||
1 | ||
list of GTID variables : | ||
gtid_domain_id 2 | ||
gtid_binlog_pos 4294967295-1-3 | ||
gtid_binlog_state 4294967295-1-3 | ||
gtid_current_pos | ||
gtid_slave_pos | ||
wsrep_gtid_domain_id 4294967295 | ||
wsrep_gtid_mode 1 | ||
# On node_1 | ||
INSERT INTO t2 VALUES(1); | ||
SELECT * FROM t2; | ||
i | ||
1 | ||
list of GTID variables : | ||
gtid_domain_id 1 | ||
gtid_binlog_pos 1-1-1,4294967295-1-3 | ||
gtid_binlog_state 1-1-1,4294967295-1-3 | ||
gtid_current_pos 1-1-1,4294967295-1-3 | ||
gtid_slave_pos | ||
wsrep_gtid_domain_id 4294967295 | ||
wsrep_gtid_mode 1 | ||
# On node_2 | ||
SELECT * FROM t2; | ||
i | ||
list of GTID variables : | ||
gtid_domain_id 2 | ||
gtid_binlog_pos 4294967295-1-3 | ||
gtid_binlog_state 4294967295-1-3 | ||
gtid_current_pos | ||
gtid_slave_pos | ||
wsrep_gtid_domain_id 4294967295 | ||
wsrep_gtid_mode 1 | ||
# On node_1 | ||
DROP TABLE t1, t2; | ||
# End of test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
!include ../galera_2nodes.cnf | ||
|
||
[mysqld] | ||
log-bin | ||
log-slave-updates | ||
|
||
[mysqld.1] | ||
gtid_domain_id=1 | ||
wsrep_gtid_mode=ON | ||
# Maximum allowed wsrep_gtid_domain_id. | ||
wsrep_gtid_domain_id=4294967295 | ||
|
||
[mysqld.2] | ||
gtid_domain_id=2 | ||
wsrep_gtid_mode=ON | ||
#wsrep_gitd_domain_id value will be inherited from donor node (mysqld.1) | ||
#wsrep_gitd_domain_id=X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Test for @@wsrep_gtid_mode and @@wsrep_gtid_domain_id variables | ||
# | ||
# When @@wsrep_gtid_mode=ON, all DDL/DML commands and transactions that | ||
# are meant to be replicated over Galera cluster nodes are tagged with | ||
# galera gtid_domain_id (@@wsrep_gtid_domain_id), while others are tagged | ||
# with the local domain_id (@@gtid_domain_id). | ||
|
||
--source include/galera_cluster.inc | ||
--source include/have_innodb.inc | ||
|
||
--echo # On node_1 | ||
--connection node_1 | ||
# print initial GTIDs | ||
source include/print_gtid.inc; | ||
|
||
--echo # On node_2 | ||
--connection node_2 | ||
# print initial GTIDs | ||
source include/print_gtid.inc; | ||
|
||
--echo # On node_1 | ||
--connection node_1 | ||
CREATE TABLE t1(i INT) ENGINE=INNODB; | ||
CREATE TABLE t2(i INT) ENGINE=MEMORY; | ||
INSERT INTO t1 VALUES(1); | ||
SELECT * FROM t1; | ||
SELECT * FROM t2; | ||
source include/print_gtid.inc; | ||
|
||
--echo # On node_2 | ||
--connection node_2 | ||
SELECT * FROM t1; | ||
source include/print_gtid.inc; | ||
|
||
--echo # On node_1 | ||
--connection node_1 | ||
INSERT INTO t2 VALUES(1); | ||
SELECT * FROM t2; | ||
source include/print_gtid.inc; | ||
|
||
--echo # On node_2 | ||
--connection node_2 | ||
SELECT * FROM t2; | ||
source include/print_gtid.inc; | ||
|
||
--echo # On node_1 | ||
--connection node_1 | ||
# Cleanup | ||
DROP TABLE t1, t2; | ||
|
||
--source include/galera_end.inc | ||
--echo # End of test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters