Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-28433 : Server crashes when wsrep_sst_donor and wsrep_cluster_ad…
…dress set to NULL Do not allow setting wsrep_sst_donor as NULL as it is incorrect value. User can use value '' (default) that represents same as NULL. Setting wsrep_cluster_address to NULL is already handled correctly. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
- Loading branch information
1 parent
7d55eb0
commit f102b59
Showing
5 changed files
with
81 additions
and
4 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,25 @@ | ||
connection node_2; | ||
connection node_1; | ||
connection node_1; | ||
connection node_2; | ||
connection node_2; | ||
SET @@global.wsrep_sst_donor = NULL; | ||
ERROR 42000: Variable 'wsrep_sst_donor' can't be set to the value of 'NULL' | ||
SET @@global.wsrep_cluster_address='NULL'; | ||
SET SESSION wsrep_sync_wait=0; | ||
SELECT @@wsrep_sst_donor; | ||
@@wsrep_sst_donor | ||
|
||
SELECT @@wsrep_cluster_address; | ||
@@wsrep_cluster_address | ||
NULL | ||
SHOW STATUS LIKE 'wsrep_ready'; | ||
Variable_name Value | ||
wsrep_ready OFF | ||
SHOW STATUS LIKE 'wsrep_cluster_status'; | ||
Variable_name Value | ||
wsrep_cluster_status Disconnected | ||
call mtr.add_suppression("WSREP: .*Invalid backend URI.*"); | ||
call mtr.add_suppression("WSREP: gcs connect failed: Invalid argument"); | ||
disconnect node_2; | ||
disconnect node_1; |
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,35 @@ | ||
--source include/galera_cluster.inc | ||
|
||
# Save original auto_increment_offset values. | ||
--let $node_1=node_1 | ||
--let $node_2=node_2 | ||
--source include/auto_increment_offset_save.inc | ||
|
||
--connection node_2 | ||
--let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address` | ||
|
||
--error ER_WRONG_VALUE_FOR_VAR | ||
SET @@global.wsrep_sst_donor = NULL; | ||
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` | ||
SET @@global.wsrep_cluster_address='NULL'; | ||
SET SESSION wsrep_sync_wait=0; | ||
SELECT @@wsrep_sst_donor; | ||
SELECT @@wsrep_cluster_address; | ||
# Must return 'OFF' | ||
SHOW STATUS LIKE 'wsrep_ready'; | ||
|
||
# Must return 'Disconnected' | ||
SHOW STATUS LIKE 'wsrep_cluster_status'; | ||
|
||
--disable_query_log | ||
--eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_orig' | ||
--enable_query_log | ||
--source include/wait_until_connected_again.inc | ||
--source include/galera_wait_ready.inc | ||
call mtr.add_suppression("WSREP: .*Invalid backend URI.*"); | ||
call mtr.add_suppression("WSREP: gcs connect failed: Invalid argument"); | ||
|
||
# Restore original auto_increment_offset values. | ||
--source include/auto_increment_offset_restore.inc | ||
|
||
--source include/galera_end.inc |
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