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 table with RenameIndex and ModifyColumn are not changed related columns #76

Closed
Defined2014 opened this issue Apr 19, 2022 · 0 comments · Fixed by #79
Closed

Alter table with RenameIndex and ModifyColumn are not changed related columns #76

Defined2014 opened this issue Apr 19, 2022 · 0 comments · Fixed by #79
Assignees
Labels
bug Something isn't working

Comments

@Defined2014
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table a (a int, b double, index i(a, b));
alter table a rename index i to i1, change column b c int;
show create table a;

2. What did you expect to see? (Required)

mysql> show create table a;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| a     | CREATE TABLE `a` (
  `a` int(11) DEFAULT NULL,
  `c` int(11) DEFAULT NULL,
  KEY `i1` (`a`,`c`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

mysql> show create table a;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| a     | CREATE TABLE `a` (
  `a` int(11) DEFAULT NULL,
  `c` int(11) DEFAULT NULL,
  KEY `i1` (`a`,`b`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

found by schrddl test #63

@Defined2014 Defined2014 self-assigned this Apr 19, 2022
@Defined2014 Defined2014 added the bug Something isn't working label Apr 19, 2022
@Defined2014 Defined2014 changed the title Alter table with RenameIndex and ModifyColumn are not worked well. Alter table with RenameIndex and ModifyColumn are not changed related columns Apr 19, 2022
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
1 participant