Skip to content

Commit

Permalink
parser: add opt_rule_blacklist and admin reload it. (#375) (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzmhhh123 authored and kennytm committed Aug 6, 2019
1 parent d4d0733 commit 1a31cab
Show file tree
Hide file tree
Showing 4 changed files with 6,116 additions and 6,091 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 @@ -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 1a31cab

Please sign in to comment.