diff --git a/_utils/terror_gen/errors_release.txt b/_utils/terror_gen/errors_release.txt index f4ffe7bf1d..2776ed8075 100644 --- a/_utils/terror_gen/errors_release.txt +++ b/_utils/terror_gen/errors_release.txt @@ -273,14 +273,14 @@ ErrSyncerUnitOnlineDDLSchemeNotSupport,[code=36040:class=sync-unit:scope=interna ErrSyncerUnitOnlineDDLOnMultipleTable,[code=36041:class=sync-unit:scope=internal:level=high],"online ddl changes on multiple table: %s not supported" ErrSyncerUnitGhostApplyEmptyTable,[code=36042:class=sync-unit:scope=internal:level=high],"empty tables not valid" ErrSyncerUnitGhostRenameTableNotValid,[code=36043:class=sync-unit:scope=internal:level=high],"tables should contain old and new table name" -ErrSyncerUnitGhostRenameToGhostTable,[code=36044:class=sync-unit:scope=internal:level=high],"rename table to ghost table %s not supported" -ErrSyncerUnitGhostRenameGhostTblToOther,[code=36045:class=sync-unit:scope=internal:level=high],"rename ghost table to other ghost table %s not supported" -ErrSyncerUnitGhostOnlineDDLOnGhostTbl,[code=36046:class=sync-unit:scope=internal:level=high],"online ddls on ghost table `%s`.`%s`" +ErrSyncerUnitGhostRenameToGhostTable,[code=36044:class=sync-unit:scope=internal:level=high],"rename table to gh-ost temporary table %s not supported" +ErrSyncerUnitGhostRenameGhostTblToOther,[code=36045:class=sync-unit:scope=internal:level=high],"rename gh-ost temporary table to other temporary table %s not supported" +ErrSyncerUnitGhostOnlineDDLOnGhostTbl,[code=36046:class=sync-unit:scope=internal:level=high],"online ddl metadata for ghost temporary table `%s`.`%s` not found" ErrSyncerUnitPTApplyEmptyTable,[code=36047:class=sync-unit:scope=internal:level=high],"empty tables not valid" ErrSyncerUnitPTRenameTableNotValid,[code=36048:class=sync-unit:scope=internal:level=high],"tables should contain old and new table name" -ErrSyncerUnitPTRenameToGhostTable,[code=36049:class=sync-unit:scope=internal:level=high],"rename table to ghost table %s not supported" -ErrSyncerUnitPTRenameGhostTblToOther,[code=36050:class=sync-unit:scope=internal:level=high],"rename ghost table to other ghost table %s not supported" -ErrSyncerUnitPTOnlineDDLOnGhostTbl,[code=36051:class=sync-unit:scope=internal:level=high],"online ddls on ghost table `%s`.`%s`" +ErrSyncerUnitPTRenameToPTTable,[code=36049:class=sync-unit:scope=internal:level=high],"rename table to pt temporary table %s not supported" +ErrSyncerUnitPTRenamePTTblToOther,[code=36050:class=sync-unit:scope=internal:level=high],"rename pt temporary table to other temporary table %s not supported" +ErrSyncerUnitPTOnlineDDLOnPTTbl,[code=36051:class=sync-unit:scope=internal:level=high],"online ddl metadata for pt temporary table `%s`.`%s` not found" ErrSyncerUnitRemoteSteamerWithGTID,[code=36052:class=sync-unit:scope=internal:level=high],"open remote streamer with GTID mode not supported" ErrSyncerUnitRemoteSteamerStartSync,[code=36053:class=sync-unit:scope=internal:level=high],"start syncing binlog from remote streamer" ErrSyncerUnitGetTableFromDB,[code=36054:class=sync-unit:scope=internal:level=high],"invalid table `%s`.`%s`" diff --git a/errors.toml b/errors.toml index 533b3007a3..75f3a12c7c 100644 --- a/errors.toml +++ b/errors.toml @@ -1649,19 +1649,19 @@ workaround = "" tags = ["internal", "high"] [error.DM-sync-unit-36044] -message = "rename table to ghost table %s not supported" +message = "rename table to gh-ost temporary table %s not supported" description = "" workaround = "" tags = ["internal", "high"] [error.DM-sync-unit-36045] -message = "rename ghost table to other ghost table %s not supported" +message = "rename gh-ost temporary table to other temporary table %s not supported" description = "" workaround = "" tags = ["internal", "high"] [error.DM-sync-unit-36046] -message = "online ddls on ghost table `%s`.`%s`" +message = "online ddl metadata for ghost temporary table `%s`.`%s` not found" description = "" workaround = "" tags = ["internal", "high"] @@ -1679,19 +1679,19 @@ workaround = "" tags = ["internal", "high"] [error.DM-sync-unit-36049] -message = "rename table to ghost table %s not supported" +message = "rename table to pt temporary table %s not supported" description = "" workaround = "" tags = ["internal", "high"] [error.DM-sync-unit-36050] -message = "rename ghost table to other ghost table %s not supported" +message = "rename pt temporary table to other temporary table %s not supported" description = "" workaround = "" tags = ["internal", "high"] [error.DM-sync-unit-36051] -message = "online ddls on ghost table `%s`.`%s`" +message = "online ddl metadata for pt temporary table `%s`.`%s` not found" description = "" workaround = "" tags = ["internal", "high"] diff --git a/pkg/terror/error_list.go b/pkg/terror/error_list.go index d323037228..aa9a373ddd 100644 --- a/pkg/terror/error_list.go +++ b/pkg/terror/error_list.go @@ -351,9 +351,9 @@ const ( codeSyncerUnitGhostOnlineDDLOnGhostTbl codeSyncerUnitPTApplyEmptyTable codeSyncerUnitPTRenameTableNotValid - codeSyncerUnitPTRenameToGhostTable - codeSyncerUnitPTRenameGhostTblToOther - codeSyncerUnitPTOnlineDDLOnGhostTbl + codeSyncerUnitPTRenameToPTTable + codeSyncerUnitPTRenamePTTblToOther + codeSyncerUnitPTOnlineDDLOnPTTbl codeSyncerUnitRemoteSteamerWithGTID codeSyncerUnitRemoteSteamerStartSync codeSyncerUnitGetTableFromDB @@ -862,14 +862,14 @@ var ( ErrSyncerUnitOnlineDDLOnMultipleTable = New(codeSyncerUnitOnlineDDLOnMultipleTable, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddl changes on multiple table: %s not supported") ErrSyncerUnitGhostApplyEmptyTable = New(codeSyncerUnitGhostApplyEmptyTable, ClassSyncUnit, ScopeInternal, LevelHigh, "empty tables not valid") ErrSyncerUnitGhostRenameTableNotValid = New(codeSyncerUnitGhostRenameTableNotValid, ClassSyncUnit, ScopeInternal, LevelHigh, "tables should contain old and new table name") - ErrSyncerUnitGhostRenameToGhostTable = New(codeSyncerUnitGhostRenameToGhostTable, ClassSyncUnit, ScopeInternal, LevelHigh, "rename table to ghost table %s not supported") - ErrSyncerUnitGhostRenameGhostTblToOther = New(codeSyncerUnitGhostRenameGhostTblToOther, ClassSyncUnit, ScopeInternal, LevelHigh, "rename ghost table to other ghost table %s not supported") - ErrSyncerUnitGhostOnlineDDLOnGhostTbl = New(codeSyncerUnitGhostOnlineDDLOnGhostTbl, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddls on ghost table `%s`.`%s`") + ErrSyncerUnitGhostRenameToGhostTable = New(codeSyncerUnitGhostRenameToGhostTable, ClassSyncUnit, ScopeInternal, LevelHigh, "rename table to gh-ost temporary table %s not supported") + ErrSyncerUnitGhostRenameGhostTblToOther = New(codeSyncerUnitGhostRenameGhostTblToOther, ClassSyncUnit, ScopeInternal, LevelHigh, "rename gh-ost temporary table to other temporary table %s not supported") + ErrSyncerUnitGhostOnlineDDLOnGhostTbl = New(codeSyncerUnitGhostOnlineDDLOnGhostTbl, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddl metadata for ghost temporary table `%s`.`%s` not found") ErrSyncerUnitPTApplyEmptyTable = New(codeSyncerUnitPTApplyEmptyTable, ClassSyncUnit, ScopeInternal, LevelHigh, "empty tables not valid") ErrSyncerUnitPTRenameTableNotValid = New(codeSyncerUnitPTRenameTableNotValid, ClassSyncUnit, ScopeInternal, LevelHigh, "tables should contain old and new table name") - ErrSyncerUnitPTRenameToGhostTable = New(codeSyncerUnitPTRenameToGhostTable, ClassSyncUnit, ScopeInternal, LevelHigh, "rename table to ghost table %s not supported") - ErrSyncerUnitPTRenameGhostTblToOther = New(codeSyncerUnitPTRenameGhostTblToOther, ClassSyncUnit, ScopeInternal, LevelHigh, "rename ghost table to other ghost table %s not supported") - ErrSyncerUnitPTOnlineDDLOnGhostTbl = New(codeSyncerUnitPTOnlineDDLOnGhostTbl, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddls on ghost table `%s`.`%s`") + ErrSyncerUnitPTRenameToPTTable = New(codeSyncerUnitPTRenameToPTTable, ClassSyncUnit, ScopeInternal, LevelHigh, "rename table to pt temporary table %s not supported") + ErrSyncerUnitPTRenamePTTblToOther = New(codeSyncerUnitPTRenamePTTblToOther, ClassSyncUnit, ScopeInternal, LevelHigh, "rename pt temporary table to other temporary table %s not supported") + ErrSyncerUnitPTOnlineDDLOnPTTbl = New(codeSyncerUnitPTOnlineDDLOnPTTbl, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddl metadata for pt temporary table `%s`.`%s` not found") ErrSyncerUnitRemoteSteamerWithGTID = New(codeSyncerUnitRemoteSteamerWithGTID, ClassSyncUnit, ScopeInternal, LevelHigh, "open remote streamer with GTID mode not supported") ErrSyncerUnitRemoteSteamerStartSync = New(codeSyncerUnitRemoteSteamerStartSync, ClassSyncUnit, ScopeInternal, LevelHigh, "start syncing binlog from remote streamer") ErrSyncerUnitGetTableFromDB = New(codeSyncerUnitGetTableFromDB, ClassSyncUnit, ScopeInternal, LevelHigh, "invalid table `%s`.`%s`") diff --git a/syncer/pt_osc.go b/syncer/pt_osc.go index 2843a7e680..4b39fd9d72 100644 --- a/syncer/pt_osc.go +++ b/syncer/pt_osc.go @@ -65,7 +65,7 @@ func (p *PT) Apply(tctx *tcontext.Context, tables []*filter.Table, statement str if tp1 == trashTable { return nil, "", "", nil } else if tp1 == ghostTable { - return nil, "", "", terror.ErrSyncerUnitPTRenameToGhostTable.Generate(statement) + return nil, "", "", terror.ErrSyncerUnitPTRenameToPTTable.Generate(statement) } } return []string{statement}, schema, table, nil @@ -79,7 +79,7 @@ func (p *PT) Apply(tctx *tcontext.Context, tables []*filter.Table, statement str tp1 := p.TableType(tables[1].Name) if tp1 == ghostTable { - return nil, "", "", terror.ErrSyncerUnitPTRenameGhostTblToOther.Generate(statement) + return nil, "", "", terror.ErrSyncerUnitPTRenamePTTblToOther.Generate(statement) } } case ghostTable: @@ -106,9 +106,9 @@ func (p *PT) Apply(tctx *tcontext.Context, tables []*filter.Table, statement str if ghostInfo != nil { return ghostInfo.DDLs, tables[1].Schema, tables[1].Name, nil } - return nil, "", "", terror.ErrSyncerUnitPTOnlineDDLOnGhostTbl.Generate(schema, table) + return nil, "", "", terror.ErrSyncerUnitPTOnlineDDLOnPTTbl.Generate(schema, table) } else if tp1 == ghostTable { - return nil, "", "", terror.ErrSyncerUnitPTRenameGhostTblToOther.Generate(statement) + return nil, "", "", terror.ErrSyncerUnitPTRenamePTTblToOther.Generate(statement) } // rename ghost table to trash table