Skip to content

Commit d45f0c1

Browse files
author
Nirbhay Choubey
committed
refs mariadb-corporation/mysql-wsrep#198: Revert test changes from previous commit
Restore tests for FLUSH commands supported by MariaDB.
1 parent ea0b183 commit d45f0c1

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

mysql-test/suite/galera/r/galera_flush.result

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ wsrep_last_committed_diff
4242
FLUSH RELAY LOGS;
4343
wsrep_last_committed_diff
4444
1
45+
SET @userstat_old= @@userstat;
46+
SET GLOBAL userstat=ON;
47+
FLUSH CLIENT_STATISTICS;
48+
FLUSH INDEX_STATISTICS;
49+
FLUSH TABLE_STATISTICS;
50+
FLUSH USER_STATISTICS;
51+
wsrep_last_committed_diff
52+
1
53+
SET @old_thread_statistics= @@global.thread_statistics;
54+
SET GLOBAL thread_statistics= ON;
55+
FLUSH THREAD_STATISTICS;
56+
wsrep_last_committed_diff
57+
1
58+
FLUSH CHANGED_PAGE_BITMAPS;
59+
wsrep_last_committed_diff
60+
1
4561
CREATE TABLE t1 (f1 INTEGER);
4662
FLUSH LOGS;
4763
FLUSH TABLES WITH READ LOCK;
@@ -68,3 +84,5 @@ wsrep_last_committed_diff
6884
1
6985
DROP TABLE t1;
7086
DROP TABLE t2;
87+
SET GLOBAL userstat= @userstat_old;
88+
SET GLOBAL thread_statistics= @old_thread_statistics;

mysql-test/suite/galera/t/galera_flush.test

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,50 @@ FLUSH RELAY LOGS;
155155
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
156156
--enable_query_log
157157

158+
--connection node_1
159+
SET @userstat_old= @@userstat;
160+
SET GLOBAL userstat=ON;
161+
162+
--connection node_2
163+
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
164+
--connection node_1
165+
FLUSH CLIENT_STATISTICS;
166+
FLUSH INDEX_STATISTICS;
167+
FLUSH TABLE_STATISTICS;
168+
FLUSH USER_STATISTICS;
169+
--connection node_2
170+
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
171+
--disable_query_log
172+
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 4 AS wsrep_last_committed_diff;
173+
--enable_query_log
174+
175+
176+
--connection node_1
177+
SET @old_thread_statistics= @@global.thread_statistics;
178+
SET GLOBAL thread_statistics= ON;
179+
180+
--connection node_2
181+
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
182+
--connection node_1
183+
FLUSH THREAD_STATISTICS;
184+
--connection node_2
185+
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
186+
--disable_query_log
187+
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
188+
--enable_query_log
189+
190+
191+
--connection node_2
192+
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
193+
--connection node_1
194+
FLUSH CHANGED_PAGE_BITMAPS;
195+
--connection node_2
196+
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
197+
--disable_query_log
198+
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
199+
--enable_query_log
200+
201+
158202
#
159203
# The following statements should not be replicated: FLUSH LOGS, FLUSH TABLES WITH LOCKS
160204
#
@@ -220,6 +264,10 @@ FLUSH TABLES t1;
220264
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
221265
--enable_query_log
222266

267+
268+
223269
--connection node_1
224270
DROP TABLE t1;
225271
DROP TABLE t2;
272+
SET GLOBAL userstat= @userstat_old;
273+
SET GLOBAL thread_statistics= @old_thread_statistics;

0 commit comments

Comments
 (0)