Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: load加载报错
[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] V5.3.3
[Reproduction Path] Use dumpling to export data, use load to import into MySQL
[Encountered Problem: Problem Phenomenon and Impact] When importing into MySQL, it always prompts that the data is truncated
[Resource Configuration]
[Attachment: Screenshot/Log/Monitoring]
Judging by the error, it seems to be an issue with the field. Does the error message always indicate a similar field problem each time? Also, you could try using CDC for transferring data from TiDB to MySQL.
Every time an error is reported, it prompts this error. Re-executing the load, running for a while, and then this error is prompted again. Importing other databases did not encounter this problem, and there is no environment to run CDC.
It looks like there might be an issue with the data.
Taking out the data to look at it doesn’t reveal any issues.
The warning above indicates that there is an issue with the data being inserted in this line. Check if the data is correct.
Or whether the field length of the table structure is sufficient.
Is this an SQL file? Just execute it directly and you’ll know why there’s an error. By the way, since you’ve already exported the SQL file, why load it? Just source it into the database directly.
Inserting this line separately works.
The table structure and the source table are consistent.
This exports an entire database, with all the data in one directory. The generated SQL files are in the hundreds or thousands, not a single SQL file.
Try importing with myloader.
When using myloader for import, can you only use mydumper for export and not dumpling?
When using mydumper to export, it reports:
mydumper_tms.sh: line 4: 20585 Segmentation fault /usr/bin/mydumper -u $YOUR_USER -p $YOUR_PASSWD -P 4000 -h XXXXXX -t 8 -l 7200 --kill-long-queries -B tms -o /data/tms/
I encountered this problem last time.
You can skip exporting this table for now, export and import the others first, and then export and import this table separately at the end.
It doesn’t mention tables, it mentions database names.
Query the table based on the field… or handle this database separately.
This database was created separately. Last time I used mydumper to export, I also encountered this issue.
line 4: 20585 Segmentation fault
Segment fault seems to be a memory error. If the library is large, try importing in batches, or try using mysqldump?