Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ast/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ const (
FlushNone FlushStmtType = iota
FlushTables
FlushPrivileges
FlushStatus
)

// FlushStmt is a statement to flush tables/privileges/optimizer costs and so on.
Expand Down
6 changes: 6 additions & 0 deletions parser/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -5518,6 +5518,12 @@ FlushOption:
Tp: ast.FlushPrivileges,
}
}
| "STATUS"
{
$$ = &ast.FlushStmt{
Tp: ast.FlushStatus,
}
}
| TableOrTables TableNameListOpt WithReadLockOpt
{
$$ = &ast.FlushStmt{
Expand Down
1 change: 1 addition & 0 deletions parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ func (s *testParserSuite) TestDBAStmt(c *C) {
{"flush tables tbl1, tbl2, tbl3", true},
{"flush tables tbl1, tbl2, tbl3 with read lock", true},
{"flush privileges", true},
{"flush status", true},
}
s.RunTest(c, table)
}
Expand Down