package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
BootstrapSession bootstrap session and domain.
BootstrapSession4DistExecution bootstrap session and dom for Distributed execution test, only for unit testing.
CreateSession creates a new session environment.
CreateSession4Test creates a new session environment for test.
CreateSession4TestWithOpt creates a new session environment for test.
CreateSessionAndSetID creates a session and set connection ID.
CreateSessionWithDomain creates a new Session and binds it with a Domain.
CreateSessionWithOpt creates a new session environment with option.
CreateStoreAndBootstrap creates a mock store and bootstrap it.
DisableRunBootstrapSQLFileInTest only used for test.
DisableStats4Test disables the stats for tests.
ExecRestrictedStmt4Test wrapper `(s *session) ExecRestrictedStmt` for test.
GetDBNames gets the sql layer database names from the session.
GetDomain gets the associated domain for store.
GetHistory get all stmtHistory in current txn.
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 creates system tables that DDL uses.
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.
InitTiDBSchemaCacheSize initializes the tidb schema cache size.
IsUpgradingClusterState checks whether the global state is upgrading.
KeyNeedToLock returns true if the key need to lock.
MustExec executes a sql statement and asserts no error occurs.
MustExecToRecodeSet executes a sql statement and asserts no error occurs.
Parse parses a query string to raw ast.StmtNode.
ParseWithParams4Test wrapper (s *session) ParseWithParams for test.
RegisterMockUpgradeFlag registers the mock upgrade flag.
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.
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.
SyncNormalRunning syncs normal state to etcd.
SyncUpgradeState syncs upgrade state to etcd.
# 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.
CreateDistFrameworkMeta create a system table that distributed task framework use to store meta information.
CreateDoneRunawayWatchTable stores the condition which is used to check whether query should be quarantined.
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.
CreateGlobalTask is a table about global task.
CreateGlobalTaskHistory is a table about history global task.
CreateGlobalVariablesTable is the SQL statement creates global variable table in system db.
CreateHelpTopic is the SQL statement creates help_topic table in system db.
CreateImportJobs is a table that IMPORT INTO uses.
CreateIndexAdvisorTable is a table to store the index advisor results.
CreateKernelOptionsTable is a table to store kernel options for tidb.
CreateMDLView is a view about metadata locks.
CreateOptRuleBlacklist stores the list of disabled optimizing operations.
CreatePasswordHistory is a table save history passwd.
CreatePITRIDMap is a table that records the id map from upstream to downstream for PITR.
CreatePlanReplayerStatusTable is a table about plan replayer status.
CreatePlanReplayerTaskTable is a table about plan replayer capture task.
CreateRequestUnitByGroupTable stores the historical RU consumption by resource group.
CreateRoleEdgesTable stores the role and user relationship information.
CreateRunawayTable stores the query which is identified as runaway or quarantined because of in watch list.
CreateRunawayWatchTable stores the condition which is used to check whether query should be quarantined.
CreateSchemaIndexUsageTable stores the index usage information.
CreateSchemaUnusedIndexesView creates a view to use `information_schema.tidb_index_usage` to get the unused indexes.
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.
CreateSysSchema creates a new schema called `sys`.
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.
DropMySQLIndexUsageTable removes the table `mysql.schema_index_usage`.
ExecStmtVarKey is a variable key for ExecStmt.
MockSimpleUpgradeToVerLatest is used to indicate the use of the simple mock bootstrapVersion, this is just a few simple DDL operations.
StoreBootstrappedKey is used by store.G/SetOption to store related bootstrap context for kv.Storage.
TidbNewCollationEnabled The variable name in mysql.tidb table and it will indicate if the new collations are enabled in the TiDB cluster.
# Variables
BackfillTables is a list of tables definitions used in dist reorg DDL.
CreateTimers is a table to store all timers for tidb.
CurrentBootstrapVersion is used in test.
DDLJobTables is a list of tables definitions used in concurrent DDL.
DDLNotifierTables contains the table definitions used in DDL notifier.
Session errors.
ErrNonTransactionalJobFailure is the error when a non-transactional job fails.
GetBootstrapVersion is used in test.
MockUpgradeToVerLatestKind is used to indicate the use of different mock bootstrapVersion.
SchemaChangedWithoutRetry is used for testing.
SupportUpgradeHTTPOpVer is exported for testing.
TestHook is exported for testing.
WithMockUpgrade is a flag identify whether tests run with mock upgrading.
# Structs
BaseCallback implements Callback interfaces.
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.
TestCallback is used to customize user callback themselves.
# Interfaces
Callback is used for Test.
# Type aliases
ExecStmtVarKeyType is a dummy type to avoid naming collision in context.