Skip to content

Commit

Permalink
Bug#1421360: Add Percona Server specific FLUSH statements.
Browse files Browse the repository at this point in the history
- Restore FLUSH commands supported by MariaDB (removed in
the previous commit)
- Adjust test case
  • Loading branch information
Nirbhay Choubey committed Feb 23, 2016
1 parent 5d4fb15 commit 17ac959
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mysql-test/suite/galera/t/galera_flush_local.opt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--query_cache_type=1 --query_cache_size=1000000 --innodb_track_changed_pages=1 --userstat=1 --thread_statistics=1
--query_cache_type=1 --query_cache_size=1000000 --userstat=1 --wsrep_replicate_myisam=true
10 changes: 8 additions & 2 deletions mysql-test/suite/galera/t/galera_flush_local.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ DROP TABLE IF EXISTS t1, t2, x1, x2;
--connection node_1
CREATE TABLE t1 (f1 INTEGER);
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
SET GLOBAL wsrep_replicate_myisam = TRUE;
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
Expand All @@ -39,6 +38,10 @@ FLUSH LOCAL SLOW LOGS;
FLUSH LOCAL GENERAL LOGS;
FLUSH LOCAL ENGINE LOGS;
FLUSH LOCAL RELAY LOGS;
FLUSH LOCAL CLIENT_STATISTICS;
FLUSH LOCAL INDEX_STATISTICS;
FLUSH LOCAL TABLE_STATISTICS;
FLUSH LOCAL USER_STATISTICS;
FLUSH LOCAL LOGS;
FLUSH LOCAL BINARY LOGS;
FLUSH LOCAL TABLES WITH READ LOCK;
Expand Down Expand Up @@ -74,7 +77,6 @@ SELECT COUNT(*) = 10 FROM x2;
DROP TABLE t1, t2, x1, x2;
CREATE TABLE t1 (f1 INTEGER);
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
SET GLOBAL wsrep_replicate_myisam = TRUE;
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
Expand All @@ -100,6 +102,10 @@ FLUSH SLOW LOGS;
FLUSH GENERAL LOGS;
FLUSH ENGINE LOGS;
FLUSH RELAY LOGS;
FLUSH CLIENT_STATISTICS;
FLUSH INDEX_STATISTICS;
FLUSH TABLE_STATISTICS;
FLUSH USER_STATISTICS;
FLUSH LOGS;
FLUSH BINARY LOGS;
FLUSH TABLES WITH READ LOCK;
Expand Down
6 changes: 5 additions & 1 deletion sql/sql_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4690,7 +4690,11 @@ case SQLCOM_PREPARE:
REFRESH_QUERY_CACHE_FREE |
#endif /* HAVE_QUERY_CACHE */
REFRESH_STATUS |
REFRESH_USER_RESOURCES))
REFRESH_USER_RESOURCES |
REFRESH_TABLE_STATS |
REFRESH_INDEX_STATS |
REFRESH_USER_STATS |
REFRESH_CLIENT_STATS))
{
WSREP_TO_ISOLATION_BEGIN_WRTCHK(WSREP_MYSQL_DB, NULL, NULL)
}
Expand Down

0 comments on commit 17ac959

Please sign in to comment.