-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-26223 Galera cluster node consider old server_id value even afte…
…r modification of server_id [wsrep_gtid_mode=ON] Variable `wsrep_new_cluster` now will be TRUE also when there is only `gcomm://` used in configuration. This configuration, even without --wsrep-new-cluster, is considered to bootstrap new cluster. Updated galera GTID test to ignore warning message when non bootstrap node have server-id different thant one cluster is initialized with. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
- Loading branch information
mkaruza
authored and
Jan Lindström
committed
Jan 27, 2022
1 parent
56f5599
commit 5317370
Showing
29 changed files
with
241 additions
and
11 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
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
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,83 @@ | ||
connection node_2; | ||
connection node_1; | ||
connection node_1; | ||
select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; | ||
@@gtid_domain_id @@server_id @@wsrep_gtid_domain_id @@wsrep_gtid_mode | ||
0 11 1 1 | ||
connection node_2; | ||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); | ||
select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; | ||
@@gtid_domain_id @@server_id @@wsrep_gtid_domain_id @@wsrep_gtid_mode | ||
0 12 1 1 | ||
connection node_1; | ||
CREATE TABLE t1(id int not null primary key) engine=innodb; | ||
INSERT INTO t1 values (1); | ||
show global variables like '%gtid%'; | ||
Variable_name Value | ||
gtid_binlog_pos 1-11-2 | ||
gtid_binlog_state 1-11-2 | ||
gtid_cleanup_batch_size 64 | ||
gtid_current_pos 1-11-2 | ||
gtid_domain_id 0 | ||
gtid_ignore_duplicates OFF | ||
gtid_pos_auto_engines | ||
gtid_slave_pos | ||
gtid_strict_mode OFF | ||
wsrep_gtid_domain_id 1 | ||
wsrep_gtid_mode ON | ||
connection node_2; | ||
SET SESSION wsrep_sync_wait=15; | ||
show global variables like '%gtid%'; | ||
Variable_name Value | ||
gtid_binlog_pos 0-12-1,1-11-2 | ||
gtid_binlog_state 0-12-1,1-11-2 | ||
gtid_cleanup_batch_size 64 | ||
gtid_current_pos 0-12-1 | ||
gtid_domain_id 0 | ||
gtid_ignore_duplicates OFF | ||
gtid_pos_auto_engines | ||
gtid_slave_pos | ||
gtid_strict_mode OFF | ||
wsrep_gtid_domain_id 1 | ||
wsrep_gtid_mode ON | ||
SET GLOBAL server_id=200; | ||
ERROR 42000: Variable 'server_id' can't be set to the value of '200' | ||
SHOW WARNINGS; | ||
Level Code Message | ||
Warning 1231 Can't change server_id because wsrep and wsrep_gtid_mode is set. You can set server_id only with wsrep_new_cluster. | ||
Error 1231 Variable 'server_id' can't be set to the value of '200' | ||
SET SESSION server_id=200; | ||
ERROR 42000: Variable 'server_id' can't be set to the value of '200' | ||
SHOW WARNINGS; | ||
Level Code Message | ||
Warning 1231 Can't change server_id because wsrep and wsrep_gtid_mode is set. You can set server_id only with wsrep_new_cluster. | ||
Error 1231 Variable 'server_id' can't be set to the value of '200' | ||
INSERT INTO t1 values(2); | ||
show global variables like '%gtid%'; | ||
Variable_name Value | ||
gtid_binlog_pos 0-12-1,1-11-3 | ||
gtid_binlog_state 0-12-1,1-11-3 | ||
gtid_cleanup_batch_size 64 | ||
gtid_current_pos 0-12-1 | ||
gtid_domain_id 0 | ||
gtid_ignore_duplicates OFF | ||
gtid_pos_auto_engines | ||
gtid_slave_pos | ||
gtid_strict_mode OFF | ||
wsrep_gtid_domain_id 1 | ||
wsrep_gtid_mode ON | ||
connection node_1; | ||
show global variables like '%gtid%'; | ||
Variable_name Value | ||
gtid_binlog_pos 1-11-3 | ||
gtid_binlog_state 1-11-3 | ||
gtid_cleanup_batch_size 64 | ||
gtid_current_pos 1-11-3 | ||
gtid_domain_id 0 | ||
gtid_ignore_duplicates OFF | ||
gtid_pos_auto_engines | ||
gtid_slave_pos | ||
gtid_strict_mode OFF | ||
wsrep_gtid_domain_id 1 | ||
wsrep_gtid_mode ON | ||
DROP TABLE t1; |
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
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
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
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
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
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
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
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
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
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,16 @@ | ||
!include ../galera_2nodes.cnf | ||
|
||
[mysqld.1] | ||
wsrep_gtid_domain_id=1 | ||
wsrep_gtid_mode=ON | ||
server-id=11 | ||
log_slave_updates | ||
log_bin | ||
|
||
[mysqld.2] | ||
wsrep_gtid_domain_id=1 | ||
wsrep_gtid_mode=ON | ||
server-id=12 | ||
log_slave_updates | ||
log_bin | ||
|
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,28 @@ | ||
--source include/galera_cluster.inc | ||
|
||
--connection node_1 | ||
select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; | ||
--connection node_2 | ||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); | ||
select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; | ||
|
||
--connection node_1 | ||
CREATE TABLE t1(id int not null primary key) engine=innodb; | ||
INSERT INTO t1 values (1); | ||
show global variables like '%gtid%'; | ||
--connection node_2 | ||
SET SESSION wsrep_sync_wait=15; | ||
show global variables like '%gtid%'; | ||
# This should give error | ||
--error ER_WRONG_VALUE_FOR_VAR | ||
SET GLOBAL server_id=200; | ||
SHOW WARNINGS; | ||
# This should give error | ||
--error ER_WRONG_VALUE_FOR_VAR | ||
SET SESSION server_id=200; | ||
SHOW WARNINGS; | ||
INSERT INTO t1 values(2); | ||
show global variables like '%gtid%'; | ||
--connection node_1 | ||
show global variables like '%gtid%'; | ||
DROP TABLE t1; |
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.