兼容性判定
真机验证:oceanbase 4.2.5.7 · group_concat_max_len 默认值/上限及 DISTINCT、ORDER BY、SEPARATOR 行为需对齐;实测2026-07-09(v4.2.5.7) 仅 EXPLAIN 通过公开资料依据 · 建议 PoC 复核支持度partial
严重度minor
置信度medium
依据规则my.func.group_concat
怎么改
需按命中位置逐条评估改写
判定说明
group_concat_max_len 默认值/上限及 DISTINCT、ORDER BY、SEPARATOR 行为需对齐;实测2026-07-09(v4.2.5.7) 仅 EXPLAIN 通过
库侧 / 应用侧路径
库侧改造
需人工确认改造边界
应用侧改造
需人工确认改造边界
推荐路线:case_by_case。验证建议:结果长度受 group_concat_max_len 限制(MySQL 默认 1024,超长静默截断)——目标端同名变量的默认值与上限需核对;DISTINCT/ORDER BY/SEPARATOR 组合逐个验证。openGauss B 模式(dolphin)提供 group_concat
规则样例
SELECT dept, GROUP_CONCAT(name ORDER BY name SEPARATOR ';') FROM emp GROUP BY dept
SELECT GROUP_CONCAT(DISTINCT tag) FROM t
SELECT COUNT(name) FROM emp GROUP BY dept
参考来源
- https://github.com/oceanbase/oceanbase-doc/blob/2a5ae3a23a51729d065cec716508eb26cb064106/zh-CN/100.learn-more-about-oceanbase/500.compatibility-with-mysql.md
- https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_group-concat
- https://en.oceanbase.com/docs/common-oceanbase-database-10000000001228196
- https://docs.opengauss.org/zh/docs/6.0.0/docs/SQLReference/%E8%81%9A%E9%9B%86%E5%87%BD%E6%95%B0.html
相关改造点
- MYSQL → oceanbase 4.3 mysql 模式 全部改造点
- oceanbase 4.3 mysql 模式 兼容性总览
- MYSQL 迁移国产库总览
- ORACLE 逗号连接疑似笛卡尔积 迁移 oceanbase 4.3 mysql 模式 怎么改
- ORACLE 深层嵌套子查询 迁移 oceanbase 4.3 mysql 模式 怎么改
- ORACLE DELETE 未带 WHERE 迁移 oceanbase 4.3 mysql 模式 怎么改
- ORACLE DISTINCT 与 ORDER BY 同用 迁移 oceanbase 4.3 mysql 模式 怎么改
- ORACLE 谓词中函数包裹列 迁移 oceanbase 4.3 mysql 模式 怎么改
- ORACLE HAVING 承载过滤条件 迁移 oceanbase 4.3 mysql 模式 怎么改