-
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.
- Loading branch information
Showing
23 changed files
with
477 additions
and
277 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,30 @@ | ||
connection node_1; | ||
connection node_2; | ||
connection node_1; | ||
call mtr.add_suppression("WSREP: TO isolation failed for: "); | ||
CREATE TABLE t2(a int not null auto_increment primary key, b int, key(b)) engine=innodb; | ||
INSERT INTO t2 values (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6); | ||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; | ||
connection node_1a; | ||
BEGIN; | ||
UPDATE t2 set b = b + 20 where b BETWEEN 2 and 5;; | ||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1; | ||
connection node_1b; | ||
connection node_2; | ||
Killing server ... | ||
connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1; | ||
connection node_1c; | ||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; | ||
Got one of the listed errors | ||
Got one of the listed errors | ||
CREATE UNIQUE INDEX b2 ON t2(b); | ||
Got one of the listed errors | ||
connection node_1; | ||
disconnect node_1a; | ||
disconnect node_1b; | ||
disconnect node_1c; | ||
connection node_2; | ||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; | ||
DROP TABLE t2; | ||
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
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,71 @@ | ||
# | ||
# Confirm that with two nodes, killing one causes the other to stop accepting connections | ||
# | ||
|
||
--source include/galera_cluster.inc | ||
--source include/have_innodb.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_1 | ||
call mtr.add_suppression("WSREP: TO isolation failed for: "); | ||
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` | ||
|
||
CREATE TABLE t2(a int not null auto_increment primary key, b int, key(b)) engine=innodb; | ||
INSERT INTO t2 values (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6); | ||
|
||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
--connection node_1a | ||
BEGIN; | ||
--send UPDATE t2 set b = b + 20 where b BETWEEN 2 and 5; | ||
|
||
# | ||
# Take thread id for above query | ||
# | ||
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
--connection node_1b | ||
--let $k_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1` | ||
|
||
--connection node_2 | ||
--source include/kill_galera.inc | ||
|
||
--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
--connection node_1c | ||
--error ER_LOCK_DEADLOCK,ER_UNKNOWN_COM_ERROR | ||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; | ||
|
||
--disable_query_log | ||
--error ER_LOCK_DEADLOCK, ER_CANNOT_USER,ER_KILL_QUERY_DENIED_ERROR | ||
--eval KILL QUERY $k_thread; | ||
--enable_query_log | ||
|
||
# Reset the master and restart the slave so that post-test checks can run | ||
--error ER_LOCK_DEADLOCK,ER_UNKNOWN_COM_ERROR | ||
CREATE UNIQUE INDEX b2 ON t2(b); | ||
|
||
--connection node_1 | ||
--disconnect node_1a | ||
--disconnect node_1b | ||
--disconnect node_1c | ||
|
||
--connection node_2 | ||
--source include/start_mysqld.inc | ||
--source include/wait_until_connected_again.inc | ||
|
||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' | ||
--source include/wait_condition.inc | ||
|
||
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 | ||
--source include/wait_until_connected_again.inc | ||
|
||
DROP TABLE t2; | ||
|
||
# Restore original auto_increment_offset values. | ||
--let $node_2=node_2a | ||
--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
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.