Repository navigation
Description
Description
INSERT IGNORE and UPDATE IGNORE still return statement errors for invalid integer strings and invalid dates. MySQL downgrades those assignment errors, stores adjusted values, and reports warnings 1366/1264.
The same behavior was included in closed #25364, but it remains present on the latest main. Open #27340 covers numeric range overflow and saturation; this report covers invalid lexical conversions such as 'abc' -> INT and '2024-02-30' -> DATE.
Environment
- Branch:
main - Commit:
065a67528608c475d0219e0be6b7d454a58f7b1a - Deployment: local distributed launch, 2 CN / 1 TN / 1 LogService
- MySQL control: 8.3.0
Steps to reproduce
create database if not exists ignore_conv;
use ignore_conv;
create table t(id int primary key, i tinyint, dt date);
set sql_mode='STRICT_TRANS_TABLES';
insert ignore into t(id,i) values(1,'abc');
insert ignore into t(id,dt) values(2,'2024-02-30');
insert into t values(3,7,'2024-01-01');
update ignore t
set i='abc', dt='2024-02-30'
where id=3;Actual behavior
MatrixOne rejects the integer assignments with:
ERROR 20203 (HY000): invalid argument cast to int, bad value abc
It rejects the date assignment with:
ERROR 20203 (HY000): invalid argument parsedate, bad value 2024-02-30
The failed inserts leave no row. The failed update preserves the original (3,7,'2024-01-01') row.
MySQL executes the same statements, stores 0 for the invalid integer and 0000-00-00 for the invalid date, and reports:
Warning 1366 Incorrect integer value: 'abc' for column 'i' at row 1
Warning 1264 Out of range value for column 'dt' at row 1
The update reports both warnings and applies both adjusted values.
Expected behavior
Under IGNORE, invalid assignment conversions that MySQL downgrades should not abort the statement. MatrixOne should store the corresponding adjusted value and publish the matching warning diagnostics.
Stability and controls
- Invalid integer INSERT: 3/3 errors in MatrixOne; 3/3 adjusted rows with warning 1366 in MySQL.
- Invalid date INSERT: 3/3 errors in MatrixOne; 3/3 zero dates with warning 1264 in MySQL.
- Combined UPDATE IGNORE: 3/3 atomic rejection in MatrixOne; 3/3 adjusted updates with two warnings in MySQL.
- A valid
INSERT IGNOREimmediately succeeds and stores the exact integer/date values in MatrixOne.
Evidence
The statement outputs and post-error table state are retained with the local latest-main validation evidence.
Code analysis
The assignment cast paths still propagate lexical integer and date parsing failures before the IGNORE DML path can convert them into adjusted values and diagnostics. The newly merged #28459 warning collector covers rows rejected by duplicate and CHECK arbitration; it does not alter value-conversion semantics.
Regression coverage
Add SQL and binary-protocol prepared coverage for INSERT/UPDATE IGNORE with invalid integer, decimal lexical input, DATE/DATETIME input, multiple invalid columns in one row, warning codes/counts, post-error state, and statement reuse.
Related
- Closed [Bug]: non-strict INSERT and INSERT IGNORE invalid conversions error instead of writing adjusted values #25364 reported the broader behavior on an older main.
- Open [Bug]: DML assignment casts must honor bounds and SQL-mode adjustment semantics #27340 tracks out-of-range numeric saturation.
- Open [Bug]: non-strict VARCHAR truncation emits no 1265 warning over JDBC or SHOW WARNINGS #27339 tracks successful VARCHAR truncation with missing warning 1265.
- fix: report INSERT IGNORE constraint warnings #28459 implements warnings for ignored duplicate/CHECK rows, not conversions.
Activity
fix: honor IGNORE conversion warnings (#28680)
fix: honor IGNORE conversion warnings (#28680)
fix: honor IGNORE conversion warnings (#28680)
fix: honor IGNORE conversion warnings (#28680)
fix: honor IGNORE conversion warnings (#28680)
fix: honor IGNORE conversion warnings (#28680)
fix: honor IGNORE conversion warnings (#28740)
Ariznawlll commentedon Sep 14, 2026
测试版本
原问题验证
Happy Path 覆盖
Unhappy Path 覆盖
白盒验证
回归测试
./motr --repeat 3 14_issue_regression.issue_28187_28772_latest_main连续 3/3 通过(213/213 statements matched)。测试证据
测试结论
测试通过。
fix: honor IGNORE conversion warnings (matrixorigin#28740)
fix: honor IGNORE conversion warnings (matrixorigin#28740)
fix: honor IGNORE conversion warnings (matrixorigin#28740)