Versions in this module Expand all Collapse all v1 v1.0.1 Jan 29, 2021 Changes in this version + const AddIndexStr + const AddPrimaryKeyStr + const ColumnInfoVersion0 + const ColumnInfoVersion1 + const ColumnInfoVersion2 + const CurrLatestColumnInfoVersion + const CurrLatestTableInfoVersion + const DefaultNegativeSequenceMaxValue + const DefaultNegativeSequenceMinValue + const DefaultNegativeSequenceStartValue + const DefaultPositiveSequenceMaxValue + const DefaultPositiveSequenceMinValue + const DefaultPositiveSequenceStartValue + const DefaultSequenceCacheBool + const DefaultSequenceCacheValue + const DefaultSequenceCycleBool + const DefaultSequenceIncrementValue + const DefaultSequenceOrderBool + const ExtraHandleID + const ExtraPidColID + const FlagDividedByZeroAsWarning + const FlagIgnoreTruncate + const FlagIgnoreZeroInDate + const FlagInInsertStmt + const FlagInLoadDataStmt + const FlagInSelectStmt + const FlagInSetOprStmt + const FlagInUpdateOrDeleteStmt + const FlagOverflowAsWarning + const FlagPadCharToFullLength + const FlagTruncateAsWarning + const PartitionTypeHash + const PartitionTypeKey + const PartitionTypeList + const PartitionTypeRange + const PartitionTypeSystemTime + const TableInfoVersion0 + const TableInfoVersion1 + const TableInfoVersion2 + const TableInfoVersion3 + var ExtraHandleName = NewCIStr("_tidb_rowid") + var ExtraPartitionIdName = NewCIStr("_tidb_pid") + func TSConvert2Time(ts uint64) time.Time + type ActionType byte + const ActionAddCheckConstraint + const ActionAddColumn + const ActionAddColumns + const ActionAddForeignKey + const ActionAddIndex + const ActionAddPrimaryKey + const ActionAddTablePartition + const ActionAlterCheckConstraint + const ActionAlterIndexVisibility + const ActionAlterSequence + const ActionAlterTableAlterPartition + const ActionCreateSchema + const ActionCreateSequence + const ActionCreateTable + const ActionCreateView + const ActionDropCheckConstraint + const ActionDropColumn + const ActionDropColumns + const ActionDropForeignKey + const ActionDropIndex + const ActionDropPrimaryKey + const ActionDropSchema + const ActionDropSequence + const ActionDropTable + const ActionDropTablePartition + const ActionDropView + const ActionExchangeTablePartition + const ActionLockTable + const ActionModifyColumn + const ActionModifySchemaCharsetAndCollate + const ActionModifyTableAutoIdCache + const ActionModifyTableCharsetAndCollate + const ActionModifyTableComment + const ActionNone + const ActionRebaseAutoID + const ActionRebaseAutoRandomBase + const ActionRecoverTable + const ActionRenameIndex + const ActionRenameTable + const ActionRenameTables + const ActionRepairTable + const ActionSetDefaultValue + const ActionSetTiFlashReplica + const ActionShardRowID + const ActionTruncateTable + const ActionTruncateTablePartition + const ActionUnlockTable + const ActionUpdateTiFlashReplicaStatus + func (action ActionType) String() string + type AffectedOption struct + OldSchemaID int64 + OldTableID int64 + SchemaID int64 + TableID int64 + type CIStr struct + L string + O string + func NewCIStr(s string) (cs CIStr) + func (cis *CIStr) UnmarshalJSON(b []byte) error + func (cis CIStr) String() string + type ChangeStateInfo struct + DependencyColumnOffset int + type ColumnInfo struct + Comment string + DefaultIsExpr bool + DefaultValue interface{} + DefaultValueBit []byte + Dependences map[string]struct{} + GeneratedExprString string + GeneratedStored bool + Hidden bool + ID int64 + Name CIStr + Offset int + OriginDefaultValue interface{} + OriginDefaultValueBit []byte + State SchemaState + Version uint64 + func FindColumnInfo(cols []*ColumnInfo, name string) *ColumnInfo + func NewExtraHandleColInfo() *ColumnInfo + func NewExtraPartitionIDColInfo() *ColumnInfo + func (c *ColumnInfo) Clone() *ColumnInfo + func (c *ColumnInfo) GetDefaultValue() interface{} + func (c *ColumnInfo) GetOriginDefaultValue() interface{} + func (c *ColumnInfo) GetTypeDesc() string + func (c *ColumnInfo) IsGenerated() bool + func (c *ColumnInfo) SetDefaultValue(value interface{}) error + func (c *ColumnInfo) SetOriginDefaultValue(value interface{}) error + type ConstraintInfo struct + ConstraintCols []CIStr + Enforced bool + ExprString string + ID int64 + InColumn bool + Name CIStr + State SchemaState + Table CIStr + func (ci *ConstraintInfo) Clone() *ConstraintInfo + type DBInfo struct + Charset string + Collate string + ID int64 + Name CIStr + State SchemaState + Tables []*TableInfo + func (db *DBInfo) Clone() *DBInfo + func (db *DBInfo) Copy() *DBInfo + type DDLReorgMeta struct + EndHandle int64 + SQLMode mysql.SQLMode + Warnings map[errors.ErrorID]*terror.Error + WarningsCount map[errors.ErrorID]int64 + func NewDDLReorgMeta() *DDLReorgMeta + type FKInfo struct + Cols []CIStr + ID int64 + Name CIStr + OnDelete int + OnUpdate int + RefCols []CIStr + RefTable CIStr + State SchemaState + func (fk *FKInfo) Clone() *FKInfo + type HistoryInfo struct + DBInfo *DBInfo + FinishedTS uint64 + SchemaVersion int64 + TableInfo *TableInfo + func (h *HistoryInfo) AddDBInfo(schemaVer int64, dbInfo *DBInfo) + func (h *HistoryInfo) AddTableInfo(schemaVer int64, tblInfo *TableInfo) + func (h *HistoryInfo) Clean() + type IndexColumn struct + Length int + Name CIStr + Offset int + func (i *IndexColumn) Clone() *IndexColumn + type IndexInfo struct + Columns []*IndexColumn + Comment string + Global bool + ID int64 + Invisible bool + Name CIStr + Primary bool + State SchemaState + Table CIStr + Tp IndexType + Unique bool + func (index *IndexInfo) Clone() *IndexInfo + func (index *IndexInfo) HasPrefixIndex() bool + type IndexType int + const IndexTypeBtree + const IndexTypeHash + const IndexTypeInvalid + const IndexTypeRtree + func (t IndexType) String() string + type Job struct + Args []interface{} + BinlogInfo *HistoryInfo + CtxVars []interface{} + DependencyID int64 + Error *terror.Error + ErrorCount int64 + ID int64 + Mu sync.Mutex + Priority int + Query string + RawArgs json.RawMessage + ReorgMeta *DDLReorgMeta + RowCount int64 + SchemaID int64 + SchemaName string + SchemaState SchemaState + SnapshotVer uint64 + StartTS uint64 + State JobState + TableID int64 + Type ActionType + Version int64 + func (job *Job) Decode(b []byte) error + func (job *Job) DecodeArgs(args ...interface{}) error + func (job *Job) Encode(updateRawArgs bool) ([]byte, error) + func (job *Job) FinishDBJob(jobState JobState, schemaState SchemaState, ver int64, dbInfo *DBInfo) + func (job *Job) FinishTableJob(jobState JobState, schemaState SchemaState, ver int64, tblInfo *TableInfo) + func (job *Job) GetRowCount() int64 + func (job *Job) GetWarnings() (map[errors.ErrorID]*terror.Error, map[errors.ErrorID]int64) + func (job *Job) IsCancelled() bool + func (job *Job) IsCancelling() bool + func (job *Job) IsDependentOn(other *Job) (bool, error) + func (job *Job) IsDone() bool + func (job *Job) IsFinished() bool + func (job *Job) IsRollbackDone() bool + func (job *Job) IsRollingback() bool + func (job *Job) IsRunning() bool + func (job *Job) IsSynced() bool + func (job *Job) SetRowCount(count int64) + func (job *Job) SetWarnings(warnings map[errors.ErrorID]*terror.Error, ...) + func (job *Job) String() string + type JobState byte + const JobStateCancelled + const JobStateCancelling + const JobStateDone + const JobStateNone + const JobStateRollbackDone + const JobStateRollingback + const JobStateRunning + const JobStateSynced + func (s JobState) String() string + type PartitionDefinition struct + Comment string + ID int64 + InValues [][]string + LessThan []string + Name CIStr + func (ci *PartitionDefinition) Clone() PartitionDefinition + type PartitionInfo struct + AddingDefinitions []PartitionDefinition + Columns []CIStr + Definitions []PartitionDefinition + DroppingDefinitions []PartitionDefinition + Enable bool + Expr string + Num uint64 + States []PartitionState + Type PartitionType + func (pi *PartitionInfo) GCPartitionStates() + func (pi *PartitionInfo) GetNameByID(id int64) string + func (pi *PartitionInfo) GetStateByID(id int64) SchemaState + func (pi *PartitionInfo) SetStateByID(id int64, state SchemaState) + type PartitionState struct + ID int64 + State SchemaState + type PartitionType int + func (p PartitionType) String() string + type PrimaryKeyType int8 + const PrimaryKeyTypeClustered + const PrimaryKeyTypeDefault + const PrimaryKeyTypeNonClustered + func (p PrimaryKeyType) String() string + type SchemaDiff struct + AffectedOpts []*AffectedOption + OldSchemaID int64 + OldTableID int64 + SchemaID int64 + TableID int64 + Type ActionType + Version int64 + type SchemaState byte + const StateDeleteOnly + const StateDeleteReorganization + const StateGlobalTxnOnly + const StateNone + const StatePublic + const StateReplicaOnly + const StateWriteOnly + const StateWriteReorganization + func (s SchemaState) String() string + type SequenceInfo struct + Cache bool + CacheValue int64 + Comment string + Cycle bool + Increment int64 + MaxValue int64 + MinValue int64 + Start int64 + type SessionInfo struct + ServerID string + SessionID uint64 + func (s SessionInfo) String() string + type TableColumnID struct + ColumnID int64 + TableID int64 + type TableInfo struct + AutoIdCache int64 + AutoIncID int64 + AutoRandID int64 + AutoRandomBits uint64 + Charset string + Collate string + Columns []*ColumnInfo + Comment string + Compression string + Constraints []*ConstraintInfo + ForeignKeys []*FKInfo + ID int64 + Indices []*IndexInfo + IsColumnar bool + IsCommonHandle bool + Lock *TableLockInfo + MaxColumnID int64 + MaxConstraintID int64 + MaxIndexID int64 + MaxShardRowIDBits uint64 + Name CIStr + OldSchemaID int64 + PKIsHandle bool + Partition *PartitionInfo + PreSplitRegions uint64 + Sequence *SequenceInfo + ShardRowIDBits uint64 + State SchemaState + TiFlashReplica *TiFlashReplicaInfo + UpdateTS uint64 + Version uint16 + View *ViewInfo + func (t *TableInfo) Clone() *TableInfo + func (t *TableInfo) Cols() []*ColumnInfo + func (t *TableInfo) ColumnIsInIndex(c *ColumnInfo) bool + func (t *TableInfo) ContainsAutoRandomBits() bool + func (t *TableInfo) FindConstraintInfoByName(constrName string) *ConstraintInfo + func (t *TableInfo) FindIndexByName(idxName string) *IndexInfo + func (t *TableInfo) FindPartitionDefinitionByName(partitionDefinitionName string) *PartitionDefinition + func (t *TableInfo) GetAutoIncrementColInfo() *ColumnInfo + func (t *TableInfo) GetDBID(dbID int64) int64 + func (t *TableInfo) GetPartitionInfo() *PartitionInfo + func (t *TableInfo) GetPkColInfo() *ColumnInfo + func (t *TableInfo) GetPkName() CIStr + func (t *TableInfo) GetUpdateTime() time.Time + func (t *TableInfo) IsAutoIncColUnsigned() bool + func (t *TableInfo) IsAutoRandomBitColUnsigned() bool + func (t *TableInfo) IsBaseTable() bool + func (t *TableInfo) IsLocked() bool + func (t *TableInfo) IsSequence() bool + func (t *TableInfo) IsView() bool + type TableLockInfo struct + Sessions []SessionInfo + State TableLockState + TS uint64 + Tp TableLockType + type TableLockState byte + const TableLockStateNone + const TableLockStatePreLock + const TableLockStatePublic + func (t TableLockState) String() string + type TableLockTpInfo struct + SchemaID int64 + TableID int64 + Tp TableLockType + type TableLockType byte + const TableLockNone + const TableLockRead + const TableLockReadLocal + const TableLockReadOnly + const TableLockWrite + const TableLockWriteLocal + func (t TableLockType) String() string + type TiFlashReplicaInfo struct + Available bool + AvailablePartitionIDs []int64 + Count uint64 + LocationLabels []string + func (tr *TiFlashReplicaInfo) IsPartitionAvailable(pid int64) bool + type ViewAlgorithm int + const AlgorithmMerge + const AlgorithmTemptable + const AlgorithmUndefined + func (v *ViewAlgorithm) String() string + type ViewCheckOption int + const CheckOptionCascaded + const CheckOptionLocal + func (v *ViewCheckOption) String() string + type ViewInfo struct + Algorithm ViewAlgorithm + CheckOption ViewCheckOption + Cols []CIStr + Definer *auth.UserIdentity + Security ViewSecurity + SelectStmt string + type ViewSecurity int + const SecurityDefiner + const SecurityInvoker + func (v *ViewSecurity) String() string