【标题描述】:mysql 分库分表迁移到openGauss不兼容问题:不支持分表(表名不同,结构相同)
【操作系统和硬件信息】与操作系统无关
【测试环境】(单机/1主x备x级联备):
【被测功能】:mysql迁移openGauss兼容性
【测试类型】:测试mysql库表导入openGauss是否兼容
【数据库版本】:openGauss任一版本
【预置条件】: 设置B模式的数据库以兼容MySQL特性,后创建多个分表
【操作步骤】(请填写详细的操作步骤):
【解决方案】
在dolphin插件中兼容MySQL语法,即参考auto_increment自动改为sequence的功能,实现自动将新创建的重复索引名改为和表名相关的新索引名。
Hey @星爷001, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Hi @星爷001, please use the command /sig xxx to add a SIG label to this issue.
For example: /sig sqlengine or /sig storageengine or /sig om or /sig ai and so on.
You can find more SIG labels from Here.
If you have no idea about that, please contact with @xiangxinyong , @zhangxubo .
和提单人沟通,考虑在索引名冲突的情况下,自动将索引名重命名为新的名称,例如:
create table t1(id int, index idx_id(id));
create table t2(id int, index idx_id(id));
这个场景,第二个索引 idx_id 就自动重命名为 idx_id_1 这样,打个告警提示下。
考虑在插件实现,并使用guc参数 dolphin.b_compatibility_mode 控制
验证通过:
b_db=# set dolphin.b_compatibility_mode=on;
b_db=# create table t1(id int,index idx_id(id));
CREATE TABLE
b_db=# create table t2(id int,index idx_id(id));
WARNING: index "idx_id" already exists, change index name to "t2_id_idx"
CREATE TABLE
登录 后才可以发表评论