Documentation ¶
Index ¶
- func ExtractSelectAndNormalizeDigest(stmtNode ast.StmtNode, specifiledDB string) (ast.StmtNode, string, string, error)
- func IsReadOnly(node ast.Node, vars *variable.SessionVars) bool
- func Optimize(ctx context.Context, sctx sessionctx.Context, node ast.Node, ...) (core.Plan, types.NameSlice, error)
- func OptimizeExecStmt(ctx context.Context, sctx sessionctx.Context, execAst *ast.ExecuteStmt, ...) (core.Plan, types.NameSlice, error)
- func OptimizeForForeignKeyCascade(ctx context.Context, sctx sessionctx.Context, node ast.StmtNode, ...) (core.Plan, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSelectAndNormalizeDigest ¶
func ExtractSelectAndNormalizeDigest(stmtNode ast.StmtNode, specifiledDB string) (ast.StmtNode, string, string, error)
ExtractSelectAndNormalizeDigest extract the select statement and normalize it.
func IsReadOnly ¶
func IsReadOnly(node ast.Node, vars *variable.SessionVars) bool
IsReadOnly check whether the ast.Node is a read only statement.
func Optimize ¶
func Optimize(ctx context.Context, sctx sessionctx.Context, node ast.Node, is infoschema.InfoSchema) (core.Plan, types.NameSlice, error)
Optimize does optimization and creates a Plan. The node must be prepared first.
func OptimizeExecStmt ¶
func OptimizeExecStmt(ctx context.Context, sctx sessionctx.Context, execAst *ast.ExecuteStmt, is infoschema.InfoSchema) (core.Plan, types.NameSlice, error)
OptimizeExecStmt to handle the "execute" statement
func OptimizeForForeignKeyCascade ¶
func OptimizeForForeignKeyCascade(ctx context.Context, sctx sessionctx.Context, node ast.StmtNode, is infoschema.InfoSchema) (core.Plan, error)
OptimizeForForeignKeyCascade does optimization and creates a Plan for foreign key cascade. The node must be prepared first. Compare to Optimize, OptimizeForForeignKeyCascade only build plan by StmtNode, doesn't consider plan cache and plan binding, also doesn't do privilege check.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.