Skip to content

Commit 7f2d974

Browse files
authored
[MySql] Merge pull request antlr#2482 from Sebruck/mysql-flush-tables
Update flush table statement as per MySQL 8.0
2 parents 74d7b89 + 1ebab42 commit 7f2d974

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

sql/mysql/Positive-Technologies/MySqlParser.g4

+1-1
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ flushOption
18481848
| USER_RESOURCES | TABLES (WITH READ LOCK)?
18491849
) #simpleFlushOption
18501850
| RELAY LOGS channelOption? #channelFlushOption
1851-
| TABLES tables flushTableOption? #tableFlushOption
1851+
| (TABLE | TABLES) tables? flushTableOption? #tableFlushOption
18521852
;
18531853

18541854
flushTableOption
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#begin
2+
flush hosts, status;
3+
#end
4+
#begin
5+
-- Table flushing
6+
flush tables;
7+
flush local tables Foo;
8+
flush tables Foo, Bar;
9+
flush tables Foo, Bar for export;
10+
flush tables Foo, Bar with read lock;
11+
#end
12+
#begin
13+
-- 'FLUSH TABLE' is an alias for 'FLUSH TABLES' (https://dev.mysql.com/doc/refman/8.0/en/flush.html)
14+
flush table;
15+
flush local table Foo;
16+
flush TABLE Foo, Bar;
17+
flush table Foo, Bar for export;
18+
#end

0 commit comments

Comments
 (0)