Skip to content

Commit

Permalink
parser: add opt_rule_blacklist and admin reload it. (pingcap#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzmhhh123 committed Jul 25, 2019
1 parent c3bdffe commit 3ec004e
Show file tree
Hide file tree
Showing 4 changed files with 6,053 additions and 6,029 deletions.
3 changes: 3 additions & 0 deletions ast/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,7 @@ const (
AdminShowSlow
AdminShowNextRowID
AdminReloadExprPushdownBlacklist
AdminReloadOptRuleBlacklist
AdminPluginDisable
AdminPluginEnable
)
Expand Down Expand Up @@ -1553,6 +1554,8 @@ func (n *AdminStmt) Restore(ctx *RestoreCtx) error {
}
case AdminReloadExprPushdownBlacklist:
ctx.WriteKeyWord("RELOAD EXPR_PUSHDOWN_BLACKLIST")
case AdminReloadOptRuleBlacklist:
ctx.WriteKeyWord("RELOAD OPT_RULE_BLACKLIST")
case AdminPluginEnable:
ctx.WriteKeyWord("PLUGINS ENABLE")
for i, v := range n.Plugins {
Expand Down
1 change: 1 addition & 0 deletions misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ var tokenMap = map[string]int{
"BINDING": binding,
"BINDINGS": bindings,
"EXPR_PUSHDOWN_BLACKLIST": exprPushdownBlacklist,
"OPT_RULE_BLACKLIST": optRuleBlacklist,
}

// See https://dev.mysql.com/doc/refman/5.7/en/function-resolution.html for details
Expand Down
Loading

0 comments on commit 3ec004e

Please sign in to comment.