Documentation
¶
Index ¶
- func GetExecuteForUpdateReadIS(node ast.Node, sctx sessionctx.Context) infoschema.InfoSchema
- func GetPreparedStmt(stmt *ast.ExecuteStmt, vars *variable.SessionVars) (*plannercore.CachedPrepareStmt, error)
- func IsReadOnly(node ast.Node, vars *variable.SessionVars) bool
- func Optimize(ctx context.Context, sctx sessionctx.Context, node ast.Node, ...) (plannercore.Plan, types.NameSlice, error)
- func OptimizeExecStmt(ctx context.Context, sctx sessionctx.Context, execAst *ast.ExecuteStmt, ...) (plannercore.Plan, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetExecuteForUpdateReadIS ¶
func GetExecuteForUpdateReadIS(node ast.Node, sctx sessionctx.Context) infoschema.InfoSchema
GetExecuteForUpdateReadIS is used to check whether the statement is `execute` and target statement has a forUpdateRead flag. If so, we will return the latest information schema.
func GetPreparedStmt ¶
func GetPreparedStmt(stmt *ast.ExecuteStmt, vars *variable.SessionVars) (*plannercore.CachedPrepareStmt, error)
GetPreparedStmt extract the prepared statement from the execute statement.
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) (plannercore.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) (plannercore.Plan, error)
OptimizeExecStmt to optimize prepare statement protocol "execute" statement this is a short path ONLY does things filling prepare related params for point select like plan which does not need extra things
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.