Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alter语句审核报错 #2736

Open
iwanghc opened this issue Nov 1, 2024 · 0 comments
Open

alter语句审核报错 #2736

iwanghc opened this issue Nov 1, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@iwanghc
Copy link
Collaborator

iwanghc commented Nov 1, 2024

版本信息(Version)

SQLE:main 3008c9fcb5956e1159147bdd3b4906112e6b2480
DMS:main 582a66d37b9212e15f7ff0f1d07a5ab745fb082f

问题描述(Describe)

审核alter语句时,出现报错

截图或日志(Log)

image
image

如何复现(To Reproduce)

创建一个索引名称与外键名称一致的表

CREATE TABLE `member_group_role_op_ranges` (
  `member_group_uid` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `role_uid` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `op_range_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `range_uids` text COLLATE utf8mb4_unicode_ci,
  KEY `member_group_role_op_ranges_ibfk_1` (`member_group_uid`),
  CONSTRAINT `member_group_role_op_ranges_ibfk_1` FOREIGN KEY (`member_group_uid`) REFERENCES `member_groups` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

在线审核对于这个表包含drop索引的alter的语句

ALTER TABLE `member_group_role_op_ranges` DEFAULT CHARACTER SET
= utf8mb4 COLLATE = utf8mb4_general_ci,
MODIFY COLUMN `member_group_uid` varchar(32) DEFAULT NULL,
MODIFY COLUMN `role_uid` varchar(32) DEFAULT NULL,
MODIFY COLUMN `op_range_type` varchar(255) DEFAULT NULL,
MODIFY COLUMN `range_uids` text,
DROP KEY `member_group_role_op_ranges_ibfk_1`

后台出现的panic,通过sqled.log看是数组越界异常
image

问题原因

解决方案

变更影响面

受影响的模块或功能

外部引用的潜在问题或风险

版本兼容性

测试建议

@iwanghc iwanghc added the bug Something isn't working label Nov 1, 2024
@ColdWaterLW ColdWaterLW added this to the v3.2410.0 milestone Nov 1, 2024
@ColdWaterLW ColdWaterLW assigned iwanghc and unassigned ColdWaterLW Nov 1, 2024
@ColdWaterLW ColdWaterLW modified the milestones: v3.2410.0, v3.2411.0 Nov 6, 2024
@ColdWaterLW ColdWaterLW modified the milestones: v3.2411.0, v3.2412.0 Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants