# 2.1.5-rc02 版本,结果不符合预期,应该是要报错的,目前看插入的时候是按照M的长度从左到右截取的
MySQL [(none)]> select * from test_db.test_tbl;
+------+------+
| k1 | v1 |
+------+------+
| 2 | 2 |
| 4 | 4 |
| 5 | 5 |
| 1 | 1 |
| 3 | 3 |
+------+------+
如果用 insert into 导入是符合预期的,直接报错
MySQL [test_db]> insert into test_tbl values(1,1),(28,2),(38,3),(400,4),(5000,5);
ERROR 1105 (HY000): errCode = 2, detailMessage = (10.81.85.75)[E-255]Arithmetic overflow when converting value 28 from type Int8 to type Decimal(1, 0)
# 1.1.5 版本 符合预期
MySQL [(none)]> select * from test_db.test_tbl;
+------+------+
| k1 | v1 |
+------+------+
| 1 | 1 |
+------+------+
Reason: decimal value is not valid for definition, column=k1, value=28, precision=1, scale=0; . src line [];
Reason: decimal value is not valid for definition, column=k1, value=38, precision=1, scale=0; . src line [];
Reason: decimal value is not valid for definition, column=k1, value=400, precision=1, scale=0; . src line [];
Reason: decimal value is not valid for definition, column=k1, value=5000, precision=1, scale=0; . src line [];
Reason: decimal value is not valid for definition, column=k1, value=6000, precision=1, scale=0; . src line [];
#1.2.8版本 符合预期
MySQL [(none)]> select * from test_db.test_tbl;
+------+------+
| k1 | v1 |
+------+------+
| 1 | 1 |
+------+------+
Reason: decimal value is not valid for definition, column=k1, value=28, precision=1, scale=0; . src line [];
Reason: decimal value is not valid for definition, column=k1, value=38, precision=1, scale=0; . src line [];
Reason: decimal value is not valid for definition, column=k1, value=400, precision=1, scale=0; . src line [];
Reason: decimal value is not valid for definition, column=k1, value=5000, precision=1, scale=0; . src line [];
Reason: decimal value is not valid for definition, column=k1, value=6000, precision=1, scale=0; . src line [];
Search before asking
Version
What's Wrong?
2.0+ after load the result is wrong
总结下当前streamload 对decimal超出宽度的行为
What You Expected?
行为和1.2之前的保持一致
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct