Handle out of range value when load data
#3024
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
load data
#3024
What did you do?
If possible, provide a recipe for reproducing the error.
create table t (a int, b int not null);
load data local infile '/tmp/test.csv' into table t fields terminated by ' ';
➜ cat /tmp/test.csv
143 1343545435346432587475
What did you expect to see?
Query OK, 1 row affected, 1 warning (0.01 sec)
Records: 1 Deleted: 0 Skipped: 0 Warnings: 1
mysql> select * from t;
+------+------------+
| a | b |
+------+------------+
| 143 | 2147483647 |
+------+------------+
What did you see instead?
We ignore this insert line because we encounter a truncate error and return an empty value, but the value of
b
can't be null.The text was updated successfully, but these errors were encountered: