Skip to content

Commit ea0b183

Browse files
temeoNirbhay Choubey
authored andcommitted
refs codership/mysql-wsrep#198 Removed code duplication, PXC specifics
* Total order isolation was started twice for FLUSH TABLES, from reload_acl_and_cache() and from mysql_execute_command(). Removed the reload_acl_and_cache() part. * Removed PXC specific stuff from MTR tests
1 parent 235bebe commit ea0b183

File tree

3 files changed

+0
-102
lines changed

3 files changed

+0
-102
lines changed

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,6 @@ 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
6145
CREATE TABLE t1 (f1 INTEGER);
6246
FLUSH LOGS;
6347
FLUSH TABLES WITH READ LOCK;
@@ -84,5 +68,3 @@ wsrep_last_committed_diff
8468
1
8569
DROP TABLE t1;
8670
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: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -155,50 +155,6 @@ 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-
202158
#
203159
# The following statements should not be replicated: FLUSH LOGS, FLUSH TABLES WITH LOCKS
204160
#
@@ -264,10 +220,6 @@ FLUSH TABLES t1;
264220
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
265221
--enable_query_log
266222

267-
268-
269223
--connection node_1
270224
DROP TABLE t1;
271225
DROP TABLE t2;
272-
SET GLOBAL userstat= @userstat_old;
273-
SET GLOBAL thread_statistics= @old_thread_statistics;

sql/sql_reload.cc

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
#include "debug_sync.h"
3030
#include "des_key_file.h"
3131

32-
#ifdef WITH_WSREP
33-
#include "sql_parse.h" // WSREP_MYSQL_DB
34-
#endif /* WITH_WSREP */
3532

3633
static void disable_checkpoints(THD *thd);
3734

@@ -316,36 +313,6 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
316313
}
317314
}
318315
}
319-
#ifdef WITH_WSREP
320-
if (WSREP(thd) && !thd->lex->no_write_to_binlog
321-
&& (options & REFRESH_TABLES)
322-
&& !(options & (REFRESH_FOR_EXPORT|REFRESH_READ_LOCK)))
323-
{
324-
/*
325-
This is done here because LOCK TABLES is not replicated in galera,
326-
the upgrade of which is checked above. Hence, done after/if we
327-
are able to upgrade locks.
328-
329-
Also, note that, in error log with debug you may see
330-
'thread holds MDL locks at TI' but since this is a flush
331-
tables and is required for LOCK TABLE WRITE
332-
it can be ignored there.
333-
*/
334-
if (tables)
335-
{
336-
if (wsrep_to_isolation_begin(thd, NULL, NULL, tables))
337-
{
338-
result= 1;
339-
goto cleanup;
340-
}
341-
}
342-
else if (wsrep_to_isolation_begin(thd, WSREP_MYSQL_DB, NULL, NULL))
343-
{
344-
result= 1;
345-
goto cleanup;
346-
}
347-
}
348-
#endif /* WITH_WSREP */
349316

350317
#ifdef WITH_WSREP
351318
if (thd && thd->wsrep_applier)
@@ -369,9 +336,6 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
369336
result= 1;
370337
}
371338
}
372-
#ifdef WITH_WSREP
373-
cleanup:
374-
#endif /* WITH_WSREP */
375339
my_dbopt_cleanup();
376340
}
377341
if (options & REFRESH_HOSTS)

0 commit comments

Comments
 (0)