diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/semantic_dump_schema.go b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/semantic_dump_schema.go index 36bb7c5b62..f0c648e21a 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/semantic_dump_schema.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/semantic_dump_schema.go @@ -142,21 +142,14 @@ func (c *SemanticDumpSchemaComp) Init() (err error) { logger.Error("获取version failed %s", err.Error()) return err } - enableGtid, err := conn.IsEnableGtid() - if err != nil { - logger.Warn("获取gtid模式失败 %s", err.Error()) - enableGtid = true - } - c.gtidPurgedOff = enableGtid - - c.isSpider = strings.Contains(version, "tdbctl") c.dumpCmd = path.Join(cst.MysqldInstallPath, "bin", "mysqldump") - if c.gtidPurgedOff { - c.useTmysqldump = false - } else if cmutil.FileExists("/home/mysql/dbbackup/mysqldump_x86_64") { - c.dumpCmd = "/home/mysql/dbbackup/mysqldump_x86_64" + c.isSpider = strings.Contains(version, "tdbctl") + if strings.Contains(version, "tmysql") { c.useTmysqldump = true } + if cmutil.MySQLVersionParse(version) > cmutil.MySQLVersionParse("5.6.9") { + c.gtidPurgedOff = true + } // to export the table structure from the central control // you need to use the mysqldump that comes with the central control if c.isSpider {