Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: dumpling导出schema后用lightning导入时发生Error 1064: You have an error in your SQL syntax

[TiDB Usage Environment] Test
[TiDB Version] v6.5.0
When using dumpling to export the schema and then importing it with lightning, an Error 1064 occurs: You have an error in your SQL syntax, but there is no error in the DDL itself.
nohup tiup dumpling -u ?-p ? -P 4000 -h 127.0.0.1 -d -o $dump_dir --filter 'dcdb.*' > $dump_dir/dumpling-out.log &
[mydumper.csv]
separator = ‘~@’
delimiter = ‘"’
header = true
not-null = false
null = ‘\N’
backslash-escape = true
nohup tiup tidb-lightning -config tidb-lightning.toml -d ? 2>&1 &
Lightning prompt:
[2024/02/22 14:03:06.672 +08:00] [WARN] [restore.go:537] ["failed to rewrite statement, will use raw input instead"]["run create schema job failed with no retry"]
[2024/02/22 14:03:07.067 +08:00] [ERROR] [restore.go:785] ["restore all schema failed"] [takeTime=437.05098ms] [error="[Lightning:Restore:ErrCreateSchema]create schema failed, table: `dcdb_1`.`MR_TZ_FUNDACCTLINK`, stmt: restore table schema: run create schema job failed: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 33 near \"\"MR_TZ_FUNDACCTLINK\" (\n\"PROJECTID\" int(11) NOT NULL DEFAULT '0',\n\"FUNDACCTTYPE\" char(1) NOT NULL DEFAULT ' ',\n\"FUNDACCT\" varchar(32) NOT NULL,\n\"DEFAULTFLAG\" char(1) NOT NULL DEFAULT ' ',\nPRIMARY KEY (\"PROJECTID\",\"FUNDACCT\") /*T![clustered_index] CLUSTERED */,\nUNIQUE KEY \"FUNDACCTLINK_UNIQUE_INDEX\" (\"PROJECTID\",\"FUNDACCTTYPE\")\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;\" "]