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

To support drop column with index #4012

Closed
blacktear23 opened this issue Aug 3, 2017 · 4 comments
Closed

To support drop column with index #4012

blacktear23 opened this issue Aug 3, 2017 · 4 comments
Labels

Comments

@blacktear23
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
create table `t` (`id` int(11), `name` varchar(255), key `idx_name` (`name`));
alter table `t` drop column `name`
  1. What did you expect to see?

name column should be deleted with out any error. In MySQL:

mysql> alter table t drop column name;
Query OK, 0 rows affected (0.06 sec)
Records: 0  Duplicates: 0  Warnings: 0
  1. What did you see instead?
mysql> alter table t drop column name;
ERROR 1105 (HY000): can't drop column name with index covered now

this "feature" will break some ORM's migration scripts.

  1. What version of TiDB are you using (tidb-server -V)?
@breezewish
Copy link
Member

breezewish commented Aug 3, 2017

Currently we does not support dropping column with index. Please refer to docs about MySQL compatibility.

@blacktear23
Copy link
Contributor Author

Sure I know that. But the important thing is this will break some ORM's migration script. Such as django-orm.

@breezewish breezewish changed the title drop column with index is not allowed To support drop column with index Aug 3, 2017
@breezewish
Copy link
Member

breezewish commented Aug 3, 2017

Got that. I modified your issue title to better fit your idea.

@zimulala
Copy link
Contributor

zimulala commented Nov 2, 2017

It's duplicated with #3364

@zimulala zimulala closed this as completed Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants