Documentation ¶
Index ¶
- Variables
- func NewStorageDDLInjector(s kv.Storage) kv.Storage
- func UnwrapStorage(s kv.Storage) kv.Storage
- type Checker
- func (*Checker) AddResourceGroup(_ sessionctx.Context, _ *ast.CreateResourceGroupStmt) error
- func (*Checker) AlterPlacementPolicy(_ sessionctx.Context, _ *ast.AlterPlacementPolicyStmt) error
- func (*Checker) AlterResourceGroup(_ sessionctx.Context, _ *ast.AlterResourceGroupStmt) error
- func (d *Checker) AlterSchema(sctx sessionctx.Context, stmt *ast.AlterDatabaseStmt) error
- func (*Checker) AlterSequence(_ sessionctx.Context, _ *ast.AlterSequenceStmt) error
- func (d *Checker) AlterTable(ctx context.Context, sctx sessionctx.Context, stmt *ast.AlterTableStmt) error
- func (*Checker) BatchCreateTableWithInfo(_ sessionctx.Context, _ model.CIStr, _ []*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 (*Checker) CreatePlacementPolicy(_ sessionctx.Context, _ *ast.CreatePlacementPolicyStmt) error
- func (*Checker) CreatePlacementPolicyWithInfo(_ sessionctx.Context, _ *model.PolicyInfo, _ 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 (*Checker) CreateSequence(_ sessionctx.Context, _ *ast.CreateSequenceStmt) error
- func (d *Checker) CreateTable(ctx sessionctx.Context, stmt *ast.CreateTableStmt) error
- func (*Checker) CreateTableWithInfo(_ sessionctx.Context, _ model.CIStr, _ *model.TableInfo, ...) error
- func (d *Checker) CreateTestDB(ctx sessionctx.Context)
- 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 (*Checker) DropPlacementPolicy(_ sessionctx.Context, _ *ast.DropPlacementPolicyStmt) error
- func (*Checker) DropResourceGroup(_ sessionctx.Context, _ *ast.DropResourceGroupStmt) error
- func (d *Checker) DropSchema(ctx sessionctx.Context, stmt *ast.DropDatabaseStmt) error
- func (*Checker) DropSequence(_ sessionctx.Context, _ *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 (*Checker) FlashbackCluster(_ sessionctx.Context, _ 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) OwnerManager() owner.Manager
- func (*Checker) RecoverSchema(_ sessionctx.Context, _ *ddl.RecoverSchemaInfo) (err error)
- func (*Checker) RecoverTable(_ sessionctx.Context, _ *ddl.RecoverInfo) (err error)
- func (d *Checker) RegisterStatsHandle(h *handle.Handle)
- func (d *Checker) RenameTable(ctx sessionctx.Context, stmt *ast.RenameTableStmt) error
- func (*Checker) RepairTable(_ sessionctx.Context, _ *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) StateSyncer() syncer.StateSyncer
- func (d *Checker) Stats(vars *variable.SessionVars) (map[string]interface{}, error)
- func (d *Checker) Stop() error
- func (*Checker) TruncateTable(_ sessionctx.Context, _ ast.Ident) error
- func (d *Checker) UnlockTables(ctx sessionctx.Context, lockedTables []model.TableLockTpInfo) error
- func (*Checker) UpdateTableReplicaInfo(_ sessionctx.Context, _ int64, _ 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) AddResourceGroup(_ sessionctx.Context, _ *ast.CreateResourceGroupStmt) error
- func (SchemaTracker) AlterPlacementPolicy(_ sessionctx.Context, _ *ast.AlterPlacementPolicyStmt) error
- func (SchemaTracker) AlterResourceGroup(_ sessionctx.Context, _ *ast.AlterResourceGroupStmt) 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(_ sessionctx.Context, _ []*ast.TableName) error
- func (d SchemaTracker) CreateIndex(ctx sessionctx.Context, stmt *ast.CreateIndexStmt) error
- func (SchemaTracker) CreatePlacementPolicy(_ sessionctx.Context, _ *ast.CreatePlacementPolicyStmt) error
- func (SchemaTracker) CreatePlacementPolicyWithInfo(_ sessionctx.Context, _ *model.PolicyInfo, _ ddl.OnExist) error
- func (d SchemaTracker) CreateSchema(ctx sessionctx.Context, stmt *ast.CreateDatabaseStmt) error
- func (d SchemaTracker) CreateSchemaWithInfo(_ sessionctx.Context, dbInfo *model.DBInfo, onExist ddl.OnExist) error
- func (SchemaTracker) CreateSequence(_ sessionctx.Context, _ *ast.CreateSequenceStmt) error
- func (d SchemaTracker) CreateTable(ctx sessionctx.Context, s *ast.CreateTableStmt) error
- func (d SchemaTracker) CreateTableWithInfo(_ sessionctx.Context, dbName model.CIStr, info *model.TableInfo, ...) error
- func (d SchemaTracker) CreateTestDB(ctx sessionctx.Context)
- func (d SchemaTracker) CreateView(ctx sessionctx.Context, s *ast.CreateViewStmt) error
- func (SchemaTracker) DoDDLJob(_ sessionctx.Context, _ *model.Job) error
- func (d SchemaTracker) DropIndex(ctx sessionctx.Context, stmt *ast.DropIndexStmt) error
- func (SchemaTracker) DropPlacementPolicy(_ sessionctx.Context, _ *ast.DropPlacementPolicyStmt) error
- func (SchemaTracker) DropResourceGroup(_ sessionctx.Context, _ *ast.DropResourceGroupStmt) error
- func (d SchemaTracker) DropSchema(_ sessionctx.Context, stmt *ast.DropDatabaseStmt) error
- func (SchemaTracker) DropSequence(_ sessionctx.Context, _ *ast.DropSequenceStmt) (err error)
- func (d SchemaTracker) DropTable(_ sessionctx.Context, stmt *ast.DropTableStmt) (err error)
- func (d SchemaTracker) DropView(_ sessionctx.Context, stmt *ast.DropTableStmt) (err error)
- func (SchemaTracker) FlashbackCluster(_ sessionctx.Context, _ uint64) (err error)
- func (SchemaTracker) GetHook() ddl.Callback
- func (SchemaTracker) GetID() string
- func (SchemaTracker) GetInfoSchemaWithInterceptor(_ sessionctx.Context) infoschema.InfoSchema
- func (SchemaTracker) GetLease() time.Duration
- func (SchemaTracker) GetScope(_ string) variable.ScopeFlag
- func (SchemaTracker) GetTableMaxHandle(_ *ddl.JobContext, _ uint64, _ table.PhysicalTable) (kv.Handle, bool, error)
- func (SchemaTracker) LockTables(_ sessionctx.Context, _ *ast.LockTablesStmt) error
- func (SchemaTracker) OwnerManager() owner.Manager
- func (SchemaTracker) RecoverSchema(_ sessionctx.Context, _ *ddl.RecoverSchemaInfo) (err error)
- func (SchemaTracker) RecoverTable(_ sessionctx.Context, _ *ddl.RecoverInfo) (err error)
- func (SchemaTracker) RegisterStatsHandle(_ *handle.Handle)
- func (d SchemaTracker) RenameTable(ctx sessionctx.Context, stmt *ast.RenameTableStmt) error
- func (SchemaTracker) RepairTable(_ sessionctx.Context, _ *ast.CreateTableStmt) error
- func (SchemaTracker) SchemaSyncer() syncer.SchemaSyncer
- func (SchemaTracker) SetBinlogClient(_ *pumpcli.PumpsClient)
- func (SchemaTracker) SetHook(_ ddl.Callback)
- func (SchemaTracker) Start(_ *pools.ResourcePool) error
- func (SchemaTracker) StateSyncer() syncer.StateSyncer
- func (SchemaTracker) Stats(_ *variable.SessionVars) (map[string]interface{}, error)
- func (SchemaTracker) Stop() error
- func (SchemaTracker) TruncateTable(_ sessionctx.Context, _ ast.Ident) error
- func (SchemaTracker) UnlockTables(_ sessionctx.Context, _ []model.TableLockTpInfo) error
- func (SchemaTracker) UpdateTableReplicaInfo(_ sessionctx.Context, _ int64, _ 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) AddResourceGroup ¶
func (*Checker) AddResourceGroup(_ sessionctx.Context, _ *ast.CreateResourceGroupStmt) error
AddResourceGroup implements the DDL interface. ResourceGroup do not affect the transaction.
func (*Checker) AlterPlacementPolicy ¶
func (*Checker) AlterPlacementPolicy(_ sessionctx.Context, _ *ast.AlterPlacementPolicyStmt) error
AlterPlacementPolicy implements the DDL interface.
func (*Checker) AlterResourceGroup ¶
func (*Checker) AlterResourceGroup(_ sessionctx.Context, _ *ast.AlterResourceGroupStmt) error
AlterResourceGroup 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 (*Checker) AlterSequence(_ sessionctx.Context, _ *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 (*Checker) BatchCreateTableWithInfo(_ sessionctx.Context, _ model.CIStr, _ []*model.TableInfo, _ ...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 (*Checker) CreatePlacementPolicy(_ sessionctx.Context, _ *ast.CreatePlacementPolicyStmt) error
CreatePlacementPolicy implements the DDL interface.
func (*Checker) CreatePlacementPolicyWithInfo ¶
func (*Checker) CreatePlacementPolicyWithInfo(_ sessionctx.Context, _ *model.PolicyInfo, _ 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 (*Checker) CreateSequence(_ sessionctx.Context, _ *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 (*Checker) CreateTableWithInfo(_ sessionctx.Context, _ model.CIStr, _ *model.TableInfo, _ ...ddl.CreateTableWithInfoConfigurier) error
CreateTableWithInfo implements the DDL interface.
func (*Checker) CreateTestDB ¶
func (d *Checker) CreateTestDB(ctx sessionctx.Context)
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 (*Checker) DropPlacementPolicy(_ sessionctx.Context, _ *ast.DropPlacementPolicyStmt) error
DropPlacementPolicy implements the DDL interface.
func (*Checker) DropResourceGroup ¶
func (*Checker) DropResourceGroup(_ sessionctx.Context, _ *ast.DropResourceGroupStmt) error
DropResourceGroup 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 (*Checker) DropSequence(_ sessionctx.Context, _ *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 (*Checker) FlashbackCluster(_ sessionctx.Context, _ 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) OwnerManager ¶
OwnerManager implements the DDL interface.
func (*Checker) RecoverSchema ¶
func (*Checker) RecoverSchema(_ sessionctx.Context, _ *ddl.RecoverSchemaInfo) (err error)
RecoverSchema implements the DDL interface.
func (*Checker) RecoverTable ¶
func (*Checker) RecoverTable(_ sessionctx.Context, _ *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 (*Checker) RepairTable(_ sessionctx.Context, _ *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) StateSyncer ¶
func (d *Checker) StateSyncer() syncer.StateSyncer
StateSyncer 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 ¶
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) AddResourceGroup ¶
func (SchemaTracker) AddResourceGroup(_ sessionctx.Context, _ *ast.CreateResourceGroupStmt) error
AddResourceGroup implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) AlterPlacementPolicy ¶
func (SchemaTracker) AlterPlacementPolicy(_ sessionctx.Context, _ *ast.AlterPlacementPolicyStmt) error
AlterPlacementPolicy implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) AlterResourceGroup ¶
func (SchemaTracker) AlterResourceGroup(_ sessionctx.Context, _ *ast.AlterResourceGroupStmt) error
AlterResourceGroup 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(_ sessionctx.Context, _ []*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 (SchemaTracker) CreatePlacementPolicyWithInfo(_ sessionctx.Context, _ *model.PolicyInfo, _ 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(_ sessionctx.Context, dbInfo *model.DBInfo, onExist ddl.OnExist) error
CreateSchemaWithInfo implements the DDL interface.
func (SchemaTracker) CreateSequence ¶
func (SchemaTracker) CreateSequence(_ sessionctx.Context, _ *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( _ sessionctx.Context, dbName model.CIStr, info *model.TableInfo, cs ...ddl.CreateTableWithInfoConfigurier, ) error
CreateTableWithInfo implements the DDL interface.
func (SchemaTracker) CreateTestDB ¶
func (d SchemaTracker) CreateTestDB(ctx sessionctx.Context)
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(_ sessionctx.Context, _ *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) DropResourceGroup ¶
func (SchemaTracker) DropResourceGroup(_ sessionctx.Context, _ *ast.DropResourceGroupStmt) error
DropResourceGroup implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) DropSchema ¶
func (d SchemaTracker) DropSchema(_ sessionctx.Context, stmt *ast.DropDatabaseStmt) error
DropSchema implements the DDL interface.
func (SchemaTracker) DropSequence ¶
func (SchemaTracker) DropSequence(_ sessionctx.Context, _ *ast.DropSequenceStmt) (err error)
DropSequence implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) DropTable ¶
func (d SchemaTracker) DropTable(_ sessionctx.Context, stmt *ast.DropTableStmt) (err error)
DropTable implements the DDL interface.
func (SchemaTracker) DropView ¶
func (d SchemaTracker) DropView(_ sessionctx.Context, stmt *ast.DropTableStmt) (err error)
DropView implements the DDL interface.
func (SchemaTracker) FlashbackCluster ¶
func (SchemaTracker) FlashbackCluster(_ sessionctx.Context, _ uint64) (err error)
FlashbackCluster implements the DDL interface, which is no-op in DM's case.
func (SchemaTracker) GetHook ¶
func (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(_ sessionctx.Context) infoschema.InfoSchema
GetInfoSchemaWithInterceptor implements the DDL interface.
func (SchemaTracker) GetLease ¶
func (SchemaTracker) GetLease() time.Duration
GetLease implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) GetScope ¶
func (SchemaTracker) GetScope(_ string) variable.ScopeFlag
GetScope implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) GetTableMaxHandle ¶
func (SchemaTracker) GetTableMaxHandle(_ *ddl.JobContext, _ uint64, _ 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(_ sessionctx.Context, _ *ast.LockTablesStmt) error
LockTables 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 (SchemaTracker) RecoverSchema(_ sessionctx.Context, _ *ddl.RecoverSchemaInfo) (err error)
RecoverSchema implements the DDL interface, which is no-op in DM's case.
func (SchemaTracker) RecoverTable ¶
func (SchemaTracker) RecoverTable(_ sessionctx.Context, _ *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)
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 (SchemaTracker) RepairTable(_ sessionctx.Context, _ *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(_ *pumpcli.PumpsClient)
SetBinlogClient implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) SetHook ¶
func (SchemaTracker) SetHook(_ ddl.Callback)
SetHook implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) Start ¶
func (SchemaTracker) Start(_ *pools.ResourcePool) error
Start implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) StateSyncer ¶
func (SchemaTracker) StateSyncer() syncer.StateSyncer
StateSyncer implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) Stats ¶
func (SchemaTracker) Stats(_ *variable.SessionVars) (map[string]interface{}, error)
Stats implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) Stop ¶
func (SchemaTracker) Stop() error
Stop implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) TruncateTable ¶
func (SchemaTracker) TruncateTable(_ sessionctx.Context, _ ast.Ident) error
TruncateTable implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) UnlockTables ¶
func (SchemaTracker) UnlockTables(_ sessionctx.Context, _ []model.TableLockTpInfo) error
UnlockTables implements the DDL interface, it's no-op in DM's case.
func (SchemaTracker) UpdateTableReplicaInfo ¶
func (SchemaTracker) UpdateTableReplicaInfo(_ sessionctx.Context, _ int64, _ 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.