兼容性判定
公开资料依据 · 建议 PoC 复核支持度partial
严重度major
置信度medium
依据规则my.ddl.charset_collation
怎么改
需按命中位置逐条评估改写
判定说明
Dolphin 支持部分 CHARACTER SET/COLLATE 语法且受多字符集参数约束,排序规则映射并非全量;结论为 doc_based 草案,建议 PoC 复核
库侧 / 应用侧路径
库侧改造
可行:目标端字符集/排序规则映射;大小写不敏感需 CI collation 或 citext/表达式索引补偿
应用侧改造
可行:大小写敏感性变化的查询与唯一性路径回归
推荐路线:db_side。验证建议:大小写不敏感等值查询与唯一约束用例必测(utf8mb4_general_ci 隐式依赖重灾区)
规则样例
CREATE TABLE t (name VARCHAR(50)) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
ALTER TABLE t MODIFY name VARCHAR(50) CHARACTER SET gbk
CREATE TABLE t (name VARCHAR(50))
参考来源
- https://docs.opengauss.org/zh/docs/latest/extension_reference/dolphin_numeric_types.html
- https://docs.opengauss.org/zh/docs/6.0.0/docs/ExtensionReference/dolphin-%E5%AD%97%E7%AC%A6%E7%B1%BB%E5%9E%8B.html
- https://docs.opengauss.org/zh/docs/6.0.0/docs/ExtensionReference/dolphin-%E4%BA%8C%E8%BF%9B%E5%88%B6%E7%B1%BB%E5%9E%8B.html
- https://docs.opengauss.org/zh/docs/6.0.0/docs/ExtensionReference/dolphin-%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2.html
- https://github.com/opengauss-mirror/Plugin/tree/e3a0cf2ae9bbcee1aa103497f6eca1b1152a4146/contrib/dolphin
- https://dev.mysql.com/doc/refman/8.0/en/charset-table.html
相关改造点
- MYSQL → opengauss 6.0 B 模式 全部改造点
- opengauss 6.0 B 模式 兼容性总览
- MYSQL 迁移国产库总览
- MYSQL GET_LOCK / RELEASE_LOCK 咨询锁函数 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL ALTER TABLE ALGORITHM= / LOCK= 在线 DDL 子句 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL ALTER TABLE 增删主键限制 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL AUTO_INCREMENT 自增列 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL CHECK 约束执行与静默忽略差异 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL 列 DEFAULT 表达式兼容差异 迁移 opengauss 6.0 B 模式 怎么改