Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: Data truncation: constant 4294970707 overflows int
[TiDB Usage Environment] Online
[TiDB Version] 4.0.16
[Encountered Problem]
Error when writing data to TiDB using sqoop: Data truncation: constant 4294970707 overflows int
[Reproduction Path] What operations were performed to encounter the problem
Repeated 3 times. The first table succeeded the first time, but the first table failed the second time.
[Problem Phenomenon and Impact]
Data cannot be written.
It might be that the int type field value overflowed.
Our data warehouse runs this task every day, which involves writing to three tables. It has been working fine until today. When running today, the first table was written successfully, but the second table failed. The task detected the failure and reran, but during the second run, the first table also failed with an “overflows int” error. However, the data warehouse team confirmed that there were no changes to the SQL fields and checked the max value for int, which did not match the large value indicated in the error.
Thanks @weixiaobing, the issue has been resolved!
It was caused by our table’s auto-increment primary key ID using the int type exceeding the maximum value (4294970707), which led to the task error.
The error was quite obvious, and we thought of this point.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.