diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-03-11 13:27:10 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-03-11 13:27:10 +0100 |
commit | b8c0e4967098fa40094229775e3560fa9052005e (patch) | |
tree | d2b4f2914776aaecbbc5d3d4aba0c826f8f3b49e /mysql-test/suite | |
parent | 5c6c4b13952b0b832b3480bbb1cc9c9889244d33 (diff) | |
parent | 440452628d95476674922c6c097825509a002d8d (diff) | |
download | mariadb-git-b8c0e4967098fa40094229775e3560fa9052005e.tar.gz |
Merge commit '10.3' into 10.4
Diffstat (limited to 'mysql-test/suite')
19 files changed, 391 insertions, 65 deletions
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index b1c28a0e594..41a94831e52 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -26,7 +26,6 @@ galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stm galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files galera_ftwrl : MDEV-21525 galera.galera_ftwrl galera_gcache_recover_manytrx : MDEV-18834 Galera test failure -galera_ist_mariabackup : MDEV-18829 test leaves port open galera_ist_progress : MDEV-15236 fails when trying to read transfer status galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges @@ -44,7 +43,7 @@ galera_sst_mariabackup_table_options: MDEV-19741 Galera test failure on galera.g galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting galera_var_innodb_disallow_writes : MDEV-20928 galera.galera_var_innodb_disallow_writes galera_var_node_address : MDEV-20485 Galera test failure -galera_var_notify_cmd : MDEV-21488,MDEV-20600 +galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang galera_var_reject_queries : assertion in inline_mysql_socket_send galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit galera_wan : MDEV-17259 Test failure on galera.galera_wan diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result index 6d808ce801e..e2fb5a05e9c 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result @@ -1,5 +1,8 @@ connection node_2; connection node_1; +SELECT @@WSREP_ON; +@@WSREP_ON +1 connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; SELECT @@wsrep_on; @@wsrep_on diff --git a/mysql-test/suite/galera/r/galera_rsu_add_pk.result b/mysql-test/suite/galera/r/galera_rsu_add_pk.result index 9b068ba30d1..a38f3ff30cb 100644 --- a/mysql-test/suite/galera/r/galera_rsu_add_pk.result +++ b/mysql-test/suite/galera/r/galera_rsu_add_pk.result @@ -11,19 +11,19 @@ SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); SET SESSION wsrep_OSU_method = "TOI"; INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +EXPECT_300000 +300000 +SELECT MAX(f1) AS EXPECT_299999 FROM t1; +EXPECT_299999 +299999 connection node_1; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +EXPECT_300000 +300000 +SELECT MAX(f1) AS EXPECT_299999 FROM t1; +EXPECT_299999 +299999 SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); SET SESSION wsrep_OSU_method = "TOI"; diff --git a/mysql-test/suite/galera/r/galera_slave_replay.result b/mysql-test/suite/galera/r/galera_slave_replay.result new file mode 100644 index 00000000000..e8dd6ae87b1 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_slave_replay.result @@ -0,0 +1,101 @@ +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_3; +SET GLOBAL wsrep_on=OFF; +RESET MASTER; +SET GLOBAL wsrep_on=ON; +connection node_2a; +START SLAVE; +connection node_3; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb; +INSERT INTO t1 VALUES (1, 'a'); +INSERT INTO t1 VALUES (3, 'a'); +set binlog_format=STATEMENT; +SET AUTOCOMMIT=ON; +START TRANSACTION; +SELECT * FROM t1 FOR UPDATE; +f1 f2 +1 a +3 a +UPDATE t1 SET f2 = 'c' WHERE f1 > 1; +connection node_2a; +SET SESSION wsrep_sync_wait = 0; +connection node_1; +SET SESSION wsrep_sync_wait = 0; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync'; +SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; +connection node_1; +INSERT INTO test.t1 VALUES (2, 'b'); +connection node_3; +COMMIT; +connection node_2a; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL debug_dbug = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync'; +connection node_3; +SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a'; +COUNT(*) = 1 +1 +SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c'; +COUNT(*) = 1 +1 +SELECT * FROM t1; +f1 f2 +1 a +3 c +connection node_2a; +set session wsrep_sync_wait=15; +set session wsrep_sync_wait=0; +wsrep_local_replays +1 +SELECT * FROM t1; +f1 f2 +1 a +2 b +3 c +SET DEBUG_SYNC = "RESET"; +# +# test phase with real abort +# +connection node_3; +set binlog_format=ROW; +insert into t1 values (4, 'd'); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE t1 SET f2 = 'd' WHERE f1 = 3; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync'; +SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; +connection node_3; +UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3; +connection node_3; +COMMIT; +connection node_2a; +SET GLOBAL debug_dbug = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync'; +SET DEBUG_SYNC = "RESET"; +connection node_2a; +set session wsrep_sync_wait=15; +SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e'; +COUNT(*) = 1 +1 +set session wsrep_sync_wait=0; +STOP SLAVE; +RESET SLAVE; +DROP TABLE t1; +connection node_3; +DROP TABLE t1; +SET GLOBAL wsrep_on=OFF; +RESET MASTER; +SET GLOBAL wsrep_on=ON; diff --git a/mysql-test/suite/galera/r/galera_var_notify_cmd.result b/mysql-test/suite/galera/r/galera_var_notify_cmd.result index 2b390d0db8d..823407fbba7 100644 --- a/mysql-test/suite/galera/r/galera_var_notify_cmd.result +++ b/mysql-test/suite/galera/r/galera_var_notify_cmd.result @@ -1,11 +1,11 @@ connection node_1; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership; -COUNT(DISTINCT uuid) +SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership; +EXPECT_2 2 -SELECT MAX(size) FROM mtr_wsrep_notify.status; -MAX(size) +SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status; +EXPECT_2 2 -SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status; -COUNT(DISTINCT idx) -1 +SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status; +EXPECT_2 +2 +DROP SCHEMA mtr_wsrep_notify; 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 2aac6d8851c..8edf1a02e9d 100644 --- a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result +++ b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result @@ -27,7 +27,7 @@ VARIABLE_VALUE = 'ON' 1 SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; VARIABLE_VALUE = 0 -0 +1 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; VARIABLE_VALUE = 'ON' 1 diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test index 40f8bd7ad49..6df605079e8 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test @@ -14,6 +14,7 @@ --source include/have_innodb.inc --source include/have_log_bin.inc --source include/galera_cluster.inc +SELECT @@WSREP_ON; # As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it # we open the node_3 connection here diff --git a/mysql-test/suite/galera/t/galera_rsu_add_pk.test b/mysql-test/suite/galera/t/galera_rsu_add_pk.test index 7db990d7be1..094048f6caa 100644 --- a/mysql-test/suite/galera/t/galera_rsu_add_pk.test +++ b/mysql-test/suite/galera/t/galera_rsu_add_pk.test @@ -26,14 +26,20 @@ SET SESSION wsrep_OSU_method = "TOI"; # Insert values after the ALTER INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +SELECT MAX(f1) AS EXPECT_299999 FROM t1; --connection node_1 --reap -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; + +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +SELECT MAX(f1) AS EXPECT_299999 FROM t1; SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); diff --git a/mysql-test/suite/galera/t/galera_slave_replay.cnf b/mysql-test/suite/galera/t/galera_slave_replay.cnf new file mode 100644 index 00000000000..9449ec9cf40 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_slave_replay.cnf @@ -0,0 +1 @@ +!include ../galera_2nodes_as_slave.cnf diff --git a/mysql-test/suite/galera/t/galera_slave_replay.test b/mysql-test/suite/galera/t/galera_slave_replay.test new file mode 100644 index 00000000000..6cdcc8d15b3 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_slave_replay.test @@ -0,0 +1,203 @@ +# +# This test tests the operation of transaction replay for async replication slave. +# If a potentially conflicting galera transaction arrives at +# just the right time during the commit and has lock conflict with async replication transaction +# applied by slave SQL thread, then the async replication transaction should either abort +# or rollback and replay (depending on the nature of lock conflict). +# + +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 + +--connection node_2a +--source include/galera_cluster.inc +--source include/galera_have_debug_sync.inc + +# +# node 3 is native MariaDB server operating as async replication master +# +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--connection node_3 +SET GLOBAL wsrep_on=OFF; +RESET MASTER; +SET GLOBAL wsrep_on=ON; + +--connection node_2a +# +# count the number of wsrep replay's done in the node +# +--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` + + +# +# nodes 1 and 2 form a galera cluster, node 2 operates as slave for native MariaDB naster in node 3 +# +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3; +--enable_query_log +START SLAVE; + +--connection node_3 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb; +INSERT INTO t1 VALUES (1, 'a'); +INSERT INTO t1 VALUES (3, 'a'); + +# +# use statement format replication to cause a false positive conflict with async replication transaction +# and galera replication. The conflict will be on GAP lock, and slave SQL thread should rollback +# and replay +# +set binlog_format=STATEMENT; + +SET AUTOCOMMIT=ON; +START TRANSACTION; + +SELECT * FROM t1 FOR UPDATE; +UPDATE t1 SET f2 = 'c' WHERE f1 > 1; + +--connection node_2a +# wait for create table and inserts to be replicated from master +SET SESSION wsrep_sync_wait = 0; +--let $wait_condition = SELECT COUNT(*) = 2 FROM test.t1; +--source include/wait_condition.inc + +# wait for create table and inserts to be replicated in cluster +--connection node_1 +SET SESSION wsrep_sync_wait = 0; +--let $wait_condition = SELECT COUNT(*) = 2 FROM test.t1; +--source include/wait_condition.inc + +--connection node_2a +# Block the future commit of async replication +--let $galera_sync_point = commit_monitor_master_enter_sync +--source include/galera_set_sync_point.inc + +# block also the applier before applying begins +SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; + +# +# now inject a conflicting insert from node 1, it will replicate with +# earlier seqno (than async transaction) and pause before applying in node 2 +# +--connection node_1 +INSERT INTO test.t1 VALUES (2, 'b'); + +# +# send the update from master, this will succeed here, beceuase of async replication. +# async replication will apply this in node 2 and pause before commit phase, +--connection node_3 +--error 0 +COMMIT; + +# Wait until async slave commit is blocked in node_2 +--connection node_2a +--source include/galera_wait_sync_point.inc + +# +# release the applier +# note: have to clear wsrep_apply_cb sync point first, as async replication will go for replay +# and as this sync point, after BF applier is released to progress +# +SET GLOBAL debug_dbug = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +# Unblock the async slave commit +--connection node_2a +--source include/galera_clear_sync_point.inc +--source include/galera_signal_sync_point.inc + +--connection node_3 + +SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a'; +SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c'; +SELECT * FROM t1; + +--connection node_2a + +# wsrep_local_replays has increased by 1 +set session wsrep_sync_wait=15; +--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` +set session wsrep_sync_wait=0; + +--disable_query_log +--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays; +--enable_query_log + +# +# replaying of async transaction should be effective, and row 3 having 'c' in f2 +# +SELECT * FROM t1; +SET DEBUG_SYNC = "RESET"; + +#******************************************************************************** +# test phase 2 +#******************************************************************************** + +--echo # +--echo # test phase with real abort +--echo # + +--connection node_3 + +set binlog_format=ROW; + +insert into t1 values (4, 'd'); + +SET AUTOCOMMIT=ON; +START TRANSACTION; + +UPDATE t1 SET f2 = 'd' WHERE f1 = 3; + +--connection node_2a +# wait for the last insert to be replicated from master +--let $wait_condition = SELECT COUNT(*) = 4 FROM test.t1; +--source include/wait_condition.inc + +# Block the commit +--let $galera_sync_point = commit_monitor_master_enter_sync +--source include/galera_set_sync_point.inc + +# block applier +SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; + +# Inject a conflicting update from node 3 +--connection node_3 +UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3; + +# send the update from master +--connection node_3 +--error 0 +COMMIT; + +--connection node_2a + +# release the applier +SET GLOBAL debug_dbug = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + + +# Unblock the async slave commit +--connection node_2a +--source include/galera_clear_sync_point.inc +--source include/galera_signal_sync_point.inc +SET DEBUG_SYNC = "RESET"; + +--connection node_2a + +set session wsrep_sync_wait=15; +SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e'; +set session wsrep_sync_wait=0; + +STOP SLAVE; +RESET SLAVE; + +DROP TABLE t1; + +--connection node_3 +DROP TABLE t1; +SET GLOBAL wsrep_on=OFF; +RESET MASTER; +SET GLOBAL wsrep_on=ON; diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt b/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt new file mode 100644 index 00000000000..70dfc98736b --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt @@ -0,0 +1 @@ +--wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh --wsrep-sync-wait=0 diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf b/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf deleted file mode 100644 index 69df4f0e7e0..00000000000 --- a/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf +++ /dev/null @@ -1,13 +0,0 @@ -!include ../galera_2nodes.cnf - -[mysqld.1] -wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh -wsrep-sync-wait=0 - -[mysqld.2] - - - - - - diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd.test b/mysql-test/suite/galera/t/galera_var_notify_cmd.test index 2b0852b4870..fda61bf2914 100644 --- a/mysql-test/suite/galera/t/galera_var_notify_cmd.test +++ b/mysql-test/suite/galera/t/galera_var_notify_cmd.test @@ -4,9 +4,15 @@ # --source include/galera_cluster.inc +--source include/force_restart.inc --connection node_1 -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership; -SELECT MAX(size) FROM mtr_wsrep_notify.status; -SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status; +--let $wait_condition = SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership; +--source include/wait_condition.inc + +SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership; +SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status; +SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status; + +# CLEANUP +DROP SCHEMA mtr_wsrep_notify; diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt b/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt new file mode 100644 index 00000000000..c31150c46af --- /dev/null +++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt @@ -0,0 +1 @@ +--wsrep-new-cluster diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf deleted file mode 100644 index 0acbcfb7843..00000000000 --- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf +++ /dev/null @@ -1,10 +0,0 @@ -!include ../galera_2nodes.cnf - -[mysqld.1] -wsrep-new-cluster - -[mysqld.2] - - - - diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test index 28025363019..0df9f0f88df 100644 --- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test +++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test @@ -6,6 +6,19 @@ --source include/galera_cluster.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'on' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc + SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; @@ -15,6 +28,19 @@ SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VAR --connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'on' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state'; +--source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; +--source include/wait_condition.inc + SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; diff --git a/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-test/suite/galera/t/lp1376747-4.test index 0c707d6d681..30ed67c0eb3 100644 --- a/mysql-test/suite/galera/t/lp1376747-4.test +++ b/mysql-test/suite/galera/t/lp1376747-4.test @@ -27,25 +27,24 @@ INSERT INTO t1 VALUES (2,3); --connection node_2a SET session wsrep_sync_wait=0; SET session wsrep_causal_reads=OFF; + SHOW CREATE TABLE t1; ---sleep 1 --send FLUSH TABLES t1 WITH READ LOCK; --connection node_2 -# let the flush table wait in pause state before we unlock -# table otherwise there is window where-in flush table is -# yet to wait in pause and unlock allows alter table to proceed. -# this is because send in asynchronous. ---sleep 3 -# this will release existing lock but will not resume -# the cluster as there is new FTRL that is still pausing it. +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%'; +--source include/wait_condition.inc + UNLOCK TABLES; SHOW CREATE TABLE t1; --connection node_2a --reap UNLOCK TABLES; ---sleep 2 + +--let $wait_condition = SELECT COUNT(*) = 2 FROM t1; +--source include/wait_condition.inc + SHOW CREATE TABLE t1; SELECT * from t1; diff --git a/mysql-test/suite/innodb_fts/r/misc_debug2.result b/mysql-test/suite/innodb_fts/r/misc_debug2.result index 2c8281579b9..ed7e6b9b7e1 100644 --- a/mysql-test/suite/innodb_fts/r/misc_debug2.result +++ b/mysql-test/suite/innodb_fts/r/misc_debug2.result @@ -1,4 +1,5 @@ -call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded"); +call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded."); +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); CREATE TABLE mdev21563(f1 VARCHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB; set debug_dbug="+d,fts_instrument_sync_request"; INSERT INTO mdev21563 VALUES('This is a test'); diff --git a/mysql-test/suite/innodb_fts/t/misc_debug2.test b/mysql-test/suite/innodb_fts/t/misc_debug2.test index 5b0184e5cca..0a9e137dd80 100644 --- a/mysql-test/suite/innodb_fts/t/misc_debug2.test +++ b/mysql-test/suite/innodb_fts/t/misc_debug2.test @@ -1,7 +1,8 @@ --source include/have_innodb.inc --source include/have_debug.inc --source include/not_embedded.inc -call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded"); +call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded."); +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); CREATE TABLE mdev21563(f1 VARCHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB; set debug_dbug="+d,fts_instrument_sync_request"; |