Documentation ¶
Index ¶
- Constants
- Variables
- func AddNewAnalyzeJob(ctx sessionctx.Context, job *statistics.AnalyzeJob)
- func BRIECreateDatabase(sctx sessionctx.Context, schema *model.DBInfo, brComment string) error
- func BRIECreateTable(sctx sessionctx.Context, dbName pmodel.CIStr, table *model.TableInfo, ...) error
- func BRIECreateTables(sctx sessionctx.Context, tables map[string][]*model.TableInfo, ...) error
- func CalculateBatchSize(estRows, initBatchSize, maxBatchSize int) int
- func ColumnName(column string) string
- func ConstructResultOfShowCreateDatabase(ctx sessionctx.Context, dbInfo *model.DBInfo, ifNotExists bool, ...) (err error)
- func ConstructResultOfShowCreatePlacementPolicy(policyInfo *model.PolicyInfo) string
- func ConstructResultOfShowCreateSequence(ctx sessionctx.Context, tableInfo *model.TableInfo, buf *bytes.Buffer)
- func ConstructResultOfShowCreateTable(ctx sessionctx.Context, tableInfo *model.TableInfo, ...) (err error)
- func ConvertConfigItem2JSON(ctx sessionctx.Context, key string, val expression.Expression) (body string, err error)
- func CountStmtNode(stmtNode ast.StmtNode, resolveCtx *resolve.Context, inRestrictedSQL bool, ...)
- func DecodeRowValToChunk(sctx sessionctx.Context, schema *expression.Schema, tblInfo *model.TableInfo, ...) error
- func Detach(originalExecutor exec.Executor) (exec.Executor, bool)
- func DumpRealOutfile(realBuf, lineBuf []byte, v float64, tp *types.FieldType) ([]byte, []byte)
- func FillOneImportJobInfo(info *importer.JobInfo, result *chunk.Chunk, importedRowCount int64)
- func FormatSQL(sql string) stringutil.StringerFunc
- func GenCascadeDeleteAST(schema, table, idx pmodel.CIStr, cols []*model.ColumnInfo, ...) *ast.DeleteStmt
- func GenCascadeSetNullAST(schema, table, idx pmodel.CIStr, cols []*model.ColumnInfo, ...) *ast.UpdateStmt
- func GenCascadeUpdateAST(schema, table, idx pmodel.CIStr, cols []*model.ColumnInfo, ...) *ast.UpdateStmt
- func GetDropOrTruncateTableInfoFromJobs(jobs []*model.Job, gcSafePoint uint64, dom *domain.Domain, ...) (bool, error)
- func GetEncodedPlan(stmtCtx *stmtctx.StatementContext, genHint bool) (encodedPlan, hintStr string)
- func GetLackHandles(expectedHandles []kv.Handle, obtainedHandlesMap *kv.HandleMap) []kv.Handle
- func GetPhysID(tblInfo *model.TableInfo, idx *int) int64
- func GetPlanDigest(stmtCtx *stmtctx.StatementContext) (string, *parser.Digest)
- func GetResultRowsCount(stmtCtx *stmtctx.StatementContext, p base.Plan) int64
- func IsFastPlan(p base.Plan) bool
- func LoadExprPushdownBlacklist(sctx sessionctx.Context) (err error)
- func LoadOptRuleBlacklist(ctx context.Context, sctx sessionctx.Context) (err error)
- func LockKeys(ctx context.Context, sctx sessionctx.Context, lockWaitTime int64, ...) error
- func MockNewCacheTableSnapShot(snapshot kv.Snapshot, memBuffer kv.MemBuffer) *cacheTableSnapshot
- func NewAnalyzeResultsNotifyWaitGroupWrapper(notify chan *statistics.AnalyzeResults) *analyzeResultsNotifyWaitGroupWrapper
- func NewProfileBuilder(sctx sessionctx.Context, start, end time.Time, tp string) (*profileBuilder, error)
- func NewRowDecoder(ctx sessionctx.Context, schema *expression.Schema, tbl *model.TableInfo) *rowcodec.ChunkDecoder
- func ParseTime(s string) (time.Time, error)
- func ResetContextOfStmt(ctx sessionctx.Context, s ast.StmtNode) (err error)
- func ResetDeleteStmtCtx(sc *stmtctx.StatementContext, stmt *ast.DeleteStmt, vars *variable.SessionVars)
- func ResetGlobalBRIEQueueForTest()
- func ResetUpdateStmtCtx(sc *stmtctx.StatementContext, stmt *ast.UpdateStmt, vars *variable.SessionVars)
- func SetFromString(value string) []string
- func Start()
- func Stop()
- func TableName(schema, table string) string
- func ValidateImportIntoColAssignmentsWithEncodeCtx(plan *importer.Plan, assigns []*ast.Assignment) error
- type AdminPluginsExec
- type AdminShowBDRRoleExec
- type AlterDDLJobExec
- type AnalyzeColumnsExec
- type AnalyzeColumnsExecV1
- type AnalyzeColumnsExecV2
- type AnalyzeExec
- type AnalyzeIndexExec
- type BRIEExec
- type BatchPointGetExec
- type CTEExec
- type CTEStorages
- type CTETableReaderExec
- type CancelDDLJobsExec
- type CheckIndexRangeExec
- type CheckTableExec
- type ChecksumTableExec
- type CleanupIndexExec
- type Closeable
- type CommandDDLJobsExec
- type CompactTableTiFlashExec
- type Compiler
- type CoprocessorDAGHandler
- type DDLExec
- type DDLJobRetriever
- type DDLJobsReaderExec
- type DeallocateExec
- type DeleteExec
- func (e *DeleteExec) Close() error
- func (e *DeleteExec) GetFKCascades() []*FKCascadeExec
- func (e *DeleteExec) GetFKChecks() []*FKCheckExec
- func (e *DeleteExec) HasFKCascades() bool
- func (e *DeleteExec) Next(ctx context.Context, req *chunk.Chunk) error
- func (e *DeleteExec) Open(ctx context.Context) error
- type ExecStmt
- func (a *ExecStmt) CloseRecordSet(txnStartTS uint64, lastErr error)
- func (a *ExecStmt) Exec(ctx context.Context) (_ sqlexec.RecordSet, err error)
- func (a *ExecStmt) FinishExecuteStmt(txnTS uint64, err error, hasMoreResults bool)
- func (a *ExecStmt) GetBinaryPlan() string
- func (a *ExecStmt) GetEncodedPlan() (p string, h string, e any)
- func (a *ExecStmt) GetOriginalSQL() string
- func (a *ExecStmt) GetPlanDigest() string
- func (a *ExecStmt) GetStmtNode() ast.StmtNode
- func (a *ExecStmt) GetTextToLog(keepHint bool) string
- func (a *ExecStmt) IsPrepared() bool
- func (a *ExecStmt) IsReadOnly(vars *variable.SessionVars) bool
- func (a *ExecStmt) LogSlowQuery(txnTS uint64, succ bool, hasMoreResults bool)
- func (a *ExecStmt) OriginText() string
- func (a *ExecStmt) PointGet(ctx context.Context) (*recordSet, error)
- func (a *ExecStmt) RebuildPlan(ctx context.Context) (int64, error)
- func (a *ExecStmt) SummaryStmt(succ bool)
- func (a *ExecStmt) Text() string
- func (a *ExecStmt) UpdatePlanCacheRuntimeInfo()
- type ExecuteExec
- type ExpandExec
- type ExplainExec
- type FKCascadeExec
- type FKCascadeRuntimeStats
- type FKCheckExec
- type FKCheckRuntimeStats
- type FastCheckTableExec
- type GrantExec
- type HistoryHotRegion
- type HistoryHotRegions
- type HistoryHotRegionsRequest
- type ImportIntoActionExec
- type ImportIntoExec
- type IndexLookUpExecutor
- func (builder IndexLookUpExecutor) BuildExecutorForIndexJoin(ctx context.Context, lookUpContents []*join.IndexJoinLookUpContent, ...) (exec.Executor, error)
- func (e *IndexLookUpExecutor) Close() error
- func (e *IndexLookUpExecutor) Detach() (exec.Executor, bool)
- func (e *IndexLookUpExecutor) Next(ctx context.Context, req *chunk.Chunk) error
- func (e *IndexLookUpExecutor) Open(ctx context.Context) error
- func (e *IndexLookUpExecutor) Table() table.Table
- type IndexLookUpRunTimeStats
- type IndexMergeReaderExecutor
- func (builder IndexMergeReaderExecutor) BuildExecutorForIndexJoin(ctx context.Context, lookUpContents []*join.IndexJoinLookUpContent, ...) (exec.Executor, error)
- func (e *IndexMergeReaderExecutor) Close() error
- func (e *IndexMergeReaderExecutor) Next(ctx context.Context, req *chunk.Chunk) error
- func (e *IndexMergeReaderExecutor) Open(_ context.Context) (err error)
- func (e *IndexMergeReaderExecutor) Table() table.Table
- type IndexMergeRuntimeStat
- type IndexReaderExecutor
- func (e *IndexReaderExecutor) Close() (err error)
- func (e *IndexReaderExecutor) Detach() (exec.Executor, bool)
- func (e *IndexReaderExecutor) Next(ctx context.Context, req *chunk.Chunk) error
- func (e *IndexReaderExecutor) Open(ctx context.Context) error
- func (sr IndexReaderExecutor) SelectResult(ctx context.Context, dctx *distsqlctx.DistSQLContext, kvReq *kv.Request, ...) (distsql.SelectResult, error)
- func (e *IndexReaderExecutor) Table() table.Table
- type InsertExec
- func (e *InsertExec) Close() error
- func (e *InsertExec) GetFKCascades() []*FKCascadeExec
- func (e *InsertExec) GetFKChecks() []*FKCheckExec
- func (e *InsertExec) HasFKCascades() bool
- func (e *InsertExec) Next(ctx context.Context, req *chunk.Chunk) error
- func (e *InsertExec) Open(ctx context.Context) error
- type InsertRuntimeStat
- type InsertValues
- type LimitExec
- type LoadDataExec
- type LoadDataReaderBuilder
- type LoadDataWorker
- type LoadStatsExec
- type LoadStatsInfo
- type MPPGather
- type MaxOneRowExec
- type MemTableReaderExec
- type MetricRetriever
- type MetricsSummaryByLabelRetriever
- type MetricsSummaryRetriever
- type MockExecutorBuilder
- type MockMetricsPromDataKey
- type ParallelNestedLoopApplyExec
- type PauseDDLJobsExec
- type PessimisticLockCacheGetter
- type PipelinedWindowExec
- type PlanReplayerCaptureInfo
- type PlanReplayerDumpInfo
- type PlanReplayerExec
- type PlanReplayerLoadExec
- type PlanReplayerLoadInfo
- type PointGetExecutor
- type PrepareExec
- type ProjectionExec
- type RecommendIndexExec
- type RecoverIndexExec
- type ReloadExprPushdownBlacklistExec
- type ReloadOptRuleBlacklistExec
- type ReplaceExec
- func (e *ReplaceExec) Close() error
- func (e *ReplaceExec) GetFKCascades() []*FKCascadeExec
- func (e *ReplaceExec) GetFKChecks() []*FKCheckExec
- func (e *ReplaceExec) HasFKCascades() bool
- func (e *ReplaceExec) Next(ctx context.Context, req *chunk.Chunk) error
- func (e *ReplaceExec) Open(ctx context.Context) error
- type ResumeDDLJobsExec
- type RevokeExec
- type SQLBindExec
- type SelectIntoExec
- type SelectLockExec
- type SelectionExec
- type SetConfigExec
- type SetExecutor
- type ShowDDLExec
- type ShowDDLJobQueriesExec
- type ShowDDLJobQueriesWithRangeExec
- type ShowDDLJobsExec
- type ShowExec
- type ShowNextRowIDExec
- type ShowSlowExec
- type ShuffleExec
- type SimpleExec
- type SimpleSeekerOnReadCloser
- type SplitIndexRegionExec
- type SplitTableRegionExec
- type TableDualExec
- type TableReaderExecutor
- func (e *TableReaderExecutor) Close() error
- func (e *TableReaderExecutor) Detach() (exec.Executor, bool)
- func (treCtx *TableReaderExecutor) GetDDLOwner(ctx context.Context) (*infosync.ServerInfo, error)
- func (treCtx *TableReaderExecutor) GetInfoSchema() isctx.MetaOnlyInfoSchema
- func (e *TableReaderExecutor) Next(ctx context.Context, req *chunk.Chunk) error
- func (e *TableReaderExecutor) Open(ctx context.Context) error
- func (sr TableReaderExecutor) SelectResult(ctx context.Context, dctx *distsqlctx.DistSQLContext, kvReq *kv.Request, ...) (distsql.SelectResult, error)
- func (e *TableReaderExecutor) Table() table.Table
- type TableSampleExecutor
- type TableScanExec
- type TestShowClusterConfigFunc
- type TiFlashSystemTableRetriever
- type TraceExec
- type TrafficCancelExec
- type TrafficCaptureExec
- type TrafficReplayExec
- type TrafficShowExec
- type UnionScanExec
- type UpdateExec
- func (e *UpdateExec) Close() error
- func (e *UpdateExec) GetFKCascades() []*FKCascadeExec
- func (e *UpdateExec) GetFKChecks() []*FKCheckExec
- func (e *UpdateExec) HasFKCascades() bool
- func (e *UpdateExec) Next(ctx context.Context, req *chunk.Chunk) error
- func (e *UpdateExec) Open(ctx context.Context) error
- type UpdatedValuesCouple
- type WindowExec
- type WithForeignKeyTrigger
Constants ¶
const LoadDataReaderBuilderKey loadDataVarKeyType = 1
LoadDataReaderBuilderKey stores the reader channel that reads from the connection.
const LoadDataVarKey loadDataVarKeyType = 0
LoadDataVarKey is a variable key for load data.
const LoadStatsVarKey loadStatsVarKeyType = 0
LoadStatsVarKey is a variable key for load statistic.
const PlanReplayerDumpVarKey planReplayerDumpKeyType = 1
PlanReplayerDumpVarKey is a variable key for plan replayer dump.
const PlanReplayerLoadVarKey planReplayerLoadKeyType = 0
PlanReplayerLoadVarKey is a variable key for plan replayer load.
Variables ¶
var ( // RandSeed is the seed for randing package. // It's public for test. RandSeed = int64(1) // MaxRegionSampleSize is the max sample size for one region when analyze v1 collects samples from table. // It's public for test. MaxRegionSampleSize = int64(1000) )
var ( // GlobalMemoryUsageTracker is the ancestor of all the Executors' memory tracker and GlobalMemory Tracker GlobalMemoryUsageTracker *memory.Tracker // GlobalDiskUsageTracker is the ancestor of all the Executors' disk tracker GlobalDiskUsageTracker *disk.Tracker // GlobalAnalyzeMemoryTracker is the ancestor of all the Analyze jobs' memory tracker and child of global Tracker GlobalAnalyzeMemoryTracker *memory.Tracker )
var (
// AnalyzeProgressTest is for test.
AnalyzeProgressTest struct{}
)
var ( // CheckTableFastBucketSize is the bucket size of fast check table. CheckTableFastBucketSize = atomic.Int64{} )
var CloseSession func(ctx sessionctx.Context)
CloseSession will be assigned by session package.
var CreateSession func(ctx sessionctx.Context) (sessionctx.Context, error)
CreateSession will be assigned by session package.
var ErrSavepointNotSupportedWithBinlog = errors.New("SAVEPOINT is not supported when binlog is enabled")
ErrSavepointNotSupportedWithBinlog export for testing.
var (
// IndexMergeCancelFuncForTest is used just for test
IndexMergeCancelFuncForTest func()
)
var LookupTableTaskChannelSize int32 = 50
LookupTableTaskChannelSize represents the channel size of the index double read taskChan.
var ParseSlowLogBatchSize = 64
ParseSlowLogBatchSize is the batch size of slow-log lines for a worker to parse, exported for testing.
var QueryReplacer = strings.NewReplacer("\r", " ", "\n", " ", "\t", " ")
QueryReplacer replaces new line and tab for grep result including query string.
var SplitBatchCreateTableForTest = splitBatchCreateTable
SplitBatchCreateTableForTest is only used for test.
var TestSetConfigHTTPHandlerKey stringutil.StringerStr = "TestSetConfigHTTPHandlerKey"
TestSetConfigHTTPHandlerKey is used as the key to store 'TestSetConfigDoRequestFunc' in the context.
var TestSetConfigServerInfoKey stringutil.StringerStr = "TestSetConfigServerInfoKey"
TestSetConfigServerInfoKey is used as the key to store 'TestSetConfigServerInfoFunc' in the context.
var TestShowClusterConfigKey stringutil.StringerStr = "TestShowClusterConfigKey"
TestShowClusterConfigKey is the key used to store TestShowClusterConfigFunc.
Functions ¶
func AddNewAnalyzeJob ¶
func AddNewAnalyzeJob(ctx sessionctx.Context, job *statistics.AnalyzeJob)
AddNewAnalyzeJob records the new analyze job.
func BRIECreateDatabase ¶
BRIECreateDatabase creates the database with OnExistIgnore option
func BRIECreateTable ¶
func BRIECreateTable( sctx sessionctx.Context, dbName pmodel.CIStr, table *model.TableInfo, brComment string, cs ...ddl.CreateTableOption, ) error
BRIECreateTable creates the table with OnExistIgnore option
func BRIECreateTables ¶
func BRIECreateTables( sctx sessionctx.Context, tables map[string][]*model.TableInfo, brComment string, cs ...ddl.CreateTableOption, ) error
BRIECreateTables creates the tables with OnExistIgnore option in batch
func CalculateBatchSize ¶
CalculateBatchSize calculates a suitable initial batch size. It exports for testing.
func ConstructResultOfShowCreateDatabase ¶
func ConstructResultOfShowCreateDatabase(ctx sessionctx.Context, dbInfo *model.DBInfo, ifNotExists bool, buf *bytes.Buffer) (err error)
ConstructResultOfShowCreateDatabase constructs the result for show create database.
func ConstructResultOfShowCreatePlacementPolicy ¶
func ConstructResultOfShowCreatePlacementPolicy(policyInfo *model.PolicyInfo) string
ConstructResultOfShowCreatePlacementPolicy constructs the result for show create placement policy.
func ConstructResultOfShowCreateSequence ¶
func ConstructResultOfShowCreateSequence(ctx sessionctx.Context, tableInfo *model.TableInfo, buf *bytes.Buffer)
ConstructResultOfShowCreateSequence constructs the result for show create sequence.
func ConstructResultOfShowCreateTable ¶
func ConstructResultOfShowCreateTable(ctx sessionctx.Context, tableInfo *model.TableInfo, allocators autoid.Allocators, buf *bytes.Buffer) (err error)
ConstructResultOfShowCreateTable constructs the result for show create table.
func ConvertConfigItem2JSON ¶
func ConvertConfigItem2JSON(ctx sessionctx.Context, key string, val expression.Expression) (body string, err error)
ConvertConfigItem2JSON converts the config item specified by key and val to json. For example:
set config x key="val" ==> {"key":"val"} set config x key=233 ==> {"key":233}
func CountStmtNode ¶
func CountStmtNode(stmtNode ast.StmtNode, resolveCtx *resolve.Context, inRestrictedSQL bool, resourceGroup string)
CountStmtNode records the number of statements with the same type.
func DecodeRowValToChunk ¶
func DecodeRowValToChunk(sctx sessionctx.Context, schema *expression.Schema, tblInfo *model.TableInfo, handle kv.Handle, rowVal []byte, chk *chunk.Chunk, rd *rowcodec.ChunkDecoder) error
DecodeRowValToChunk decodes row value into chunk checking row format used.
func Detach ¶
Detach detaches the current executor from the session context. After detaching, the session context can be used to execute another statement while this executor is still running. The returning value shows whether this executor is able to be detached.
NOTE: the implementation of `Detach` should guarantee that no matter whether it returns true or false, both the original executor and the returning executor should be able to be used correctly. This restriction is to make sure that if `Detach(a)` returns `true`, while other children of `a`'s parent returns `false`, the caller can still use the original one.
func DumpRealOutfile ¶
DumpRealOutfile dumps a real number to lineBuf.
func FillOneImportJobInfo ¶
FillOneImportJobInfo is exported for testing.
func FormatSQL ¶
func FormatSQL(sql string) stringutil.StringerFunc
FormatSQL is used to format the original SQL, e.g. truncating long SQL, appending prepared arguments.
func GenCascadeDeleteAST ¶
func GenCascadeDeleteAST(schema, table, idx pmodel.CIStr, cols []*model.ColumnInfo, fkValues [][]types.Datum) *ast.DeleteStmt
GenCascadeDeleteAST uses to generate cascade delete ast, export for test.
func GenCascadeSetNullAST ¶
func GenCascadeSetNullAST(schema, table, idx pmodel.CIStr, cols []*model.ColumnInfo, fkValues [][]types.Datum) *ast.UpdateStmt
GenCascadeSetNullAST uses to generate foreign key `SET NULL` ast, export for test.
func GenCascadeUpdateAST ¶
func GenCascadeUpdateAST(schema, table, idx pmodel.CIStr, cols []*model.ColumnInfo, couple *UpdatedValuesCouple) *ast.UpdateStmt
GenCascadeUpdateAST uses to generate cascade update ast, export for test.
func GetDropOrTruncateTableInfoFromJobs ¶
func GetDropOrTruncateTableInfoFromJobs(jobs []*model.Job, gcSafePoint uint64, dom *domain.Domain, fn func(*model.Job, *model.TableInfo) (bool, error)) (bool, error)
GetDropOrTruncateTableInfoFromJobs gets the dropped/truncated table information from DDL jobs, it will use the `start_ts` of DDL job as snapshot to get the dropped/truncated table information.
func GetEncodedPlan ¶
func GetEncodedPlan(stmtCtx *stmtctx.StatementContext, genHint bool) (encodedPlan, hintStr string)
GetEncodedPlan returned same as getEncodedPlan
func GetLackHandles ¶
GetLackHandles gets the handles in expectedHandles but not in obtainedHandlesMap.
func GetPlanDigest ¶
func GetPlanDigest(stmtCtx *stmtctx.StatementContext) (string, *parser.Digest)
GetPlanDigest will try to get the select plan tree if the plan is select or the select plan of delete/update/insert statement.
func GetResultRowsCount ¶
func GetResultRowsCount(stmtCtx *stmtctx.StatementContext, p base.Plan) int64
GetResultRowsCount gets the count of the statement result rows.
func LoadExprPushdownBlacklist ¶
func LoadExprPushdownBlacklist(sctx sessionctx.Context) (err error)
LoadExprPushdownBlacklist loads the latest data from table mysql.expr_pushdown_blacklist.
func LoadOptRuleBlacklist ¶
func LoadOptRuleBlacklist(ctx context.Context, sctx sessionctx.Context) (err error)
LoadOptRuleBlacklist loads the latest data from table mysql.opt_rule_blacklist.
func LockKeys ¶
func LockKeys(ctx context.Context, sctx sessionctx.Context, lockWaitTime int64, keys ...kv.Key) error
LockKeys locks the keys for pessimistic transaction.
func MockNewCacheTableSnapShot ¶
MockNewCacheTableSnapShot only serves for test.
func NewAnalyzeResultsNotifyWaitGroupWrapper ¶
func NewAnalyzeResultsNotifyWaitGroupWrapper(notify chan *statistics.AnalyzeResults) *analyzeResultsNotifyWaitGroupWrapper
NewAnalyzeResultsNotifyWaitGroupWrapper is to create analyzeResultsNotifyWaitGroupWrapper
func NewProfileBuilder ¶
func NewProfileBuilder(sctx sessionctx.Context, start, end time.Time, tp string) (*profileBuilder, error)
NewProfileBuilder returns a new profileBuilder.
func NewRowDecoder ¶
func NewRowDecoder(ctx sessionctx.Context, schema *expression.Schema, tbl *model.TableInfo) *rowcodec.ChunkDecoder
NewRowDecoder creates a chunk decoder for new row format row value decode.
func ResetContextOfStmt ¶
func ResetContextOfStmt(ctx sessionctx.Context, s ast.StmtNode) (err error)
ResetContextOfStmt resets the StmtContext and session variables. Before every execution, we must clear statement context.
func ResetDeleteStmtCtx ¶
func ResetDeleteStmtCtx(sc *stmtctx.StatementContext, stmt *ast.DeleteStmt, vars *variable.SessionVars)
ResetDeleteStmtCtx resets statement context for DeleteStmt.
func ResetGlobalBRIEQueueForTest ¶
func ResetGlobalBRIEQueueForTest()
ResetGlobalBRIEQueueForTest resets the ID allocation for the global BRIE queue. In some of our test cases, we rely on the ID is allocated from 1. When batch executing test cases, the assumation may be broken and make the cases fail.
func ResetUpdateStmtCtx ¶
func ResetUpdateStmtCtx(sc *stmtctx.StatementContext, stmt *ast.UpdateStmt, vars *variable.SessionVars)
ResetUpdateStmtCtx resets statement context for UpdateStmt.
func SetFromString ¶
SetFromString constructs a slice of strings from a comma separated string. It is assumed that there is no duplicated entry. You could use addToSet to maintain this property. It is exported for tests. I HOPE YOU KNOW WHAT YOU ARE DOING.
func ValidateImportIntoColAssignmentsWithEncodeCtx ¶
func ValidateImportIntoColAssignmentsWithEncodeCtx(plan *importer.Plan, assigns []*ast.Assignment) error
ValidateImportIntoColAssignmentsWithEncodeCtx validates the column assignment expressions should be compatible with the encoding context (which maybe different with the context in the current session). For example, the function `tidb_is_ddl_owner()` requires the optional eval properties which are not provided by the encoding context, so we should avoid using it in the column assignment expressions.
Types ¶
type AdminPluginsExec ¶
type AdminPluginsExec struct { exec.BaseExecutor Action core.AdminPluginsAction Plugins []string }
AdminPluginsExec indicates AdminPlugins executor.
type AdminShowBDRRoleExec ¶
type AdminShowBDRRoleExec struct { exec.BaseExecutor // contains filtered or unexported fields }
AdminShowBDRRoleExec represents a show BDR role executor.
type AlterDDLJobExec ¶
type AlterDDLJobExec struct { exec.BaseExecutor AlterOpts []*core.AlterDDLJobOpt // contains filtered or unexported fields }
AlterDDLJobExec indicates an Executor for alter config of a DDL Job.
type AnalyzeColumnsExec ¶
type AnalyzeColumnsExec struct { core.AnalyzeInfo // contains filtered or unexported fields }
AnalyzeColumnsExec represents Analyze columns push down executor.
type AnalyzeColumnsExecV1 ¶
type AnalyzeColumnsExecV1 struct {
*AnalyzeColumnsExec
}
AnalyzeColumnsExecV1 is used to maintain v1 analyze process
type AnalyzeColumnsExecV2 ¶
type AnalyzeColumnsExecV2 struct {
*AnalyzeColumnsExec
}
AnalyzeColumnsExecV2 is used to maintain v2 analyze process
type AnalyzeExec ¶
type AnalyzeExec struct { exec.BaseExecutor OptionsMap map[int64]core.V2AnalyzeOptions // contains filtered or unexported fields }
AnalyzeExec represents Analyze executor.
type AnalyzeIndexExec ¶
type AnalyzeIndexExec struct {
// contains filtered or unexported fields
}
AnalyzeIndexExec represents analyze index push down executor.
type BRIEExec ¶
type BRIEExec struct { exec.BaseExecutor // contains filtered or unexported fields }
BRIEExec represents an executor for BRIE statements (BACKUP, RESTORE, etc)
type BatchPointGetExec ¶
type BatchPointGetExec struct { exec.BaseExecutor // contains filtered or unexported fields }
BatchPointGetExec executes a bunch of point select queries.
func (*BatchPointGetExec) Close ¶
func (e *BatchPointGetExec) Close() error
Close implements the Executor interface.
type CTEExec ¶
type CTEExec struct { exec.BaseExecutor // contains filtered or unexported fields }
CTEExec implements CTE. Following diagram describes how CTEExec works.
`iterInTbl` is shared by `CTEExec` and `CTETableReaderExec`. `CTETableReaderExec` reads data from `iterInTbl`, and its output will be stored `iterOutTbl` by `CTEExec`.
When an iteration ends, `CTEExec` will move all data from `iterOutTbl` into `iterInTbl`, which will be the input for new iteration. At the end of each iteration, data in `iterOutTbl` will also be added into `resTbl`. `resTbl` stores data of all iteration.
+----------+ write |iterOutTbl| CTEExec ------------------->| | | +----+-----+ ------------- | write | | v other op other op +----------+ (seed) (recursive) | resTbl | ^ | | | +----------+ CTETableReaderExec ^ | read +----------+ +---------------+iterInTbl | | | +----------+
type CTEStorages ¶
CTEStorages stores resTbl and iterInTbl for CTEExec. There will be a map[CTEStorageID]*CTEStorages in StmtCtx, which will store all CTEStorages to make all shared CTEs use same the CTEStorages.
type CTETableReaderExec ¶
type CTETableReaderExec struct { exec.BaseExecutor // contains filtered or unexported fields }
CTETableReaderExec scans data in iterInTbl, which is filled by corresponding CTEExec.
func (*CTETableReaderExec) Close ¶
func (e *CTETableReaderExec) Close() (err error)
Close implements the Executor interface.
type CancelDDLJobsExec ¶
type CancelDDLJobsExec struct {
*CommandDDLJobsExec
}
CancelDDLJobsExec represents a cancel DDL jobs executor.
type CheckIndexRangeExec ¶
type CheckIndexRangeExec struct { exec.BaseExecutor // contains filtered or unexported fields }
CheckIndexRangeExec outputs the index values which has handle between begin and end.
func (*CheckIndexRangeExec) Close ¶
func (*CheckIndexRangeExec) Close() error
Close implements the Executor Close interface.
type CheckTableExec ¶
type CheckTableExec struct { exec.BaseExecutor // contains filtered or unexported fields }
CheckTableExec represents a check table executor. It is built from the "admin check table" statement, and it checks if the index matches the records in the table.
func (*CheckTableExec) Close ¶
func (e *CheckTableExec) Close() error
Close implements the Executor Close interface.
type ChecksumTableExec ¶
type ChecksumTableExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ChecksumTableExec represents ChecksumTable executor.
type CleanupIndexExec ¶
type CleanupIndexExec struct { exec.BaseExecutor // contains filtered or unexported fields }
CleanupIndexExec represents a cleanup index executor. It is built from "admin cleanup index" statement, is used to delete dangling index data.
func (*CleanupIndexExec) Close ¶
func (*CleanupIndexExec) Close() error
Close implements the Executor Close interface.
type Closeable ¶
type Closeable interface { // Close closes the object. Close() error }
Closeable is a interface for closeable structures.
type CommandDDLJobsExec ¶
type CommandDDLJobsExec struct { exec.BaseExecutor // contains filtered or unexported fields }
CommandDDLJobsExec is the general struct for Cancel/Pause/Resume commands on DDL jobs. These command currently by admin have the very similar struct and operations, it should be a better idea to have them in the same struct.
type CompactTableTiFlashExec ¶
type CompactTableTiFlashExec struct { exec.BaseExecutor // contains filtered or unexported fields }
CompactTableTiFlashExec represents an executor for "ALTER TABLE [NAME] COMPACT TIFLASH REPLICA" statement.
type Compiler ¶
type Compiler struct {
Ctx sessionctx.Context
}
Compiler compiles an ast.StmtNode to a physical plan.
type CoprocessorDAGHandler ¶
type CoprocessorDAGHandler struct {
// contains filtered or unexported fields
}
CoprocessorDAGHandler uses to handle cop dag request.
func NewCoprocessorDAGHandler ¶
func NewCoprocessorDAGHandler(sctx sessionctx.Context) *CoprocessorDAGHandler
NewCoprocessorDAGHandler creates a new CoprocessorDAGHandler.
func (*CoprocessorDAGHandler) HandleRequest ¶
func (h *CoprocessorDAGHandler) HandleRequest(ctx context.Context, req *coprocessor.Request) *coprocessor.Response
HandleRequest handles the coprocessor request.
func (*CoprocessorDAGHandler) HandleStreamRequest ¶
func (h *CoprocessorDAGHandler) HandleStreamRequest(ctx context.Context, req *coprocessor.Request, stream tikvpb.Tikv_CoprocessorStreamServer) error
HandleStreamRequest handles the coprocessor stream request.
type DDLExec ¶
type DDLExec struct { exec.BaseExecutor // contains filtered or unexported fields }
DDLExec represents a DDL executor. It grabs a DDL instance from Domain, calling the DDL methods to do the work.
type DDLJobRetriever ¶
DDLJobRetriever retrieve the DDLJobs. nolint:structcheck
type DDLJobsReaderExec ¶
type DDLJobsReaderExec struct { exec.BaseExecutor DDLJobRetriever // contains filtered or unexported fields }
DDLJobsReaderExec executes DDLJobs information retrieving.
func (*DDLJobsReaderExec) Close ¶
func (e *DDLJobsReaderExec) Close() error
Close implements the Executor Close interface.
type DeallocateExec ¶
type DeallocateExec struct { exec.BaseExecutor Name string }
DeallocateExec represent a DEALLOCATE executor.
type DeleteExec ¶
type DeleteExec struct { exec.BaseExecutor IsMultiTable bool // contains filtered or unexported fields }
DeleteExec represents a delete executor. See https://dev.mysql.com/doc/refman/5.7/en/delete.html
func (*DeleteExec) Close ¶
func (e *DeleteExec) Close() error
Close implements the Executor Close interface.
func (*DeleteExec) GetFKCascades ¶
func (e *DeleteExec) GetFKCascades() []*FKCascadeExec
GetFKCascades implements WithForeignKeyTrigger interface.
func (*DeleteExec) GetFKChecks ¶
func (e *DeleteExec) GetFKChecks() []*FKCheckExec
GetFKChecks implements WithForeignKeyTrigger interface.
func (*DeleteExec) HasFKCascades ¶
func (e *DeleteExec) HasFKCascades() bool
HasFKCascades implements WithForeignKeyTrigger interface.
type ExecStmt ¶
type ExecStmt struct { // GoCtx stores parent go context.Context for a stmt. GoCtx context.Context // InfoSchema stores a reference to the schema information. InfoSchema infoschema.InfoSchema // Plan stores a reference to the final physical plan. Plan base.Plan StmtNode ast.StmtNode Ctx sessionctx.Context // LowerPriority represents whether to lower the execution priority of a query. LowerPriority bool // OutputNames will be set if using cached plan OutputNames []*types.FieldName PsStmt *plannercore.PlanCacheStmt // contains filtered or unexported fields }
ExecStmt implements the sqlexec.Statement interface, it builds a planner.Plan to an sqlexec.Statement.
func (*ExecStmt) CloseRecordSet ¶
CloseRecordSet will finish the execution of current statement and do some record work
func (*ExecStmt) Exec ¶
Exec builds an Executor from a plan. If the Executor doesn't return result, like the INSERT, UPDATE statements, it executes in this function. If the Executor returns result, execution is done after this function returns, in the returned sqlexec.RecordSet Next method.
func (*ExecStmt) FinishExecuteStmt ¶
FinishExecuteStmt is used to record some information after `ExecStmt` execution finished: 1. record slow log if needed. 2. record summary statement. 3. record execute duration metric. 4. update the `PrevStmt` in session variable. 5. reset `DurationParse` in session variable.
func (*ExecStmt) GetBinaryPlan ¶
GetBinaryPlan implements StmtExecLazyInfo interface.
func (*ExecStmt) GetEncodedPlan ¶
GetEncodedPlan implements StmtExecLazyInfo interface.
func (*ExecStmt) GetOriginalSQL ¶
GetOriginalSQL implements StmtExecLazyInfo interface.
func (*ExecStmt) GetPlanDigest ¶
GetPlanDigest implements StmtExecLazyInfo interface.
func (*ExecStmt) GetStmtNode ¶
GetStmtNode returns the stmtNode inside Statement
func (*ExecStmt) GetTextToLog ¶
GetTextToLog return the query text to log.
func (*ExecStmt) IsPrepared ¶
IsPrepared returns true if stmt is a prepare statement.
func (*ExecStmt) IsReadOnly ¶
func (a *ExecStmt) IsReadOnly(vars *variable.SessionVars) bool
IsReadOnly returns true if a statement is read only. If current StmtNode is an ExecuteStmt, we can get its prepared stmt, then using ast.IsReadOnly function to determine a statement is read only or not.
func (*ExecStmt) LogSlowQuery ¶
LogSlowQuery is used to print the slow query in the log files.
func (*ExecStmt) OriginText ¶
OriginText returns original statement as a string.
func (*ExecStmt) PointGet ¶
PointGet short path for point exec directly from plan, keep only necessary steps
func (*ExecStmt) RebuildPlan ¶
RebuildPlan rebuilds current execute statement plan. It returns the current information schema version that 'a' is using.
func (*ExecStmt) SummaryStmt ¶
SummaryStmt collects statements for information_schema.statements_summary
func (*ExecStmt) UpdatePlanCacheRuntimeInfo ¶
func (a *ExecStmt) UpdatePlanCacheRuntimeInfo()
UpdatePlanCacheRuntimeInfo updates the runtime information of the plan in the plan cache.
type ExecuteExec ¶
type ExecuteExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ExecuteExec represents an EXECUTE executor. It cannot be executed by itself, all it needs to do is to build another Executor from a prepared statement.
func (*ExecuteExec) Build ¶
func (e *ExecuteExec) Build(b *executorBuilder) error
Build builds a prepared statement into an executor. After Build, e.StmtExec will be used to do the real execution.
type ExpandExec ¶
type ExpandExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ExpandExec is used to execute expand logical plan.
func (*ExpandExec) Close ¶
func (e *ExpandExec) Close() error
Close implements the Executor Close interface.
type ExplainExec ¶
type ExplainExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ExplainExec represents an explain executor.
func (*ExplainExec) Close ¶
func (e *ExplainExec) Close() error
Close implements the Executor Close interface.
type FKCascadeExec ¶
type FKCascadeExec struct {
// contains filtered or unexported fields
}
FKCascadeExec uses to execute foreign key cascade behaviour.
type FKCascadeRuntimeStats ¶
FKCascadeRuntimeStats contains the FKCascadeExec runtime stats.
func (*FKCascadeRuntimeStats) Clone ¶
func (s *FKCascadeRuntimeStats) Clone() execdetails.RuntimeStats
Clone implements the RuntimeStats interface.
func (*FKCascadeRuntimeStats) Merge ¶
func (s *FKCascadeRuntimeStats) Merge(other execdetails.RuntimeStats)
Merge implements the RuntimeStats interface.
func (*FKCascadeRuntimeStats) String ¶
func (s *FKCascadeRuntimeStats) String() string
String implements the RuntimeStats interface.
func (*FKCascadeRuntimeStats) Tp ¶
func (*FKCascadeRuntimeStats) Tp() int
Tp implements the RuntimeStats interface.
type FKCheckExec ¶
type FKCheckExec struct { *plannercore.FKCheck // contains filtered or unexported fields }
FKCheckExec uses to check foreign key constraint. When insert/update child table, need to check the row has related row exists in refer table. When insert/update parent table, need to check the row doesn't have related row exists in refer table.
type FKCheckRuntimeStats ¶
type FKCheckRuntimeStats struct { Total time.Duration Check time.Duration Lock time.Duration Keys int }
FKCheckRuntimeStats contains the FKCheckExec runtime stats.
func (*FKCheckRuntimeStats) Clone ¶
func (s *FKCheckRuntimeStats) Clone() execdetails.RuntimeStats
Clone implements the RuntimeStats interface.
func (*FKCheckRuntimeStats) Merge ¶
func (s *FKCheckRuntimeStats) Merge(other execdetails.RuntimeStats)
Merge implements the RuntimeStats interface.
func (*FKCheckRuntimeStats) String ¶
func (s *FKCheckRuntimeStats) String() string
String implements the RuntimeStats interface.
func (*FKCheckRuntimeStats) Tp ¶
func (*FKCheckRuntimeStats) Tp() int
Tp implements the RuntimeStats interface.
type FastCheckTableExec ¶
type FastCheckTableExec struct { exec.BaseExecutor // contains filtered or unexported fields }
FastCheckTableExec represents a check table executor. It is built from the "admin check table" statement, and it checks if the index matches the records in the table. It uses a new algorithms to check table data, which is faster than the old one(CheckTableExec).
type GrantExec ¶
type GrantExec struct { exec.BaseExecutor Privs []*ast.PrivElem ObjectType ast.ObjectTypeType Level *ast.GrantLevel Users []*ast.UserSpec AuthTokenOrTLSOptions []*ast.AuthTokenOrTLSOption WithGrant bool // contains filtered or unexported fields }
GrantExec executes GrantStmt.
type HistoryHotRegion ¶
type HistoryHotRegion struct { UpdateTime int64 `json:"update_time"` RegionID uint64 `json:"region_id"` StoreID uint64 `json:"store_id"` PeerID uint64 `json:"peer_id"` IsLearner bool `json:"is_learner"` IsLeader bool `json:"is_leader"` HotRegionType string `json:"hot_region_type"` HotDegree int64 `json:"hot_degree"` FlowBytes float64 `json:"flow_bytes"` KeyRate float64 `json:"key_rate"` QueryRate float64 `json:"query_rate"` StartKey string `json:"start_key"` EndKey string `json:"end_key"` }
HistoryHotRegion records each hot region's statistics. it's the response of PD.
type HistoryHotRegions ¶
type HistoryHotRegions struct {
HistoryHotRegion []*HistoryHotRegion `json:"history_hot_region"`
}
HistoryHotRegions records filtered hot regions stored in each PD. it's the response of PD.
type HistoryHotRegionsRequest ¶
type HistoryHotRegionsRequest struct { StartTime int64 `json:"start_time,omitempty"` EndTime int64 `json:"end_time,omitempty"` RegionIDs []uint64 `json:"region_ids,omitempty"` StoreIDs []uint64 `json:"store_ids,omitempty"` PeerIDs []uint64 `json:"peer_ids,omitempty"` IsLearners []bool `json:"is_learners,omitempty"` IsLeaders []bool `json:"is_leaders,omitempty"` HotRegionTypes []string `json:"hot_region_type,omitempty"` }
HistoryHotRegionsRequest wrap conditions push down to PD.
type ImportIntoActionExec ¶
type ImportIntoActionExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ImportIntoActionExec represents a import into action executor.
type ImportIntoExec ¶
type ImportIntoExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ImportIntoExec represents a IMPORT INTO executor.
type IndexLookUpExecutor ¶
type IndexLookUpExecutor struct { exec.BaseExecutorV2 // PushedLimit is used to skip the preceding and tailing handles when Limit is sunk into IndexLookUpReader. PushedLimit *plannercore.PushedDownLimit // contains filtered or unexported fields }
IndexLookUpExecutor implements double read for index scan.
func (IndexLookUpExecutor) BuildExecutorForIndexJoin ¶
func (builder IndexLookUpExecutor) BuildExecutorForIndexJoin(ctx context.Context, lookUpContents []*join.IndexJoinLookUpContent, indexRanges []*ranger.Range, keyOff2IdxOff []int, cwc *plannercore.ColWithCmpFuncManager, canReorderHandles bool, memTracker *memory.Tracker, interruptSignal *atomic.Value) (exec.Executor, error)
func (*IndexLookUpExecutor) Close ¶
func (e *IndexLookUpExecutor) Close() error
Close implements Exec Close interface.
func (*IndexLookUpExecutor) Detach ¶
func (e *IndexLookUpExecutor) Detach() (exec.Executor, bool)
Detach detaches the current executor from the session context.
func (*IndexLookUpExecutor) Open ¶
func (e *IndexLookUpExecutor) Open(ctx context.Context) error
Open implements the Executor Open interface.
func (*IndexLookUpExecutor) Table ¶
func (e *IndexLookUpExecutor) Table() table.Table
Table implements the dataSourceExecutor interface.
type IndexLookUpRunTimeStats ¶
type IndexLookUpRunTimeStats struct { FetchHandleTotal int64 FetchHandle int64 TaskWait int64 TableRowScan int64 TableTaskNum int64 Concurrency int // Record the `Next` call affected wait duration details. NextWaitIndexScan time.Duration NextWaitTableLookUpBuild time.Duration NextWaitTableLookUpResp time.Duration // contains filtered or unexported fields }
IndexLookUpRunTimeStats record the indexlookup runtime stat
func (*IndexLookUpRunTimeStats) Clone ¶
func (e *IndexLookUpRunTimeStats) Clone() execdetails.RuntimeStats
Clone implements the RuntimeStats interface.
func (*IndexLookUpRunTimeStats) Merge ¶
func (e *IndexLookUpRunTimeStats) Merge(other execdetails.RuntimeStats)
Merge implements the RuntimeStats interface.
func (*IndexLookUpRunTimeStats) String ¶
func (e *IndexLookUpRunTimeStats) String() string
func (*IndexLookUpRunTimeStats) Tp ¶
func (*IndexLookUpRunTimeStats) Tp() int
Tp implements the RuntimeStats interface.
type IndexMergeReaderExecutor ¶
type IndexMergeReaderExecutor struct { exec.BaseExecutor // contains filtered or unexported fields }
IndexMergeReaderExecutor accesses a table with multiple index/table scan. There are three types of workers: 1. partialTableWorker/partialIndexWorker, which are used to fetch the handles 2. indexMergeProcessWorker, which is used to do the `Union` operation. 3. indexMergeTableScanWorker, which is used to get the table tuples with the given handles.
The execution flow is really like IndexLookUpReader. However, it uses multiple index scans or table scans to get the handles:
- use the partialTableWorkers and partialIndexWorkers to fetch the handles (a batch per time) and send them to the indexMergeProcessWorker.
- indexMergeProcessWorker do the `Union` operation for a batch of handles it have got. For every handle in the batch:
- check whether it has been accessed.
- if not, record it and send it to the indexMergeTableScanWorker.
- if accessed, just ignore it.
func (IndexMergeReaderExecutor) BuildExecutorForIndexJoin ¶
func (builder IndexMergeReaderExecutor) BuildExecutorForIndexJoin(ctx context.Context, lookUpContents []*join.IndexJoinLookUpContent, indexRanges []*ranger.Range, keyOff2IdxOff []int, cwc *plannercore.ColWithCmpFuncManager, canReorderHandles bool, memTracker *memory.Tracker, interruptSignal *atomic.Value) (exec.Executor, error)
func (*IndexMergeReaderExecutor) Close ¶
func (e *IndexMergeReaderExecutor) Close() error
Close implements Exec Close interface.
func (*IndexMergeReaderExecutor) Open ¶
func (e *IndexMergeReaderExecutor) Open(_ context.Context) (err error)
Open implements the Executor Open interface
func (*IndexMergeReaderExecutor) Table ¶
func (e *IndexMergeReaderExecutor) Table() table.Table
Table implements the dataSourceExecutor interface.
type IndexMergeRuntimeStat ¶
type IndexMergeRuntimeStat struct { IndexMergeProcess time.Duration FetchIdxTime int64 WaitTime int64 FetchRow int64 TableTaskNum int64 Concurrency int }
IndexMergeRuntimeStat record the indexMerge runtime stat
func (*IndexMergeRuntimeStat) Clone ¶
func (e *IndexMergeRuntimeStat) Clone() execdetails.RuntimeStats
Clone implements the RuntimeStats interface.
func (*IndexMergeRuntimeStat) Merge ¶
func (e *IndexMergeRuntimeStat) Merge(other execdetails.RuntimeStats)
Merge implements the RuntimeStats interface.
func (*IndexMergeRuntimeStat) String ¶
func (e *IndexMergeRuntimeStat) String() string
func (*IndexMergeRuntimeStat) Tp ¶
func (*IndexMergeRuntimeStat) Tp() int
Tp implements the RuntimeStats interface.
type IndexReaderExecutor ¶
type IndexReaderExecutor struct { exec.BaseExecutorV2 // contains filtered or unexported fields }
IndexReaderExecutor sends dag request and reads index data from kv layer.
func (*IndexReaderExecutor) Close ¶
func (e *IndexReaderExecutor) Close() (err error)
Close clears all resources hold by current object.
func (*IndexReaderExecutor) Detach ¶
func (e *IndexReaderExecutor) Detach() (exec.Executor, bool)
Detach detaches the current executor from the session context.
func (*IndexReaderExecutor) Open ¶
func (e *IndexReaderExecutor) Open(ctx context.Context) error
Open implements the Executor Open interface.
func (IndexReaderExecutor) SelectResult ¶
func (sr IndexReaderExecutor) SelectResult(ctx context.Context, dctx *distsqlctx.DistSQLContext, kvReq *kv.Request, fieldTypes []*types.FieldType, copPlanIDs []int, rootPlanID int) (distsql.SelectResult, error)
func (*IndexReaderExecutor) Table ¶
func (e *IndexReaderExecutor) Table() table.Table
Table implements the dataSourceExecutor interface.
type InsertExec ¶
type InsertExec struct { *InsertValues OnDuplicate []*expression.Assignment Priority mysql.PriorityEnum // contains filtered or unexported fields }
InsertExec represents an insert executor.
func (*InsertExec) Close ¶
func (e *InsertExec) Close() error
Close implements the Executor Close interface.
func (*InsertExec) GetFKCascades ¶
func (e *InsertExec) GetFKCascades() []*FKCascadeExec
GetFKCascades implements WithForeignKeyTrigger interface.
func (*InsertExec) GetFKChecks ¶
func (e *InsertExec) GetFKChecks() []*FKCheckExec
GetFKChecks implements WithForeignKeyTrigger interface.
func (*InsertExec) HasFKCascades ¶
func (e *InsertExec) HasFKCascades() bool
HasFKCascades implements WithForeignKeyTrigger interface.
type InsertRuntimeStat ¶
type InsertRuntimeStat struct { *execdetails.BasicRuntimeStats *txnsnapshot.SnapshotRuntimeStats *autoid.AllocatorRuntimeStats CheckInsertTime time.Duration Prefetch time.Duration FKCheckTime time.Duration }
InsertRuntimeStat record the stat about insert and check
func (*InsertRuntimeStat) Clone ¶
func (e *InsertRuntimeStat) Clone() execdetails.RuntimeStats
Clone implements the RuntimeStats interface.
func (*InsertRuntimeStat) Merge ¶
func (e *InsertRuntimeStat) Merge(other execdetails.RuntimeStats)
Merge implements the RuntimeStats interface.
func (*InsertRuntimeStat) String ¶
func (e *InsertRuntimeStat) String() string
func (*InsertRuntimeStat) Tp ¶
func (*InsertRuntimeStat) Tp() int
Tp implements the RuntimeStats interface.
type InsertValues ¶
type InsertValues struct { exec.BaseExecutor SelectExec exec.Executor Table table.Table Columns []*ast.ColumnName Lists [][]expression.Expression GenExprs []expression.Expression // contains filtered or unexported fields }
InsertValues is the data to insert. nolint:structcheck
type LimitExec ¶
type LimitExec struct { exec.BaseExecutor // contains filtered or unexported fields }
LimitExec represents limit executor It ignores 'Offset' rows from src, then returns 'Count' rows at maximum.
type LoadDataExec ¶
type LoadDataExec struct { exec.BaseExecutor FileLocRef ast.FileLocRefTp // contains filtered or unexported fields }
LoadDataExec represents a load data executor.
func (*LoadDataExec) Close ¶
func (e *LoadDataExec) Close() error
Close implements the Executor interface.
type LoadDataReaderBuilder ¶
type LoadDataReaderBuilder func(filepath string) ( r io.ReadCloser, err error, )
LoadDataReaderBuilder is a function type that builds a reader from a file path.
type LoadDataWorker ¶
type LoadDataWorker struct { UserSctx sessionctx.Context // contains filtered or unexported fields }
LoadDataWorker does a LOAD DATA job.
func NewLoadDataWorker ¶
func NewLoadDataWorker( userSctx sessionctx.Context, plan *plannercore.LoadData, tbl table.Table, ) (w *LoadDataWorker, err error)
NewLoadDataWorker creates a new LoadDataWorker that is ready to work.
func (*LoadDataWorker) GetController ¶
func (e *LoadDataWorker) GetController() *importer.LoadDataController
GetController get load data controller. used in unit test.
func (*LoadDataWorker) GetInfilePath ¶
func (e *LoadDataWorker) GetInfilePath() string
GetInfilePath get infile path.
func (*LoadDataWorker) LoadLocal ¶
func (e *LoadDataWorker) LoadLocal(ctx context.Context, r io.ReadCloser) error
LoadLocal reads from client connection and do load data job.
func (*LoadDataWorker) TestLoadLocal ¶
func (e *LoadDataWorker) TestLoadLocal(parser mydump.Parser) error
TestLoadLocal is a helper function for unit test.
type LoadStatsExec ¶
type LoadStatsExec struct { exec.BaseExecutor // contains filtered or unexported fields }
LoadStatsExec represents a load statistic executor.
func (*LoadStatsExec) Close ¶
func (*LoadStatsExec) Close() error
Close implements the Executor Close interface.
type LoadStatsInfo ¶
type LoadStatsInfo struct { Path string Ctx sessionctx.Context }
LoadStatsInfo saves the information of loading statistic operation.
func (*LoadStatsInfo) Update ¶
func (e *LoadStatsInfo) Update(data []byte) error
Update updates the stats of the corresponding table according to the data.
type MPPGather ¶
type MPPGather struct { exec.BaseExecutor // contains filtered or unexported fields }
MPPGather dispatch MPP tasks and read data from root tasks.
type MaxOneRowExec ¶
type MaxOneRowExec struct { exec.BaseExecutor // contains filtered or unexported fields }
MaxOneRowExec checks if the number of rows that a query returns is at maximum one. It's built from subquery expression.
type MemTableReaderExec ¶
type MemTableReaderExec struct { exec.BaseExecutor // contains filtered or unexported fields }
MemTableReaderExec executes memTable information retrieving from the MemTable components
func (*MemTableReaderExec) Close ¶
func (e *MemTableReaderExec) Close() error
Close implements the Executor Close interface.
type MetricRetriever ¶
type MetricRetriever struct {
// contains filtered or unexported fields
}
MetricRetriever uses to read metric data.
type MetricsSummaryByLabelRetriever ¶
type MetricsSummaryByLabelRetriever struct {
// contains filtered or unexported fields
}
MetricsSummaryByLabelRetriever uses to read metric detail data.
type MetricsSummaryRetriever ¶
type MetricsSummaryRetriever struct {
// contains filtered or unexported fields
}
MetricsSummaryRetriever uses to read metric data.
type MockExecutorBuilder ¶
type MockExecutorBuilder struct {
// contains filtered or unexported fields
}
MockExecutorBuilder is a wrapper for executorBuilder. ONLY used in test.
func NewMockExecutorBuilderForTest ¶
func NewMockExecutorBuilderForTest(ctx sessionctx.Context, is infoschema.InfoSchema) *MockExecutorBuilder
NewMockExecutorBuilderForTest is ONLY used in test.
type MockMetricsPromDataKey ¶
type MockMetricsPromDataKey struct{}
MockMetricsPromDataKey is for test
type ParallelNestedLoopApplyExec ¶
type ParallelNestedLoopApplyExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ParallelNestedLoopApplyExec is the executor for apply.
func (*ParallelNestedLoopApplyExec) Close ¶
func (e *ParallelNestedLoopApplyExec) Close() error
Close implements the Executor interface.
type PauseDDLJobsExec ¶
type PauseDDLJobsExec struct {
*CommandDDLJobsExec
}
PauseDDLJobsExec indicates an Executor for Pause a DDL Job.
type PessimisticLockCacheGetter ¶
type PessimisticLockCacheGetter struct {
// contains filtered or unexported fields
}
PessimisticLockCacheGetter implements the kv.Getter interface. It is used as a middle cache to construct the BufferedBatchGetter.
type PipelinedWindowExec ¶
type PipelinedWindowExec struct { exec.BaseExecutor // contains filtered or unexported fields }
PipelinedWindowExec is the executor for window functions.
func (*PipelinedWindowExec) Close ¶
func (e *PipelinedWindowExec) Close() error
Close implements the Executor Close interface.
type PlanReplayerCaptureInfo ¶
PlanReplayerCaptureInfo indicates capture info
type PlanReplayerDumpInfo ¶
type PlanReplayerDumpInfo struct { ExecStmts []ast.StmtNode Analyze bool HistoricalStatsTS uint64 StartTS uint64 Path string File *os.File FileName string // contains filtered or unexported fields }
PlanReplayerDumpInfo indicates dump info
func (*PlanReplayerDumpInfo) DumpSQLsFromFile ¶
func (e *PlanReplayerDumpInfo) DumpSQLsFromFile(ctx context.Context, b []byte) error
DumpSQLsFromFile dumps plan replayer results for sqls from file
type PlanReplayerExec ¶
type PlanReplayerExec struct { exec.BaseExecutor CaptureInfo *PlanReplayerCaptureInfo DumpInfo *PlanReplayerDumpInfo // contains filtered or unexported fields }
PlanReplayerExec represents a plan replayer executor.
type PlanReplayerLoadExec ¶
type PlanReplayerLoadExec struct { exec.BaseExecutor // contains filtered or unexported fields }
PlanReplayerLoadExec represents a plan replayer load executor.
type PlanReplayerLoadInfo ¶
type PlanReplayerLoadInfo struct { Path string Ctx sessionctx.Context }
PlanReplayerLoadInfo contains file path and session context.
func (*PlanReplayerLoadInfo) Update ¶
func (e *PlanReplayerLoadInfo) Update(data []byte) error
Update updates the data of the corresponding table.
type PointGetExecutor ¶
type PointGetExecutor struct { exec.BaseExecutor // contains filtered or unexported fields }
PointGetExecutor executes point select query.
func (*PointGetExecutor) Close ¶
func (e *PointGetExecutor) Close() error
Close implements the Executor interface.
func (*PointGetExecutor) Init ¶
func (e *PointGetExecutor) Init(p *plannercore.PointGetPlan)
Init set fields needed for PointGetExecutor reuse, this does NOT change baseExecutor field
func (*PointGetExecutor) Open ¶
func (e *PointGetExecutor) Open(context.Context) error
Open implements the Executor interface.
func (*PointGetExecutor) Recreated ¶
func (e *PointGetExecutor) Recreated(p *plannercore.PointGetPlan)
Recreated based on Init, change baseExecutor fields also
type PrepareExec ¶
type PrepareExec struct { exec.BaseExecutor ID uint32 ParamCount int Fields []*resolve.ResultField Stmt any // contains filtered or unexported fields }
PrepareExec represents a PREPARE executor.
func NewPrepareExec ¶
func NewPrepareExec(ctx sessionctx.Context, sqlTxt string) *PrepareExec
NewPrepareExec creates a new PrepareExec.
type ProjectionExec ¶
type ProjectionExec struct { exec.BaseExecutorV2 // contains filtered or unexported fields }
ProjectionExec implements the physical Projection Operator: https://en.wikipedia.org/wiki/Projection_(relational_algebra)
func (*ProjectionExec) Close ¶
func (e *ProjectionExec) Close() error
Close implements the Executor Close interface.
func (*ProjectionExec) Detach ¶
func (e *ProjectionExec) Detach() (exec.Executor, bool)
Detach detaches the current executor from the session context.
func (*ProjectionExec) Next ¶
Next implements the Executor Next interface.
Here we explain the execution flow of the parallel projection implementation. There are 3 main components:
- "projectionInputFetcher": Fetch input "Chunk" from child.
- "projectionWorker": Do the projection work.
- "ProjectionExec.Next": Return result to parent.
1. "projectionInputFetcher" gets its input and output resources from its "inputCh" and "outputCh" channel, once the input and output resources are obtained, it fetches child's result into "input.chk" and:
a. Dispatches this input to the worker specified in "input.targetWorker" b. Dispatches this output to the main thread: "ProjectionExec.Next" c. Dispatches this output to the worker specified in "input.targetWorker"
It is finished and exited once:
a. There is no more input from child. b. "ProjectionExec" close the "globalFinishCh"
2. "projectionWorker" gets its input and output resources from its "inputCh" and "outputCh" channel, once the input and output resources are abtained, it calculates the projection result use "input.chk" as the input and "output.chk" as the output, once the calculation is done, it:
a. Sends "nil" or error to "output.done" to mark this input is finished. b. Returns the "input" resource to "projectionInputFetcher.inputCh"
They are finished and exited once:
a. "ProjectionExec" closes the "globalFinishCh"
3. "ProjectionExec.Next" gets its output resources from its "outputCh" channel. After receiving an output from "outputCh", it should wait to receive a "nil" or error from "output.done" channel. Once a "nil" or error is received:
a. Returns this output to its parent b. Returns the "output" resource to "projectionInputFetcher.outputCh" +-----------+----------------------+--------------------------+ | | | | | +--------+---------+ +--------+---------+ +--------+---------+ | | projectionWorker | + projectionWorker | ... + projectionWorker | | +------------------+ +------------------+ +------------------+ | ^ ^ ^ ^ ^ ^ | | | | | | | | inputCh outputCh inputCh outputCh inputCh outputCh | ^ ^ ^ ^ ^ ^ | | | | | | | | | | | | +----------------->outputCh | | | | | | | v | +-------+-------+--------+ +---------------------+ | | projectionInputFetcher | | ProjectionExec.Next | | +------------------------+ +---------+-----------+ | ^ ^ | | | | | | inputCh outputCh | | ^ ^ | | | | | +------------------------------+ +----------------------+
type RecommendIndexExec ¶
type RecommendIndexExec struct { exec.BaseExecutor Action string SQL string AdviseID int64 Options []ast.RecommendIndexOption // contains filtered or unexported fields }
RecommendIndexExec represents a recommend index executor.
type RecoverIndexExec ¶
type RecoverIndexExec struct { exec.BaseExecutor // contains filtered or unexported fields }
RecoverIndexExec represents a recover index executor. It is built from "admin recover index" statement, is used to backfill corrupted index.
type ReloadExprPushdownBlacklistExec ¶
type ReloadExprPushdownBlacklistExec struct {
exec.BaseExecutor
}
ReloadExprPushdownBlacklistExec indicates ReloadExprPushdownBlacklist executor.
type ReloadOptRuleBlacklistExec ¶
type ReloadOptRuleBlacklistExec struct {
exec.BaseExecutor
}
ReloadOptRuleBlacklistExec indicates ReloadOptRuleBlacklist executor.
type ReplaceExec ¶
type ReplaceExec struct { *InsertValues Priority int }
ReplaceExec represents a replace executor.
func (*ReplaceExec) Close ¶
func (e *ReplaceExec) Close() error
Close implements the Executor Close interface.
func (*ReplaceExec) GetFKCascades ¶
func (e *ReplaceExec) GetFKCascades() []*FKCascadeExec
GetFKCascades implements WithForeignKeyTrigger interface.
func (*ReplaceExec) GetFKChecks ¶
func (e *ReplaceExec) GetFKChecks() []*FKCheckExec
GetFKChecks implements WithForeignKeyTrigger interface.
func (*ReplaceExec) HasFKCascades ¶
func (e *ReplaceExec) HasFKCascades() bool
HasFKCascades implements WithForeignKeyTrigger interface.
type ResumeDDLJobsExec ¶
type ResumeDDLJobsExec struct {
*CommandDDLJobsExec
}
ResumeDDLJobsExec indicates an Executor for Resume a DDL Job.
type RevokeExec ¶
type RevokeExec struct { exec.BaseExecutor Privs []*ast.PrivElem ObjectType ast.ObjectTypeType Level *ast.GrantLevel Users []*ast.UserSpec // contains filtered or unexported fields }
RevokeExec executes RevokeStmt.
type SQLBindExec ¶
type SQLBindExec struct { exec.BaseExecutor // contains filtered or unexported fields }
SQLBindExec represents a bind executor.
type SelectIntoExec ¶
type SelectIntoExec struct { exec.BaseExecutor core.LineFieldsInfo // contains filtered or unexported fields }
SelectIntoExec represents a SelectInto executor.
func (*SelectIntoExec) Close ¶
func (s *SelectIntoExec) Close() error
Close implements the Executor Close interface.
type SelectLockExec ¶
type SelectLockExec struct { exec.BaseExecutor Lock *ast.SelectLockInfo // contains filtered or unexported fields }
SelectLockExec represents a select lock executor. It is built from the "SELECT .. FOR UPDATE" or the "SELECT .. LOCK IN SHARE MODE" statement. For "SELECT .. FOR UPDATE" statement, it locks every row key from source Executor. After the execution, the keys are buffered in transaction, and will be sent to KV when doing commit. If there is any key already locked by another transaction, the transaction will rollback and retry.
type SelectionExec ¶
type SelectionExec struct { exec.BaseExecutorV2 // contains filtered or unexported fields }
SelectionExec represents a filter executor.
func (*SelectionExec) Close ¶
func (e *SelectionExec) Close() error
Close implements plannercore.Plan Close interface.
func (*SelectionExec) Detach ¶
func (e *SelectionExec) Detach() (exec.Executor, bool)
Detach detaches the current executor from the session context.
type SetConfigExec ¶
type SetConfigExec struct { exec.BaseExecutor // contains filtered or unexported fields }
SetConfigExec executes 'SET CONFIG' statement.
type SetExecutor ¶
type SetExecutor struct { exec.BaseExecutor // contains filtered or unexported fields }
SetExecutor executes set statement.
type ShowDDLExec ¶
type ShowDDLExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ShowDDLExec represents a show DDL executor.
type ShowDDLJobQueriesExec ¶
type ShowDDLJobQueriesExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ShowDDLJobQueriesExec represents a show DDL job queries executor. The jobs id that is given by 'admin show ddl job queries' statement, only be searched in the latest 10 history jobs.
type ShowDDLJobQueriesWithRangeExec ¶
type ShowDDLJobQueriesWithRangeExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ShowDDLJobQueriesWithRangeExec represents a show DDL job queries with range executor. The jobs id that is given by 'admin show ddl job queries' statement, can be searched within a specified range in history jobs using offset and limit.
type ShowDDLJobsExec ¶
type ShowDDLJobsExec struct { exec.BaseExecutor DDLJobRetriever // contains filtered or unexported fields }
ShowDDLJobsExec represent a show DDL jobs executor.
func (*ShowDDLJobsExec) Close ¶
func (e *ShowDDLJobsExec) Close() error
Close implements the Executor Close interface.
type ShowExec ¶
type ShowExec struct { exec.BaseExecutor Tp ast.ShowStmtType // Databases/Tables/Columns/.... DBName pmodel.CIStr Table *resolve.TableNameW // Used for showing columns. Partition pmodel.CIStr // Used for showing partition Column *ast.ColumnName // Used for `desc table column`. IndexName pmodel.CIStr // Used for show table regions. ResourceGroupName pmodel.CIStr // Used for showing resource group Flag int // Some flag parsed from sql, such as FULL. Roles []*auth.RoleIdentity // Used for show grants. User *auth.UserIdentity // Used by show grants, show create user. Extractor base.ShowPredicateExtractor CountWarningsOrErrors bool // Used for showing count(*) warnings | errors Full bool IfNotExists bool // Used for `show create database if not exists` GlobalScope bool // GlobalScope is used by show variables Extended bool // Used for `show extended columns from ...` ImportJobID *int64 // contains filtered or unexported fields }
ShowExec represents a show executor.
type ShowNextRowIDExec ¶
type ShowNextRowIDExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ShowNextRowIDExec represents a show the next row ID executor.
type ShowSlowExec ¶
type ShowSlowExec struct { exec.BaseExecutor ShowSlow *ast.ShowSlow // contains filtered or unexported fields }
ShowSlowExec represents the executor of showing the slow queries. It is build from the "admin show slow" statement:
admin show slow top [internal | all] N admin show slow recent N
type ShuffleExec ¶
type ShuffleExec struct { exec.BaseExecutor // contains filtered or unexported fields }
ShuffleExec is the executor to run other executors in a parallel manner.
It fetches chunks from M `DataSources` (value of M depends on the actual executor, e.g. M = 1 for WindowExec, M = 2 for MergeJoinExec).
It splits tuples from each `DataSource` into N partitions (Only "split by hash" is implemented so far).
It invokes N workers in parallel, each one has M `receiver` to receive partitions from `DataSources`
It assigns partitions received as input to each worker and executes child executors.
It collects outputs from each worker, then sends outputs to its parent.
+-------------+ +-------| Main Thread | | +------+------+ | ^ | | | + v +++ outputHolderCh | | outputCh (1 x Concurrency) v +++ | ^ | | | +-------+-------+ v | | +--------------+ +--------------+ +----- | worker | ....... | worker | worker (N Concurrency): child executor, eg. WindowExec (+SortExec) | +------------+-+ +-+------------+ | ^ ^ | | | | +-+ +-+ ...... +-+ | | | | | | | | ... ... ... inputCh (Concurrency x 1) v | | | | | | inputHolderCh +++ +++ +++ v ^ ^ ^ | | | | | +------o----+ | | | +-----------------+-----+ | | | | +---+------------+------------+----+-----------+ | | Partition Splitter | | +--------------+-+------------+-+--------------+ | ^ | | | +---------------v-----------------+ +----------> | fetch data from DataSource | +---------------------------------+
func (*ShuffleExec) Close ¶
func (e *ShuffleExec) Close() error
Close implements the Executor Close interface.
type SimpleExec ¶
type SimpleExec struct { exec.BaseExecutor Statement ast.StmtNode ResolveCtx *resolve.Context // IsFromRemote indicates whether the statement IS FROM REMOTE TiDB instance in cluster, // and executing in coprocessor. // Used for `global kill`. See https://github.com/pingcap/tidb/blob/master/docs/design/2020-06-01-global-kill.md. IsFromRemote bool // contains filtered or unexported fields }
SimpleExec represents simple statement executor. For statements do simple execution. includes `UseStmt`, 'SetStmt`, `DoStmt`, `BeginStmt`, `CommitStmt`, `RollbackStmt`. TODO: list all simple statements.
type SimpleSeekerOnReadCloser ¶
type SimpleSeekerOnReadCloser struct {
// contains filtered or unexported fields
}
SimpleSeekerOnReadCloser provides Seek(0, SeekCurrent) on ReadCloser.
func NewSimpleSeekerOnReadCloser ¶
func NewSimpleSeekerOnReadCloser(r io.ReadCloser) *SimpleSeekerOnReadCloser
NewSimpleSeekerOnReadCloser creates a SimpleSeekerOnReadCloser.
func (*SimpleSeekerOnReadCloser) Close ¶
func (s *SimpleSeekerOnReadCloser) Close() error
Close implements io.Closer.
func (*SimpleSeekerOnReadCloser) GetFileSize ¶
func (*SimpleSeekerOnReadCloser) GetFileSize() (int64, error)
GetFileSize implements storage.ExternalFileReader.
type SplitIndexRegionExec ¶
type SplitIndexRegionExec struct { exec.BaseExecutor // contains filtered or unexported fields }
SplitIndexRegionExec represents a split index regions executor.
type SplitTableRegionExec ¶
type SplitTableRegionExec struct { exec.BaseExecutor // contains filtered or unexported fields }
SplitTableRegionExec represents a split table regions executor.
type TableDualExec ¶
type TableDualExec struct { exec.BaseExecutorV2 // contains filtered or unexported fields }
TableDualExec represents a dual table executor.
type TableReaderExecutor ¶
type TableReaderExecutor struct { exec.BaseExecutorV2 // contains filtered or unexported fields }
TableReaderExecutor sends DAG request and reads table data from kv layer.
func (*TableReaderExecutor) Close ¶
func (e *TableReaderExecutor) Close() error
Close implements the Executor Close interface.
func (*TableReaderExecutor) Detach ¶
func (e *TableReaderExecutor) Detach() (exec.Executor, bool)
Detach detaches the current executor from the session context.
func (*TableReaderExecutor) GetDDLOwner ¶
func (treCtx *TableReaderExecutor) GetDDLOwner(ctx context.Context) (*infosync.ServerInfo, error)
func (*TableReaderExecutor) GetInfoSchema ¶
func (treCtx *TableReaderExecutor) GetInfoSchema() isctx.MetaOnlyInfoSchema
func (*TableReaderExecutor) Next ¶
Next fills data into the chunk passed by its caller. The task was actually done by tableReaderHandler.
func (*TableReaderExecutor) Open ¶
func (e *TableReaderExecutor) Open(ctx context.Context) error
Open initializes necessary variables for using this executor.
func (TableReaderExecutor) SelectResult ¶
func (sr TableReaderExecutor) SelectResult(ctx context.Context, dctx *distsqlctx.DistSQLContext, kvReq *kv.Request, fieldTypes []*types.FieldType, copPlanIDs []int, rootPlanID int) (distsql.SelectResult, error)
func (*TableReaderExecutor) Table ¶
func (e *TableReaderExecutor) Table() table.Table
Table implements the dataSourceExecutor interface.
type TableSampleExecutor ¶
type TableSampleExecutor struct { exec.BaseExecutor // contains filtered or unexported fields }
TableSampleExecutor fetches a few rows through kv.Scan according to the specific sample method.
func (*TableSampleExecutor) Close ¶
func (*TableSampleExecutor) Close() error
Close implements the Executor Close interface.
type TableScanExec ¶
type TableScanExec struct { exec.BaseExecutor // contains filtered or unexported fields }
TableScanExec is a table scan executor without result fields.
type TestShowClusterConfigFunc ¶
TestShowClusterConfigFunc is used to test 'show config ...'.
type TiFlashSystemTableRetriever ¶
type TiFlashSystemTableRetriever struct {
// contains filtered or unexported fields
}
TiFlashSystemTableRetriever is used to read system table from tiflash.
type TraceExec ¶
type TraceExec struct { exec.BaseExecutor // CollectedSpans collects all span during execution. Span is appended via // callback method which passes into tracer implementation. CollectedSpans []basictracer.RawSpan // contains filtered or unexported fields }
TraceExec represents a root executor of trace query.
type TrafficCancelExec ¶
type TrafficCancelExec struct {
exec.BaseExecutor
}
TrafficCancelExec sends cancel traffic job requests to TiProxy.
type TrafficCaptureExec ¶
type TrafficCaptureExec struct { exec.BaseExecutor Args map[string]string }
TrafficCaptureExec sends capture traffic requests to TiProxy.
type TrafficReplayExec ¶
type TrafficReplayExec struct { exec.BaseExecutor Args map[string]string }
TrafficReplayExec sends replay traffic requests to TiProxy.
type TrafficShowExec ¶
type TrafficShowExec struct { exec.BaseExecutor // contains filtered or unexported fields }
TrafficShowExec sends show traffic job requests to TiProxy.
type UnionScanExec ¶
type UnionScanExec struct { exec.BaseExecutor // contains filtered or unexported fields }
UnionScanExec merges the rows from dirty table and the rows from distsql request.
func (*UnionScanExec) Close ¶
func (us *UnionScanExec) Close() error
Close implements the Executor Close interface.
type UpdateExec ¶
type UpdateExec struct { exec.BaseExecutor OrderedList []*expression.Assignment IgnoreError bool // contains filtered or unexported fields }
UpdateExec represents a new update executor.
func (*UpdateExec) Close ¶
func (e *UpdateExec) Close() error
Close implements the Executor Close interface.
func (*UpdateExec) GetFKCascades ¶
func (e *UpdateExec) GetFKCascades() []*FKCascadeExec
GetFKCascades implements WithForeignKeyTrigger interface.
func (*UpdateExec) GetFKChecks ¶
func (e *UpdateExec) GetFKChecks() []*FKCheckExec
GetFKChecks implements WithForeignKeyTrigger interface.
func (*UpdateExec) HasFKCascades ¶
func (e *UpdateExec) HasFKCascades() bool
HasFKCascades implements WithForeignKeyTrigger interface.
type UpdatedValuesCouple ¶
UpdatedValuesCouple contains the updated new row the old rows, exporting for test.
type WindowExec ¶
type WindowExec struct { exec.BaseExecutor // contains filtered or unexported fields }
WindowExec is the executor for window functions.
func (*WindowExec) Close ¶
func (e *WindowExec) Close() error
Close implements the Executor Close interface.
type WithForeignKeyTrigger ¶
type WithForeignKeyTrigger interface { GetFKChecks() []*FKCheckExec GetFKCascades() []*FKCascadeExec HasFKCascades() bool }
WithForeignKeyTrigger indicates the executor has foreign key check or cascade.
Source Files ¶
- adapter.go
- admin.go
- admin_plugins.go
- analyze.go
- analyze_col.go
- analyze_col_v2.go
- analyze_global_stats.go
- analyze_idx.go
- analyze_utils.go
- analyze_worker.go
- batch_checker.go
- batch_point_get.go
- bind.go
- brie.go
- brie_utils.go
- builder.go
- check_table_index.go
- checksum.go
- compact_table.go
- compiler.go
- coprocessor.go
- cte.go
- cte_table_reader.go
- ddl.go
- delete.go
- detach.go
- distsql.go
- expand.go
- explain.go
- foreign_key.go
- grant.go
- import_into.go
- index_merge_reader.go
- infoschema_reader.go
- insert.go
- insert_common.go
- inspection_common.go
- inspection_profile.go
- inspection_result.go
- inspection_summary.go
- load_data.go
- load_stats.go
- mem_reader.go
- memtable_reader.go
- metrics_reader.go
- mpp_gather.go
- operate_ddl_jobs.go
- opt_rule_blacklist.go
- parallel_apply.go
- pipelined_window.go
- plan_replayer.go
- point_get.go
- prepared.go
- projection.go
- recommend_index.go
- reload_expr_pushdown_blacklist.go
- replace.go
- revoke.go
- sample.go
- select.go
- select_into.go
- set.go
- set_config.go
- show.go
- show_bdr_role.go
- show_ddl.go
- show_ddl_job_queries.go
- show_ddl_jobs.go
- show_next_row_id.go
- show_placement.go
- show_slow_queries.go
- show_stats.go
- shuffle.go
- simple.go
- slow_query.go
- split.go
- stmtsummary.go
- table_reader.go
- trace.go
- traffic.go
- union_scan.go
- update.go
- utils.go
- window.go
- write.go