From a11bec178518d16907e24a7baf83c881a78ef103 Mon Sep 17 00:00:00 2001 From: rj03hou Date: Thu, 1 Dec 2016 16:04:04 +0800 Subject: [PATCH] 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. --- go/logic/applier.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go/logic/applier.go b/go/logic/applier.go index 286728a..b9568b9 100644 --- a/go/logic/applier.go +++ b/go/logic/applier.go @@ -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,