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

Util.php does not use correct MySql version if version is 8.0 or above #14947

Closed
tm8544 opened this issue Feb 11, 2019 · 9 comments · Fixed by #15916
Closed

Util.php does not use correct MySql version if version is 8.0 or above #14947

tm8544 opened this issue Feb 11, 2019 · 9 comments · Fixed by #15916
Assignees
Labels
enhancement A feature request for improving phpMyAdmin waiting on upstream Issues blocked by a third-party
Milestone

Comments

@tm8544
Copy link

tm8544 commented Feb 11, 2019

If Mysql version is 8.0 or above, phpmyadmin/libraries/classes/Util.php still uses max version 5.7

See Util.php starting from line 358:
if ($serverVersion >= 50700) {
$mysql = '5.7';
} elseif ($serverVersion >= 50600) {
$mysql = '5.6';
} elseif ($serverVersion >= 50500) {
$mysql = '5.5';
}

It should be
if ($serverVersion >= 80000) {
$mysql = '8.0';
} elseif ($serverVersion >= 50700) {
$mysql = '5.7';
} elseif ($serverVersion >= 50600) {
$mysql = '5.6';
} elseif ($serverVersion >= 50500) {
$mysql = '5.5';
}

@ibennetch
Copy link
Member

This is a great suggestion and good job noticing this behavior.

A complete solution should probably also adjust for different MariaDB versions, as well. For instance, I'm on MariaDB 10.1.37 (getVersion returns 100137) but I'm still linked to the 5.7 documentation with this patch.

@williamdes I thought you had done some work to link to the appropriate documentation depending on if the user was running a MariaDB or MySQL instance, am I remembering incorrectly what the purpose was?

We'll probably need to end up with checks here for MySQL vs MariaDB, then decide the appropriate version number within that logic.

@ibennetch
Copy link
Member

The proposed patch is a good improvement despite the other issue I pointed out.

@williamdes williamdes added enhancement A feature request for improving phpMyAdmin waiting on upstream Issues blocked by a third-party labels Feb 26, 2019
@williamdes
Copy link
Member

@ibennetch @tm8544 I think this can be implemented on https://github.com/williamdes/mariadb-mysql-kbs

@ibennetch
Copy link
Member

Related to #14520

@victorphoenix3
Copy link
Contributor

@williamdes I have tested and found that we cannot directly implement this patch since then many of the links will break.
For example - when we call show_mysql_docu('procedure_analyse') in display_structure.twig we get redirected to https://dev.mysql.com/doc/refman/5.7/en/procedure-analyse.html .
But after applying the patch we will be redirected to https://dev.mysql.com/doc/refman/8.0/en/procedure-analyse.html which does not exist since
PROCEDURE ANALYSE() has been removed in MySQL 8.0.

I am looking for a better fix for the issue.

@williamdes
Copy link
Member

@victorphoenix3 this fix must be implemented on this repo https://github.com/williamdes/mariadb-mysql-kbs

@williamdes
Copy link
Member

williamdes commented Jan 15, 2020

It would make sense

@victorphoenix3
Copy link
Contributor

@victorphoenix3 this fix must be implemented on this repo https://github.com/williamdes/mariadb-mysql-kbs

@williamdes could u please explain why I need to use this repo? What is this repo is for?

@williamdes
Copy link
Member

@victorphoenix3 this fix must be implemented on this repo https://github.com/williamdes/mariadb-mysql-kbs

@williamdes could u please explain why I need to use this repo? What is this repo is for?

I started to move out all the dynamic data in #14459

And would like to continue moving out the data, and URLs that are left.
Because it is not phpMyAdmin's job to keep up to date with the websites.
And also it would allow to have links for MariaDB :

@williamdes could u please explain why I need to use this repo?

#14459 is be an example and the first purpose of my repo

@williamdes williamdes added this to Triage zone in Enhancements Jan 23, 2020
@williamdes williamdes moved this from Triage zone to Deprecations in Enhancements Jan 23, 2020
@williamdes williamdes added this to the 5.1.0 milestone Feb 9, 2020
Enhancements automation moved this from Deprecations to Done Feb 9, 2020
williamdes added a commit that referenced this issue Feb 9, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 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 waiting on upstream Issues blocked by a third-party
Projects
Enhancements
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants