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

Table options & Auto increment #15410

Closed
OlafvdSpek opened this issue Jul 29, 2019 · 9 comments · Fixed by #15922
Closed

Table options & Auto increment #15410

OlafvdSpek opened this issue Jul 29, 2019 · 9 comments · Fixed by #15922
Assignees
Labels
Bug A problem or regression with an existing feature good first issue 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

  1. Open Table Operations - Table options in two tabs
  2. Update the Auto increment value in the first tab to simulate some inserts.
  3. Update the Table comment in the second tab
  4. Note the Auto increment value has been reset to the original value.

I'm not sure about the consequences but I don't think the reset is desirable.

@Tithugues
Copy link
Contributor

Sorry, but I don't see the issue here.

You have two forms, each one specifies an AUTO_INCREMENT value. Don't you expect it to be used when you submit the form?

@OlafvdSpek
Copy link
Author

OlafvdSpek commented Jul 29, 2019

I don't expect / want auto-increment to be updated when I only want to update the table comment or another option.

One solution would be to only set auto-increment if the user actually changed it (store the old value in a hidden field).

Note that auto-increment could easily be updated by some other concurrent process that's using the DB.

@MauricioFauth MauricioFauth added the enhancement A feature request for improving phpMyAdmin label Aug 3, 2019
@williamdes williamdes added this to Triage zone in Enhancements Jan 23, 2020
@williamdes
Copy link
Member

@OlafvdSpek do you mean for example you open the page, someone increments the value and you save the comment. The good value would be lost.
Let me know if I am right.
In that case it is a bug.

@OlafvdSpek
Copy link
Author

You're right ;)

@williamdes williamdes added this to Needs triage in issues via automation Jan 24, 2020
@williamdes williamdes removed this from Triage zone in Enhancements Jan 24, 2020
@williamdes williamdes added Bug A problem or regression with an existing feature good first issue and removed enhancement A feature request for improving phpMyAdmin labels Jan 24, 2020
@williamdes williamdes moved this from Needs triage to Medium priority in issues Jan 24, 2020
@yashrajbothra
Copy link
Contributor

yashrajbothra commented Jan 29, 2020

Can anyone elaborate this issue?

What i understood is for example:
I have 2 tabs for editing same row which has 251 as its primary index.
In first tab we increment primary index
then in second one we change another column

So the change in 2nd tab will be lost?
Am i right?

@williamdes
Copy link
Member

then in second one we change another column

Changing the table description for example

So the change in 2nd tab will be lost?

The incrementation from first tab will be lost and replace by the value of the 2nd tab (bug !)

@yashrajbothra
Copy link
Contributor

Hey @williamdes I think the better solution would be to give a warning if the auto_increment value has diffrence.

What do you think?

@williamdes
Copy link
Member

Hey @yashrajbothra I do not agree
Having a hidden field to detect if the value was changed by the user is the right solution :)

Ex:
AI value
AI initial value

If (AI value! = AI initial value)
//User changed the value
Update the AI value ()

@yashrajbothra
Copy link
Contributor

Okay this also seems good solution i will try to implement this 👍

yashrajbothra added a commit to yashrajbothra/phpmyadmin that referenced this issue Feb 5, 2020
Signed-off-by: Yash Bothra <yashrajbothra786@gmail.com>
@williamdes williamdes added this to the 5.0.2 milestone Feb 5, 2020
@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 Feb 5, 2020
@williamdes williamdes linked a pull request Feb 5, 2020 that will close this issue
williamdes added a commit that referenced this issue Feb 10, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Medium priority to Closed Feb 10, 2020
@williamdes williamdes self-assigned this Feb 10, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2021
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 good first issue 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.

5 participants