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
dropdatabase if exists mysql_compat_model1_gap;
createdatabasemysql_compat_model1_gap;
use mysql_compat_model1_gap;
set session sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE';
createtablet_update_ignore(id intprimary key, i int, d decimal(5,2), dt date, vc varchar(4));
insert into t_update_ignore values (1,1,1.23,'2024-01-01','ok');
update ignore t_update_ignore
set i='abc', d='99999.99', dt='2024-02-31', vc='abcdef'where id=1;
select id, i, d, dt, vc, hex(vc) from t_update_ignore;
Expected Behavior
MySQL downgrades the invalid assignments to warnings and updates the row with adjusted values:
id i d dt vc hex(vc)
1 0 999.99 0000-00-00 abcd 61626364
Actual Behavior
MatrixOne errors and leaves the original row unchanged:
ERROR 20203: invalid argument cast to int, bad value abc
id i d dt vc hex(vc)
1 1 1.23 2024-01-01 ok 6F6B
Notes
This is not the same as #25347. #25347 tracks UPDATE IGNORE duplicate-key conflict handling; this issue tracks invalid value conversion / adjustment semantics in UPDATE IGNORE.
Checked this while preparing the focused fix for #25352.
I am not including #25365 in that PR because UPDATE IGNORE is not a low-risk compatibility tweak in the current code path. A correct implementation first needs statement-level IGNORE semantics to be preserved through parsing/planning/execution, then each affected error class must be deliberately downgraded or adjusted.
The cases in this issue are also part of the same broader invalid-value adjustment area as #25364: invalid numeric strings, invalid dates, decimal overflow/saturation, warnings, and strict-vs-non-strict behavior. Changing those paths would affect normal UPDATE, UPDATE IGNORE, prepared statements, generated/default expressions, and shared assignment cast behavior. Earlier discussion in #15345 also records that some MySQL invalid-value behavior under IGNORE should not be copied without an explicit MO product decision.
Given that, I do not think this should be fixed as part of #25352. The safer path is to first decide the intended MO compatibility policy for invalid adjusted values, then implement UPDATE IGNORE consistently across the parser, planner, and execution error handling.
Reviewed the R&D comment and I agree this should not be treated as a small standalone bug fix.
UPDATE IGNORE invalid-value handling needs a deliberate statement-level IGNORE policy across parser/planner/execution, plus a product decision for which conversion failures should be downgraded to warnings and which adjusted values should be written. The repro is in the same invalid adjusted-value semantic family as #25364: invalid numeric strings, invalid dates, decimal saturation, warnings, and strict-vs-non-strict behavior.
Changing this only for this issue would risk inconsistent behavior between UPDATE, UPDATE IGNORE, prepared statements, defaults/generated expressions, and shared assignment casts.
For future exploration, I will not file UPDATE IGNORE invalid adjusted-value differences as new MySQL-compat bugs unless MO explicitly decides to follow this MySQL behavior.
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 UPDATE IGNORE invalid-value adjustment is a broad semantic/product decision, not something that should be fixed opportunistically in the #25352 path.
Under MySQL compatibility expectations, the behavior still differs from MySQL. Whether MO should implement MySQL-style UPDATE IGNORE adjusted values and warning downgrades needs explicit product/R&D confirmation, so this should remain open/needs-triage.
I rechecked the reproductions against current main (ea7b57f104). The compatibility difference is real, but the conclusion is unchanged: this is not a safe small UPDATE IGNORE patch.
Current main preserves UPDATE IGNORE for duplicate-key handling through the plan/execution path, but invalid numeric/date/decimal conversions happen in shared assignment casts before that duplicate-key policy. Extending IGNORE from the currently explicit cases to adjusted conversion values and warnings would affect update, insert, load, prepared statements, defaults, and generated expressions.
This is the same unresolved product-semantics question as #25364 and the maintainer direction recorded in #15345. A local update-only exception would make equivalent assignments behave differently depending on the statement path.
Conclusion: no PR for this issue as currently scoped. If MatrixOne decides to adopt MySQL-style adjusted-value behavior, it should first define one conversion/warning policy and apply it consistently to all assignment paths.
Activity
LeftHandCold commentedon Jul 3, 2026
Checked this while preparing the focused fix for #25352.
I am not including #25365 in that PR because
UPDATE IGNOREis not a low-risk compatibility tweak in the current code path. A correct implementation first needs statement-levelIGNOREsemantics to be preserved through parsing/planning/execution, then each affected error class must be deliberately downgraded or adjusted.The cases in this issue are also part of the same broader invalid-value adjustment area as #25364: invalid numeric strings, invalid dates, decimal overflow/saturation, warnings, and strict-vs-non-strict behavior. Changing those paths would affect normal
UPDATE,UPDATE IGNORE, prepared statements, generated/default expressions, and shared assignment cast behavior. Earlier discussion in #15345 also records that some MySQL invalid-value behavior underIGNOREshould not be copied without an explicit MO product decision.Given that, I do not think this should be fixed as part of #25352. The safer path is to first decide the intended MO compatibility policy for invalid adjusted values, then implement
UPDATE IGNOREconsistently across the parser, planner, and execution error handling.Ariznawlll commentedon Jul 3, 2026
Reviewed the R&D comment and I agree this should not be treated as a small standalone bug fix.
UPDATE IGNOREinvalid-value handling needs a deliberate statement-level IGNORE policy across parser/planner/execution, plus a product decision for which conversion failures should be downgraded to warnings and which adjusted values should be written. The repro is in the same invalid adjusted-value semantic family as #25364: invalid numeric strings, invalid dates, decimal saturation, warnings, and strict-vs-non-strict behavior.Changing this only for this issue would risk inconsistent behavior between UPDATE, UPDATE IGNORE, prepared statements, defaults/generated expressions, and shared assignment casts.
For future exploration, I will not file
UPDATE IGNOREinvalid adjusted-value differences as new MySQL-compat bugs unless MO explicitly decides to follow this MySQL behavior.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 UPDATE IGNORE invalid-value adjustment is a broad semantic/product decision, not something that should be fixed opportunistically in the #25352 path.
Under MySQL compatibility expectations, the behavior still differs from MySQL. Whether MO should implement MySQL-style UPDATE IGNORE adjusted values and warning downgrades needs explicit product/R&D confirmation, so this should remain open/needs-triage.
fix: grouped correlated column binding (#25445)
LeftHandCold commentedon Jul 15, 2026
I rechecked the reproductions against current
main(ea7b57f104). The compatibility difference is real, but the conclusion is unchanged: this is not a safe smallUPDATE IGNOREpatch.Current
mainpreservesUPDATE IGNOREfor duplicate-key handling through the plan/execution path, but invalid numeric/date/decimal conversions happen in shared assignment casts before that duplicate-key policy. ExtendingIGNOREfrom the currently explicit cases to adjusted conversion values and warnings would affect update, insert, load, prepared statements, defaults, and generated expressions.This is the same unresolved product-semantics question as #25364 and the maintainer direction recorded in #15345. A local update-only exception would make equivalent assignments behave differently depending on the statement path.
Conclusion: no PR for this issue as currently scoped. If MatrixOne decides to adopt MySQL-style adjusted-value behavior, it should first define one conversion/warning policy and apply it consistently to all assignment paths.
LeftHandCold commentedon Jul 31, 2026
#25365:MySQL 明确规定 UPDATE IGNORE 将转换错误调整到最近合法值,因此不是“MySQL 自己也错了”。MySQL UPDATE 文档 (https://dev.mysql.com/doc/refman/8.0/en/update.html) 当前 main 已修复 VARCHAR 截断和重复键,但
integer、decimal、date 仍不同。由于 #15345 已有 maintainer 结论“不跟随类型不匹配、越界等宽松行为”,现在不应做 UPDATE-only 局部补丁;除非产品重新决定统一兼容 INSERT/UPDATE/LOAD/prepared 及 warning 语义。
fix: grouped correlated column binding (matrixorigin#25445)
fix: grouped correlated column binding (matrixorigin#25445)
fix: grouped correlated column binding (matrixorigin#25445)