Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
refs MW-245: Galera MTR Tests: additional tests for wsrep_reject_quer…
…ies, wsrep_dirty_reads
- Loading branch information
1 parent
8f717ed
commit 84d4ab5
Showing
2 changed files
with
65 additions
and
0 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,21 @@ | ||
| CREATE TABLE t1 (f1 INTEGER); | ||
| SET SESSION wsrep_reject_queries = ALL; | ||
| ERROR HY000: Variable 'wsrep_reject_queries' is a GLOBAL variable and should be set with SET GLOBAL | ||
| SET GLOBAL wsrep_reject_queries = ALL; | ||
| SELECT * FROM t1; | ||
| ERROR 08S01: WSREP has not yet prepared node for application use | ||
| SET GLOBAL wsrep_reject_queries = ALL_KILL; | ||
| ERROR HY000: Lost connection to MySQL server during query | ||
| SELECT * FROM t1; | ||
| ERROR 70100: Connection was killed | ||
| SELECT * FROM t1; | ||
| ERROR 08S01: WSREP has not yet prepared node for application use | ||
| SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; | ||
| VARIABLE_VALUE = 2 | ||
| 1 | ||
| INSERT INTO t1 VALUES (1); | ||
| SET GLOBAL wsrep_reject_queries = NONE; | ||
| SELECT COUNT(*) = 1 FROM t1; | ||
| COUNT(*) = 1 | ||
| 1 | ||
| 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # | ||
| # Test wsrep_reject_queries | ||
| # | ||
|
|
||
| --source include/galera_cluster.inc | ||
| --source include/have_innodb.inc | ||
|
|
||
| CREATE TABLE t1 (f1 INTEGER); | ||
|
|
||
| --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
|
|
||
| --connection node_1 | ||
| --error ER_GLOBAL_VARIABLE | ||
| SET SESSION wsrep_reject_queries = ALL; | ||
|
|
||
| SET GLOBAL wsrep_reject_queries = ALL; | ||
|
|
||
| --error ER_UNKNOWN_COM_ERROR | ||
| SELECT * FROM t1; | ||
|
|
||
| # Lost connection | ||
| --error 2013 | ||
| SET GLOBAL wsrep_reject_queries = ALL_KILL; | ||
|
|
||
| --connection node_1a | ||
| --error ER_CONNECTION_KILLED | ||
| SELECT * FROM t1; | ||
|
|
||
| --connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
| --error ER_UNKNOWN_COM_ERROR | ||
| SELECT * FROM t1; | ||
|
|
||
| # Confirm that replication continues | ||
|
|
||
| --connection node_2 | ||
| SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; | ||
| INSERT INTO t1 VALUES (1); | ||
|
|
||
| --connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
| SET GLOBAL wsrep_reject_queries = NONE; | ||
|
|
||
| SELECT COUNT(*) = 1 FROM t1; | ||
|
|
||
| DROP TABLE t1; |