Load Error

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

Original topic: load加载报错

| username: TiDBer_OB4kHrS7

[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]

| username: Jolyne | Original post link

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.

| username: TiDBer_OB4kHrS7 | Original post link

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.

| username: heiwandou | Original post link

It looks like there might be an issue with the data.

| username: TiDBer_OB4kHrS7 | Original post link

Taking out the data to look at it doesn’t reveal any issues.

| username: Jolyne | Original post link

The warning above indicates that there is an issue with the data being inserted in this line. Check if the data is correct.

| username: Jolyne | Original post link

Or whether the field length of the table structure is sufficient.

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

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.

| username: TiDBer_OB4kHrS7 | Original post link

Inserting this line separately works.

| username: TiDBer_OB4kHrS7 | Original post link

The table structure and the source table are consistent.

| username: TiDBer_OB4kHrS7 | Original post link

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.

| username: 路在何chu | Original post link

Try importing with myloader.

| username: TiDBer_OB4kHrS7 | Original post link

When using myloader for import, can you only use mydumper for export and not dumpling?

| username: TiDBer_OB4kHrS7 | Original post link

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.

| username: Jolyne | Original post link

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.

| username: TiDBer_OB4kHrS7 | Original post link

It doesn’t mention tables, it mentions database names.

| username: Billmay表妹 | Original post link

| username: Jolyne | Original post link

Query the table based on the field… or handle this database separately.

| username: TiDBer_OB4kHrS7 | Original post link

This database was created separately. Last time I used mydumper to export, I also encountered this issue.
line 4: 20585 Segmentation fault

| username: Miracle | Original post link

Segment fault seems to be a memory error. If the library is large, try importing in batches, or try using mysqldump?