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]: invalid UTF-8 bytes can be inserted into utf8mb4 varchar #25302
MatrixOne accepts invalid UTF-8 byte sequences into a utf8mb4VARCHAR column. MySQL rejects the same insert with ERROR 1366 Incorrect string value.
Steps to Reproduce
droptable if exists t_invalid_utf8_probe;
createtablet_invalid_utf8_probe (
id intprimary key,
s varchar(10) character set utf8mb4,
b varbinary(10)
);
insert into t_invalid_utf8_probe values (1, unhex('C328'), unhex('C328'));
select id, hex(s) as s_hex, hex(b) as b_hex
from t_invalid_utf8_probe
order by id;
MySQL Result
ERROR 1366 (HY000): Incorrect string value: '\xC3(' for column 's' at row 1
No row is inserted.
MatrixOne Result
Tested on latest main at 200bfa7e0efb.
id s_hex b_hex
1 C328 C328
Expected Behavior
For utf8mb4 text columns, MatrixOne should reject invalid UTF-8 byte sequences, matching MySQL. Binary columns such as VARBINARY may store the raw bytes.
Notes
Found during active MySQL compatibility exploration, Module 4: String / Charset / Collation. I searched existing issues for invalid UTF-8 insert / incorrect string value and did not find a duplicate.
Activity
daviszhen commentedon Aug 5, 2026
彻底修改,修改量太大