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

Faster index rename #14953

Closed
linaspasv opened this issue Feb 13, 2019 · 17 comments · Fixed by #15912
Closed

Faster index rename #14953

linaspasv opened this issue Feb 13, 2019 · 17 comments · Fixed by #15912
Assignees
Labels
enhancement A feature request for improving phpMyAdmin has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Milestone

Comments

@linaspasv
Copy link

phpMyAdmin is still using the old DROP INDEX and ADD INDEX method when someone tries to rename index/key. It's not the problem for small tables but it's time consuming for a larger ones.

As of MySQL 5.7 version RENAME INDEX is possible through ALTER TABLE (please see http://dev.mysql.com/doc/refman/5.7/en/alter-table.html). It would be nice if we could have a possibility of RENAME INDEX if nothing else except name has changed during index/key edit.

Thanks.

@shucon
Copy link
Contributor

shucon commented Feb 28, 2019

@ibennetch @williamdes what do you think? I think it would be a good enhancement.

@williamdes
Copy link
Member

@shucon I think adding the new syntax could be great is we detect that the version supports it :)

@williamdes williamdes added the enhancement A feature request for improving phpMyAdmin label Feb 28, 2019
@kartik1000
Copy link
Contributor

@williamdes, Hey don't you think we already have this feature. See this
Screenshot 2019-03-31 at 11 39 27 PM
This is in the insert section, from the edit we can easily edit the name.
Do let me know your views on it.

@ibennetch
Copy link
Member

@kartik1000 maybe I’m misunderstanding something, but think that interface uses the DROP INDEX / ADD INDEX syntax referenced in the original post. The feature request is about changing the back end to use RENAME INDEX where supported.

@williamdes
Copy link
Member

williamdes commented Mar 31, 2019

@williamdes, Hey don't you think we already have this feature.

@kartik1000 as @ibennetch explained, this is more about the SQL syntax to use for renaming an index :)

@kartik1000
Copy link
Contributor

Yup @ibennetch and @williamdes, got it from the first line I thought it was about front-end. That's why the issue seemed a bit weird to me. Thanks for the Explaination :)

@williamdes williamdes added this to Triage zone in Enhancements Jan 23, 2020
@williamdes
Copy link
Member

@kartik1000 do you want to implement the change ?

@williamdes williamdes moved this from Triage zone to Nice to have soon in Enhancements Jan 24, 2020
@kartik1000
Copy link
Contributor

@williamdes Yes surely.

@kartik1000
Copy link
Contributor

@williamdes Shall I add another button of 'rename' in addition to edit and drop or should it work through edit only?

@williamdes
Copy link
Member

If RENAME support changing the definition of the index then use edit.
If RENAME only does renaming add a rename button.

@kartik1000
Copy link
Contributor

I will add a button then because it only renames the button. I referred to the documentation given in description of the issue

@kartik1000
Copy link
Contributor

@williamdes Does something like this look good?
Screenshot 2020-01-28 at 1 24 55 PM

@williamdes
Copy link
Member

@kartik1000 Yeah, looks good !

@kartik1000
Copy link
Contributor

@williamdes I have implemented this feature but this is not supported by MariaDB and is supported by only MySQL after MySQL 5.7. I should have checked this first 😅 . What should I do now?

@williamdes
Copy link
Member

@kartik1000 I think you need to hide the button or disable it
Maybe disabling the button and adding a tooltip to explain could be an idea

@kartik1000
Copy link
Contributor

@williamdes I thought we can keep the button for MariaDB but it will perform task through add/drop instead of rename. What do you think?

@williamdes
Copy link
Member

Yeah, very good idea!

@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 added this to the 5.1.0 milestone Feb 23, 2020
williamdes pushed a commit to kartik1000/phpmyadmin that referenced this issue Nov 5, 2020
…ax of MySQL

Signed-off-by: Kartik Kathuria <kathuriakartik0@gmail.com>
@williamdes williamdes self-assigned this Nov 13, 2020
williamdes added a commit that referenced this issue Nov 13, 2020
…yntax of MySQL

Issue: #14953
Pull-request: #15912
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Nov 13, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
Enhancements automation moved this from Nice to have soon to Done Nov 13, 2020
williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Dec 24, 2020
Ref: 3dad3b5
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Jan 19, 2021
Ref: 3dad3b5
Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement A feature request for improving phpMyAdmin has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Enhancements
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants