Encountering errors during Lightning recovery despite disabling all restrictions, seeking expert assistance

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 做lightning恢复时,限制的都关了,仍出现报错,求大佬协助

| username: LBX流鼻血

[TiDB Usage Environment] Production Environment
[TiDB Version] 4.0.6
[Reproduction Path] Operations performed that led to the issue
[Encountered Issue: Problem Phenomenon and Impact]
set @@global.sql_mode=‘’;
set sql_mode=‘’;
set @@global.transaction_isolation =‘READ-COMMITTED’;
SET global TRANSACTION ISOLATION LEVEL READ COMMITTED;
set @@global.tidb_txn_mode = ‘pessimistic’;
set global innodb_strict_mode=OFF;
All restrictions are turned off, but the following error still occurs during restoration:
Error: restore table xxxdb.xxxtable failed: in file 20231009/xxxdb.xxxtable.167.sql:0 at offset 83826831: syntax error: unexpected Integer (5) at offset 83826831, expecting start of row
tidb lightning encountered error: restore table xxxdb.xxxtable failed: in file 20231009/xxxdb.xxxtable.167.sql:0 at offset 83826831: syntax error: unexpected Integer (5) at offset 83826831, expecting start of row

| username: WalterWj | Original post link

There is an issue with the file content, please check the corresponding SQL file.

| username: 像风一样的男子 | Original post link

Will executing the SQL file directly cause an error?

| username: LBX流鼻血 | Original post link

There should be an issue with that line, the SQL is obviously wrong, but several files are like this. Re-exporting takes 2 hours and importing takes 3 hours, it’s a headache :sweat_smile:

| username: 路在何chu | Original post link

The file is corrupted. How did you export it?

| username: 路在何chu | Original post link

It is estimated that there is already a problem with the export.

| username: Fly-bird | Original post link

syntax error: unexpected Integer (5) at offset 83826831

| username: LBX流鼻血 | Original post link

Using dumpling

| username: LBX流鼻血 | Original post link

Found that line, it’s like this, damn, why is it like this when dumpling exports it?

| username: TiDBer_小阿飞 | Original post link

Could it be a character set issue?