Skip to content

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Feb 5, 2024

MySQL allows a primary key with an auto_increment column to be dropped as long as there is a secondary index that includes the auto_increment column as the first column in the index. (MySQL Reference)

This PR also enables dropping a primary key by referencing it by it's ID (PRIMARY), in order to match MySQL's behavior, e.g.

DROP INDEX `PRIMARY` ON t;

Related to dolthub/dolt#7456

@fulghum fulghum requested a review from zachmu February 5, 2024 22:47
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fulghum fulghum merged commit 0aaa10a into main Feb 7, 2024
@fulghum fulghum deleted the fulghum/dolt-7456 branch February 7, 2024 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants