diff options
author | Monty <monty@mariadb.org> | 2016-05-01 19:10:13 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-05-01 19:10:13 +0300 |
commit | 5a7374d71b1c1bb88cd09c4c634483113f793a2c (patch) | |
tree | 23b6f1e282473725ac9e440de445f71a53943ba7 /mysql-test | |
parent | 4f1c81de2875cbce4180e152d12a8a1df60c717a (diff) | |
download | mariadb-git-5a7374d71b1c1bb88cd09c4c634483113f793a2c.tar.gz |
Fixed test cases that broke because we now print changing of connections
- Don't log connection creation in galera_connect.inc
Diffstat (limited to 'mysql-test')
140 files changed, 741 insertions, 1 deletions
diff --git a/mysql-test/include/galera_connect.inc b/mysql-test/include/galera_connect.inc index 9d458c5e063..a40b03bf421 100644 --- a/mysql-test/include/galera_connect.inc +++ b/mysql-test/include/galera_connect.inc @@ -37,12 +37,15 @@ if (!$_galera_port) if ($galera_debug) { +--disable_query_log --echo connect($galera_connection_name,127.0.0.1,root,,test,$_galera_port,) +--enable_query_log } # Temporal solution to avoid concurrent IST MDEV-7178 --sleep 1 # Open a connection +--disable_query_log --connect($galera_connection_name,127.0.0.1,root,,test,$_galera_port,) - +--enable_query_log diff --git a/mysql-test/suite/galera/r/binlog_checksum.result b/mysql-test/suite/galera/r/binlog_checksum.result index 5c1981fc17f..e86f3892ac7 100644 --- a/mysql-test/suite/galera/r/binlog_checksum.result +++ b/mysql-test/suite/galera/r/binlog_checksum.result @@ -1,7 +1,9 @@ # On node_1 +connection node_1; SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM; SET @@GLOBAL.BINLOG_CHECKSUM=CRC32; # On node_2 +connection node_2; SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM; SET @@GLOBAL.BINLOG_CHECKSUM=CRC32; USE test; @@ -23,6 +25,7 @@ c1 5 # On node_2 +connection node_2; SELECT * FROM test.t1; c1 1 @@ -31,6 +34,10 @@ c1 4 5 DROP TABLE t1; +connection node_1; SET @@GLOBAL.BINLOG_CHECKSUM = @binlog_checksum_saved; +connection node_2; SET @@GLOBAL.BINLOG_CHECKSUM = @binlog_checksum_saved; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/create.result b/mysql-test/suite/galera/r/create.result index d8a2db99a68..20bc9a3958e 100644 --- a/mysql-test/suite/galera/r/create.result +++ b/mysql-test/suite/galera/r/create.result @@ -25,10 +25,12 @@ SET @@GLOBAL.wsrep_forced_binlog_format=@wsrep_forced_binlog_format_saved; # # MDEV-7673: CREATE TABLE SELECT fails on Galera cluster # +connection node_1; CREATE TABLE t1 (i INT) ENGINE=INNODB DEFAULT CHARSET=utf8 SELECT 1 as i; SELECT * FROM t1; i 1 +connection node_2; SELECT * FROM t1; i 1 @@ -37,6 +39,7 @@ DROP TABLE t1; # MDEV-8166 : Adding index on new table from select crashes Galera # cluster # +connection node_1; CREATE TABLE t1(i int(11) NOT NULL DEFAULT '0') ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO t1(i) VALUES (1), (2), (3); CREATE TABLE t2 (i INT) SELECT i FROM t1; @@ -46,6 +49,7 @@ i 1 2 3 +connection node_2; SELECT * FROM t2; i 1 diff --git a/mysql-test/suite/galera/r/enforce_storage_engine.result b/mysql-test/suite/galera/r/enforce_storage_engine.result index a3513fc2789..746aa22bf20 100644 --- a/mysql-test/suite/galera/r/enforce_storage_engine.result +++ b/mysql-test/suite/galera/r/enforce_storage_engine.result @@ -2,11 +2,13 @@ # MDEV-8831 : enforce_storage_engine doesn't block table creation on # other nodes (galera cluster) # +connection node_1; SET @@enforce_storage_engine=INNODB; CREATE TABLE t1(i INT) ENGINE=INNODB; CREATE TABLE t2(i INT) ENGINE=MYISAM; ERROR 42000: Unknown storage engine 'MyISAM' INSERT INTO t1 VALUES(1); +connection node_2; SHOW TABLES; Tables_in_test t1 @@ -14,6 +16,7 @@ SELECT COUNT(*)=1 FROM t1; COUNT(*)=1 1 CREATE TABLE t2(i INT) ENGINE=MYISAM; +connection node_1; SHOW TABLES; Tables_in_test t1 diff --git a/mysql-test/suite/galera/r/fk.result b/mysql-test/suite/galera/r/fk.result index d6a3a25b01a..ab8e1c8f680 100644 --- a/mysql-test/suite/galera/r/fk.result +++ b/mysql-test/suite/galera/r/fk.result @@ -1,6 +1,7 @@ USE test; # On node_1 +connection node_1; CREATE TABLE networks ( `tenant_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `id` varchar(36) COLLATE utf8_unicode_ci NOT NULL, @@ -60,9 +61,11 @@ INSERT INTO ipallocations VALUES ('f37aa3fe-ab99-4d0f-a566-6cd3169d7516','10.25. select * from ports where ports.id = 'f37aa3fe-ab99-4d0f-a566-6cd3169d7516'; tenant_id id name network_id mac_address admin_state_up status device_id device_owner f37aa3fe-ab99-4d0f-a566-6cd3169d7516 f37aa3fe-ab99-4d0f-a566-6cd3169d7516 fa:16:3e:e3:cc:bb 1 DOWN f37aa3fe-ab99-4d0f-a566-6cd3169d7516 network:router_gateway +connection node_2; select * from ports where ports.id = 'f37aa3fe-ab99-4d0f-a566-6cd3169d7516'; tenant_id id name network_id mac_address admin_state_up status device_id device_owner f37aa3fe-ab99-4d0f-a566-6cd3169d7516 f37aa3fe-ab99-4d0f-a566-6cd3169d7516 fa:16:3e:e3:cc:bb 1 DOWN f37aa3fe-ab99-4d0f-a566-6cd3169d7516 network:router_gateway +connection node_1; DELETE FROM ports WHERE ports.id = 'f37aa3fe-ab99-4d0f-a566-6cd3169d7516'; select * from networks; tenant_id id name status admin_state_up shared @@ -78,6 +81,7 @@ select * from ports; tenant_id id name network_id mac_address admin_state_up status device_id device_owner # On node_2 +connection node_2; select * from networks; tenant_id id name status admin_state_up shared f37aa3fe-ab99-4d0f-a566-6cd3169d7516 f37aa3fe-ab99-4d0f-a566-6cd3169d7516 MyNet ACTIVE 0 0 @@ -90,7 +94,10 @@ select * from ipallocations; port_id ip_address subnet_id network_id select * from ports; tenant_id id name network_id mac_address admin_state_up status device_id device_owner +connection node_1; drop table ipallocations; drop table subnets; drop table ports; drop table networks; +disconnect node_2; +disconnect node_1; diff --git a/mysql-test/suite/galera/r/galera_account_management.result b/mysql-test/suite/galera/r/galera_account_management.result index 9b3ae9ba46e..7fb472a5c2d 100644 --- a/mysql-test/suite/galera/r/galera_account_management.result +++ b/mysql-test/suite/galera/r/galera_account_management.result @@ -1,39 +1,55 @@ +connection node_1; CREATE USER user1, user2 IDENTIFIED BY 'password'; +connection node_2; SELECT COUNT(*) = 2 FROM mysql.user WHERE user IN ('user1', 'user2'); COUNT(*) = 2 1 +connection node_1; RENAME USER user2 TO user3; +connection node_2; SELECT COUNT(*) = 0 FROM mysql.user WHERE user = 'user2'; COUNT(*) = 0 1 SELECT COUNT(*) = 1 FROM mysql.user WHERE user = 'user3'; COUNT(*) = 1 1 +connection node_1; SET PASSWORD FOR user3 = PASSWORD('foo'); +connection node_1; SELECT password != '' FROM mysql.user WHERE user = 'user3'; password != '' 1 +connection node_1; DROP USER user1, user3; +connection node_2; SELECT COUNT(*) = 0 FROM mysql.user WHERE user IN ('user1', 'user2'); COUNT(*) = 0 1 +connection node_1; GRANT ALL ON *.* TO user4 IDENTIFIED BY 'password'; +connection node_2; SELECT COUNT(*) = 1 FROM mysql.user WHERE user = 'user4'; COUNT(*) = 1 1 SELECT Select_priv = 'Y' FROM mysql.user WHERE user = 'user4'; Select_priv = 'Y' 1 +connection node_1; CREATE USER user5; GRANT PROXY ON user4 TO user5; +connection node_2; SELECT COUNT(*) = 1 FROM mysql.proxies_priv WHERE user = 'user5'; COUNT(*) = 1 1 +connection node_1; REVOKE ALL PRIVILEGES ON *.* FROM user4; +connection node_2; SELECT Select_priv = 'N' FROM mysql.user WHERE user = 'user4'; Select_priv = 'N' 1 +connection node_1; REVOKE PROXY ON user4 FROM user5; +connection node_2; SELECT COUNT(*) = 0 FROM mysql.proxies_priv WHERE user = 'user5'; COUNT(*) = 0 1 diff --git a/mysql-test/suite/galera/r/galera_alter_engine_innodb.result b/mysql-test/suite/galera/r/galera_alter_engine_innodb.result index 2b30ac5814d..ff6ab792c0e 100644 --- a/mysql-test/suite/galera/r/galera_alter_engine_innodb.result +++ b/mysql-test/suite/galera/r/galera_alter_engine_innodb.result @@ -1,6 +1,7 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); ALTER TABLE t1 ENGINE=InnoDB; +connection node_2; SELECT ENGINE = 'InnoDB' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; ENGINE = 'InnoDB' 1 diff --git a/mysql-test/suite/galera/r/galera_alter_engine_myisam.result b/mysql-test/suite/galera/r/galera_alter_engine_myisam.result index 280cb58208c..389383858ac 100644 --- a/mysql-test/suite/galera/r/galera_alter_engine_myisam.result +++ b/mysql-test/suite/galera/r/galera_alter_engine_myisam.result @@ -2,10 +2,12 @@ SET GLOBAL wsrep_replicate_myisam = TRUE; CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM; INSERT INTO t1 VALUES (1); ALTER TABLE t1 ENGINE=InnoDB; +connection node_2; SELECT ENGINE = 'InnoDB' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; ENGINE = 'InnoDB' 1 SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_alter_table_force.result b/mysql-test/suite/galera/r/galera_alter_table_force.result index 401ab46d868..d0a2f81b631 100644 --- a/mysql-test/suite/galera/r/galera_alter_table_force.result +++ b/mysql-test/suite/galera/r/galera_alter_table_force.result @@ -1,6 +1,7 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); ALTER TABLE t1 FORCE; +connection node_2; SELECT ENGINE = 'InnoDB' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; ENGINE = 'InnoDB' 1 diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result index cecbfc1f3cf..18dcc55d5d4 100644 --- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result +++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result @@ -1,12 +1,17 @@ +connection node_1; SET SESSION wsrep_sync_wait = 0; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; FLUSH TABLE t1 WITH READ LOCK; +connection node_2; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_1; UNLOCK TABLES; SET SESSION wsrep_sync_wait = 7; SELECT COUNT(*) = 2 FROM t1; diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result index ee967356c85..1cf88dbf5d3 100644 --- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result +++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result @@ -1,10 +1,13 @@ +connection node_1; SET SESSION wsrep_sync_wait = 0; SET SESSION lock_wait_timeout = 60; SET SESSION innodb_lock_wait_timeout=60; SET SESSION wait_timeout=60; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; FLUSH TABLE t1 WITH READ LOCK; +connection node_2; ALTER TABLE t1 ADD COLUMN f2 INTEGER; +connection node_1; SELECT 1 FROM DUAL; 1 1 diff --git a/mysql-test/suite/galera/r/galera_as_master.result b/mysql-test/suite/galera/r/galera_as_master.result index d87a744000c..92a1a0e7cb3 100644 --- a/mysql-test/suite/galera/r/galera_as_master.result +++ b/mysql-test/suite/galera/r/galera_as_master.result @@ -1,4 +1,6 @@ +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; START SLAVE; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); # Disable binary logging for current session @@ -10,6 +12,7 @@ CREATE TABLE test.t3 AS SELECT * from t1; SET SQL_LOG_BIN=ON; INSERT INTO t1 VALUES(3); CREATE TABLE test.t4 AS SELECT * from t1; +connection node_2; SELECT * FROM t1; f1 1 @@ -27,6 +30,7 @@ f1 1 2 3 +connection node_3; SHOW TABLES; Tables_in_test t1 @@ -41,8 +45,10 @@ f1 2 3 # Cleanup +connection node_1; DROP TABLE t1, t4; SET SQL_LOG_BIN=OFF; DROP TABLE t2, t3; +connection node_3; STOP SLAVE; RESET SLAVE ALL; diff --git a/mysql-test/suite/galera/r/galera_as_master_large.result b/mysql-test/suite/galera/r/galera_as_master_large.result index 4d5533899cf..dad74211af9 100644 --- a/mysql-test/suite/galera/r/galera_as_master_large.result +++ b/mysql-test/suite/galera/r/galera_as_master_large.result @@ -2,7 +2,9 @@ # MDEV-9044 : Getting binlog corruption on my Galera cluster (10.1.8) # making it impossible to async slave. # +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; START SLAVE; +connection node_1; SELECT @@GLOBAL.BINLOG_CACHE_SIZE; @@GLOBAL.BINLOG_CACHE_SIZE 8192 @@ -12,12 +14,14 @@ START TRANSACTION; INSERT INTO t1 VALUES(1, REPEAT('-', 10000)); COMMIT; INSERT INTO t2 VALUES(1); +connection node_2; SELECT c1, LENGTH(c2) FROM t1; c1 LENGTH(c2) 1 10000 SELECT * FROM t2; c1 1 +connection node_3; SELECT c1, LENGTH(c2) FROM t1; c1 LENGTH(c2) 1 10000 @@ -25,6 +29,8 @@ SELECT * FROM t2; c1 1 # Cleanup +connection node_1; DROP TABLE t1, t2; +connection node_3; STOP SLAVE; RESET SLAVE ALL; diff --git a/mysql-test/suite/galera/r/galera_as_slave.result b/mysql-test/suite/galera/r/galera_as_slave.result index 2d7d689aa36..9ccb5106234 100644 --- a/mysql-test/suite/galera/r/galera_as_slave.result +++ b/mysql-test/suite/galera/r/galera_as_slave.result @@ -1,15 +1,24 @@ +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2; START SLAVE; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); +connection node_2; INSERT INTO t1 VALUES (2); +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 INSERT INTO t1 VALUES (3); +connection node_2; SELECT COUNT(*) = 3 FROM t1; COUNT(*) = 3 1 +connection node_1; DROP TABLE t1; +connection node_2; STOP SLAVE; RESET SLAVE ALL; +connection node_1; RESET MASTER; diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid.result b/mysql-test/suite/galera/r/galera_as_slave_gtid.result index fbac7b1b6b5..0ef9d208bf4 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_gtid.result +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid.result @@ -1,16 +1,24 @@ +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2; START SLAVE; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); SELECT LENGTH(@@global.gtid_binlog_state) > 1; LENGTH(@@global.gtid_binlog_state) > 1 1 +connection node_2; gtid_binlog_state_equal 1 +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 gtid_binlog_state_equal 1 +connection node_1; DROP TABLE t1; +connection node_3; +connection node_2; STOP SLAVE; RESET SLAVE ALL; diff --git a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result index 8c07d87eec3..210492937b0 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result @@ -1,7 +1,10 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_2; SET AUTOCOMMIT=OFF; FLUSH TABLES t1 FOR EXPORT; +connection node_1; INSERT INTO t1 VALUES (2); +connection node_2; SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; COMMIT; diff --git a/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result b/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result index e3819172510..ae1ca6d2157 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result @@ -1,7 +1,10 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_2; SET AUTOCOMMIT=OFF; FLUSH TABLES WITH READ LOCK;; +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; UNLOCK TABLES; wsrep_local_aborts_increment 1 diff --git a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result b/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result index 2e44a773b23..ce3ac6ab2cb 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result @@ -1,11 +1,15 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_2a; SELECT GET_LOCK("foo", 1000); GET_LOCK("foo", 1000) 1 +connection node_2; SET AUTOCOMMIT=OFF; INSERT INTO t1 VALUES (1); SELECT GET_LOCK("foo", 1000);; +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction wsrep_local_aborts_increment 1 diff --git a/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result b/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result index 7510e48ee83..81b5816ddbe 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result @@ -1,7 +1,10 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_2; SET AUTOCOMMIT=OFF; LOCK TABLE t1 WRITE; +connection node_1; INSERT INTO t1 VALUES (2); +connection node_2; UNLOCK TABLES; COMMIT; SELECT COUNT(*) = 1 FROM t1; diff --git a/mysql-test/suite/galera/r/galera_bf_abort_sleep.result b/mysql-test/suite/galera/r/galera_bf_abort_sleep.result index 8e85a5feda2..f069198dff6 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_sleep.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_sleep.result @@ -1,8 +1,11 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_2; SET AUTOCOMMIT=OFF; INSERT INTO t1 VALUES (1); SELECT SLEEP(1000);; +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction wsrep_local_aborts_increment 1 diff --git a/mysql-test/suite/galera/r/galera_binlog_cache_size.result b/mysql-test/suite/galera/r/galera_binlog_cache_size.result index 9726cf2a440..6aac74ab5f0 100644 --- a/mysql-test/suite/galera/r/galera_binlog_cache_size.result +++ b/mysql-test/suite/galera/r/galera_binlog_cache_size.result @@ -3,6 +3,7 @@ CREATE TABLE ten (f1 INTEGER); INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); SET GLOBAL binlog_cache_size=4096; SET GLOBAL max_binlog_cache_size=4096; +connection node_1a; SET AUTOCOMMIT=ON; START TRANSACTION; INSERT INTO t1 SELECT REPEAT('a', 767) FROM ten; diff --git a/mysql-test/suite/galera/r/galera_binlog_checksum.result b/mysql-test/suite/galera/r/galera_binlog_checksum.result index a6ab62350b1..b0ea2293119 100644 --- a/mysql-test/suite/galera/r/galera_binlog_checksum.result +++ b/mysql-test/suite/galera/r/galera_binlog_checksum.result @@ -1,9 +1,12 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_1; UPDATE t1 SET f1 = 2 WHERE f1 = 1; +connection node_2; SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result b/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result index 984a943fcbe..7b88af5d5af 100644 --- a/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result +++ b/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result @@ -1,5 +1,6 @@ CREATE TABLE t1 (f1 VARCHAR(1000)); INSERT INTO t1 VALUES (REPEAT('x', 1000)); +connection node_2; SELECT COUNT(*) = 1 FROM t1 WHERE f1 = REPEAT('x', 1000); COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_concurrent_ctas.result b/mysql-test/suite/galera/r/galera_concurrent_ctas.result index 8b0a4c07ac2..8a3ac1ae0d3 100644 --- a/mysql-test/suite/galera/r/galera_concurrent_ctas.result +++ b/mysql-test/suite/galera/r/galera_concurrent_ctas.result @@ -1 +1,3 @@ +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/galera_create_function.result b/mysql-test/suite/galera/r/galera_create_function.result index 8e4a823d00f..576ea44cce5 100644 --- a/mysql-test/suite/galera/r/galera_create_function.result +++ b/mysql-test/suite/galera/r/galera_create_function.result @@ -1,3 +1,4 @@ +connection node_1; CREATE USER 'user1'; CREATE DEFINER = 'user1' @@ -18,12 +19,14 @@ DETERMINISTIC NO SQL SQL SECURITY INVOKER RETURN 123; +connection node_1; SHOW CREATE FUNCTION f1; Function sql_mode Create Function character_set_client collation_connection Database Collation f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTION `f1`(param INTEGER) RETURNS varchar(200) CHARSET latin1 MODIFIES SQL DATA COMMENT 'f1_comment' RETURN 'abc' latin1 latin1_swedish_ci latin1_swedish_ci +connection node_2; SELECT 1 FROM DUAL; 1 1 @@ -33,6 +36,7 @@ f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTIO MODIFIES SQL DATA COMMENT 'f1_comment' RETURN 'abc' latin1 latin1_swedish_ci latin1_swedish_ci +connection node_1; SHOW CREATE FUNCTION f2; Function sql_mode Create Function character_set_client collation_connection Database Collation f2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f2`(param VARCHAR(100)) RETURNS int(11) @@ -40,6 +44,7 @@ f2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` DETERMINISTIC SQL SECURITY INVOKER RETURN 123 latin1 latin1_swedish_ci latin1_swedish_ci +connection node_2; SHOW CREATE FUNCTION f2; Function sql_mode Create Function character_set_client collation_connection Database Collation f2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f2`(param VARCHAR(100)) RETURNS int(11) @@ -53,6 +58,7 @@ f1(1) = 'abc' SELECT f2('abc') = 123; f2('abc') = 123 1 +connection node_1; DROP FUNCTION f1; DROP FUNCTION f2; DROP USER 'user1'; diff --git a/mysql-test/suite/galera/r/galera_create_procedure.result b/mysql-test/suite/galera/r/galera_create_procedure.result index 6191ef48ee5..90f29ffa617 100644 --- a/mysql-test/suite/galera/r/galera_create_procedure.result +++ b/mysql-test/suite/galera/r/galera_create_procedure.result @@ -1,3 +1,4 @@ +connection node_1; CREATE USER 'user1'; CREATE TABLE t1 (f1 INTEGER); CREATE @@ -16,12 +17,14 @@ PROCEDURE p2 (param VARCHAR(100)) DETERMINISTIC NO SQL SQL SECURITY INVOKER BEGIN END ; +connection node_1; SHOW CREATE PROCEDURE p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` PROCEDURE `p1`(IN param1 INTEGER, OUT param2 INTEGER, INOUT param3 INTEGER) MODIFIES SQL DATA COMMENT 'p1_comment' INSERT INTO t1 VALUES (1) latin1 latin1_swedish_ci latin1_swedish_ci +connection node_2; SELECT 1 FROM DUAL; 1 1 @@ -31,6 +34,7 @@ p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` PROCEDU MODIFIES SQL DATA COMMENT 'p1_comment' INSERT INTO t1 VALUES (1) latin1 latin1_swedish_ci latin1_swedish_ci +connection node_1; SHOW CREATE PROCEDURE p2; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation p2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(param VARCHAR(100)) @@ -38,6 +42,7 @@ p2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` DETERMINISTIC SQL SECURITY INVOKER BEGIN END latin1 latin1_swedish_ci latin1_swedish_ci +connection node_2; SHOW CREATE PROCEDURE p2; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation p2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(param VARCHAR(100)) @@ -47,6 +52,7 @@ p2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` BEGIN END latin1 latin1_swedish_ci latin1_swedish_ci CALL p1(@a, @b, @c); CALL p2('abc'); +connection node_1; DROP PROCEDURE p1; DROP PROCEDURE p2; DROP USER 'user1'; diff --git a/mysql-test/suite/galera/r/galera_create_table_like.result b/mysql-test/suite/galera/r/galera_create_table_like.result index b335101fa62..131ac311bca 100644 --- a/mysql-test/suite/galera/r/galera_create_table_like.result +++ b/mysql-test/suite/galera/r/galera_create_table_like.result @@ -11,6 +11,7 @@ CREATE TABLE real_table3 LIKE schema1.myisam_table; CREATE TEMPORARY TABLE temp_table1 LIKE schema1.real_table; CREATE TEMPORARY TABLE temp_table2 LIKE schema1.temp_table; CREATE TEMPORARY TABLE temp_table3 LIKE schema1.myisam_table; +connection node_2; SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'real_table' AND TABLE_SCHEMA = 'schema1'; COUNT(*) = 1 1 @@ -38,6 +39,7 @@ COUNT(*) = 0 SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'temp_table3' AND TABLE_SCHEMA = 'schema2'; COUNT(*) = 0 1 +connection node_1; DROP TABLE schema1.real_table; DROP TABLE schema1.myisam_table; DROP TABLE schema2.real_table1; diff --git a/mysql-test/suite/galera/r/galera_create_trigger.result b/mysql-test/suite/galera/r/galera_create_trigger.result index 7e656081871..d07a007543e 100644 --- a/mysql-test/suite/galera/r/galera_create_trigger.result +++ b/mysql-test/suite/galera/r/galera_create_trigger.result @@ -7,6 +7,7 @@ CREATE DEFINER=root@localhost TRIGGER definer_root BEFORE INSERT ON definer_root CREATE DEFINER=user1 TRIGGER definer_user BEFORE INSERT ON definer_user FOR EACH ROW SET NEW.trigger_user = CURRENT_USER(); CREATE DEFINER=current_user TRIGGER definer_current_user BEFORE INSERT ON definer_current_user FOR EACH ROW SET NEW.trigger_user = CURRENT_USER(); CREATE TRIGGER definer_default BEFORE INSERT ON definer_default FOR EACH ROW SET NEW.trigger_user = CURRENT_USER(); +connection node_2; INSERT INTO definer_root (f1) VALUES (1); SELECT DEFINER = 'root@localhost' FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME = 'definer_root'; DEFINER = 'root@localhost' @@ -35,6 +36,7 @@ DEFINER = 'root@localhost' SELECT trigger_user = 'root@localhost' FROM definer_default; trigger_user = 'root@localhost' 1 +connection node_1; DROP TABLE definer_current_user; DROP TABLE definer_user; DROP TABLE definer_root; diff --git a/mysql-test/suite/galera/r/galera_delete_limit.result b/mysql-test/suite/galera/r/galera_delete_limit.result index 72bee18eab6..f6fb2e56346 100644 --- a/mysql-test/suite/galera/r/galera_delete_limit.result +++ b/mysql-test/suite/galera/r/galera_delete_limit.result @@ -1,8 +1,11 @@ +connection node_1; CREATE TABLE ten (f1 INTEGER) Engine=InnoDB; INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO t1 SELECT f1 FROM ten ORDER BY RAND(); +connection node_2; DELETE FROM t1 ORDER BY RAND() LIMIT 5; +connection node_1; sum_matches 1 max_matches @@ -10,7 +13,9 @@ max_matches DROP TABLE t1; CREATE TABLE t2 (f1 INTEGER) Engine=InnoDB; INSERT INTO t2 SELECT f1 FROM ten ORDER BY RAND(); +connection node_2; DELETE FROM t2 ORDER BY RAND() LIMIT 5; +connection node_1; sum_matches 1 max_matches diff --git a/mysql-test/suite/galera/r/galera_drop_multi.result b/mysql-test/suite/galera/r/galera_drop_multi.result index d82ae3bec1a..7793ef93b90 100644 --- a/mysql-test/suite/galera/r/galera_drop_multi.result +++ b/mysql-test/suite/galera/r/galera_drop_multi.result @@ -8,6 +8,7 @@ START TRANSACTION; DROP TABLE t1, t2, t3, t4; INSERT INTO t5 VALUES (1); COMMIT; +connection node_2; SHOW CREATE TABLE t1; ERROR 42S02: Table 'test.t1' doesn't exist SHOW CREATE TABLE t2; @@ -17,4 +18,5 @@ ERROR 42S02: Table 'test.t3' doesn't exist SHOW CREATE TABLE t4; ERROR 42S02: Table 'test.t4' doesn't exist CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t2,test.t4'' on query\. Default database: 'test'\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); +connection node_1; DROP TABLE t5; diff --git a/mysql-test/suite/galera/r/galera_enum.result b/mysql-test/suite/galera/r/galera_enum.result index e853c5c9943..e8ccb12b990 100644 --- a/mysql-test/suite/galera/r/galera_enum.result +++ b/mysql-test/suite/galera/r/galera_enum.result @@ -1,9 +1,11 @@ +connection node_1; CREATE TABLE t1 (f1 ENUM('', 'one', 'two'), KEY (f1)) ENGINE=InnoDB; INSERT INTO t1 VALUES (''); INSERT INTO t1 VALUES ('one'), ('two'); INSERT INTO t1 VALUES (0), (1), (2); Warnings: Warning 1265 Data truncated for column 'f1' at row 1 +connection node_2; SELECT COUNT(*) = 6 FROM t1; COUNT(*) = 6 1 @@ -14,23 +16,30 @@ SELECT COUNT(*) = 2 FROM t1 where f1 = 'one'; COUNT(*) = 2 1 DROP TABLE t1; +connection node_1; CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (''), ('one'), ('two'); +connection node_2; SELECT COUNT(*) = 3 FROM t1; COUNT(*) = 3 1 SELECT COUNT(*) = 1 FROM t1 WHERE f1 = ''; COUNT(*) = 1 1 +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f1 = 'three' where f1 = ''; +connection node_2; SET AUTOCOMMIt=OFF; START TRANSACTION; UPDATE t1 SET f1 = 'four' where f1 = ''; +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_1; SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three'; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_events.result b/mysql-test/suite/galera/r/galera_events.result index 09d8406d5d0..f01627aba70 100644 --- a/mysql-test/suite/galera/r/galera_events.result +++ b/mysql-test/suite/galera/r/galera_events.result @@ -1,18 +1,27 @@ +connection node_1; CREATE EVENT event1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT 1; +connection node_2; SELECT DEFINER= 'root@localhost', ORIGINATOR = 1, STATUS = 'SLAVESIDE_DISABLED', EVENT_TYPE = 'ONE TIME', ON_COMPLETION = 'NOT PRESERVE' FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME = 'event1'; DEFINER= 'root@localhost' ORIGINATOR = 1 STATUS = 'SLAVESIDE_DISABLED' EVENT_TYPE = 'ONE TIME' ON_COMPLETION = 'NOT PRESERVE' 1 1 1 1 1 +connection node_1; ALTER EVENT event1 DISABLE; +connection node_2; SELECT DEFINER= 'root@localhost', ORIGINATOR = 1, STATUS = 'SLAVESIDE_DISABLED', EVENT_TYPE = 'ONE TIME', ON_COMPLETION = 'NOT PRESERVE' FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME = 'event1'; DEFINER= 'root@localhost' ORIGINATOR = 1 STATUS = 'SLAVESIDE_DISABLED' EVENT_TYPE = 'ONE TIME' ON_COMPLETION = 'NOT PRESERVE' 1 1 1 1 1 +connection node_2; SET GLOBAL event_scheduler = ON; CREATE EVENT event2 ON SCHEDULE AT CURRENT_TIMESTAMP ON COMPLETION NOT PRESERVE DO SELECT 1; +connection node_1; SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME = 'event2'; COUNT(*) = 0 1 +connection node_1; DROP EVENT event1; +connection node_2; SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME = 'event1'; COUNT(*) = 0 1 +connection node_2; SET GLOBAL event_scheduler = OFF;; diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result index 89f4301a0b4..73375ae55c5 100644 --- a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result +++ b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result @@ -18,7 +18,9 @@ ON DELETE CASCADE INSERT INTO grandparent VALUES (1),(2); INSERT INTO parent VALUES (1,1), (2,2); INSERT INTO child VALUES (1,1), (2,2); +connection node_2; DELETE FROM grandparent WHERE id = 1; +connection node_1; SELECT COUNT(*) = 0 FROM parent WHERE grandparent_id = 1; COUNT(*) = 0 1 diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_update.result b/mysql-test/suite/galera/r/galera_fk_cascade_update.result index 2ab2ad31a13..5fe8b532473 100644 --- a/mysql-test/suite/galera/r/galera_fk_cascade_update.result +++ b/mysql-test/suite/galera/r/galera_fk_cascade_update.result @@ -18,7 +18,9 @@ ON UPDATE CASCADE INSERT INTO grandparent VALUES (1),(2); INSERT INTO parent VALUES (1,1), (2,2); INSERT INTO child VALUES (1,1), (2,2); +connection node_2; UPDATE grandparent SET id = 3 WHERE id = 1; +connection node_1; SELECT COUNT(*) = 1 FROM parent WHERE grandparent_id = 3; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_fk_conflict.result b/mysql-test/suite/galera/r/galera_fk_conflict.result index ae6c4823a54..d9919c0348b 100644 --- a/mysql-test/suite/galera/r/galera_fk_conflict.result +++ b/mysql-test/suite/galera/r/galera_fk_conflict.result @@ -10,13 +10,17 @@ REFERENCES parent(id) ) ENGINE=InnoDB; INSERT INTO parent VALUES (1), (2); INSERT INTO child VALUES (1,1); +connection node_1; SET AUTOCOMMIT = OFF; START TRANSACTION; DELETE FROM parent WHERE id = 2; +connection node_2; SET AUTOCOMMIT = OFF; START TRANSACTION; INSERT INTO child VALUES (2, 2); +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction DROP TABLE child; diff --git a/mysql-test/suite/galera/r/galera_fk_mismatch.result b/mysql-test/suite/galera/r/galera_fk_mismatch.result index 07cdb1b09a2..bdc60c9e099 100644 --- a/mysql-test/suite/galera/r/galera_fk_mismatch.result +++ b/mysql-test/suite/galera/r/galera_fk_mismatch.result @@ -13,11 +13,14 @@ ON DELETE CASCADE ) ENGINE=InnoDB; INSERT INTO parent VALUES (1, 2); INSERT INTO child VALUES (1, 1); +connection node_2; UPDATE parent SET id1 = 3 WHERE id1 = 1; +connection node_1; SELECT COUNT(*) = 1 FROM child WHERE parent_id1 = 3; COUNT(*) = 1 1 DELETE FROM parent WHERE id1 = 3; +connection node_2; SELECT COUNT(*) = 0 FROM child WHERE parent_id1 = 3; COUNT(*) = 0 1 diff --git a/mysql-test/suite/galera/r/galera_fk_multicolumn.result b/mysql-test/suite/galera/r/galera_fk_multicolumn.result index a86b87a83ef..f5b6aa23692 100644 --- a/mysql-test/suite/galera/r/galera_fk_multicolumn.result +++ b/mysql-test/suite/galera/r/galera_fk_multicolumn.result @@ -17,7 +17,9 @@ ON UPDATE CASCADE INSERT INTO t0 VALUES (0, 0); INSERT INTO t1 VALUES (0); INSERT INTO t2 VALUES (0); +connection node_2; UPDATE t0 SET f1 = 1, f2 = 2; +connection node_1; SELECT f1 = 1 FROM t1 WHERE f1 = 1; f1 = 1 1 diff --git a/mysql-test/suite/galera/r/galera_fk_multitable.result b/mysql-test/suite/galera/r/galera_fk_multitable.result index e77128d3b04..04ff7adc3e9 100644 --- a/mysql-test/suite/galera/r/galera_fk_multitable.result +++ b/mysql-test/suite/galera/r/galera_fk_multitable.result @@ -11,7 +11,9 @@ ON DELETE CASCADE INSERT INTO t0 VALUES (0), (1); INSERT INTO t1 VALUES (0, 0); INSERT INTO t1 VALUES (1, 0); +connection node_2; DELETE t0.*, t1.* FROM t0, t1 WHERE t0.f0 = 0 AND t1.f1 = 0; +connection node_1; SELECT COUNT(*) = 1 FROM t0; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_fk_no_pk.result b/mysql-test/suite/galera/r/galera_fk_no_pk.result index e4f92863d92..e7b5f0b2b64 100644 --- a/mysql-test/suite/galera/r/galera_fk_no_pk.result +++ b/mysql-test/suite/galera/r/galera_fk_no_pk.result @@ -12,11 +12,14 @@ ON DELETE CASCADE ) ENGINE=InnoDB; INSERT INTO parent VALUES (1), (1), (2), (2); INSERT INTO child VALUES (1,1), (2,2), (1,1), (2,2); +connection node_2; DELETE FROM parent WHERE id = 1; SELECT COUNT(*) = 0 FROM child WHERE id = 1; COUNT(*) = 0 1 +connection node_1; UPDATE parent SET id = 3 WHERE id = 2; +connection node_2; SELECT COUNT(*) = 0 FROM child WHERE parent_id = 1; COUNT(*) = 0 1 diff --git a/mysql-test/suite/galera/r/galera_fk_selfreferential.result b/mysql-test/suite/galera/r/galera_fk_selfreferential.result index 25c37046e88..3b4dbf2a8e9 100644 --- a/mysql-test/suite/galera/r/galera_fk_selfreferential.result +++ b/mysql-test/suite/galera/r/galera_fk_selfreferential.result @@ -6,7 +6,9 @@ REFERENCES t1(f1) ON DELETE CASCADE ) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, 1), (2, 1); +connection node_2; DELETE FROM t1 WHERE f1 = 1; +connection node_1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 diff --git a/mysql-test/suite/galera/r/galera_fk_setnull.result b/mysql-test/suite/galera/r/galera_fk_setnull.result index f7fb9d04040..d4f20fe60a3 100644 --- a/mysql-test/suite/galera/r/galera_fk_setnull.result +++ b/mysql-test/suite/galera/r/galera_fk_setnull.result @@ -12,10 +12,12 @@ ON DELETE SET NULL ) ENGINE=InnoDB; INSERT INTO parent VALUES (1),(2); INSERT INTO child VALUES (1,1),(2,2); +connection node_2; DELETE FROM parent WHERE id = 1; SELECT parent_id IS NULL FROM child WHERE id = 1; parent_id IS NULL 1 +connection node_1; SELECT parent_id IS NULL FROM child WHERE id = 1; parent_id IS NULL 1 @@ -23,8 +25,10 @@ UPDATE parent SET id = 3 WHERE id = 2; SELECT parent_id IS NULL FROM child WHERE id = 2; parent_id IS NULL 1 +connection node_2; SELECT parent_id IS NULL FROM child WHERE id = 2; parent_id IS NULL 1 +connection node_1; DROP TABLE child; DROP TABLE parent; diff --git a/mysql-test/suite/galera/r/galera_forced_binlog_format.result b/mysql-test/suite/galera/r/galera_forced_binlog_format.result index 92e78685b58..01f738f6109 100644 --- a/mysql-test/suite/galera/r/galera_forced_binlog_format.result +++ b/mysql-test/suite/galera/r/galera_forced_binlog_format.result @@ -1,3 +1,4 @@ +connection node_1; RESET MASTER; SET SESSION binlog_format = 'STATEMENT'; Warnings: @@ -40,4 +41,6 @@ GRANT ALL PRIVILEGES ON `testdb_9401`.`t1` TO 'dummy'@'localhost' REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost; DROP USER dummy@localhost; DROP DATABASE testdb_9401; +disconnect node_2; +disconnect node_1; # End of tests diff --git a/mysql-test/suite/galera/r/galera_ftwrl.result b/mysql-test/suite/galera/r/galera_ftwrl.result index c216b52650b..0565781c051 100644 --- a/mysql-test/suite/galera/r/galera_ftwrl.result +++ b/mysql-test/suite/galera/r/galera_ftwrl.result @@ -1,7 +1,10 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +connection node_2; SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; FLUSH TABLES WITH READ LOCK; +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; SHOW TABLES; ERROR HY000: Lock wait timeout exceeded; try restarting transaction SELECT * FROM t1; diff --git a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result index ad60ead4b8a..a1ba8672eae 100644 --- a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result +++ b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result @@ -1,16 +1,22 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; FLUSH TABLES WITH READ LOCK; +connection node_1; INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (5); +connection node_1a; +connection node_2; UNLOCK TABLES; +connection node_1; INSERT INTO t1 VALUES (6); +connection node_2; SELECT COUNT(*) = 6 FROM t1; COUNT(*) = 6 1 diff --git a/mysql-test/suite/galera/r/galera_gtid.result b/mysql-test/suite/galera/r/galera_gtid.result index 546c29cb49a..acc5eae9876 100644 --- a/mysql-test/suite/galera/r/galera_gtid.result +++ b/mysql-test/suite/galera/r/galera_gtid.result @@ -1,9 +1,11 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY); INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 UPDATE t1 SET f1 = 2; +connection node_1; SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_insert_ignore.result b/mysql-test/suite/galera/r/galera_insert_ignore.result index b53b5795416..d21fb2b02d0 100644 --- a/mysql-test/suite/galera/r/galera_insert_ignore.result +++ b/mysql-test/suite/galera/r/galera_insert_ignore.result @@ -1,5 +1,7 @@ SET GLOBAL wsrep_sync_wait = 7; +connection node_2; SET GLOBAL wsrep_sync_wait = 7; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); INSERT IGNORE INTO t1 VALUES (1), (2); @@ -9,10 +11,12 @@ SELECT * FROM t1; f1 1 2 +connection node_2; SELECT * FROM t1; f1 1 2 +connection node_2; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (0), (2), (3); INSERT IGNORE INTO t1 SELECT f1 FROM t2; @@ -24,14 +28,17 @@ f1 1 2 3 +connection node_1; SELECT * FROM t1; f1 0 1 2 3 +connection node_2; CREATE TABLE t3 (f1 INTEGER UNIQUE) Engine=InnoDB; INSERT INTO t3 VALUES (NULL); +connection node_1; INSERT IGNORE INTO t3 VALUES (1), (NULL), (2); SELECT * FROM t3; f1 @@ -39,6 +46,7 @@ NULL NULL 1 2 +connection node_2; SELECT * FROM t3; f1 NULL @@ -46,6 +54,7 @@ NULL 1 2 SET GLOBAL wsrep_sync_wait = (SELECT @@wsrep_sync_wait); +connection node_1; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; diff --git a/mysql-test/suite/galera/r/galera_insert_multi.result b/mysql-test/suite/galera/r/galera_insert_multi.result index 33717781f2c..38bb5c26d20 100644 --- a/mysql-test/suite/galera/r/galera_insert_multi.result +++ b/mysql-test/suite/galera/r/galera_insert_multi.result @@ -1,57 +1,76 @@ +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1),(2); +connection node_2; INSERT INTO t1 VALUES (3),(4); +connection node_1; SELECT COUNT(*) = 4 FROM t1; COUNT(*) = 4 1 +connection node_2; SELECT COUNT(*) = 4 FROM t1; COUNT(*) = 4 1 DROP TABLE t1; +connection node_2; CREATE TABLE t1 (f1 INTEGER, KEY (f1)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1),(1); +connection node_1; INSERT INTO t1 VALUES (2),(2); +connection node_2; SELECT COUNT(*) = 4 FROM t1; COUNT(*) = 4 1 +connection node_1; SELECT COUNT(*) = 4 FROM t1; COUNT(*) = 4 1 DROP TABLE t1; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_2; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 DROP TABLE t1; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; SET AUTOCOMMIT = OFF; START TRANSACTION; INSERT INTO t1 VALUES (1), (2); +connection node_2; SET AUTOCOMMIT = OFF; START TRANSACTION; INSERT INTO t1 VALUES (2), (1); +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ROLLBACK; INSERT INTO t1 VALUES (1), (2); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' DROP TABLE t1; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; START TRANSACTION; INSERT INTO t1 VALUES (1), (2); +connection node_2; START TRANSACTION; INSERT INTO t1 VALUES (2), (1); +connection node_1; ROLLBACK; +connection node_2; COMMIT; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 +connection node_1; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 diff --git a/mysql-test/suite/galera/r/galera_kill_applier.result b/mysql-test/suite/galera/r/galera_kill_applier.result index fe4911639ed..6fa632c242f 100644 --- a/mysql-test/suite/galera/r/galera_kill_applier.result +++ b/mysql-test/suite/galera/r/galera_kill_applier.result @@ -1,3 +1,4 @@ +connection node_1; Got one of the listed errors Got one of the listed errors Got one of the listed errors diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result index 8dd36497dfb..c5b3e31b80e 100644 --- a/mysql-test/suite/galera/r/galera_kill_ddl.result +++ b/mysql-test/suite/galera/r/galera_kill_ddl.result @@ -1,11 +1,17 @@ +connection node_1; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +connection node_2; Killing server ... +connection node_1; ALTER TABLE t1 ADD COLUMN f2 INTEGER; +connection node_2; +connection node_2a; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1'; COUNT(*) = 2 1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 +connection node_1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_kill_smallchanges.result b/mysql-test/suite/galera/r/galera_kill_smallchanges.result index 8409740a035..bcd7d6fd15d 100644 --- a/mysql-test/suite/galera/r/galera_kill_smallchanges.result +++ b/mysql-test/suite/galera/r/galera_kill_smallchanges.result @@ -1,11 +1,17 @@ +connection node_1; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +connection node_2; Killing server ... +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; +connection node_2a; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 +connection node_1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_lock_table.result b/mysql-test/suite/galera/r/galera_lock_table.result index 16e9037a4de..c15f61d298e 100644 --- a/mysql-test/suite/galera/r/galera_lock_table.result +++ b/mysql-test/suite/galera/r/galera_lock_table.result @@ -1,8 +1,11 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB; +connection node_2; LOCK TABLE t1 READ; +connection node_1; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); +connection node_2a; SET SESSION wsrep_sync_wait=0; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 @@ -10,6 +13,7 @@ COUNT(*) = 0 SELECT COUNT(*) = 0 FROM t2; COUNT(*) = 0 1 +connection node_2; UNLOCK TABLES; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 diff --git a/mysql-test/suite/galera/r/galera_log_bin.result b/mysql-test/suite/galera/r/galera_log_bin.result index 4772f347375..576a72eb55f 100644 --- a/mysql-test/suite/galera/r/galera_log_bin.result +++ b/mysql-test/suite/galera/r/galera_log_bin.result @@ -3,12 +3,14 @@ INSERT INTO t1 VALUES (1); CREATE TABLE t2 (id INT) ENGINE=InnoDB; INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 SELECT COUNT(*) = 2 FROM t2; COUNT(*) = 2 1 +connection node_1; ALTER TABLE t1 ADD COLUMN f2 INTEGER; FLUSH LOGS; SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18; @@ -31,6 +33,7 @@ mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000002 # Xid # # COMMIT /* xid=# */ mysqld-bin.000002 # Gtid # # GTID 0-1-6 mysqld-bin.000002 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER +connection node_2; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 2 1 @@ -56,4 +59,5 @@ mysqld-bin.000003 # Gtid # # GTID 0-1-6 mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER DROP TABLE t1; DROP TABLE t2; +connection node_1; RESET MASTER; diff --git a/mysql-test/suite/galera/r/galera_many_indexes.result b/mysql-test/suite/galera/r/galera_many_indexes.result index ab6eec550a1..59d0194687f 100644 --- a/mysql-test/suite/galera/r/galera_many_indexes.result +++ b/mysql-test/suite/galera/r/galera_many_indexes.result @@ -63,6 +63,7 @@ CREATE UNIQUE INDEX i3 ON t1(f1); CREATE UNIQUE INDEX i2 ON t1(f1); CREATE UNIQUE INDEX i1 ON t1(f1); INSERT INTO t1 VALUES (REPEAT('a', 767)); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 @@ -91,6 +92,7 @@ INSERT INTO t1 VALUES (REPEAT('b', 767)); ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status OK +connection node_1; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 @@ -98,6 +100,7 @@ ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status OK DELETE FROM t1 WHERE f1 = REPEAT('b', 767); +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; SELECT COUNT(*) = 1 FROM t1; @@ -108,16 +111,23 @@ ROLLBACK; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_2; START TRANSACTION; SET AUTOCOMMIT=OFF; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_1; START TRANSACTION; +connection node_2; START TRANSACTION; +connection node_1; UPDATE t1 SET f1 = REPEAT('e', 767); +connection node_2; UPDATE t1 SET f1 = REPEAT('f', 767); +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_mdl_race.result b/mysql-test/suite/galera/r/galera_mdl_race.result index 535f20de7f1..0c83ead931e 100644 --- a/mysql-test/suite/galera/r/galera_mdl_race.result +++ b/mysql-test/suite/galera/r/galera_mdl_race.result @@ -2,24 +2,32 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); INSERT INTO t1 VALUES (1, 'a'); INSERT INTO t1 VALUES (2, 'a'); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; UPDATE t1 SET f2 = 'b' WHERE f1 = 1; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; LOCK TABLE t2 WRITE; +connection node_1; SET GLOBAL DEBUG = "d,sync.wsrep_before_mdl_wait"; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead SELECT * FROM t2;; +connection node_1a; SET GLOBAL DEBUG = "d,sync.wsrep_after_BF_victim_lock"; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +connection node_2; UPDATE t1 SET f2 = 'c' WHERE f1 = 1; +connection node_1a; SET GLOBAL DEBUG = ""; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock"; UNLOCK TABLES; +connection node_1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a'; COUNT(*) = 1 @@ -27,6 +35,7 @@ COUNT(*) = 1 SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c'; COUNT(*) = 1 1 +connection node_2; SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a'; COUNT(*) = 1 1 @@ -35,4 +44,5 @@ COUNT(*) = 1 1 DROP TABLE t1; DROP TABLE t2; +connection node_1a; SET DEBUG_SYNC = "RESET"; diff --git a/mysql-test/suite/galera/r/galera_multi_database.result b/mysql-test/suite/galera/r/galera_multi_database.result index a04eb484caf..f6242de663b 100644 --- a/mysql-test/suite/galera/r/galera_multi_database.result +++ b/mysql-test/suite/galera/r/galera_multi_database.result @@ -2,13 +2,17 @@ CREATE DATABASE d1; CREATE TABLE d1.t1(f1 INTEGER) ENGINE=InnoDB; CREATE DATABASE d2; CREATE TABLE d2.t1(f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO d1.t1 VALUES (1); +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO d2.t1 VALUES (1); +connection node_1; COMMIT; +connection node_2; COMMIT; SELECT COUNT(*) = 1 FROM d1.t1; COUNT(*) = 1 @@ -16,6 +20,7 @@ COUNT(*) = 1 SELECT COUNT(*) = 1 FROM d2.t1; COUNT(*) = 1 1 +connection node_1; SELECT COUNT(*) = 1 FROM d1.t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_myisam_autocommit.result b/mysql-test/suite/galera/r/galera_myisam_autocommit.result index 3f8d93bae76..e9578a261e6 100644 --- a/mysql-test/suite/galera/r/galera_myisam_autocommit.result +++ b/mysql-test/suite/galera/r/galera_myisam_autocommit.result @@ -14,6 +14,7 @@ DELETE FROM t1 WHERE f1 = 9; DELETE FROM t2 WHERE f1 = 9; TRUNCATE TABLE t1; TRUNCATE TABLE t1; +connection node_2; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 diff --git a/mysql-test/suite/galera/r/galera_myisam_transactions.result b/mysql-test/suite/galera/r/galera_myisam_transactions.result index 284f92b414c..25796c309d1 100644 --- a/mysql-test/suite/galera/r/galera_myisam_transactions.result +++ b/mysql-test/suite/galera/r/galera_myisam_transactions.result @@ -7,6 +7,7 @@ START TRANSACTION; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); COMMIT; +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 @@ -16,12 +17,14 @@ COUNT(*) = 0 SELECT COUNT(*) = 0 FROM t2; COUNT(*) = 0 1 +connection node_1; START TRANSACTION; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_nopk_bit.result b/mysql-test/suite/galera/r/galera_nopk_bit.result index 5723dac42fd..7662c15c672 100644 --- a/mysql-test/suite/galera/r/galera_nopk_bit.result +++ b/mysql-test/suite/galera/r/galera_nopk_bit.result @@ -1,5 +1,6 @@ CREATE TABLE t1 (f1 BIT) ENGINE=InnoDB; INSERT INTO t1 VALUES (NULL),(0),(b'1'); +connection node_2; SELECT f1 IS NULL, f1 = b'1' FROM t1; f1 IS NULL f1 = b'1' 1 NULL @@ -8,19 +9,24 @@ f1 IS NULL f1 = b'1' DELETE FROM t1 WHERE f1 = b'1'; UPDATE t1 SET f1 = b'1' WHERE f1 IS NULL; UPDATE t1 SET f1 = 1 WHERE f1 = b'0'; +connection node_1; SELECT f1 IS NULL, f1 = b'1' FROM t1; f1 IS NULL f1 = b'1' 0 1 0 1 +connection node_1; CREATE TABLE t2 (f1 BIT) ENGINE=InnoDB; INSERT INTO t2 VALUES (NULL); SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t2 SET f1 = 0 WHERE f1 IS NULL; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t2 SET f1 = 1 WHERE f1 IS NULL; +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_nopk_blob.result b/mysql-test/suite/galera/r/galera_nopk_blob.result index 7491b715ed2..a7570c2cfee 100644 --- a/mysql-test/suite/galera/r/galera_nopk_blob.result +++ b/mysql-test/suite/galera/r/galera_nopk_blob.result @@ -1,26 +1,32 @@ CREATE TABLE t1 (f1 BLOB) ENGINE=InnoDB; INSERT INTO t1 VALUES (NULL),('abc'); +connection node_2; SELECT f1 FROM t1; f1 NULL abc DELETE FROM t1 WHERE f1 IS NULL; UPDATE t1 SET f1 = 'xyz' WHERE f1 = 'abc'; +connection node_1; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 SELECT f1 = 'abc' FROM t1; f1 = 'abc' 0 +connection node_1; CREATE TABLE t2 (f1 BLOB) ENGINE=InnoDB; INSERT INTO t2 VALUES (NULL); SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t2 SET f1 = 'abc' WHERE f1 IS NULL; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t2 SET f1 = 'xyz' WHERE f1 IS NULL; +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_nopk_large_varchar.result b/mysql-test/suite/galera/r/galera_nopk_large_varchar.result index abca81e15b0..08cffaa2bd1 100644 --- a/mysql-test/suite/galera/r/galera_nopk_large_varchar.result +++ b/mysql-test/suite/galera/r/galera_nopk_large_varchar.result @@ -1,11 +1,13 @@ CREATE TABLE t1 (f1 VARCHAR(8000)) ENGINE=InnoDB; INSERT INTO t1 VALUES (NULL),(CONCAT(REPEAT('x', 7999), 'a')); +connection node_2; SELECT LENGTH(f1) FROM t1; LENGTH(f1) NULL 8000 DELETE FROM t1 WHERE f1 IS NULL; UPDATE t1 SET f1 = CONCAT(REPEAT('x', 7999), 'b') WHERE f1 = CONCAT(REPEAT('x', 7999), 'a'); +connection node_1; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 @@ -15,15 +17,19 @@ LENGTH(f1) = 8000 SELECT f1 = CONCAT(REPEAT('x', 7999), 'b') FROM t1; f1 = CONCAT(REPEAT('x', 7999), 'b') 1 +connection node_1; CREATE TABLE t2 (f1 BLOB) ENGINE=InnoDB; INSERT INTO t2 VALUES (CONCAT(REPEAT('x', 7999), 'a')); SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t2 SET f1 = 'abc' WHERE f1 = CONCAT(REPEAT('x', 7999), 'a'); +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t2 SET f1 = 'xyz' WHERE f1 = CONCAT(REPEAT('x', 7999), 'a'); +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_nopk_unicode.result b/mysql-test/suite/galera/r/galera_nopk_unicode.result index 68d049a2146..882a91a29b5 100644 --- a/mysql-test/suite/galera/r/galera_nopk_unicode.result +++ b/mysql-test/suite/galera/r/galera_nopk_unicode.result @@ -3,16 +3,21 @@ f1 VARCHAR(255), KEY (f1) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO t1 VALUES ('текст'); +connection node_2; SELECT f1 = 'текст' FROM t1; f1 = 'текст' 1 +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f1 = 'текст2'; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f1 = 'текст3'; +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction SELECT f1 = 'текст2' FROM t1; diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result index db4528ac22d..bf4b056a6e4 100644 --- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result +++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result @@ -1,9 +1,12 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB; +connection node_2; SET GLOBAL wsrep_slave_threads = 2; LOCK TABLE t1 READ; +connection node_1; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); +connection node_2a; SET SESSION wsrep_sync_wait=0; SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%'; COUNT(*) = 1 @@ -17,7 +20,9 @@ COUNT(*) = 0 SELECT COUNT(*) = 0 FROM t2; COUNT(*) = 0 1 +connection node_2; UNLOCK TABLES; +connection node_2a; SET SESSION wsrep_sync_wait = 7;; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 diff --git a/mysql-test/suite/galera/r/galera_pc_ignore_sb.result b/mysql-test/suite/galera/r/galera_pc_ignore_sb.result index 5fcccfe2d59..e02ec0a3179 100644 --- a/mysql-test/suite/galera/r/galera_pc_ignore_sb.result +++ b/mysql-test/suite/galera/r/galera_pc_ignore_sb.result @@ -1,5 +1,10 @@ +connection node_1; +connection node_2; +connection node_1; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; +connection node_2; Killing server ... +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); DROP TABLE t1; @@ -10,3 +15,4 @@ SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABL VARIABLE_VALUE = 'ON' 1 SET GLOBAL wsrep_cluster_address = ''; +connection node_2; diff --git a/mysql-test/suite/galera/r/galera_pk_bigint_signed.result b/mysql-test/suite/galera/r/galera_pk_bigint_signed.result index a3075994657..27bb3c50733 100644 --- a/mysql-test/suite/galera/r/galera_pk_bigint_signed.result +++ b/mysql-test/suite/galera/r/galera_pk_bigint_signed.result @@ -3,23 +3,29 @@ INSERT INTO t1 VALUES (-9223372036854775808, 'min'), (9223372036854775807, 'max') ; +connection node_2; SELECT * FROM t1; f1 f2 -9223372036854775808 min 9223372036854775807 max UPDATE t1 SET f2 = CONCAT(f2, '_'); +connection node_1; SELECT * FROM t1; f1 f2 -9223372036854775808 min_ 9223372036854775807 max_ +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f2 = 'foo' WHERE f1 = -9223372036854775808; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f2 = 'bar' WHERE f1 = -9223372036854775808; +connection node_1; COMMIT; SET AUTOCOMMIT=ON; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result b/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result index 441926e949c..f586fe2f589 100644 --- a/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result +++ b/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result @@ -2,21 +2,27 @@ CREATE TABLE t1 (f1 BIGINT UNSIGNED PRIMARY KEY, f2 VARCHAR(5)) ENGINE=InnoDB; INSERT INTO t1 VALUES (18446744073709551615, 'max') ; +connection node_2; SELECT f1 = 18446744073709551615 FROM t1; f1 = 18446744073709551615 1 UPDATE t1 SET f2 = CONCAT(f2, '_'); +connection node_1; SELECT f1 = 18446744073709551615 FROM t1; f1 = 18446744073709551615 1 +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f2 = 'foo' WHERE f1 = 18446744073709551615; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f2 = 'bar' WHERE f1 = 18446744073709551615; +connection node_1; COMMIT; SET AUTOCOMMIT=ON; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_prepared_statement.result b/mysql-test/suite/galera/r/galera_prepared_statement.result index de5ac9c760a..d32d412ff46 100644 --- a/mysql-test/suite/galera/r/galera_prepared_statement.result +++ b/mysql-test/suite/galera/r/galera_prepared_statement.result @@ -11,6 +11,7 @@ EXECUTE st1; EXECUTE st2; EXECUTE st3; EXECUTE st4; +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 @@ -25,8 +26,10 @@ COUNT(*) = 1 1 ALTER TABLE t1 ADD COLUMN f2 INTEGER; ALTER TABLE t1 DROP COLUMN f1; +connection node_1; EXECUTE st1; ERROR 22007: Incorrect integer value: 'abc' for column 'f2' at row 1 +connection node_1; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; diff --git a/mysql-test/suite/galera/r/galera_query_cache.result b/mysql-test/suite/galera/r/galera_query_cache.result index 502d8a58e9c..e64c9438646 100644 --- a/mysql-test/suite/galera/r/galera_query_cache.result +++ b/mysql-test/suite/galera/r/galera_query_cache.result @@ -1,5 +1,6 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; RESET QUERY CACHE; FLUSH STATUS; SELECT COUNT(*) FROM t1; @@ -14,7 +15,9 @@ COUNT(*) SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; VARIABLE_VALUE = 1 1 +connection node_1; INSERT INTO t1 VALUES (2); +connection node_2; FLUSH STATUS; SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Qcache_queries_in_cache'; VARIABLE_VALUE = 0 @@ -34,7 +37,9 @@ COUNT(*) SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; VARIABLE_VALUE = 1 1 +connection node_1; ALTER TABLE t1 ADD COLUMN f2 INTEGER; +connection node_2; FLUSH STATUS; SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Qcache_queries_in_cache'; VARIABLE_VALUE = 0 diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result index 856abbb43be..2a37d62698a 100644 --- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result +++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result @@ -1,5 +1,6 @@ CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; Warnings: @@ -8,7 +9,9 @@ SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; MAX(id) 1 +connection node_1; INSERT INTO t1 VALUES (2); +connection node_2; SELECT MAX(id) FROM t1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction SET GLOBAL DEBUG = ""; @@ -21,14 +24,18 @@ SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead SET DEBUG_SYNC = "RESET"; +connection node_1; INSERT INTO t1 VALUES (3); +connection node_2; SELECT MAX(id) FROM t1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction SET GLOBAL DEBUG = ""; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +connection node_1; INSERT INTO t1 VALUES (4); +connection node_2; SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; MAX(id) @@ -44,13 +51,18 @@ VARIABLE_VALUE = 1 SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +connection node_1; INSERT INTO t1 VALUES (5); +connection node_2; SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1 ; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; SET GLOBAL DEBUG = ""; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +connection node_2; MAX(id) 5 SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; diff --git a/mysql-test/suite/galera/r/galera_read_only.result b/mysql-test/suite/galera/r/galera_read_only.result index 82736c5f4ba..4c2523f8691 100644 --- a/mysql-test/suite/galera/r/galera_read_only.result +++ b/mysql-test/suite/galera/r/galera_read_only.result @@ -1,15 +1,21 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +connection node_2; SET GLOBAL read_only=TRUE; +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 CREATE USER foo@localhost; # Open connection to node 2 using 'foo' user. +connect foo_node_2,127.0.0.1,foo,,test,$port_2,; # Connect with foo_node_2 +connection foo_node_2; INSERT INTO t1 VALUES (2); ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result b/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result index 4acf0143f8b..2470f59c497 100644 --- a/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result +++ b/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result @@ -1,13 +1,16 @@ +connection node_1; SET GLOBAL wsrep_provider_options = 'repl.key_format=FLAT16'; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (123); CREATE TABLE t2 (f1 VARCHAR(256)) ENGINE=InnoDB; INSERT INTO t2 VALUES (REPEAT('a', 256)); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 UPDATE t1 SET f1 = 234; UPDATE t2 SET f1 = REPEAT('b', 256); +connection node_1; SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 234; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result index 6e245b44462..00980181824 100644 --- a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result +++ b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result @@ -1,3 +1,4 @@ +connection node_1; CREATE TABLE t1 (f1 VARCHAR(512)) ENGINE=InnoDB; SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512'; INSERT INTO t1 VALUES (REPEAT('a', 512)); diff --git a/mysql-test/suite/galera/r/galera_restart_nochanges.result b/mysql-test/suite/galera/r/galera_restart_nochanges.result index accace97826..380a4812da1 100644 --- a/mysql-test/suite/galera/r/galera_restart_nochanges.result +++ b/mysql-test/suite/galera/r/galera_restart_nochanges.result @@ -1,5 +1,10 @@ +connection node_1; +connection node_2; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; +connection node_2a; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_roles.result b/mysql-test/suite/galera/r/galera_roles.result index c0cdbc0e338..1617f0d7b51 100644 --- a/mysql-test/suite/galera/r/galera_roles.result +++ b/mysql-test/suite/galera/r/galera_roles.result @@ -3,6 +3,7 @@ # # On node_1 +connection node_1; CREATE DATABASE test1; CREATE TABLE test1.t1 (a int, b int); CREATE TABLE test1.t2 (a int, b int); @@ -18,8 +19,11 @@ GRANT EXECUTE ON PROCEDURE test1.pr1 TO role1; GRANT SELECT ON test1.t1 TO role1; GRANT SELECT (a) ON test1.t2 TO role1; # Open connections to the 2 nodes using 'foo' user. +connect foo_node_1,127.0.0.1,foo,,test,$port_1,; +connect foo_node_2,127.0.0.1,foo,,test,$port_2,; # Connect with foo_node_1 +connection foo_node_1; SHOW GRANTS; Grants for foo@localhost GRANT role1 TO 'foo'@'localhost' @@ -55,6 +59,7 @@ pr1 pr1 # Connect with foo_node_2 +connection foo_node_2; SHOW GRANTS; Grants for foo@localhost GRANT role1 TO 'foo'@'localhost' @@ -93,13 +98,16 @@ pr1 # # # Connect with node_1 +connection node_1; REVOKE EXECUTE ON PROCEDURE test1.pr1 FROM role1; # Connect with foo_node_1 +connection foo_node_1; CALL test1.pr1(); ERROR 42000: execute command denied to user 'foo'@'localhost' for routine 'test1.pr1' # Connect with foo_node_2 +connection foo_node_2; CALL test1.pr1(); ERROR 42000: execute command denied to user 'foo'@'localhost' for routine 'test1.pr1' # @@ -107,9 +115,11 @@ ERROR 42000: execute command denied to user 'foo'@'localhost' for routine 'test1 # # Connect with node_1 +connection node_1; DROP ROLE role1; # Connect with foo_node_1 +connection foo_node_1; FLUSH TABLES; SELECT * FROM mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping' @@ -131,6 +141,7 @@ CURRENT_ROLE() role1 # Connect with foo_node_2 +connection foo_node_2; FLUSH TABLES; SELECT * FROM mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'roles_mapping' @@ -150,7 +161,11 @@ NULL SELECT CURRENT_ROLE(); CURRENT_ROLE() role1 +disconnect foo_node_2; # Connect with node_1 +connection node_1; DROP USER foo@localhost; DROP DATABASE test1; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/galera_rsu_error.result b/mysql-test/suite/galera/r/galera_rsu_error.result index bfe41390d1d..5c16e34b492 100644 --- a/mysql-test/suite/galera/r/galera_rsu_error.result +++ b/mysql-test/suite/galera/r/galera_rsu_error.result @@ -1,5 +1,6 @@ CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; INSERT INTO t1 VALUES (1), (1); +connection node_2; SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' @@ -8,6 +9,7 @@ SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME = COUNT(*) = 0 1 INSERT INTO t1 VALUES (1); +connection node_1; SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME = 't1'; COUNT(*) = 0 1 @@ -15,6 +17,7 @@ SELECT COUNT(*) = 3 FROM t1; COUNT(*) = 3 1 INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(3) = 4 FROM t1; COUNT(3) = 4 1 diff --git a/mysql-test/suite/galera/r/galera_rsu_simple.result b/mysql-test/suite/galera/r/galera_rsu_simple.result index 4c2780a2933..d0ddcfb4d64 100644 --- a/mysql-test/suite/galera/r/galera_rsu_simple.result +++ b/mysql-test/suite/galera/r/galera_rsu_simple.result @@ -1,17 +1,21 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; +connection node_2; SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD COLUMN f2 INTEGER; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 2 1 +connection node_1; SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 1 1 INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 INSERT INTO t1 (f1) VALUES (2); +connection node_1; SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result index 62e327ffdee..2b2b80ee91c 100644 --- a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result +++ b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result @@ -1,10 +1,14 @@ +connection node_1; CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; SET GLOBAL wsrep_desync=1; SET wsrep_OSU_method=RSU; SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; ALTER TABLE t1 ADD COLUMN f2 INTEGER;; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; SET GLOBAL wsrep_desync=0; SET DEBUG_SYNC= 'now SIGNAL continue'; +connection node_1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -17,6 +21,7 @@ wsrep_desync OFF SET wsrep_OSU_method=TOI; DROP TABLE t1; SET DEBUG_SYNC= 'RESET'; +connection node_1; CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; SET GLOBAL wsrep_desync=0; Warnings: @@ -24,10 +29,12 @@ Warning 1231 'wsrep_desync' is already OFF. SET wsrep_OSU_method=RSU; SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; ALTER TABLE t1 ADD COLUMN f2 INTEGER;; +connection node_1a; SET GLOBAL wsrep_desync=1; ERROR HY000: Operation 'desync' failed for SET GLOBAL wsrep_desync=1 SET GLOBAL wsrep_desync=0; SET DEBUG_SYNC= 'now SIGNAL continue'; +connection node_1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -39,4 +46,5 @@ DROP TABLE t1; SET DEBUG_SYNC= 'RESET'; CALL mtr.add_suppression("Protocol violation"); CALL mtr.add_suppression("desync failed"); +connection node_2; CALL mtr.add_suppression("Protocol violation"); diff --git a/mysql-test/suite/galera/r/galera_sbr.result b/mysql-test/suite/galera/r/galera_sbr.result index 0bf6cc7c9d3..61a58c9cb89 100644 --- a/mysql-test/suite/galera/r/galera_sbr.result +++ b/mysql-test/suite/galera/r/galera_sbr.result @@ -1,3 +1,4 @@ +connection node_1; SET SESSION binlog_format = 'STATEMENT'; Warnings: Warning 1105 MariaDB Galera does not support binlog format: STATEMENT @@ -7,8 +8,10 @@ SET SESSION binlog_format = 'MIXED'; Warnings: Warning 1105 MariaDB Galera does not support binlog format: MIXED INSERT INTO t1 VALUES (2); +connection node_2; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 DROP TABLE t1; +connection node_1; SET GLOBAL binlog_format = 'ROW'; diff --git a/mysql-test/suite/galera/r/galera_sbr_binlog.result b/mysql-test/suite/galera/r/galera_sbr_binlog.result index 0bf6cc7c9d3..61a58c9cb89 100644 --- a/mysql-test/suite/galera/r/galera_sbr_binlog.result +++ b/mysql-test/suite/galera/r/galera_sbr_binlog.result @@ -1,3 +1,4 @@ +connection node_1; SET SESSION binlog_format = 'STATEMENT'; Warnings: Warning 1105 MariaDB Galera does not support binlog format: STATEMENT @@ -7,8 +8,10 @@ SET SESSION binlog_format = 'MIXED'; Warnings: Warning 1105 MariaDB Galera does not support binlog format: MIXED INSERT INTO t1 VALUES (2); +connection node_2; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 DROP TABLE t1; +connection node_1; SET GLOBAL binlog_format = 'ROW'; diff --git a/mysql-test/suite/galera/r/galera_serializable.result b/mysql-test/suite/galera/r/galera_serializable.result index 90fe628e505..e81c3911b7d 100644 --- a/mysql-test/suite/galera/r/galera_serializable.result +++ b/mysql-test/suite/galera/r/galera_serializable.result @@ -1,27 +1,37 @@ +connection node_1; CREATE TABLE t1 (id INT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; START TRANSACTION; SELECT * FROM t1; id f2 +connection node_2; INSERT INTO t1 VALUES (1,1); +connection node_1; SELECT * FROM t1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ROLLBACK; DELETE FROM t1; +connection node_1; INSERT INTO t1 VALUES (1,1); START TRANSACTION; SELECT * FROM t1; id f2 1 1 +connection node_2; UPDATE t1 SET f2 = 2; +connection node_1; UPDATE t1 SET f2 = 3; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ROLLBACK; DELETE FROM t1; +connection node_1; START TRANSACTION; +connection node_1; INSERT INTO t1 VALUES (1,1); +connection node_2; INSERT INTO t1 VALUES (1,2); +connection node_1; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_server.result b/mysql-test/suite/galera/r/galera_server.result index ef81bf376b0..cc08b826e82 100644 --- a/mysql-test/suite/galera/r/galera_server.result +++ b/mysql-test/suite/galera/r/galera_server.result @@ -1,20 +1,26 @@ +connection node_1; # On node_1 CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS (HOST 'foo'); +connection node_2; # On node_2 SELECT * FROM mysql.servers; Server_name Host Db Username Password Port Socket Wrapper Owner s1 foo 3306 mysql ALTER SERVER s1 OPTIONS (HOST 'bar'); +connection node_1; # On node_1 SELECT * FROM mysql.servers; Server_name Host Db Username Password Port Socket Wrapper Owner s1 bar 3306 mysql DROP SERVER s1; +connection node_2; # On node_2 SELECT COUNT(*)=0 FROM mysql.servers; COUNT(*)=0 1 +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/galera_split_brain.result b/mysql-test/suite/galera/r/galera_split_brain.result index 615615040fe..9c5952cfa28 100644 --- a/mysql-test/suite/galera/r/galera_split_brain.result +++ b/mysql-test/suite/galera/r/galera_split_brain.result @@ -1,5 +1,11 @@ call mtr.add_suppression("WSREP: TO isolation failed for: "); +connection node_1; +connection node_1; +connection node_2; +connection node_2; Killing server ... +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction SET GLOBAL wsrep_cluster_address = ''; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; diff --git a/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result b/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result index c15a24e481f..14407c917a1 100644 --- a/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result +++ b/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result @@ -3,10 +3,12 @@ SET SESSION sql_log_bin = 0; INSERT INTO t1 VALUES (1); SET SESSION sql_log_bin = 1; INSERT INTO t1 VALUES (2); +connection node_2; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1; COUNT(*) = 1 1 +connection node_1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_ssl.result b/mysql-test/suite/galera/r/galera_ssl.result index 569c3c607d5..022d06319b8 100644 --- a/mysql-test/suite/galera/r/galera_ssl.result +++ b/mysql-test/suite/galera/r/galera_ssl.result @@ -6,6 +6,7 @@ VARIABLE_VALUE = 2 1 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; VARIABLE_VALUE = 'Synced' 1 diff --git a/mysql-test/suite/galera/r/galera_ssl_compression.result b/mysql-test/suite/galera/r/galera_ssl_compression.result index f25b614d139..333d646376c 100644 --- a/mysql-test/suite/galera/r/galera_ssl_compression.result +++ b/mysql-test/suite/galera/r/galera_ssl_compression.result @@ -4,19 +4,23 @@ VARIABLE_VALUE = 'Synced' SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 +connection node_2; SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; VARIABLE_VALUE = 'Synced' 1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 +connection node_1; SET GLOBAL wsrep_provider_options = "socket.ssl_compression=No"; ERROR HY000: Incorrect arguments to SET CREATE TABLE t1 (f1 VARCHAR(333) PRIMARY KEY, f2 BLOB) Engine=InnoDB; INSERT INTO t1 VALUES (REPEAT('a', 333), REPEAT('b', 65535)); +connection node_2; SELECT COUNT(*) = 1 FROM t1 WHERE f1 = REPEAT('a', 333) AND f2 = REPEAT('b', 65535); COUNT(*) = 1 1 +connection node_1; DROP TABLE t1; CALL mtr.add_suppression("Unknown parameter 'socket\.ssl_compression'"); CALL mtr.add_suppression("Set options returned 7"); diff --git a/mysql-test/suite/galera/r/galera_status_cluster.result b/mysql-test/suite/galera/r/galera_status_cluster.result index d7cf671cb10..ad92a51b775 100644 --- a/mysql-test/suite/galera/r/galera_status_cluster.result +++ b/mysql-test/suite/galera/r/galera_status_cluster.result @@ -1,9 +1,11 @@ +connection node_1; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 +connection node_2; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 diff --git a/mysql-test/suite/galera/r/galera_status_local_index.result b/mysql-test/suite/galera/r/galera_status_local_index.result index 4e886ac8921..8c36b60cc5f 100644 --- a/mysql-test/suite/galera/r/galera_status_local_index.result +++ b/mysql-test/suite/galera/r/galera_status_local_index.result @@ -1,6 +1,9 @@ +connection node_1; CREATE TABLE wsrep_local_indexes (wsrep_local_index INTEGER); INSERT INTO wsrep_local_indexes VALUES ((SELECT variable_value FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_local_index')); +connection node_2; INSERT INTO wsrep_local_indexes VALUES ((SELECT variable_value FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_local_index')); +connection node_1; SELECT COUNT(*) = 2 FROM wsrep_local_indexes; COUNT(*) = 2 1 diff --git a/mysql-test/suite/galera/r/galera_suspend_slave.result b/mysql-test/suite/galera/r/galera_suspend_slave.result index 02904812dd5..380ecb395c3 100644 --- a/mysql-test/suite/galera/r/galera_suspend_slave.result +++ b/mysql-test/suite/galera/r/galera_suspend_slave.result @@ -1,9 +1,16 @@ +connection node_1; +connection node_2; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_2; +disconnect node_2; +connection node_1; Suspending node_2 ... INSERT INTO t1 VALUES (1); Got one of the listed errors Resuming node_2 ... INSERT INTO t1 VALUES (1); +connection node_2a; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result index 2f030c26bb8..4a73a573041 100644 --- a/mysql-test/suite/galera/r/galera_sync_wait_show.result +++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result @@ -1,38 +1,53 @@ +connection node_2; SET SESSION wsrep_sync_wait = 1; +connection node_1; CREATE DATABASE db1; +connection node_2; SHOW CREATE DATABASE db1; Database Create Database db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */ DROP DATABASE db1; +connection node_1; CREATE PROCEDURE p1 () SELECT 1 FROM DUAL; +connection node_2; SHOW CREATE PROCEDURE p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() SELECT 1 FROM DUAL latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE p1; +connection node_1; CREATE PROCEDURE p1 () SELECT 1 FROM DUAL; +connection node_2; SHOW PROCEDURE CODE p1; Pos Instruction 0 stmt 0 "SELECT 1 FROM DUAL" DROP PROCEDURE p1; +connection node_1; CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123; +connection node_2; SHOW CREATE FUNCTION f1; Function sql_mode Create Function character_set_client collation_connection Database Collation f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) RETURN 123 latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION f1; +connection node_1; CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123; +connection node_2; SHOW FUNCTION CODE f1; Pos Instruction 0 freturn 3 123 DROP FUNCTION f1; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a'; +connection node_2; SHOW CREATE TRIGGER tr1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation tr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a' latin1 latin1_swedish_ci latin1_swedish_ci DROP TABLE t1; +connection node_1; CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1; +connection node_2; SHOW CREATE EVENT event1; Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation event1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `event1` ON SCHEDULE AT '2038-01-01 23:59:59' ON COMPLETION NOT PRESERVE DISABLE ON SLAVE DO SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci diff --git a/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result b/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result index f91415323ec..8a86dfd11e2 100644 --- a/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result +++ b/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result @@ -1,40 +1,54 @@ +connection node_1; CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB; INSERT INTO t1 (f2) SELECT 1 FROM ten; +connection node_2; INSERT INTO t1 (f2) SELECT 1 FROM ten; ALTER TABLE t1 AUTO_INCREMENT = 1000; INSERT INTO t1 (f2) SELECT 1 FROM ten; +connection node_1; INSERT INTO t1 (f2) SELECT 1 FROM ten; SELECT MIN(f1) >= 1000, COUNT(*) = 20, COUNT(DISTINCT f1) = 20 FROM t1 WHERE f1 >= 1000; MIN(f1) >= 1000 COUNT(*) = 20 COUNT(DISTINCT f1) = 20 1 1 1 +connection node_2; SELECT MIN(f1) >= 1000, COUNT(*) = 20, COUNT(DISTINCT f1) = 20 FROM t1 WHERE f1 >= 1000; MIN(f1) >= 1000 COUNT(*) = 20 COUNT(DISTINCT f1) = 20 1 1 1 +connection node_1; ALTER TABLE t1 AUTO_INCREMENT = 5; INSERT INTO t1 (f2) SELECT 1 FROM ten; +connection node_2; INSERT INTO t1 (f2) SELECT 1 FROM ten; SELECT MIN(f1) >= 1000, COUNT(*) = 40, COUNT(DISTINCT f1) = 40 FROM t1 WHERE f1 >= 1000; MIN(f1) >= 1000 COUNT(*) = 40 COUNT(DISTINCT f1) = 40 1 1 1 +connection node_1; SELECT MIN(f1) >= 1000, COUNT(*) = 40, COUNT(DISTINCT f1) = 40 FROM t1 WHERE f1 >= 1000; MIN(f1) >= 1000 COUNT(*) = 40 COUNT(DISTINCT f1) = 40 1 1 1 DROP TABLE t1; +connection node_1; SET GLOBAL wsrep_auto_increment_control = OFF; SET GLOBAL auto_increment_increment = 1; SET GLOBAL auto_increment_offset = 1; +connection node_2; SET GLOBAL wsrep_auto_increment_control = OFF; SET GLOBAL auto_increment_increment = 1; SET GLOBAL auto_increment_offset = 1; +connection node_1a; CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB; +connection node_2a; ALTER TABLE t1 AUTO_INCREMENT=100; +connection node_1a; INSERT INTO t1 (f2) SELECT 1 FROM ten; +connection node_2a; INSERT INTO t1 (f2) SELECT 1 FROM ten; SELECT MIN(f1) = 100, MAX(f1) = 119, COUNT(f1) = 20, COUNT(DISTINCT f1) = 20 FROM t1; MIN(f1) = 100 MAX(f1) = 119 COUNT(f1) = 20 COUNT(DISTINCT f1) = 20 1 1 1 1 +connection node_1a; SELECT MIN(f1) = 100, MAX(f1) = 119, COUNT(f1) = 20, COUNT(DISTINCT f1) = 20 FROM t1; MIN(f1) = 100 MAX(f1) = 119 COUNT(f1) = 20 COUNT(DISTINCT f1) = 20 1 1 1 1 diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_locking.result b/mysql-test/suite/galera/r/galera_toi_ddl_locking.result index f0a51db14d3..68743c024a0 100644 --- a/mysql-test/suite/galera/r/galera_toi_ddl_locking.result +++ b/mysql-test/suite/galera/r/galera_toi_ddl_locking.result @@ -1,7 +1,9 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +connection node_1; SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; ALTER TABLE t1 ADD COLUMN f2 INTEGER;; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 @@ -15,6 +17,7 @@ SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t2 VALUES (1); COMMIT;; +connection node_1b; SET SESSION wsrep_sync_wait = 0; SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit'; COUNT(*) = 1 @@ -23,19 +26,24 @@ SELECT COUNT(*) = 0 FROM t2; COUNT(*) = 0 1 SET DEBUG_SYNC= 'now SIGNAL continue'; +connection node_1a; +connection node_1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 SELECT COUNT(*) = 1 FROM t2; COUNT(*) = 1 1 +connection node_2; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 SELECT COUNT(*) = 1 FROM t2; COUNT(*) = 1 1 +connection node_1; SET DEBUG_SYNC= 'RESET'; +connection node_1b; SET DEBUG_SYNC= 'RESET'; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result b/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result index 41e693c2b19..3844fa97d82 100644 --- a/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result +++ b/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result @@ -1,6 +1,9 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER); +connection node_2; ALTER TABLE t1 ADD COLUMN f3 INTEGER; INSERT INTO t1 (f1, f2) VALUES (DEFAULT, 123);; +connection node_1; CREATE UNIQUE INDEX i1 ON t1(f2);; +connection node_2; INSERT INTO t1 (f1, f2) VALUES (DEFAULT, 234); SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 3 @@ -11,6 +14,7 @@ COUNT(*) = 2 SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 +connection node_1; SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 3 1 diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result b/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result index 9dfa433d49f..722bb9d9e12 100644 --- a/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result +++ b/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result @@ -1,9 +1,12 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; ALTER TABLE t1 ADD COLUMN f2 INTEGER; INSERT INTO t1 VALUES (2, 3); +connection node_1; ALTER TABLE t1 DROP COLUMN f2; INSERT INTO t1 VALUES (4); +connection node_2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -18,6 +21,7 @@ f1 1 2 4 +connection node_1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera/r/galera_toi_ftwrl.result b/mysql-test/suite/galera/r/galera_toi_ftwrl.result index 594717c96ff..0f13e95b689 100644 --- a/mysql-test/suite/galera/r/galera_toi_ftwrl.result +++ b/mysql-test/suite/galera/r/galera_toi_ftwrl.result @@ -1,6 +1,9 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +connection node_2; FLUSH TABLES WITH READ LOCK; +connection node_1; ALTER TABLE t1 ADD COLUMN f2 INTEGER; +connection node_2; UNLOCK TABLES; SHOW CREATE TABLE t1; Table Create Table diff --git a/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result b/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result index eac50e8853c..c13b689f82b 100644 --- a/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result +++ b/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result @@ -1,15 +1,20 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES (2); +connection node_2a; ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=EXCLUSIVE; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_1; INSERT INTO t1 VALUES (2, 2); SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 +connection node_2; INSERT INTO t1 VALUES (3, 3); SELECT COUNT(*) = 3 FROM t1; COUNT(*) = 3 diff --git a/mysql-test/suite/galera/r/galera_toi_lock_shared.result b/mysql-test/suite/galera/r/galera_toi_lock_shared.result index 36c38860688..950c4d83c70 100644 --- a/mysql-test/suite/galera/r/galera_toi_lock_shared.result +++ b/mysql-test/suite/galera/r/galera_toi_lock_shared.result @@ -1,10 +1,13 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=SHARED; +connection node_1; INSERT INTO t1 VALUES (2, 2); SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 +connection node_2; INSERT INTO t1 VALUES (3, 3); SELECT COUNT(*) = 3 FROM t1; COUNT(*) = 3 diff --git a/mysql-test/suite/galera/r/galera_truncate.result b/mysql-test/suite/galera/r/galera_truncate.result index eeeb6721d12..4f3d72dbca7 100644 --- a/mysql-test/suite/galera/r/galera_truncate.result +++ b/mysql-test/suite/galera/r/galera_truncate.result @@ -1,24 +1,31 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; TRUNCATE TABLE t1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_2; CREATE TABLE t2 (f1 VARCHAR(255)) Engine=InnoDB; INSERT INTO t2 VALUES ('abc'); +connection node_1; TRUNCATE TABLE t2; +connection node_2; SELECT COUNT(*) = 0 FROM t2; COUNT(*) = 0 1 +connection node_1; CREATE TABLE t3 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB; INSERT INTO t3 VALUES (DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT); CREATE TABLE t4 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB AUTO_INCREMENT=1234; INSERT INTO t4 VALUES (DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT); TRUNCATE TABLE t3; TRUNCATE TABLE t4; +connection node_2; SELECT AUTO_INCREMENT = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME IN ('t3', 't4'); AUTO_INCREMENT = 1 1 diff --git a/mysql-test/suite/galera/r/galera_truncate_temporary.result b/mysql-test/suite/galera/r/galera_truncate_temporary.result index 0bdc4e3632a..183ebd9d24a 100644 --- a/mysql-test/suite/galera/r/galera_truncate_temporary.result +++ b/mysql-test/suite/galera/r/galera_truncate_temporary.result @@ -4,8 +4,10 @@ TRUNCATE TABLE t1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_2; SELECT * FROM t1; ERROR 42S02: Table 'test.t1' doesn't exist +connection node_1; DROP TABLE t1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); @@ -21,12 +23,14 @@ TRUNCATE TABLE t1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 SELECT f1 = 1 FROM t1; f1 = 1 1 +connection node_1; DROP TABLE t1; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 @@ -38,18 +42,23 @@ TRUNCATE TABLE t1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_2; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_1; DROP TABLE t1; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (2); +connection node_2; TRUNCATE TABLE t1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_1; SELECT f1 = 2 FROM t1; f1 = 2 1 diff --git a/mysql-test/suite/galera/r/galera_unicode_identifiers.result b/mysql-test/suite/galera/r/galera_unicode_identifiers.result index 8bea105c77e..146cc052152 100644 --- a/mysql-test/suite/galera/r/galera_unicode_identifiers.result +++ b/mysql-test/suite/galera/r/galera_unicode_identifiers.result @@ -1,5 +1,7 @@ SET GLOBAL wsrep_sync_wait = 7; +connection node_2; SET GLOBAL wsrep_sync_wait = 7; +connection node_1; CREATE DATABASE `database with space`; USE `database with space`; CREATE TABLE `table with space` ( @@ -24,6 +26,7 @@ CREATE TABLE `втора таблица` ( KEY `първи индекс` (`първа колона`) ); INSERT INTO `втора таблица` VALUES (1, 1); +connection node_2; USE `database with space`; SELECT `second column with space` FROM `table with space`; second column with space @@ -37,6 +40,7 @@ SELECT `втора колона` FROM `втора таблица`; втора колона 1 SET GLOBAL wsrep_sync_wait = (SELECT @@wsrep_sync_wait); +connection node_1; DROP TABLE `database with space`.`table with space`; DROP TABLE `база`.`таблица`; DROP TABLE `втора база`.`втора таблица`; diff --git a/mysql-test/suite/galera/r/galera_unicode_pk.result b/mysql-test/suite/galera/r/galera_unicode_pk.result index d59615b2542..2711e44b7cb 100644 --- a/mysql-test/suite/galera/r/galera_unicode_pk.result +++ b/mysql-test/suite/galera/r/galera_unicode_pk.result @@ -2,16 +2,21 @@ CREATE TABLE t1 ( f1 VARCHAR(255) PRIMARY KEY ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO t1 VALUES ('текст'); +connection node_2; SELECT f1 = 'текст' FROM t1; f1 = 'текст' 1 +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f1 = 'текст2'; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; UPDATE t1 SET f1 = 'текст3'; +connection node_1; COMMIT; +connection node_2; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction SELECT f1 = 'текст2' FROM t1; @@ -20,11 +25,15 @@ f1 = 'текст2' SELECT f1 = 'текст2' FROM t1 WHERE f1 = 'текст2'; f1 = 'текст2' 1 +connection node_2; START TRANSACTION; INSERT INTO t1 VALUES ('текст4'); +connection node_1; START TRANSACTION; INSERT INTO t1 VALUES ('текст4'); +connection node_2; COMMIT; +connection node_1; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction COMMIT; diff --git a/mysql-test/suite/galera/r/galera_update_limit.result b/mysql-test/suite/galera/r/galera_update_limit.result index c26eb1c29f6..20a94e6f504 100644 --- a/mysql-test/suite/galera/r/galera_update_limit.result +++ b/mysql-test/suite/galera/r/galera_update_limit.result @@ -1,8 +1,11 @@ +connection node_1; CREATE TABLE ten (f1 INTEGER) Engine=InnoDB; INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO t1 SELECT f1 FROM ten ORDER BY RAND(); +connection node_2; UPDATE IGNORE t1 SET f1 = FLOOR(1 + (RAND() * 10)) ORDER BY RAND() LIMIT 5; +connection node_1; sum_matches 1 max_matches @@ -10,7 +13,9 @@ max_matches DROP TABLE t1; CREATE TABLE t2 (f1 INTEGER) Engine=InnoDB; INSERT INTO t2 SELECT f1 FROM ten ORDER BY RAND(); +connection node_2; UPDATE IGNORE t2 SET f1 = FLOOR(1 + (RAND() * 10)) ORDER BY RAND() LIMIT 5; +connection node_1; sum_matches 1 DROP TABLE t2; diff --git a/mysql-test/suite/galera/r/galera_v1_row_events.result b/mysql-test/suite/galera/r/galera_v1_row_events.result index a6ab62350b1..b0ea2293119 100644 --- a/mysql-test/suite/galera/r/galera_v1_row_events.result +++ b/mysql-test/suite/galera/r/galera_v1_row_events.result @@ -1,9 +1,12 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_1; UPDATE t1 SET f1 = 2 WHERE f1 = 1; +connection node_2; SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_var_OSU_method.result b/mysql-test/suite/galera/r/galera_var_OSU_method.result index 9a07873e1b9..18e8bd2271a 100644 --- a/mysql-test/suite/galera/r/galera_var_OSU_method.result +++ b/mysql-test/suite/galera/r/galera_var_OSU_method.result @@ -1,16 +1,24 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; +connection node_1; SET SESSION wsrep_OSU_method = "RSU"; SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; ALTER TABLE t1 ADD COLUMN f2 INTEGER;; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; SET GLOBAL wsrep_OSU_method = "TOI"; SET DEBUG_SYNC= 'now SIGNAL continue'; +connection node_1; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 2 1 +connection node_2; SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 1 1 +connection node_1; SET SESSION wsrep_OSU_method = "TOI"; +connection node_1; SET DEBUG_SYNC= 'RESET'; +connection node_1a; SET DEBUG_SYNC= 'RESET'; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_var_OSU_method2.result b/mysql-test/suite/galera/r/galera_var_OSU_method2.result index 08f2e6aa0d8..0e3751645a8 100644 --- a/mysql-test/suite/galera/r/galera_var_OSU_method2.result +++ b/mysql-test/suite/galera/r/galera_var_OSU_method2.result @@ -1,19 +1,26 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; +connection node_1; SET SESSION wsrep_OSU_method = "TOI"; SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; ALTER TABLE t1 ADD COLUMN f2 INTEGER;; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_OSU_method = "RSU"; SET DEBUG_SYNC= 'now SIGNAL continue'; +connection node_1; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 2 1 INSERT INTO t1 VALUES (1,2); +connection node_2; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 2 1 INSERT INTO t1 VALUES (3,4); +connection node_1; SET GLOBAL wsrep_OSU_method = "TOI"; DROP TABLE t1; SET DEBUG_SYNC= 'RESET'; +connection node_1a; SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result b/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result index 92b69fbbaa7..15bbe7c508a 100644 --- a/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result +++ b/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result @@ -1,9 +1,12 @@ +connection node_1; SET GLOBAL wsrep_auto_increment_control = OFF; SET GLOBAL auto_increment_increment = 1; SET GLOBAL auto_increment_offset = 1; +connection node_2; SET GLOBAL wsrep_auto_increment_control = OFF; SET GLOBAL auto_increment_increment = 1; SET GLOBAL auto_increment_offset = 1; +connection node_1a; SELECT @@auto_increment_increment = 1; @@auto_increment_increment = 1 1 @@ -18,6 +21,7 @@ t1 CREATE TABLE `t1` ( `node` varchar(10) DEFAULT NULL, PRIMARY KEY (`f1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +connection node_2a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -25,6 +29,7 @@ t1 CREATE TABLE `t1` ( `node` varchar(10) DEFAULT NULL, PRIMARY KEY (`f1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +connection node_1a; SELECT @@auto_increment_increment = 1; @@auto_increment_increment = 1 1 @@ -37,6 +42,7 @@ INSERT INTO t1 (node) VALUES ('node1'); SELECT f1 FROM t1; f1 1 +connection node_2a; SELECT @@auto_increment_increment = 1; @@auto_increment_increment = 1 1 @@ -49,12 +55,16 @@ INSERT INTO t1 (node) VALUES ('node2'); SELECT f1 FROM t1; f1 1 +connection node_1a; COMMIT; +connection node_2a; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_1a; SELECT * FROM t1; f1 node 1 node1 +connection node_2a; SELECT * FROM t1; f1 node 1 node1 diff --git a/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result b/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result index e6f37792569..b13302d3ecd 100644 --- a/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result +++ b/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result @@ -1,11 +1,14 @@ SET GLOBAL wsrep_certify_nonPK = OFF; +connection node_2; SET GLOBAL wsrep_certify_nonPK = OFF; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB /* Table has no primary key */; CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1), (2); Got one of the listed errors INSERT INTO t2 VALUES (1), (2); UPDATE t2 SET f1 = 3 WHERE f1 = 1; +connection node_2; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 @@ -15,7 +18,9 @@ COUNT(*) = 2 SELECT COUNT(*) = 1 FROM t2 WHERE f1 = 3; COUNT(*) = 1 1 +connection node_1; SET GLOBAL wsrep_certify_nonPK = 1; +connection node_2; SET GLOBAL wsrep_certify_nonPK = 1; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera/r/galera_var_cluster_address.result b/mysql-test/suite/galera/r/galera_var_cluster_address.result index f8bd869f8fe..09971c08580 100644 --- a/mysql-test/suite/galera/r/galera_var_cluster_address.result +++ b/mysql-test/suite/galera/r/galera_var_cluster_address.result @@ -1,3 +1,6 @@ +connection node_1; +connection node_2; +connection node_1; SET GLOBAL wsrep_cluster_address = 'foo://'; SET SESSION wsrep_sync_wait=0; SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS; @@ -14,19 +17,24 @@ wsrep_local_state 0 SHOW STATUS LIKE 'wsrep_local_state_comment'; Variable_name Value wsrep_local_state_comment Initialized +connection node_2; SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 1 1 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 +connection node_1; +connection node_2; SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address; +connection node_1; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 +connection node_1; SET GLOBAL wsrep_cluster_address = 'gcomm://192.0.2.1'; SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS; ERROR 08S01: WSREP has not yet prepared node for application use @@ -42,7 +50,10 @@ wsrep_local_state 0 SHOW STATUS LIKE 'wsrep_local_state_comment'; Variable_name Value wsrep_local_state_comment Initialized +connection node_1; +connection node_2; SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address; +connection node_1; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 diff --git a/mysql-test/suite/galera/r/galera_var_desync_on.result b/mysql-test/suite/galera/r/galera_var_desync_on.result index 0b5f34688b7..383e077f775 100644 --- a/mysql-test/suite/galera/r/galera_var_desync_on.result +++ b/mysql-test/suite/galera/r/galera_var_desync_on.result @@ -1,8 +1,10 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; SET GLOBAL wsrep_desync = TRUE; FLUSH TABLES WITH READ LOCK; +connection node_1; INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4); @@ -12,6 +14,7 @@ INSERT INTO t1 VALUES (7); INSERT INTO t1 VALUES (8); INSERT INTO t1 VALUES (9); INSERT INTO t1 VALUES (10); +connection node_2; SET SESSION wsrep_sync_wait = 0; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 @@ -22,7 +25,9 @@ SET SESSION wsrep_sync_wait = 1; SELECT COUNT(*) = 10 FROM t1; COUNT(*) = 10 1 +connection node_1; INSERT INTO t1 VALUES (11); +connection node_2; SELECT COUNT(*) = 11 FROM t1; COUNT(*) = 11 1 diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result index 6d703c8cf95..6b3a3ec0eb5 100644 --- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result +++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result @@ -1,3 +1,4 @@ +connection node_2; CREATE TABLE t1(i INT) ENGINE=INNODB; INSERT INTO t1 VALUES(1); SELECT * FROM t1; @@ -18,8 +19,11 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; i 1 +connection node_1; SELECT * FROM t1; i 1 DROP TABLE t1; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/galera_var_fkchecks.result b/mysql-test/suite/galera/r/galera_var_fkchecks.result index 342212a5241..8b1b913a584 100644 --- a/mysql-test/suite/galera/r/galera_var_fkchecks.result +++ b/mysql-test/suite/galera/r/galera_var_fkchecks.result @@ -12,6 +12,7 @@ INSERT INTO parent VALUES (1); INSERT INTO child VALUES (1,1); SET SESSION foreign_key_checks = 0; INSERT INTO child VALUES (2,2); +connection node_2; SELECT COUNT(*) = 1 FROM child WHERE id = 2; COUNT(*) = 1 1 @@ -19,6 +20,7 @@ INSERT INTO child VALUES (3,3); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) SET SESSION foreign_key_checks = 0; DELETE FROM parent; +connection node_1; SELECT COUNT(*) = 0 FROM parent; COUNT(*) = 0 1 diff --git a/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result b/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result index 8e84236d5bf..1a8733e2e1a 100644 --- a/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result +++ b/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result @@ -1,4 +1,5 @@ # On node_1 +connection node_1; list of GTID variables : gtid_domain_id 1 gtid_binlog_pos @@ -8,6 +9,7 @@ gtid_slave_pos wsrep_gtid_domain_id 9999 wsrep_gtid_mode 1 # On node_2 +connection node_2; list of GTID variables : gtid_domain_id 2 gtid_binlog_pos @@ -17,6 +19,7 @@ gtid_slave_pos wsrep_gtid_domain_id 9999 wsrep_gtid_mode 1 # 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); @@ -34,6 +37,7 @@ gtid_slave_pos wsrep_gtid_domain_id 9999 wsrep_gtid_mode 1 # On node_2 +connection node_2; SELECT * FROM t1; i 1 @@ -46,6 +50,7 @@ gtid_slave_pos wsrep_gtid_domain_id 9999 wsrep_gtid_mode 1 # On node_1 +connection node_1; INSERT INTO t2 VALUES(1); SELECT * FROM t2; i @@ -59,6 +64,7 @@ gtid_slave_pos wsrep_gtid_domain_id 9999 wsrep_gtid_mode 1 # On node_2 +connection node_2; SELECT * FROM t2; i list of GTID variables : @@ -70,5 +76,8 @@ gtid_slave_pos wsrep_gtid_domain_id 9999 wsrep_gtid_mode 1 # On node_1 +connection node_1; DROP TABLE t1, t2; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result index 912e45a14b1..5377a0af1b6 100644 --- a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result +++ b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result @@ -1,11 +1,16 @@ +connection node_1a; SET SESSION wsrep_sync_wait = 0; +connection node_1; CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; SET GLOBAL innodb_disallow_writes=ON; INSERT INTO t1 VALUES (1);; +connection node_1a; SET GLOBAL innodb_disallow_writes=OFF; +connection node_1; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_var_log_bin.result b/mysql-test/suite/galera/r/galera_var_log_bin.result index a6ab62350b1..b0ea2293119 100644 --- a/mysql-test/suite/galera/r/galera_var_log_bin.result +++ b/mysql-test/suite/galera/r/galera_var_log_bin.result @@ -1,9 +1,12 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_1; UPDATE t1 SET f1 = 2 WHERE f1 = 1; +connection node_2; SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_size.result b/mysql-test/suite/galera/r/galera_var_max_ws_size.result index d0bf7deafa5..71859ef82e0 100644 --- a/mysql-test/suite/galera/r/galera_var_max_ws_size.result +++ b/mysql-test/suite/galera/r/galera_var_max_ws_size.result @@ -1,3 +1,4 @@ +connection node_1; CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine=InnoDB; SET GLOBAL wsrep_max_ws_size = 1024; INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024)); diff --git a/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result b/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result index f2a951c26b0..202633a020e 100644 --- a/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result +++ b/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result @@ -1,12 +1,17 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; SET GLOBAL wsrep_mysql_replication_bundle = 2; +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 0 +connection node_1; INSERT INTO t1 VALUES (2); +connection node_2; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 +connection node_1; SET GLOBAL wsrep_mysql_replication_bundle = 0; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_var_node_address.result b/mysql-test/suite/galera/r/galera_var_node_address.result index fa88f4b3128..fe3b5613903 100644 --- a/mysql-test/suite/galera/r/galera_var_node_address.result +++ b/mysql-test/suite/galera/r/galera_var_node_address.result @@ -1,9 +1,14 @@ SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 4 1 +connection node_1; CREATE TABLE t1 (f1 INTEGER); +connection node_2; INSERT INTO t1 VALUES (1); +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_3; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result index c8b79071d10..382466b1387 100644 --- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result +++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result @@ -1,8 +1,10 @@ SET GLOBAL wsrep_replicate_myisam = FALSE; CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=MyISAM; INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_1; SET GLOBAL wsrep_replicate_myisam = 0; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result index 73a0576048b..bf5a09f6a77 100644 --- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result +++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result @@ -1,17 +1,24 @@ +connection node_1; +connection node_1; SET GLOBAL wsrep_replicate_myisam = TRUE; +connection node_2; SET GLOBAL wsrep_replicate_myisam = TRUE; +connection node_1; CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=MyISAM; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2), (3); INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL; +connection node_2; SELECT COUNT(*) = 5 FROM t1; COUNT(*) = 5 1 DROP TABLE t1; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(100)) ENGINE=MyISAM; INSERT INTO t1 VALUES (1, 'abc'),(2,'abc'), (3, 'xxx'); REPLACE INTO t1 VALUES (1, 'klm'), (2,'xyz'); REPLACE INTO t1 SELECT 3, 'yyy' FROM DUAL; +connection node_2; SELECT COUNT(*) = 3 FROM t1; COUNT(*) = 3 1 @@ -24,19 +31,26 @@ COUNT(*) = 1 SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3 AND f2 = 'yyy'; COUNT(*) = 1 1 +connection node_1; UPDATE t1 SET f2 = 'zzz' WHERE f2 = 'yyy'; +connection node_2; SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'zzz'; COUNT(*) = 1 1 +connection node_1; DELETE FROM t1 WHERE f2 = 'zzz'; +connection node_2; SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'zzz'; COUNT(*) = 0 1 +connection node_1; TRUNCATE TABLE t1; +connection node_2; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 DROP TABLE t1; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; @@ -44,18 +58,21 @@ START TRANSACTION; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); COMMIT; +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 SELECT COUNT(*) = 1 FROM t2; COUNT(*) = 1 1 +connection node_1; START TRANSACTION; INSERT INTO t1 VALUES (2); INSERT INTO t2 VALUES (2); ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back +connection node_2; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 @@ -64,15 +81,20 @@ COUNT(*) = 1 1 DROP TABLE t1; DROP TABLE t2; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM; CREATE TABLE t2 (f2 INTEGER PRIMARY KEY) ENGINE=InnoDB; START TRANSACTION; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); +connection node_2; INSERT INTO t1 VALUES (1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +connection node_1; COMMIT; DROP TABLE t1; DROP TABLE t2; +connection node_1; SET GLOBAL wsrep_replicate_myisam = 0; +connection node_2; SET GLOBAL wsrep_replicate_myisam = 0; diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result index 603dfaeacc7..facc083544c 100644 --- a/mysql-test/suite/galera/r/galera_var_slave_threads.result +++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result @@ -1,5 +1,7 @@ +connection node_1; CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB; +connection node_2; SET GLOBAL wsrep_slave_threads = 0; Warnings: Warning 1292 Truncated incorrect wsrep_slave_threads value: '0' @@ -17,7 +19,9 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use COUNT(*) = 1 1 SET GLOBAL wsrep_slave_threads = 64; +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 @@ -28,6 +32,7 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use COUNT(*) = 1 1 SET GLOBAL wsrep_slave_threads = 1; +connection node_1; INSERT INTO t2 VALUES (DEFAULT); INSERT INTO t2 VALUES (DEFAULT); INSERT INTO t2 VALUES (DEFAULT); @@ -92,6 +97,7 @@ INSERT INTO t2 VALUES (DEFAULT); INSERT INTO t2 VALUES (DEFAULT); INSERT INTO t2 VALUES (DEFAULT); INSERT INTO t2 VALUES (DEFAULT); +connection node_2; SELECT COUNT(*) = 64 FROM t2; COUNT(*) = 64 1 @@ -107,7 +113,9 @@ DROP TABLE t2; # # lp:1372840 - Changing wsrep_slave_threads causes future connections to hang # +connection node_1; CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=INNODB; +connection node_2; SET GLOBAL wsrep_slave_threads = 4; SET GLOBAL wsrep_slave_threads = 1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_var_sync_wait.result b/mysql-test/suite/galera/r/galera_var_sync_wait.result index f6136a4ddc4..40a6290374f 100644 --- a/mysql-test/suite/galera/r/galera_var_sync_wait.result +++ b/mysql-test/suite/galera/r/galera_var_sync_wait.result @@ -1,4 +1,6 @@ +connection node_1; CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; +connection node_2; SET GLOBAL wsrep_sync_wait = 1; SHOW TABLES LIKE '%t1'; Tables_in_test (%t1) @@ -6,15 +8,20 @@ t1 SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connection node_1; CREATE TABLE t2 (f1 INT PRIMARY KEY) Engine=InnoDB; +connection node_2; SET GLOBAL wsrep_sync_wait = 4; INSERT INTO t2 VALUES (1); +connection node_1; CREATE TABLE t3 (f1 INT PRIMARY KEY) Engine=InnoDB; INSERT INTO t3 VALUES (1); +connection node_2; SET GLOBAL wsrep_sync_wait = 2; UPDATE t3 SET f1 = 2; affected rows: 1 info: Rows matched: 1 Changed: 1 Warnings: 0 +connection node_2; SET GLOBAL wsrep_sync_wait = 7; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result b/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result index 8b1c4ebf83b..36340f505ff 100644 --- a/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result +++ b/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result @@ -2,11 +2,14 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); SET SESSION wsrep_on = FALSE; INSERT INTO t1 VALUES (2); +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 +connection node_1; SET GLOBAL wsrep_on = TRUE; INSERT INTO t1 VALUES (3); +connection node_2; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 diff --git a/mysql-test/suite/galera/r/galera_wan.result b/mysql-test/suite/galera/r/galera_wan.result index 6be32b291e5..73100636a0d 100644 --- a/mysql-test/suite/galera/r/galera_wan.result +++ b/mysql-test/suite/galera/r/galera_wan.result @@ -1,9 +1,14 @@ SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 4 1 +connection node_1; CREATE TABLE t1 (f1 INTEGER); +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_3; INSERT INTO t1 VALUES (1); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); +connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; +connection node_4; SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'; VARIABLE_VALUE LIKE '%gmcast.segment = 3%' 1 diff --git a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result index e3f2fa4046f..ca388496794 100644 --- a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result +++ b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result @@ -16,6 +16,7 @@ VARIABLE_VALUE = 4 SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; VARIABLE_VALUE = 'Synced' 1 +connection node_2; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 diff --git a/mysql-test/suite/galera/r/galera_zero_length_column.result b/mysql-test/suite/galera/r/galera_zero_length_column.result index 2e6119bd1ba..572d94d6756 100644 --- a/mysql-test/suite/galera/r/galera_zero_length_column.result +++ b/mysql-test/suite/galera/r/galera_zero_length_column.result @@ -1,9 +1,11 @@ +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY , f2 VARCHAR(0)) ENGINE=InnoDB; CREATE TABLE t2 (f1 VARCHAR(0)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); INSERT INTO t1 VALUES (2, ''); INSERT INTO t2 VALUES (NULL); INSERT INTO t2 VALUES (''); +connection node_2; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 @@ -25,6 +27,7 @@ f1 = '' UPDATE t1 SET f2 = '' WHERE f1 = 1; UPDATE t1 SET f2 = NULL WHERE f1 = 2; UPDATE t2 SET f1 = '' WHERE f1 IS NULL; +connection node_1; SELECT f2 = '' FROM t1 WHERE f1 = 1; f2 = '' 1 diff --git a/mysql-test/suite/galera/r/grant.result b/mysql-test/suite/galera/r/grant.result index 8d257e7e8e2..a2ca72ee8ec 100644 --- a/mysql-test/suite/galera/r/grant.result +++ b/mysql-test/suite/galera/r/grant.result @@ -3,6 +3,7 @@ # # On node_1 +connection node_1; GRANT SELECT ON *.* TO 'user_6266'@'localhost' IDENTIFIED BY 'pass'; # Now, try changing password for 'user_6266'. This command should also @@ -10,8 +11,11 @@ GRANT SELECT ON *.* TO 'user_6266'@'localhost' IDENTIFIED BY 'pass'; SET PASSWORD FOR 'user_6266'@'localhost' = PASSWORD('newpass'); # On node_2 +connection node_2; SELECT user FROM mysql.user WHERE user='user_6266'; user user_6266 DROP USER 'user_6266'@'localhost'; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/lp1276424.result b/mysql-test/suite/galera/r/lp1276424.result index 5f09ec9ea8b..363758e0d66 100644 --- a/mysql-test/suite/galera/r/lp1276424.result +++ b/mysql-test/suite/galera/r/lp1276424.result @@ -1,6 +1,7 @@ CREATE TABLE t1 (f1 INT DEFAULT NULL, UNIQUE KEY i1 (f1)) ENGINE=InnoDB; INSERT INTO t1 VALUES (NULL); INSERT INTO t1 VALUES (NULL); +connection node_2; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 diff --git a/mysql-test/suite/galera/r/lp1438990.result b/mysql-test/suite/galera/r/lp1438990.result index b53bc186953..d48d2435faa 100644 --- a/mysql-test/suite/galera/r/lp1438990.result +++ b/mysql-test/suite/galera/r/lp1438990.result @@ -1,3 +1,4 @@ +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); CREATE TABLE t2 (f1 INTEGER PRIMARY KEY); CREATE TABLE t3 (f1 INTEGER PRIMARY KEY); diff --git a/mysql-test/suite/galera/r/mdev_9290.result b/mysql-test/suite/galera/r/mdev_9290.result index cb2f0813333..276ab9e8ecb 100644 --- a/mysql-test/suite/galera/r/mdev_9290.result +++ b/mysql-test/suite/galera/r/mdev_9290.result @@ -2,13 +2,18 @@ # MDEV-9290 : InnoDB: Assertion failure in file trx0sys.cc line 353 # InnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno # +connection node_1; CREATE TABLE t1 (i INT) ENGINE=InnoDB; +connection node_2; START TRANSACTION; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); COMMIT; +connection node_1; SELECT * FROM t1; i 1 2 DROP TABLE t1; +disconnect node_2; +disconnect node_1; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#110.result b/mysql-test/suite/galera/r/mysql-wsrep#110.result index 551c3666fb4..6d4031d71cd 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#110.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#110.result @@ -1,3 +1,4 @@ +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); CREATE TABLE t2 (f1 INTEGER PRIMARY KEY); CREATE TABLE t3 (f1 INTEGER PRIMARY KEY); @@ -23,6 +24,7 @@ COUNT(*) = 1 SELECT COUNT(*) = 1 FROM t3; COUNT(*) = 1 1 +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 @@ -32,6 +34,7 @@ COUNT(*) = 1 SELECT COUNT(*) = 1 FROM t3; COUNT(*) = 1 1 +connection node_1; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#198.result b/mysql-test/suite/galera/r/mysql-wsrep#198.result index 25ba2cb615c..afc2a07fb30 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#198.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#198.result @@ -1,16 +1,26 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB; +connection node_2; LOCK TABLE t2 WRITE; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; OPTIMIZE TABLE t1,t2;; +connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2b; REPAIR TABLE t1,t2;; +connection node_2; SET SESSION wsrep_sync_wait = 0; +connection node_1; INSERT INTO t2 VALUES (1); +connection node_2; UNLOCK TABLES; +connection node_2a; Table Op Msg_type Msg_text test.t1 optimize note Table does not support optimize, doing recreate + analyze instead test.t1 optimize status OK test.t2 optimize note Table does not support optimize, doing recreate + analyze instead test.t2 optimize status OK +connection node_2b; Table Op Msg_type Msg_text test.t1 repair note The storage engine for the table doesn't support repair test.t2 repair note The storage engine for the table doesn't support repair diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result index 1c0998e35ac..0f2980eddd2 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#201.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#201.result @@ -1,4 +1,5 @@ CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; INSERT INTO t1 VALUES (DEFAULT); +connection node_2; SET GLOBAL query_cache_size=1355776; SET SESSION wsrep_sync_wait = 7; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#237.result b/mysql-test/suite/galera/r/mysql-wsrep#237.result index 1889a8feca0..19503dd5781 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#237.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#237.result @@ -1,11 +1,18 @@ CREATE TABLE t (f1 INTEGER PRIMARY KEY) Engine=InnoDB; +connection node_1; SET DEBUG_SYNC = 'wsrep_before_replication WAIT_FOR continue'; INSERT INTO t values (1);; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; SET SESSION wsrep_sync_wait = 0; +connection node_2; FLUSH TABLES; +connection node_1a; SELECT SLEEP(1); SLEEP(1) 0 SET DEBUG_SYNC= 'now SIGNAL continue'; +connection node_1; DROP TABLE t; +connection node_1a; SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#247.result b/mysql-test/suite/galera/r/mysql-wsrep#247.result index 1b00f511f03..e59c6d1a299 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#247.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#247.result @@ -1,3 +1,4 @@ +connection node_1; SET GLOBAL wsrep_desync=1; SET wsrep_OSU_method=RSU; CREATE TABLE t1 (i int primary key); diff --git a/mysql-test/suite/galera/r/mysql-wsrep#31.result b/mysql-test/suite/galera/r/mysql-wsrep#31.result index a21bb3eccfd..973f11543fa 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#31.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#31.result @@ -1,10 +1,13 @@ +connection node_1; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; INSERT INTO t1 VALUES('test'); CREATE DATABASE db; +connection node_2; Shutting down server 2 ... Recovering server 2 ... Performing --wsrep-recover ... Restarting server ... Using --wsrep-start-position when starting mysqld ... +connection node_1; DROP TABLE t1; DROP DATABASE db; diff --git a/mysql-test/suite/galera/r/partition.result b/mysql-test/suite/galera/r/partition.result index 3907b4f08c9..15f0275a04c 100644 --- a/mysql-test/suite/galera/r/partition.result +++ b/mysql-test/suite/galera/r/partition.result @@ -13,10 +13,12 @@ SELECT * FROM t1; pk i # On node_1 +connection node_1; SELECT * FROM t1; pk i # On node_2 +connection node_2; SELECT * FROM t1; pk i DROP TABLE t1; @@ -26,6 +28,7 @@ DROP TABLE t1; # # On node_1 +connection node_1; CREATE TABLE test.t1 ( i INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (i) @@ -46,6 +49,7 @@ i 9 # On node_2 +connection node_2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -70,15 +74,18 @@ i 9 # On node_1 +connection node_1; ALTER TABLE t1 TRUNCATE PARTITION p2; SELECT * FROM test.t1; i # On node_2 +connection node_2; SELECT * FROM test.t1; i # On node_1 +connection node_1; ALTER TABLE t1 DROP PARTITION p2; SHOW CREATE TABLE t1; Table Create Table @@ -91,6 +98,7 @@ t1 CREATE TABLE `t1` ( PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ # On node_2 +connection node_2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -104,11 +112,13 @@ DROP TABLE t1, p1; # # MDEV-5146: Bulk loads into partitioned table not working # +connection node_1; # Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002 # entries. SET GLOBAL wsrep_load_data_splitting = ON; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +connection node_2; SELECT COUNT(*) = 20002 FROM t1; COUNT(*) = 20002 1 @@ -116,9 +126,11 @@ wsrep_last_committed_diff 1 DROP TABLE t1; # Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries. +connection node_1; SET GLOBAL wsrep_load_data_splitting = ON; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +connection node_2; SELECT COUNT(*) = 101 FROM t1; COUNT(*) = 101 1 @@ -127,14 +139,19 @@ wsrep_last_committed_diff DROP TABLE t1; # Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002 # entries. +connection node_1; SET GLOBAL wsrep_load_data_splitting = OFF; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +connection node_2; SELECT COUNT(*) = 20002 FROM t1; COUNT(*) = 20002 1 wsrep_last_committed_diff 1 DROP TABLE t1; +connection node_1; SET GLOBAL wsrep_load_data_splitting = 1;; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/rename.result b/mysql-test/suite/galera/r/rename.result index 3c81e8b6320..a7ec431657b 100644 --- a/mysql-test/suite/galera/r/rename.result +++ b/mysql-test/suite/galera/r/rename.result @@ -2,6 +2,7 @@ # MDEV-8598 : Failed MySQL DDL commands and Galera replication # # On node 1 +connection node_1; USE test; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1(i INT) ENGINE=INNODB; @@ -13,6 +14,8 @@ i CREATE USER foo@localhost; GRANT SELECT on test.* TO foo@localhost; # Open connection to the 1st node using 'test_user1' user. +connect foo_node_1,localhost,foo,,test,$port_1,; +connection foo_node_1; SELECT * FROM t1; i 1 @@ -20,20 +23,24 @@ i RENAME TABLE t1 TO t2; ERROR 42000: DROP, ALTER command denied to user 'foo'@'localhost' for table 't1' # On node 2 +connection node_2; USE test; SELECT * FROM t1; i 1 # On node_1 +connection node_1; RENAME TABLE t1 TO t2; SHOW TABLES; Tables_in_test t2 # On node 2 +connection node_2; USE test; SELECT * FROM t2; i 1 +connection node_1; DROP USER foo@localhost; DROP TABLE t2; # End of tests diff --git a/mysql-test/suite/galera/r/rpl_row_annotate.result b/mysql-test/suite/galera/r/rpl_row_annotate.result index ff8d49702ac..23de06f015b 100644 --- a/mysql-test/suite/galera/r/rpl_row_annotate.result +++ b/mysql-test/suite/galera/r/rpl_row_annotate.result @@ -1,14 +1,18 @@ # On node_2 +connection node_2; RESET MASTER; # On node_1 +connection node_1; RESET MASTER; CREATE TABLE t1(i INT)ENGINE=INNODB; INSERT INTO t1 VALUES(1); DELETE FROM t1 WHERE i = 1; # On node_2 +connection node_2; INSERT INTO t1 VALUES(2); DELETE FROM t1 WHERE i = 2; # On node_1 +connection node_1; SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM <start_pos>; Log_name Pos Event_type Server_id End_log_pos Info mysqld-bin.000001 # Gtid_list 1 # [] @@ -36,6 +40,7 @@ mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1) mysqld-bin.000001 # Delete_rows_v1 2 # table_id: # flags: STMT_END_F mysqld-bin.000001 # Xid 2 # COMMIT /* xid= */ # On node_2 +connection node_2; SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM <start_pos>; Log_name Pos Event_type Server_id End_log_pos Info mysqld-bin.000001 # Gtid_list 2 # [] @@ -63,4 +68,6 @@ mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1) mysqld-bin.000001 # Delete_rows_v1 2 # table_id: # flags: STMT_END_F mysqld-bin.000001 # Xid 2 # COMMIT /* xid= */ DROP TABLE t1; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/sql_log_bin.result b/mysql-test/suite/galera/r/sql_log_bin.result index 237725ec9a7..8b208ff82d5 100644 --- a/mysql-test/suite/galera/r/sql_log_bin.result +++ b/mysql-test/suite/galera/r/sql_log_bin.result @@ -1,5 +1,6 @@ # On node_1 +connection node_1; USE test; CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB; INSERT INTO t1 VALUES (1); @@ -31,6 +32,7 @@ c1 2 # On node_2 +connection node_2; USE test; SELECT * FROM t1; c1 @@ -49,4 +51,6 @@ c1 1 2 DROP TABLE t1, t2, t3, t4; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/unique_key.result b/mysql-test/suite/galera/r/unique_key.result index ffb4f01c1f8..9f1fc858389 100644 --- a/mysql-test/suite/galera/r/unique_key.result +++ b/mysql-test/suite/galera/r/unique_key.result @@ -5,6 +5,7 @@ USE test; # On node_1 +connection node_1; CREATE TABLE t1(c1 INT DEFAULT NULL, UNIQUE KEY c1(c1)) ENGINE=INNODB; INSERT INTO t1 VALUES (NULL); INSERT INTO t1 VALUES (NULL); @@ -14,12 +15,14 @@ NULL NULL # On node_2 +connection node_2; SELECT * FROM test.t1; c1 NULL NULL # On node_1 +connection node_1; INSERT INTO t1 VALUES (1); UPDATE t1 SET c1=NULL WHERE c1=1; SELECT * FROM test.t1; @@ -29,6 +32,7 @@ NULL NULL # On node_2 +connection node_2; SELECT * FROM test.t1; c1 NULL @@ -36,12 +40,16 @@ NULL NULL # On node_1 +connection node_1; DELETE FROM t1 WHERE c1<=>NULL; SELECT * FROM test.t1; c1 # On node_2 +connection node_2; SELECT * FROM test.t1; c1 DROP TABLE t1; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/r/view.result b/mysql-test/suite/galera/r/view.result index 06d7bf072e8..f8da811f9cc 100644 --- a/mysql-test/suite/galera/r/view.result +++ b/mysql-test/suite/galera/r/view.result @@ -8,6 +8,7 @@ DROP VIEW v1; # MDEV-8464 : ALTER VIEW not replicated in some cases # # On node_1 +connection node_1; USE test; CREATE TABLE t1(i INT) ENGINE=INNODB; CREATE DEFINER=CURRENT_USER VIEW v1 AS SELECT * FROM t1; @@ -15,6 +16,7 @@ CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t1; CREATE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t1; CREATE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER VIEW v4 AS SELECT * FROM t1; # On node_2 +connection node_2; USE test; SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -29,11 +31,13 @@ SHOW CREATE VIEW v4; View Create View character_set_client collation_connection v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci # On node_1 +connection node_1; ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; ALTER ALGORITHM=UNDEFINED VIEW v2 AS SELECT * FROM t1; ALTER DEFINER=CURRENT_USER VIEW v3 AS SELECT * FROM t1; ALTER ALGORITHM=TEMPTABLE DEFINER=CURRENT_USER VIEW v4 AS SELECT * FROM t1; # On node_2 +connection node_2; SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci diff --git a/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result b/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result index f966f18964b..3e737267fbd 100644 --- a/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result +++ b/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result @@ -1,13 +1,16 @@ include/master-slave.inc [connection master] *** MDEV-9383: Server fails to read master.info after upgrade 10.0 -> 10.1 *** +connection slave; include/stop_slave.inc CHANGE MASTER TO master_use_gtid=CURRENT_POS; include/rpl_stop_server.inc [server_number=2] include/rpl_start_server.inc [server_number=2] +connection master; CREATE TABLE t1 (a INT PRIMARY KEY); INSERT INTO t1 VALUES (1); include/save_master_gtid.inc +connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc @@ -17,8 +20,10 @@ a include/stop_slave.inc include/rpl_stop_server.inc [server_number=2] include/rpl_start_server.inc [server_number=2] +connection master; INSERT INTO t1 VALUES (2); include/save_master_gtid.inc +connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc @@ -29,8 +34,10 @@ a include/stop_slave.inc include/rpl_stop_server.inc [server_number=2] include/rpl_start_server.inc [server_number=2] +connection master; INSERT INTO t1 VALUES (3); include/save_master_gtid.inc +connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc @@ -42,8 +49,10 @@ a include/stop_slave.inc include/rpl_stop_server.inc [server_number=2] include/rpl_start_server.inc [server_number=2] +connection master; INSERT INTO t1 VALUES (4); include/save_master_gtid.inc +connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc @@ -56,8 +65,10 @@ a include/stop_slave.inc include/rpl_stop_server.inc [server_number=2] include/rpl_start_server.inc [server_number=2] +connection master; INSERT INTO t1 VALUES (5); include/save_master_gtid.inc +connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc @@ -71,8 +82,10 @@ a include/stop_slave.inc include/rpl_stop_server.inc [server_number=2] include/rpl_start_server.inc [server_number=2] +connection master; INSERT INTO t1 VALUES (6); include/save_master_gtid.inc +connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc @@ -84,5 +97,6 @@ a 4 5 6 +connection master; DROP TABLE t1; include/rpl_end.inc |