Commit d45f0c11 authored by Nirbhay Choubey's avatar Nirbhay Choubey

refs codership/mysql-wsrep#198: Revert test changes from previous commit

Restore tests for FLUSH commands supported by MariaDB.
parent ea0b1837
......@@ -42,6 +42,22 @@ wsrep_last_committed_diff
FLUSH RELAY LOGS;
wsrep_last_committed_diff
1
SET @userstat_old= @@userstat;
SET GLOBAL userstat=ON;
FLUSH CLIENT_STATISTICS;
FLUSH INDEX_STATISTICS;
FLUSH TABLE_STATISTICS;
FLUSH USER_STATISTICS;
wsrep_last_committed_diff
1
SET @old_thread_statistics= @@global.thread_statistics;
SET GLOBAL thread_statistics= ON;
FLUSH THREAD_STATISTICS;
wsrep_last_committed_diff
1
FLUSH CHANGED_PAGE_BITMAPS;
wsrep_last_committed_diff
1
CREATE TABLE t1 (f1 INTEGER);
FLUSH LOGS;
FLUSH TABLES WITH READ LOCK;
......@@ -68,3 +84,5 @@ wsrep_last_committed_diff
1
DROP TABLE t1;
DROP TABLE t2;
SET GLOBAL userstat= @userstat_old;
SET GLOBAL thread_statistics= @old_thread_statistics;
......@@ -155,6 +155,50 @@ FLUSH RELAY LOGS;
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_1
SET @userstat_old= @@userstat;
SET GLOBAL userstat=ON;
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
FLUSH CLIENT_STATISTICS;
FLUSH INDEX_STATISTICS;
FLUSH TABLE_STATISTICS;
FLUSH USER_STATISTICS;
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 4 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_1
SET @old_thread_statistics= @@global.thread_statistics;
SET GLOBAL thread_statistics= ON;
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
FLUSH THREAD_STATISTICS;
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
FLUSH CHANGED_PAGE_BITMAPS;
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
--enable_query_log
#
# The following statements should not be replicated: FLUSH LOGS, FLUSH TABLES WITH LOCKS
#
......@@ -220,6 +264,10 @@ FLUSH TABLES t1;
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_1
DROP TABLE t1;
DROP TABLE t2;
SET GLOBAL userstat= @userstat_old;
SET GLOBAL thread_statistics= @old_thread_statistics;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment