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
[Compatibility]: CONCAT and CONCAT_WS reject JSON operands #28907
CONCAT and CONCAT_WS reject JSON operands that MySQL stringifies. This prevents direct queries as well as View/CTAS and prepared SQL over JSON columns.
Reproduction
dropdatabase if exists concat_json_repro;
createdatabaseconcat_json_repro;
use concat_json_repro;
createtablesrc(id intprimary key,js json,v varchar(20));
insert into src values
(1,'{"b":2,"a":1}','Aé中a'),
(2,'null',''),
(3,null,null);
select id,
concat('',js),
concat(js,''),
concat_ws('|','x',js,'y'),
concat_ws('|',js,v)
from src order by id;
createviewv_jsonasselect id,concat_ws('|','x',js,'y') c from src;
prepare p from'select id,concat_ws(''|'',''x'',js,''y'') from src order by id';
execute p;
MatrixOne result
Two-argument CONCAT returns invalid argument function concat, bad value [CHAR JSON].
CONCAT_WS returns invalid argument function concat_ws, bad value [VARCHAR VARCHAR JSON VARCHAR].
View creation and prepared compilation are rejected on the same JSON operand.
MySQL 8.0.45 result
MySQL renders the JSON value using its normal JSON text representation:
{"a": 1, "b": 2}
null
SQL NULL
CONCAT preserves SQL NULL. CONCAT_WS includes the JSON literal null but skips SQL NULL, matching its ordinary NULL rules. View, CTAS, and prepared execution retain those values.
Control and scope
Explicit CAST(js AS CHAR) makes both CONCAT and CONCAT_WS work in MatrixOne and produces the same JSON text as MySQL. Canonical object output, JSON null, SQL NULL, mixed JSON/VARCHAR inputs, View/CTAS, and prepared SQL are covered. Three independent executions produced identical results on each database.
Code location
The builtInConcatCheck and concatWsCheck argument conversion paths use the generic implicit cast to VARCHAR; JSON has no accepted implicit conversion there even though explicit JSON-to-character conversion already supplies the required representation.
Environment
MatrixOne: official main commit 0c3a04f390adaf6281fd592a49778ea5b1155e67
Activity
Ariznawlll commentedon Sep 15, 2026
Duplicate of #28905. This issue was created a second time accidentally; please track JSON operands in CONCAT/CONCAT_WS in #28905.
fix: restore prepared TPCC filter selectivity with per-binding proof (#…