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

Can't rename primary key with auto increment #14732

Closed
OlafvdSpek opened this issue Nov 18, 2018 · 15 comments · Fixed by #15204
Closed

Can't rename primary key with auto increment #14732

OlafvdSpek opened this issue Nov 18, 2018 · 15 comments · Fixed by #15204
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@OlafvdSpek
Copy link

When trying to rename the primary key, it returns a multiple primary keys error. Only happens when it has auto increment.

V: master

@lem9
Copy link
Contributor

lem9 commented Nov 18, 2018

I confirm and this is a regression from 4.8.3. In current master, MySQL error 1068 is returned with no reason. Can be reproduced in sakila.actor.

@OlafvdSpek
Copy link
Author

Maybe (guessing) it's because the key and/or auto-inc updates are done in a separate query from the main updates.

@williamdes williamdes added the Bug A problem or regression with an existing feature label Nov 18, 2018
saurass added a commit to saurass/phpmyadmin that referenced this issue Apr 15, 2019
Signed-off-by: Saurabh Srivastava <saurabhsrivastava312@gmail.com>
saurass added a commit to saurass/phpmyadmin that referenced this issue Apr 15, 2019
Signed-off-by: Saurabh Srivastava <saurabhsrivastava312@gmail.com>
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Apr 15, 2019
@williamdes
Copy link
Member

Can someone help me find the rename PK ui ?

@OlafvdSpek
Copy link
Author

Rename the field that has the primary key.

@williamdes williamdes self-assigned this Apr 15, 2019
@williamdes williamdes added this to the 5.0.0 milestone Apr 15, 2019
saurass added a commit to saurass/phpmyadmin that referenced this issue Apr 16, 2019
Signed-off-by: Saurabh Srivastava <saurabhsrivastava312@gmail.com>

Fix - phpmyadmin#14732 - taking care for phpmyadmin#13235

Signed-off-by: Saurabh Srivastava <saurabhsrivastava312@gmail.com>
williamdes added a commit that referenced this issue Apr 25, 2019
Fixes: #14732
Pull-request: #15204
Signed-off-by: William Desportes <williamdes@wdes.fr>
@OlafvdSpek
Copy link
Author

OlafvdSpek commented Jul 29, 2019

@williamdes williamdes reopened this Aug 2, 2019
@williamdes williamdes added this to Needs triage in issues via automation Aug 11, 2019
@williamdes williamdes moved this from Needs triage to n/a priority in issues Aug 11, 2019
@williamdes williamdes removed the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Oct 21, 2019
@williamdes williamdes removed their assignment Oct 21, 2019
@OlafvdSpek
Copy link
Author

Shouldn't this be high-priority?

@williamdes
Copy link
Member

Now that it is 5.0 + I agree

@williamdes williamdes moved this from n/a priority to High priority in issues Dec 16, 2019
@williamdes
Copy link
Member

@OlafvdSpek #15204 did not solve the issue ?

@OlafvdSpek
Copy link
Author

No

https://demo.phpmyadmin.net/master-config/index.php?route=/table/structure&db=sakila&table=actor

@NikhilNagdev
Copy link
Contributor

I have solved this issue please review my PR.

@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Dec 16, 2019
@williamdes williamdes self-assigned this Dec 16, 2019
williamdes added a commit that referenced this issue Dec 16, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from High priority to Closed Dec 16, 2019
williamdes added a commit that referenced this issue Dec 16, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes
Copy link
Member

@OlafvdSpek I fixed the fix (a993e36) of the fix (836cc74) of my fix in 850c125

Code was added by #14417 in 2a07cee

@OlafvdSpek
Copy link
Author

Do tests cover this scenario?

@williamdes
Copy link
Member

Yes, they do

If you discover that I made a mistake please report ASAP

@OlafvdSpek
Copy link
Author

But they didn't before?

Otherwise I don't understand #14732 (comment)

@williamdes
Copy link
Member

@OlafvdSpek no, not before
I had no time and asked if maybe a miracle had solved the issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

4 participants