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 authored Jul 16, 2019
1 parent fadeae6 commit 9b44a2f
Show file tree
Hide file tree
Showing 4 changed files with 6,149 additions and 6,125 deletions.
3 changes: 3 additions & 0 deletions ast/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,7 @@ const (
AdminShowSlow
AdminShowNextRowID
AdminReloadExprPushdownBlacklist
AdminReloadOptRuleBlacklist
AdminPluginDisable
AdminPluginEnable
)
Expand Down Expand Up @@ -1554,6 +1555,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 @@ -589,6 +589,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 9b44a2f

Please sign in to comment.