Repository navigation
Description
Description
MatrixOne does not implement MySQL's assignment contract for the group_concat_max_len system variable at either end of its valid range. Values below the minimum are rejected instead of clamped to 4 with warning 1292, and unsigned values above INT64_MAX are rejected even though MySQL accepts them through UINT64_MAX.
Environment
- Branch:
main - Commit:
e7d46d6dfb27696211ca828c55e245d3bd1b634d - Deployment: local standalone, 1 CN / 1 TN / 1 LogService
- Oracle: MySQL 8.3.0
Steps to reproduce
select @@session.group_concat_max_len;
set session group_concat_max_len = 0;
show warnings;
select @@session.group_concat_max_len;
set session group_concat_max_len = 3;
show warnings;
select @@session.group_concat_max_len;
set session group_concat_max_len = 9223372036854775808;
show warnings;
select @@session.group_concat_max_len;
set session group_concat_max_len = 18446744073709551615;
show warnings;
select @@session.group_concat_max_len;Actual behavior
MatrixOne returns ERROR 20101 ... convert to the system variable int type failed for every assignment above. Failed low-value assignments leave the old value unchanged; values above 9223372036854775807 cannot be represented.
Expected behavior
MySQL 8.3.0 behaves as follows:
0,1, and3are accepted as assignments, clamped to4, and expose warning 1292 (Truncated incorrect group_concat_max_len value).9223372036854775808and18446744073709551615are accepted and retained exactly.4,9223372036854775807, andDEFAULTare accepted by both products and serve as controls.
MatrixOne should apply the same minimum-clamping/warning behavior and support the documented unsigned upper range.
Stability and controls
- Reproducer: 3/3 on the stated MatrixOne commit; output SHA-256 was identical in all runs.
- MySQL oracle: 3/3; output SHA-256 was identical in all runs.
- Controls:
4,9223372036854775807, andDEFAULTare accepted by MatrixOne. - Failed assignments do not corrupt the session's previous value.
Evidence
- Reproducer:
evidence/group_concat/group_concat_variable_boundaries.sql - MatrixOne output SHA-256:
ef33c5b0e4a5c97847dab8393f55a5ac7b75430f2e05c02ea374787acbfafca4 - MySQL output SHA-256:
5c57b112ddb03c0f06cddaace1c1322944a1719a22273a18b272b1324b2f5098
Code analysis
pkg/frontend/variables.go registers group_concat_max_len with InitSystemVariableIntType("group_concat_max_len", 4, math.MaxInt64, false). The signed integer system-variable type rejects out-of-range input rather than applying MySQL's warning-and-clamp behavior and cannot represent the MySQL UINT64_MAX upper bound.
Regression coverage
Add session-variable assignment cases for 0, 1, 3, 4, INT64_MAX, INT64_MAX+1, UINT64_MAX, -1, and DEFAULT, asserting both the stored value and SHOW WARNINGS diagnostics.
Related
- [Compatibility]: prepared GROUP_CONCAT ignores MySQL prepare-time limit floor #28253 covers prepared-statement plan behavior when the valid session value changes; it does not cover system-variable assignment bounds.
- [Bug]: GROUP_CONCAT ignores group_concat_max_len #25370 covers application of a valid
group_concat_max_lento aggregate output.
Activity
fix(frontend): support MySQL group_concat_max_len bounds (#28727)
slyunnn commentedon Sep 14, 2026
Regression and extended verification for #28667 (2026-09-14)
Verification Environment
origin/main:6987fda6c4a13295b8d525706342fc6033094d2e—fix: honor mysql ignore space for built-in functions (#28677).2cb541edef91debd2b9b4a7f772bd10df1d0ff8a—fix(frontend): support MySQL group_concat_max_len bounds.127.0.0.1:6001, CN1127.0.0.1:16001, CN2127.0.0.1:16002.8.3.0was the compatibility control.What Was Covered
0,1, and3clamp to4and report warning1292.4,INT64_MAX,INT64_MAX+1, andUINT64_MAXretain their exact values.-1is clamped with warning1292; the session remains usable.DEFAULTrestores the session value.8.3.0comparison matches clamping, warnings, and unsigned upper-range values.6001with24/24, replayed twice with48/48, and passed on CN116001and CN216002with24/24each.Findings
The fix applies MySQL-compatible minimum clamping and warning diagnostics while preserving the complete
UINT64range.MOTR / BVT Coverage
suites/14_issue_regression/t/issue_28667_group_concat_len.testandsuites/14_issue_regression/r/issue_28667_group_concat_len.result.test/issue-28667-group-concat-len.ab394f9a3e0f285545c4f210a8e17884f83ca22e(test: add MOTR regression for #28667).matrixorigin/motr; no issue-specific PR was created.Final Conclusion
Fixed. No large-data regression is required: system-variable assignment and warning generation are deterministic per session assignment and independent of row count, block/batch boundaries, memory/spill, concurrency, skew, network, or resource scale.
fix(frontend): support MySQL group_concat_max_len bounds (matrixorigi…
fix(frontend): support MySQL group_concat_max_len bounds (matrixorigi…
fix(frontend): support MySQL group_concat_max_len bounds (matrixorigi…