package
6.7.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
BootstrapSession runs the first time when the TiDB server start.
CreateSession creates a new session environment.
CreateSession4Test creates a new session environment for test.
CreateSession4TestWithOpt creates a new session environment for test.
CreateSessionWithDomain creates a new Session and binds it with a Domain.
CreateSessionWithOpt creates a new session environment with option.
DisableStats4Test disables the stats for tests.
ExecRestrictedStmt4Test wrapper `(s *session) ExecRestrictedStmt` for test.
GetDomain gets the associated domain for store.
GetHistory get all stmtHistory in current txn.
GetIndexUsageSyncLease returns the index usage sync lease time.
GetPlanReplayerGCLease returns the plan replayer gc lease time.
GetRows4Test gets all the rows from a RecordSet, only used for test.
GetStartTSFromSession returns the startTS in the session `se`.
HandleNonTransactionalDML is the entry point for a non-transactional DML statement.
InitDDLJobTables is to create tidb_ddl_job, tidb_ddl_reorg and tidb_ddl_history, or tidb_background_subtask and tidb_background_subtask_history.
InitMDLTable is to create tidb_mdl_info, which is used for metadata lock.
InitMDLVariable initializes the metadata lock variable.
InitMDLVariableForBootstrap initializes the metadata lock variable.
InitMDLVariableForUpgrade initializes the metadata lock variable.
Parse parses a query string to raw ast.StmtNode.
ParseWithParams4Test wrapper (s *session) ParseWithParams for test.
RemoveLockDDLJobs removes the DDL jobs which doesn't get the metadata lock from job2ver.
ResetMockAutoRandIDRetryCount set the number of occurrences of `kv.ErrTxnRetryable` when calling TxnState.Commit().
ResetStoreForWithTiKVTest is only used in the test code.
ResultSetToStringSlice changes the RecordSet to [][]string.
SetIndexUsageSyncLease changes the default index usage sync lease time for loading info.
SetPlanReplayerGCLease changes the default plan repalyer gc lease time.
SetSchemaLease changes the default schema lease time for DDL.
SetStatsLease changes the default stats lease time for loading stats info.
# Constants
CreateAdvisoryLocks stores the advisory locks (get_lock, release_lock).
CreateAnalyzeJobs stores the analyze jobs.
CreateAnalyzeOptionsTable stores the analyze options used by analyze and auto analyze.
CreateBindInfoTable stores the sql bind info which is used to update globalBindCache.
CreateCapturePlanBaselinesBlacklist stores the baseline capture filter rules.
CreateColumnPrivTable is the SQL statement creates column scope privilege table in system db.
CreateColumnStatsUsageTable stores the column stats usage information.
CreateDBPrivTable is the SQL statement creates DB scope privilege table in system db.
CreateDefaultRolesTable stores the active roles for a user.
CreateExprPushdownBlacklist stores the expressions which are not allowed to be pushed down.
CreateGCDeleteRangeDoneTable stores schemas which are already deleted by DeleteRange.
CreateGCDeleteRangeTable stores schemas which can be deleted by DeleteRange.
CreateGlobalGrantsTable stores dynamic privs.
CreateGlobalPrivTable is the SQL statement creates Global scope privilege table in system db.
CreateGlobalVariablesTable is the SQL statement creates global variable table in system db.
CreateHelpTopic is the SQL statement creates help_topic table in system db.
CreateMDLView is a view about metadata locks.
CreateOptRuleBlacklist stores the list of disabled optimizing operations.
CreatePasswordHistory is a table save history passwd.
CreatePlanReplayerStatusTable is a table about plan replayer status.
CreatePlanReplayerTaskTable is a table about plan replayer capture task.
CreateRoleEdgesTable stores the role and user relationship information.
CreateSchemaIndexUsageTable stores the index usage information.
CreateStatsBucketsTable stores the histogram info for every table columns.
CreateStatsColsTable stores the statistics of table columns.
CreateStatsExtended stores the registered extended statistics.
CreateStatsFeedbackTable stores the feedback info which is used to update stats.
CreateStatsFMSketchTable stores FMSketch data of a column histogram.
CreateStatsHistory stores the historical stats.
CreateStatsMetaHistory stores the historical meta stats.
CreateStatsMetaTable stores the meta of table statistics.
CreateStatsTableLocked stores the locked tables.
CreateStatsTopNTable stores topn data of a cmsketch with top n.
CreateTableCacheMetaTable stores the cached table meta lock information.
CreateTablePrivTable is the SQL statement creates table scope privilege table in system db.
CreateTiDBTable is the SQL statement creates a table in system db.
CreateTTLJobHistory is a table that stores ttl job's history.
CreateTTLTableStatus is a table about TTL job schedule.
CreateTTLTask is a table about parallel ttl tasks.
CreateUserTable is the SQL statement creates User table in system db.
ExecStmtVarKey is a variable key for ExecStmt.
# Variables
BackfillTables is a list of tables definitions used in dist reorg DDL.
DDLJobTables is a list of tables definitions used in concurrent DDL.
Session errors.
ErrNonTransactionalJobFailure is the error when a non-transactional job fails.
SchemaChangedWithoutRetry is used for testing.
# Structs
LazyTxn wraps kv.Transaction to provide a new kv.Transaction.
Opt describes the option for creating session.
StmtHistory holds all histories of statements in a txn.
# Interfaces
Session context, it is consistent with the lifecycle of a client connection.
# Type aliases
ExecStmtVarKeyType is a dummy type to avoid naming collision in context.