If the original table is MyISAM and the default engine is Innodb, and the gtid mode is on, there will be error when execute 'LOCK TABLES tbl WRITE, tbl_magic WRITE'. If make the magic cut-over table's engine same with the original table, there will not have this problem.

This commit is contained in:
rj03hou 2016-12-01 16:04:04 +08:00
parent d5e78e4b58
commit a11bec1785

View File

@ -701,8 +701,9 @@ func (this *Applier) CreateAtomicCutOverSentryTable() error {
query := fmt.Sprintf(`create /* gh-ost */ table %s.%s (
id int auto_increment primary key
) comment='%s'
) engine=%s comment='%s'
`,
this.migrationContext.TableEngine,
sql.EscapeName(this.migrationContext.DatabaseName),
sql.EscapeName(tableName),
atomicCutOverMagicHint,