Bug Report
With export-fix-sql = false, we still see files under the fixDir path.
The file only contains the chunk meta:
-- table: database.test_table
-- range in sequence: (1234) < (key) <= (5678)
The issue is that this line is not guarded with export-fix-sql, so empty sql is added to dml.sqls:
dml.sqls = append(dml.sqls, sql)
Then later in writeSQLs, for each empty sql, the chunk meta data is written to disk
// write chunk meta
chunkRange := dml.node.ChunkRange
fixSQLFile.WriteString(fmt.Sprintf("-- table: %s.%s\n-- %s\n", tableDiff.Schema, tableDiff.Table, chunkRange.ToMeta()))
We just need to guard this line with export-fix-sql.
Bug Report
With
export-fix-sql = false, we still see files under the fixDir path.The file only contains the chunk meta:
The issue is that this line is not guarded with
export-fix-sql, so emptysqlis added todml.sqls:Then later in writeSQLs, for each empty sql, the chunk meta data is written to disk
We just need to guard this line with
export-fix-sql.