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
TINYTEXT accepts values larger than the MySQL-compatible 255-byte limit #26687
Compatibility test: MySQL Connector/ODBC 9.7.0 upstream t_text_fetch
Reproduction
set @@sql_mode='';
droptable if exists tinytext_limit_repro;
createtabletinytext_limit_repro (value tinytext);
insert into tinytext_limit_repro values (repeat('A', 1000));
select length(value) from tinytext_limit_repro;
Observed result: 1000.
The same behavior is visible through ODBC prepared parameter binding: a 1000-byte value is stored and SQLGetData returns indicator length 1000. The upstream Connector/ODBC test expects the MySQL TINYTEXT maximum of 255 bytes when non-strict sql_mode permits truncation.
Expected behavior
TINYTEXT should retain MySQL-compatible size semantics: at most 255 bytes, with the configured strict/non-strict SQL mode determining error versus truncation/warning behavior. It should not behave as an unbounded alias of TEXT.
Impact
Applications that select TINYTEXT to enforce a MySQL-compatible schema constraint can persist data that MySQL rejects or truncates. ODBC length indicators, migrations, validation logic, and cross-database round trips then disagree even though the DDL is accepted by both systems.
This is independent of #26683, which concerns COM_QUERY declared-length metadata. Here the stored value itself exceeds the declared MySQL type limit.
The MOTR files were added to preserve the 255-byte TINYTEXT boundary across strict and non-strict SQL modes, and to
prevent UTF-8 truncation from splitting a multi-byte character. No MatrixOne service source code was modified.
Final conclusion
#26687 is fixed on current main: TINYTEXT enforces the MySQL-compatible 255-byte limit, truncates safely in non-
strict mode, and rejects oversized values in strict mode.
Suggested resolution: merge the MOTR regression PR and close #26687.
Activity
slyunnn commentedon Aug 11, 2026
Regression and extended verification for #26687 (2026-08-11)
Verification environment
d01c85974f9540f8baa2e768ca86fea952941fe2fix(hashjoin): broadcast const vectors in spill paths (#26938)ae2af58bf4b4feaeb65ddb85a59a1e10fb80bc53fix: enforce TINYTEXT byte length limit (#26697)test/issue-26687-tinytext-byte-limit3fab7cbab350436c651e50f3fa5250e14fa44734Regression verification
Reproduced the original non-strict-mode case:
TINYTEXTis stored as 255 bytes.TINYTEXTno longer behaves as an unboundedTEXTalias.Result: passed.
Extended verification
ASCII boundary:
UTF-8 byte boundary:
Strict SQL mode:
1406.MOTR regression
suites/14_issue_regression/t/issue_26687_tinytext_byte_limit.testsuites/14_issue_regression/r/issue_26687_tinytext_byte_limit.resultTest-file changes
The MOTR files were added to preserve the 255-byte
TINYTEXTboundary across strict and non-strict SQL modes, and toprevent UTF-8 truncation from splitting a multi-byte character. No MatrixOne service source code was modified.
Final conclusion
#26687 is fixed on current
main:TINYTEXTenforces the MySQL-compatible 255-byte limit, truncates safely in non-strict mode, and rejects oversized values in strict mode.
Suggested resolution: merge the MOTR regression PR and close #26687.