You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: LOAD DATA non-strict invalid conversions abort instead of loading adjusted rows #25366
dropdatabase if exists mysql_compat_model1_gap;
createdatabasemysql_compat_model1_gap;
use mysql_compat_model1_gap;
set session sql_mode ='';
createtablet_load(id intprimary key, i int, d decimal(5,2), dt date, vc varchar(4));
load data local infile '/path/to/file.csv'
into table t_load
fields terminated by ',' lines terminated by '\n';
select id, i, d, dt, vc, hex(vc) from t_load order by id;
Expected Behavior
MySQL loads all rows and adjusts invalid / truncated values with warnings:
MatrixOne aborts the load and no rows are inserted:
ERROR 20101: internal error: the input value 'abc' is not int32 type for column 1
Notes
I searched existing issues before filing. The close matches were parquet / JSONLine load issues or older loading null-handling items, not this MySQL CSV LOAD DATA LOCAL INFILE non-strict conversion behavior.
Checked this while preparing the focused fix for #25352.
I am not including #25366 in that PR because LOAD DATA invalid-value handling is a broad data-ingest semantic change, not a small compatibility bug fix. The reported cases overlap the same invalid numeric/date/decimal adjusted-value behavior discussed in #25364 and #25365.
Changing this for LOAD DATA would need to define exactly which conversion failures become warnings, which rows are accepted, what adjusted values are written, how strict/non-strict modes interact with LOCAL and non-LOCAL load paths, and how warning counts/errors are reported. Those choices would affect shared load/insert assignment conversion paths and could change existing MO behavior for users relying on current rejection semantics.
Because earlier discussion in #15345 indicates that some MySQL invalid-value behavior under IGNORE should not automatically be treated as MO-compatible behavior, this should wait for an explicit compatibility/product decision. After that decision, it should be implemented as a dedicated LOAD DATA compatibility PR with targeted BVT/UT coverage rather than bundled with the #25352 planner fix.
Reviewed the R&D comment and I agree this should not be fixed as a direct LOAD DATA bug without a product decision.
The reported behavior belongs to the same invalid adjusted-value semantics as #25364/#25365: invalid numeric strings, invalid dates, decimal adjustment/saturation, warning counts, strict/non-strict mode, and row acceptance rules.
For LOAD DATA specifically, changing this would require defining which conversion failures become warnings, what adjusted values are written, whether LOCAL/non-LOCAL paths differ, how partial rows and warning counts are reported, and how this interacts with shared insert/load assignment conversions. That is broader than a focused compatibility patch and may change current MO rejection semantics that users rely on.
For future exploration, I will treat LOAD DATA invalid adjusted-value behavior as current MO behavior unless product direction explicitly says to match MySQL.
Closing this issue as not planned/current behavior pending product decision.
After re-reading the R&D comment, this is not confirmed as "not a bug". The comment means LOAD DATA invalid-value adjustment is a broad data-ingest semantic/product decision, not a small isolated fix.
Under MySQL compatibility expectations, the behavior still differs from MySQL. Whether MO should accept rows with MySQL-style adjusted values/warnings in LOAD DATA needs explicit product/R&D confirmation, so this should remain open/needs-triage.
dropdatabase if exists mysql_compat_model1_gap;
createdatabasemysql_compat_model1_gap;
use mysql_compat_model1_gap;
set session sql_mode ='';
createtablet_load(
id intprimary key,
i int,
d decimal(5,2),
dt date,
vc varchar(4)
);
load data local infile '/tmp/issue25366.csv'
into table t_load
fields terminated by ','
lines terminated by '\n';
select id, i, d, dt, vc, hex(vc)
from t_load
order by id;
实际结果
LOAD 执行成功,没有再出现原来的错误:
internal error: the input value 'abc' is not int32 type for column 1
Activity
LeftHandCold commentedon Jul 3, 2026
Checked this while preparing the focused fix for #25352.
I am not including #25366 in that PR because
LOAD DATAinvalid-value handling is a broad data-ingest semantic change, not a small compatibility bug fix. The reported cases overlap the same invalid numeric/date/decimal adjusted-value behavior discussed in #25364 and #25365.Changing this for
LOAD DATAwould need to define exactly which conversion failures become warnings, which rows are accepted, what adjusted values are written, how strict/non-strict modes interact withLOCALand non-LOCALload paths, and how warning counts/errors are reported. Those choices would affect shared load/insert assignment conversion paths and could change existing MO behavior for users relying on current rejection semantics.Because earlier discussion in #15345 indicates that some MySQL invalid-value behavior under
IGNOREshould not automatically be treated as MO-compatible behavior, this should wait for an explicit compatibility/product decision. After that decision, it should be implemented as a dedicatedLOAD DATAcompatibility PR with targeted BVT/UT coverage rather than bundled with the #25352 planner fix.Ariznawlll commentedon Jul 3, 2026
Reviewed the R&D comment and I agree this should not be fixed as a direct LOAD DATA bug without a product decision.
The reported behavior belongs to the same invalid adjusted-value semantics as #25364/#25365: invalid numeric strings, invalid dates, decimal adjustment/saturation, warning counts, strict/non-strict mode, and row acceptance rules.
For LOAD DATA specifically, changing this would require defining which conversion failures become warnings, what adjusted values are written, whether LOCAL/non-LOCAL paths differ, how partial rows and warning counts are reported, and how this interacts with shared insert/load assignment conversions. That is broader than a focused compatibility patch and may change current MO rejection semantics that users rely on.
For future exploration, I will treat LOAD DATA invalid adjusted-value behavior as current MO behavior unless product direction explicitly says to match MySQL.
Closing this issue as not planned/current behavior pending product decision.
Ariznawlll commentedon Jul 3, 2026
Reopening: my previous close was premature.
After re-reading the R&D comment, this is not confirmed as "not a bug". The comment means LOAD DATA invalid-value adjustment is a broad data-ingest semantic/product decision, not a small isolated fix.
Under MySQL compatibility expectations, the behavior still differs from MySQL. Whether MO should accept rows with MySQL-style adjusted values/warnings in LOAD DATA needs explicit product/R&D confirmation, so this should remain open/needs-triage.
fix: grouped correlated column binding (#25445)
LeftHandCold commentedon Jul 14, 2026
fixed
Ariznawlll commentedon Jul 16, 2026
最新 main 验证结果
结论:#25366 报告的问题已解决。在非严格模式下执行
LOAD DATA LOCAL INFILE,遇到非法字段转换时不再整批中止,数据可以正常写入。测试环境
main8f3aee9cef5d667c6c7686d83cb155d0ba321e1fgo1.26.4./mo-service -launch etc/launch/launch.toml测试数据
测试 SQL
实际结果
LOAD 执行成功,没有再出现原来的错误:
查询结果如下:
重复验证
连续执行 3 次
truncate + load + select:3/3 均成功,三行数据全部写入,结果一致。
最终结论
✅ 最新
main上已无法复现整批加载失败的问题,#25366 验证修复。fix: grouped correlated column binding (matrixorigin#25445)
fix: grouped correlated column binding (matrixorigin#25445)
fix: grouped correlated column binding (matrixorigin#25445)