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

"REFERENCES" priviledge is used by MySQL - wrong message #16463

Closed
mvorisek opened this issue Nov 6, 2020 · 5 comments · Fixed by #16588
Closed

"REFERENCES" priviledge is used by MySQL - wrong message #16463

mvorisek opened this issue Nov 6, 2020 · 5 comments · Fixed by #16588
Assignees
Labels
Bug A problem or regression with an existing feature good first issue help wanted ui Issues relating to the user interface
Projects
Milestone

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Nov 6, 2020

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to Edit privileges page of any user
  2. Hover mouse over REFERENCES priviledge
  3. See wrong message - at least MySQL 8 supports REFERENCES priviledge (without this permission, foreign keys can not be created, thus very misleading)

Expected behavior

Message is shown only for databases that really does NOT support REFERENCES priviledge.

Screenshots

image

@mvorisek
Copy link
Contributor Author

mvorisek commented Nov 6, 2020

it seems that message is hardcoded for any version:

<code><dfn title="{% trans 'Has no effect in this MySQL version.' %}">REFERENCES</dfn></code>

@ibennetch
Copy link
Member

ibennetch commented Nov 7, 2020

From what I can tell, we have to account for three scenarios. MySQL 5.6.22 and newer use this, older versions do not, and all of MariaDB ignores it.

So we should test whether the server is MySQL or MariaDB, check the MySQL version and change the text to "Required for creating foreign key relations", "Not used for this server version", or "Not used for MariaDB servers" as is appropriate.

@williamdes williamdes added Bug A problem or regression with an existing feature good first issue help wanted ui Issues relating to the user interface labels Nov 10, 2020
@williamdes williamdes added this to the 5.1.0 milestone Nov 10, 2020
@williamdes williamdes added this to Needs triage in issues via automation Nov 10, 2020
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Nov 10, 2020
@prashanttholia
Copy link
Contributor

Hi @williamdes,

I have raised a PR (#16588) carrying a fix for the issue. I request you to review it and accept it if the updates look good.

Thanks.

@mvorisek
Copy link
Contributor Author

@prashanttholia LGTM, thanks for your contribution!

@prashanttholia
Copy link
Contributor

Thanks! Welcome!

@williamdes williamdes self-assigned this Jan 21, 2021
williamdes added a commit that referenced this issue Jan 21, 2021
Pull-request: #16588
Fixes: #16463
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jan 22, 2021
[ci skip]
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from to be fixed soon to Closed Jan 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2022
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 help wanted ui Issues relating to the user interface
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

4 participants