Documentation ¶
Index ¶
- Variables
- func NewStorageDDLInjector(s kv.Storage) kv.Storage
- func UnwrapStorage(s kv.Storage) kv.Storage
- type Checker
- func (d Checker) AlterPlacementPolicy(ctx sessionctx.Context, stmt *ast.AlterPlacementPolicyStmt) error
- func (d Checker) AlterSchema(sctx sessionctx.Context, stmt *ast.AlterDatabaseStmt) error
- func (d Checker) AlterSequence(ctx sessionctx.Context, stmt *ast.AlterSequenceStmt) error
- func (d Checker) AlterTable(ctx context.Context, sctx sessionctx.Context, stmt *ast.AlterTableStmt) error
- func (d Checker) BatchCreateTableWithInfo(ctx sessionctx.Context, schema model.CIStr, info []*model.TableInfo, ...) error
- func (d Checker) CleanupTableLock(ctx sessionctx.Context, tables []*ast.TableName) error
- func (d Checker) CreateIndex(ctx sessionctx.Context, stmt *ast.CreateIndexStmt) error
- func (d Checker) CreatePlacementPolicy(ctx sessionctx.Context, stmt *ast.CreatePlacementPolicyStmt) error
- func (d Checker) CreatePlacementPolicyWithInfo(ctx sessionctx.Context, policy *model.PolicyInfo, onExist ddl.OnExist) error
- func (d Checker) CreateSchema(ctx sessionctx.Context, stmt *ast.CreateDatabaseStmt) error
- func (d Checker) CreateSchemaWithInfo(ctx sessionctx.Context, info *model.DBInfo, onExist ddl.OnExist) error
- func (d Checker) CreateSequence(ctx sessionctx.Context, stmt *ast.CreateSequenceStmt) error
- func (d Checker) CreateTable(ctx sessionctx.Context, stmt *ast.CreateTableStmt) error
- func (d Checker) CreateTableWithInfo(ctx sessionctx.Context, schema model.CIStr, info *model.TableInfo, ...) error
- func (d Checker) CreateTestDB()
- func (d Checker) CreateView(ctx sessionctx.Context, stmt *ast.CreateViewStmt) error
- func (d *Checker) Disable()
- func (d Checker) DoDDLJob(ctx sessionctx.Context, job *model.Job) error
- func (d Checker) DropIndex(ctx sessionctx.Context, stmt *ast.DropIndexStmt) error
- func (d Checker) DropPlacementPolicy(ctx sessionctx.Context, stmt *ast.DropPlacementPolicyStmt) error
- func (d Checker) DropSchema(ctx sessionctx.Context, stmt *ast.DropDatabaseStmt) error
- func (d Checker) DropSequence(ctx sessionctx.Context, stmt *ast.DropSequenceStmt) (err error)
- func (d Checker) DropTable(ctx sessionctx.Context, stmt *ast.DropTableStmt) (err error)
- func (d Checker) DropView(ctx sessionctx.Context, stmt *ast.DropTableStmt) (err error)
- func (d *Checker) Enable()
- func (d Checker) FlashbackCluster(ctx sessionctx.Context, flashbackTS uint64) (err error)
- func (d Checker) GetHook() ddl.Callback
- func (d Checker) GetID() string
- func (d Checker) GetInfoSchemaWithInterceptor(ctx sessionctx.Context) infoschema.InfoSchema
- func (d Checker) GetLease() time.Duration
- func (d Checker) GetScope(status string) variable.ScopeFlag
- func (d Checker) GetTableMaxHandle(ctx *ddl.JobContext, startTS uint64, tbl table.PhysicalTable) (kv.Handle, bool, error)
- func (d Checker) LockTables(ctx sessionctx.Context, stmt *ast.LockTablesStmt) error
- func (d Checker) MoveJobFromQueue2Table(bool) error
- func (d Checker) MoveJobFromTable2Queue() error
- func (d Checker) OwnerManager() owner.Manager
- func (d Checker) RecoverSchema(ctx sessionctx.Context, recoverSchemaInfo *ddl.RecoverSchemaInfo) (err error)
- func (d Checker) RecoverTable(ctx sessionctx.Context, recoverInfo *ddl.RecoverInfo) (err error)
- func (d Checker) RegisterStatsHandle(h *handle.Handle)
- func (d Checker) RenameTable(ctx sessionctx.Context, stmt *ast.RenameTableStmt) error
- func (d Checker) RepairTable(ctx sessionctx.Context, table *ast.TableName, createStmt *ast.CreateTableStmt) error
- func (d Checker) SchemaSyncer() syncer.SchemaSyncer
- func (d Checker) SetBinlogClient(client *pumpcli.PumpsClient)
- func (d Checker) SetHook(h ddl.Callback)
- func (d Checker) Start(ctxPool *pools.ResourcePool) error
- func (d Checker) Stats(vars *variable.SessionVars) (map[string]interface{}, error)
- func (d Checker) Stop() error
- func (d Checker) TruncateTable(ctx sessionctx.Context, tableIdent ast.Ident) error
- func (d Checker) UnlockTables(ctx sessionctx.Context, lockedTables []model.TableLockTpInfo) error
- func (d Checker) UpdateTableReplicaInfo(ctx sessionctx.Context, physicalID int64, available bool) error
- type InfoStore
- func (i *InfoStore) AllSchemaNames() []string
- func (i *InfoStore) AllTableNamesOfSchema(schema model.CIStr) ([]string, error)
- func (i *InfoStore) DeleteSchema(name model.CIStr) bool
- func (i *InfoStore) DeleteTable(schema, table model.CIStr) error
- func (i *InfoStore) PutSchema(dbInfo *model.DBInfo)
- func (i *InfoStore) PutTable(schemaName model.CIStr, tblInfo *model.TableInfo) error
- func (i *InfoStore) SchemaByName(name model.CIStr) *model.DBInfo
- func (i *InfoStore) TableByName(schema, table model.CIStr) (*model.TableInfo, error)
- func (i *InfoStore) TableClonedByName(schema, table model.CIStr) (*model.TableInfo, error)
- type InfoStoreAdaptor
- func (i InfoStoreAdaptor) SchemaByName(schema model.CIStr) (*model.DBInfo, bool)
- func (i InfoStoreAdaptor) TableByName(schema, table model.CIStr) (t table.Table, err error)
- func (i InfoStoreAdaptor) TableExists(schema, table model.CIStr) bool
- func (i InfoStoreAdaptor) TableIsView(schema, table model.CIStr) bool
- type SchemaTracker
- func (SchemaTracker) AlterPlacementPolicy(ctx sessionctx.Context, stmt *ast.AlterPlacementPolicyStmt) error
- func (d SchemaTracker) AlterSchema(ctx sessionctx.Context, stmt *ast.AlterDatabaseStmt) (err error)
- func (SchemaTracker) AlterSequence(_ sessionctx.Context, _ *ast.AlterSequenceStmt) error
- func (d SchemaTracker) AlterTable(ctx context.Context, sctx sessionctx.Context, stmt *ast.AlterTableStmt) (err error)
- func (d SchemaTracker) BatchCreateTableWithInfo(ctx sessionctx.Context, schema model.CIStr, info []*model.TableInfo, ...) error
- func (SchemaTracker) CleanupTableLock(ctx sessionctx.Context, tables []*ast.TableName) error
- func (d SchemaTracker) CreateIndex(ctx sessionctx.Context, stmt *ast.CreateIndexStmt) error
- func (SchemaTracker) CreatePlacementPolicy(_ sessionctx.Context, _ *ast.CreatePlacementPolicyStmt) error
- func (d SchemaTracker) CreatePlacementPolicyWithInfo(ctx sessionctx.Context, policy *model.PolicyInfo, onExist ddl.OnExist) error
- func (d SchemaTracker) CreateSchema(ctx sessionctx.Context, stmt *ast.CreateDatabaseStmt) error
- func (d SchemaTracker) CreateSchemaWithInfo(ctx sessionctx.Context, dbInfo *model.DBInfo, onExist ddl.OnExist) error
- func (d SchemaTracker) CreateSequence(ctx sessionctx.Context, stmt *ast.CreateSequenceStmt) error
- func (d SchemaTracker) CreateTable(ctx sessionctx.Context, s *ast.CreateTableStmt) error
- func (d SchemaTracker) CreateTableWithInfo(ctx sessionctx.Context, dbName model.CIStr, info *model.TableInfo, ...) error
- func (d SchemaTracker) CreateTestDB()
- func (d SchemaTracker) CreateView(ctx sessionctx.Context, s *ast.CreateViewStmt) error
- func (SchemaTracker) DoDDLJob(ctx sessionctx.Context, job *model.Job) error
- func (d SchemaTracker) DropIndex(ctx sessionctx.Context, stmt *ast.DropIndexStmt) error
- func (SchemaTracker) DropPlacementPolicy(_ sessionctx.Context, _ *ast.DropPlacementPolicyStmt) error
- func (d SchemaTracker) DropSchema(ctx sessionctx.Context, stmt *ast.DropDatabaseStmt) error
- func (d SchemaTracker) DropSequence(ctx sessionctx.Context, stmt *ast.DropSequenceStmt) (err error)
- func (d SchemaTracker) DropTable(ctx sessionctx.Context, stmt *ast.DropTableStmt) (err error)
- func (d SchemaTracker) DropView(ctx sessionctx.Context, stmt *ast.DropTableStmt) (err error)
- func (d SchemaTracker) FlashbackCluster(ctx sessionctx.Context, flashbackTS uint64) (err error)
- func (d SchemaTracker) GetHook() ddl.Callback
- func (SchemaTracker) GetID() string
- func (SchemaTracker) GetInfoSchemaWithInterceptor(ctx sessionctx.Context) infoschema.InfoSchema
- func (d SchemaTracker) GetLease() time.Duration
- func (d SchemaTracker) GetScope(status string) variable.ScopeFlag
- func (SchemaTracker) GetTableMaxHandle(ctx *ddl.JobContext, startTS uint64, tbl table.PhysicalTable) (kv.Handle, bool, error)
- func (SchemaTracker) LockTables(ctx sessionctx.Context, stmt *ast.LockTablesStmt) error
- func (SchemaTracker) MoveJobFromQueue2Table(b bool) error
- func (SchemaTracker) MoveJobFromTable2Queue() error
- func (SchemaTracker) OwnerManager() owner.Manager
- func (d SchemaTracker) RecoverSchema(ctx sessionctx.Context, recoverSchemaInfo *ddl.RecoverSchemaInfo) (err error)
- func (d SchemaTracker) RecoverTable(ctx sessionctx.Context, recoverInfo *ddl.RecoverInfo) (err error)
- func (SchemaTracker) RegisterStatsHandle(handle *handle.Handle)
- func (d SchemaTracker) RenameTable(ctx sessionctx.Context, stmt *ast.RenameTableStmt) error
- func (d SchemaTracker) RepairTable(ctx sessionctx.Context, table *ast.TableName, createStmt *ast.CreateTableStmt) error
- func (SchemaTracker) SchemaSyncer() syncer.SchemaSyncer
- func (SchemaTracker) SetBinlogClient(client *pumpcli.PumpsClient)
- func (SchemaTracker) SetHook(h ddl.Callback)
- func (d SchemaTracker) Start(ctxPool *pools.ResourcePool) error
- func (d SchemaTracker) Stats(vars *variable.SessionVars) (map[string]interface{}, error)
- func (d SchemaTracker) Stop() error
- func (SchemaTracker) TruncateTable(ctx sessionctx.Context, tableIdent ast.Ident) error
- func (SchemaTracker) UnlockTables(ctx sessionctx.Context, lockedTables []model.TableLockTpInfo) error
- func (d SchemaTracker) UpdateTableReplicaInfo(ctx sessionctx.Context, physicalID int64, available bool) error
- type StorageDDLInjector
Constants ¶
This section is empty.
Variables ¶
var ( // ConstructResultOfShowCreateDatabase should be assigned to executor.ConstructResultOfShowCreateDatabase. // It is used to break cycle import. ConstructResultOfShowCreateDatabase func(sessionctx.Context, *model.DBInfo, bool, *bytes.Buffer) error // ConstructResultOfShowCreateTable should be assigned to executor.ConstructResultOfShowCreateTable. // It is used to break cycle import. ConstructResultOfShowCreateTable func(sessionctx.Context, *model.TableInfo, autoid.Allocators, *bytes.Buffer) error )
Functions ¶
func NewStorageDDLInjector ¶
NewStorageDDLInjector creates a new StorageDDLInjector to inject Checker.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker is used to check the result of SchemaTracker is same as real DDL.
func (Checker) AlterPlacementPolicy ¶
func (d Checker) AlterPlacementPolicy(ctx sessionctx.Context, stmt *ast.AlterPlacementPolicyStmt) error
AlterPlacementPolicy implements the DDL interface.
func (Checker) AlterSchema ¶
func (d Checker) AlterSchema(sctx sessionctx.Context, stmt *ast.AlterDatabaseStmt) error
AlterSchema implements the DDL interface.
func (Checker) AlterSequence ¶
func (d Checker) AlterSequence(ctx sessionctx.Context, stmt *ast.AlterSequenceStmt) error
AlterSequence implements the DDL interface.
func (Checker) AlterTable ¶
func (d Checker) AlterTable(ctx context.Context, sctx sessionctx.Context, stmt *ast.AlterTableStmt) error
AlterTable implements the DDL interface.
func (Checker) BatchCreateTableWithInfo ¶
func (d Checker) BatchCreateTableWithInfo(ctx sessionctx.Context, schema model.CIStr, info []*model.TableInfo, cs ...ddl.CreateTableWithInfoConfigurier) error
BatchCreateTableWithInfo implements the DDL interface.
func (Checker) CleanupTableLock ¶
CleanupTableLock implements the DDL interface.
func (Checker) CreateIndex ¶
func (d Checker) CreateIndex(ctx sessionctx.Context, stmt *ast.CreateIndexStmt) error
CreateIndex implements the DDL interface.
func (Checker) CreatePlacementPolicy ¶
func (d Checker) CreatePlacementPolicy(ctx sessionctx.Context, stmt *ast.CreatePlacementPolicyStmt) error
CreatePlacementPolicy implements the DDL interface.
func (Checker) CreatePlacementPolicyWithInfo ¶
func (d Checker) CreatePlacementPolicyWithInfo(ctx sessionctx.Context, policy *model.PolicyInfo, onExist ddl.OnExist) error
CreatePlacementPolicyWithInfo implements the DDL interface.
func (Checker) CreateSchema ¶
func (d Checker) CreateSchema(ctx sessionctx.Context, stmt *ast.CreateDatabaseStmt) error
CreateSchema implements the DDL interface.
func (Checker) CreateSchemaWithInfo ¶
func (d Checker) CreateSchemaWithInfo(ctx sessionctx.Context, info *model.DBInfo, onExist ddl.OnExist) error
CreateSchemaWithInfo implements the DDL interface.
func (Checker) CreateSequence ¶
func (d Checker) CreateSequence(ctx sessionctx.Context, stmt *ast.CreateSequenceStmt) error
CreateSequence implements the DDL interface.
func (Checker) CreateTable ¶
func (d Checker) CreateTable(ctx sessionctx.Context, stmt *ast.CreateTableStmt) error
CreateTable implements the DDL interface.
func (Checker) CreateTableWithInfo ¶
func (d Checker) CreateTableWithInfo(ctx sessionctx.Context, schema model.CIStr, info *model.TableInfo, cs ...ddl.CreateTableWithInfoConfigurier) error
CreateTableWithInfo implements the DDL interface.
func (Checker) CreateTestDB ¶
func (d Checker) CreateTestDB()
CreateTestDB creates a `test` database like the default behaviour of TiDB.
func (Checker) CreateView ¶
func (d Checker) CreateView(ctx sessionctx.Context, stmt *ast.CreateViewStmt) error
CreateView implements the DDL interface.
func (Checker) DropIndex ¶
func (d Checker) DropIndex(ctx sessionctx.Context, stmt *ast.DropIndexStmt) error
DropIndex implements the DDL interface.
func (Checker) DropPlacementPolicy ¶
func (d Checker) DropPlacementPolicy(ctx sessionctx.Context, stmt *ast.DropPlacementPolicyStmt) error
DropPlacementPolicy implements the DDL interface.
func (Checker) DropSchema ¶
func (d Checker) DropSchema(ctx sessionctx.Context, stmt *ast.DropDatabaseStmt) error
DropSchema implements the DDL interface.
func (Checker) DropSequence ¶
func (d Checker) DropSequence(ctx sessionctx.Context, stmt *ast.DropSequenceStmt) (err error)
DropSequence implements the DDL interface.
func (Checker) DropTable ¶
func (d Checker) DropTable(ctx sessionctx.Context, stmt *ast.DropTableStmt) (err error)
DropTable implements the DDL interface.
func (Checker) DropView ¶
func (d Checker) DropView(ctx sessionctx.Context, stmt *ast.DropTableStmt) (err error)
DropView implements the DDL interface.
func (Checker) FlashbackCluster ¶
func (d Checker) FlashbackCluster(ctx sessionctx.Context, flashbackTS uint64) (err error)
FlashbackCluster implements the DDL interface.
func (Checker) GetInfoSchemaWithInterceptor ¶
func (d Checker) GetInfoSchemaWithInterceptor(ctx sessionctx.Context) infoschema.InfoSchema
GetInfoSchemaWithInterceptor implements the DDL interface.
func (Checker) GetTableMaxHandle ¶
func (d Checker) GetTableMaxHandle(ctx *ddl.JobContext, startTS uint64, tbl table.PhysicalTable) (kv.Handle, bool, error)
GetTableMaxHandle implements the DDL interface.
func (Checker) LockTables ¶
func (d Checker) LockTables(ctx sessionctx.Context, stmt *ast.LockTablesStmt) error
LockTables implements the DDL interface.
func (Checker) MoveJobFromQueue2Table ¶
MoveJobFromQueue2Table implements the DDL interface.
func (Checker) MoveJobFromTable2Queue ¶
MoveJobFromTable2Queue implements the DDL interface.
func (Checker) OwnerManager ¶
OwnerManager implements the DDL interface.
func (Checker) RecoverSchema ¶
func (d Checker) RecoverSchema(ctx sessionctx.Context, recoverSchemaInfo *ddl.RecoverSchemaInfo) (err error)
RecoverSchema implements the DDL interface.
func (Checker) RecoverTable ¶
func (d Checker) RecoverTable(ctx sessionctx.Context, recoverInfo *ddl.RecoverInfo) (err error)
RecoverTable implements the DDL interface.
func (Checker) RegisterStatsHandle ¶
RegisterStatsHandle implements the DDL interface.
func (Checker) RenameTable ¶
func (d Checker) RenameTable(ctx sessionctx.Context, stmt *ast.RenameTableStmt) error
RenameTable implements the DDL interface.
func (Checker) RepairTable ¶
func (d Checker) RepairTable(ctx sessionctx.Context, table *ast.TableName, createStmt *ast.CreateTableStmt) error
RepairTable implements the DDL interface.
func (Checker) SchemaSyncer ¶
func (d Checker) SchemaSyncer() syncer.SchemaSyncer
SchemaSyncer implements the DDL interface.
func (Checker) SetBinlogClient ¶
func (d Checker) SetBinlogClient(client *pumpcli.PumpsClient)
SetBinlogClient implements the DDL interface.
func (Checker) Start ¶
func (d Checker) Start(ctxPool *pools.ResourcePool) error
Start implements the DDL interface.
func (Checker) Stats ¶
func (d Checker) Stats(vars *variable.SessionVars) (map[string]interface{}, error)
Stats implements the DDL interface.
func (Checker) TruncateTable ¶
TruncateTable implements the DDL interface.
func (Checker) UnlockTables ¶
func (d Checker) UnlockTables(ctx sessionctx.Context, lockedTables []model.TableLockTpInfo) error
UnlockTables implements the DDL interface.
func (Checker) UpdateTableReplicaInfo ¶
func (d Checker) UpdateTableReplicaInfo(ctx sessionctx.Context, physicalID int64, available bool) error
UpdateTableReplicaInfo implements the DDL interface.
type InfoStore ¶
type InfoStore struct {
// contains filtered or unexported fields
}
InfoStore is a simple structure that stores DBInfo and TableInfo. It's modifiable and not thread-safe.
func NewInfoStore ¶
NewInfoStore creates a InfoStore.
func (*InfoStore) AllSchemaNames ¶
AllSchemaNames returns all the schemas' names.
func (*InfoStore) AllTableNamesOfSchema ¶
AllTableNamesOfSchema return all table names of a schema.
func (*InfoStore) DeleteSchema ¶
DeleteSchema deletes the schema from InfoSchema. Returns true when the schema exists, false otherwise.
func (*InfoStore) DeleteTable ¶
DeleteTable deletes the TableInfo, it will return ErrDatabaseNotExists or ErrTableNotExists when schema or table does not exist.
func (*InfoStore) PutTable ¶
PutTable puts a TableInfo, it will overwrite the old one. If the schema doesn't exist, it will return ErrDatabaseNotExists.
func (*InfoStore) SchemaByName ¶
SchemaByName returns the DBInfo of given name. nil if not found.
func (*InfoStore) TableByName ¶
TableByName returns the TableInfo. It will also return the error like an infoschema.
type InfoStoreAdaptor ¶
type InfoStoreAdaptor struct { infoschema.InfoSchema // contains filtered or unexported fields }
InfoStoreAdaptor convert InfoStore to InfoSchema, it only implements a part of InfoSchema interface to be used by DDL interface. nolint:unused
func (InfoStoreAdaptor) SchemaByName ¶
SchemaByName implements the InfoSchema interface. nolint:unused
func (InfoStoreAdaptor) TableByName ¶
TableByName implements the InfoSchema interface. nolint:unused
func (InfoStoreAdaptor) TableExists ¶
func (i InfoStoreAdaptor) TableExists(schema, table model.CIStr) bool
TableExists implements the InfoSchema interface. nolint:unused
func (InfoStoreAdaptor) TableIsView ¶
func (i InfoStoreAdaptor) TableIsView(schema, table model.CIStr) bool
TableIsView implements the InfoSchema interface. nolint:unused
type SchemaTracker ¶
type SchemaTracker struct {
*InfoStore
}
SchemaTracker is used to track schema changes by DM. It implements DDL interface and by applying DDL, it updates the table structure to keep tracked with upstream changes. It embeds an InfoStore which stores DBInfo and TableInfo. The DBInfo and TableInfo can be treated as immutable, so after reading them by SchemaByName or TableByName, later modifications made by SchemaTracker will not change them. SchemaTracker is not thread-safe.
func NewSchemaTracker ¶
func NewSchemaTracker(lowerCaseTableNames int) SchemaTracker
NewSchemaTracker creates a SchemaTracker. lowerCaseTableNames has the same meaning as MySQL variable lower_case_table_names.
func (SchemaTracker) AlterPlacementPolicy ¶
func (SchemaTracker) AlterPlacementPolicy(ctx sessionctx.Context, stmt *ast.AlterPlacementPolicyStmt) error
AlterPlacementPolicy implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) AlterSchema ¶
func (d SchemaTracker) AlterSchema(ctx sessionctx.Context, stmt *ast.AlterDatabaseStmt) (err error)
AlterSchema implements the DDL interface.
func (SchemaTracker) AlterSequence ¶
func (SchemaTracker) AlterSequence(_ sessionctx.Context, _ *ast.AlterSequenceStmt) error
AlterSequence implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) AlterTable ¶
func (d SchemaTracker) AlterTable(ctx context.Context, sctx sessionctx.Context, stmt *ast.AlterTableStmt) (err error)
AlterTable implements the DDL interface.
func (SchemaTracker) BatchCreateTableWithInfo ¶
func (d SchemaTracker) BatchCreateTableWithInfo(ctx sessionctx.Context, schema model.CIStr, info []*model.TableInfo, cs ...ddl.CreateTableWithInfoConfigurier) error
BatchCreateTableWithInfo implements the DDL interface, it will call CreateTableWithInfo for each table.
func (SchemaTracker) CleanupTableLock ¶
func (SchemaTracker) CleanupTableLock(ctx sessionctx.Context, tables []*ast.TableName) error
CleanupTableLock implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) CreateIndex ¶
func (d SchemaTracker) CreateIndex(ctx sessionctx.Context, stmt *ast.CreateIndexStmt) error
CreateIndex implements the DDL interface.
func (SchemaTracker) CreatePlacementPolicy ¶
func (SchemaTracker) CreatePlacementPolicy(_ sessionctx.Context, _ *ast.CreatePlacementPolicyStmt) error
CreatePlacementPolicy implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) CreatePlacementPolicyWithInfo ¶
func (d SchemaTracker) CreatePlacementPolicyWithInfo(ctx sessionctx.Context, policy *model.PolicyInfo, onExist ddl.OnExist) error
CreatePlacementPolicyWithInfo implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) CreateSchema ¶
func (d SchemaTracker) CreateSchema(ctx sessionctx.Context, stmt *ast.CreateDatabaseStmt) error
CreateSchema implements the DDL interface.
func (SchemaTracker) CreateSchemaWithInfo ¶
func (d SchemaTracker) CreateSchemaWithInfo(ctx sessionctx.Context, dbInfo *model.DBInfo, onExist ddl.OnExist) error
CreateSchemaWithInfo implements the DDL interface.
func (SchemaTracker) CreateSequence ¶
func (d SchemaTracker) CreateSequence(ctx sessionctx.Context, stmt *ast.CreateSequenceStmt) error
CreateSequence implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) CreateTable ¶
func (d SchemaTracker) CreateTable(ctx sessionctx.Context, s *ast.CreateTableStmt) error
CreateTable implements the DDL interface.
func (SchemaTracker) CreateTableWithInfo ¶
func (d SchemaTracker) CreateTableWithInfo( ctx sessionctx.Context, dbName model.CIStr, info *model.TableInfo, cs ...ddl.CreateTableWithInfoConfigurier, ) error
CreateTableWithInfo implements the DDL interface.
func (SchemaTracker) CreateTestDB ¶
func (d SchemaTracker) CreateTestDB()
CreateTestDB creates the `test` database, which is the default behavior of TiDB.
func (SchemaTracker) CreateView ¶
func (d SchemaTracker) CreateView(ctx sessionctx.Context, s *ast.CreateViewStmt) error
CreateView implements the DDL interface.
func (SchemaTracker) DoDDLJob ¶
func (SchemaTracker) DoDDLJob(ctx sessionctx.Context, job *model.Job) error
DoDDLJob implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) DropIndex ¶
func (d SchemaTracker) DropIndex(ctx sessionctx.Context, stmt *ast.DropIndexStmt) error
DropIndex implements the DDL interface.
func (SchemaTracker) DropPlacementPolicy ¶
func (SchemaTracker) DropPlacementPolicy(_ sessionctx.Context, _ *ast.DropPlacementPolicyStmt) error
DropPlacementPolicy implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) DropSchema ¶
func (d SchemaTracker) DropSchema(ctx sessionctx.Context, stmt *ast.DropDatabaseStmt) error
DropSchema implements the DDL interface.
func (SchemaTracker) DropSequence ¶
func (d SchemaTracker) DropSequence(ctx sessionctx.Context, stmt *ast.DropSequenceStmt) (err error)
DropSequence implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) DropTable ¶
func (d SchemaTracker) DropTable(ctx sessionctx.Context, stmt *ast.DropTableStmt) (err error)
DropTable implements the DDL interface.
func (SchemaTracker) DropView ¶
func (d SchemaTracker) DropView(ctx sessionctx.Context, stmt *ast.DropTableStmt) (err error)
DropView implements the DDL interface.
func (SchemaTracker) FlashbackCluster ¶
func (d SchemaTracker) FlashbackCluster(ctx sessionctx.Context, flashbackTS uint64) (err error)
FlashbackCluster implements the DDL interface, which is no-op in DM's case.
func (SchemaTracker) GetHook ¶
func (d SchemaTracker) GetHook() ddl.Callback
GetHook implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) GetID ¶
func (SchemaTracker) GetID() string
GetID implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) GetInfoSchemaWithInterceptor ¶
func (SchemaTracker) GetInfoSchemaWithInterceptor(ctx sessionctx.Context) infoschema.InfoSchema
GetInfoSchemaWithInterceptor implements the DDL interface.
func (SchemaTracker) GetLease ¶
func (d SchemaTracker) GetLease() time.Duration
GetLease implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) GetScope ¶
func (d SchemaTracker) GetScope(status string) variable.ScopeFlag
GetScope implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) GetTableMaxHandle ¶
func (SchemaTracker) GetTableMaxHandle(ctx *ddl.JobContext, startTS uint64, tbl table.PhysicalTable) (kv.Handle, bool, error)
GetTableMaxHandle implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) LockTables ¶
func (SchemaTracker) LockTables(ctx sessionctx.Context, stmt *ast.LockTablesStmt) error
LockTables implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) MoveJobFromQueue2Table ¶
func (SchemaTracker) MoveJobFromQueue2Table(b bool) error
MoveJobFromQueue2Table implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) MoveJobFromTable2Queue ¶
func (SchemaTracker) MoveJobFromTable2Queue() error
MoveJobFromTable2Queue implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) OwnerManager ¶
func (SchemaTracker) OwnerManager() owner.Manager
OwnerManager implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) RecoverSchema ¶
func (d SchemaTracker) RecoverSchema(ctx sessionctx.Context, recoverSchemaInfo *ddl.RecoverSchemaInfo) (err error)
RecoverSchema implements the DDL interface, which is no-op in DM's case.
func (SchemaTracker) RecoverTable ¶
func (d SchemaTracker) RecoverTable(ctx sessionctx.Context, recoverInfo *ddl.RecoverInfo) (err error)
RecoverTable implements the DDL interface, which is no-op in DM's case.
func (SchemaTracker) RegisterStatsHandle ¶
func (SchemaTracker) RegisterStatsHandle(handle *handle.Handle)
RegisterStatsHandle implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) RenameTable ¶
func (d SchemaTracker) RenameTable(ctx sessionctx.Context, stmt *ast.RenameTableStmt) error
RenameTable implements the DDL interface.
func (SchemaTracker) RepairTable ¶
func (d SchemaTracker) RepairTable(ctx sessionctx.Context, table *ast.TableName, createStmt *ast.CreateTableStmt) error
RepairTable implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) SchemaSyncer ¶
func (SchemaTracker) SchemaSyncer() syncer.SchemaSyncer
SchemaSyncer implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) SetBinlogClient ¶
func (SchemaTracker) SetBinlogClient(client *pumpcli.PumpsClient)
SetBinlogClient implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) SetHook ¶
func (SchemaTracker) SetHook(h ddl.Callback)
SetHook implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) Start ¶
func (d SchemaTracker) Start(ctxPool *pools.ResourcePool) error
Start implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) Stats ¶
func (d SchemaTracker) Stats(vars *variable.SessionVars) (map[string]interface{}, error)
Stats implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) Stop ¶
func (d SchemaTracker) Stop() error
Stop implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) TruncateTable ¶
func (SchemaTracker) TruncateTable(ctx sessionctx.Context, tableIdent ast.Ident) error
TruncateTable implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) UnlockTables ¶
func (SchemaTracker) UnlockTables(ctx sessionctx.Context, lockedTables []model.TableLockTpInfo) error
UnlockTables implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) UpdateTableReplicaInfo ¶
func (d SchemaTracker) UpdateTableReplicaInfo(ctx sessionctx.Context, physicalID int64, available bool) error
UpdateTableReplicaInfo implements the DDL interface, it's no-op in DM's case.
type StorageDDLInjector ¶
StorageDDLInjector wraps kv.Storage to inject checker to domain's DDL in bootstrap time.
func (StorageDDLInjector) EtcdAddrs ¶
func (s StorageDDLInjector) EtcdAddrs() ([]string, error)
EtcdAddrs implements the kv.EtcdBackend interface.
func (StorageDDLInjector) StartGCWorker ¶
func (s StorageDDLInjector) StartGCWorker() error
StartGCWorker implements the kv.EtcdBackend interface.
func (StorageDDLInjector) TLSConfig ¶
func (s StorageDDLInjector) TLSConfig() *tls.Config
TLSConfig implements the kv.EtcdBackend interface.