diff options
Diffstat (limited to 'mysql-test/suite/galera/t/partition.test')
-rw-r--r-- | mysql-test/suite/galera/t/partition.test | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/mysql-test/suite/galera/t/partition.test b/mysql-test/suite/galera/t/partition.test index bb5a02411c3..13e09a4e3e6 100644 --- a/mysql-test/suite/galera/t/partition.test +++ b/mysql-test/suite/galera/t/partition.test @@ -129,11 +129,17 @@ CREATE TABLE t1 (pk INT PRIMARY KEY) --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` --connection node_2 -SELECT COUNT(*) = 20002 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 20002 FROM t1; +--source include/wait_condition.inc -# LOAD-ing 20002 rows causes 3 commits to be registered +SELECT COUNT(*) FROM t1; + +# LOAD-ing 20002 rows causes +# 3 commits to be registered when the Galera library does not support streaming replication and +# 5 commits to be registered when the Galera library supports streaming replication --disable_query_log ---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 3 AS wsrep_last_committed_diff; +--replace_result 3 AS_EXPECTED_3_or_5 5 AS_EXPECTED_3_or_5 +--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff; --enable_query_log DROP TABLE t1; @@ -157,11 +163,14 @@ CREATE TABLE t1 (pk INT PRIMARY KEY) --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` --connection node_2 -SELECT COUNT(*) = 101 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 101 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) FROM t1; # LOAD-ing 101 rows causes 1 commit to be registered --disable_query_log ---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff; +--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff; --enable_query_log DROP TABLE t1; @@ -186,11 +195,16 @@ CREATE TABLE t1 (pk INT PRIMARY KEY) --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` --connection node_2 -SELECT COUNT(*) = 20002 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 20002 FROM t1; +--source include/wait_condition.inc +SELECT COUNT(*) FROM t1; -# LOAD-ing 20002 rows causes 1 commit to be registered +# LOAD-ing 20002 rows causes +# 1 commit to be registered when the Galera library does not support streaming replication and +# 2 commits to be registered when the Galera library supports streaming replication --disable_query_log ---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff; +--replace_result 1 AS_EXPECTED_1_or_2 2 AS_EXPECTED_1_or_2 +--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff; --enable_query_log DROP TABLE t1; |