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

Status / Advisor problem with MySQL 8.0.11 #14245

Closed
tm8544 opened this issue May 1, 2018 · 16 comments
Closed

Status / Advisor problem with MySQL 8.0.11 #14245

tm8544 opened this issue May 1, 2018 · 16 comments
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

@tm8544
Copy link

tm8544 commented May 1, 2018

Steps to reproduce

  1. On PhpMyAdmin, select tab Status and the select link Advisor

Expected behaviour

Advisor output without errors

Actual behaviour

Errors occurred while executing rule expressions:
- Failed calculating value for rule 'Query cache disabled'. Error when evaluating: Variable "query_cache_size" is not valid around position 1 for expression `query_cache_size`.
- Failed evaluating precondition for rule 'Query cache efficiency (%)'. Error when evaluating: Variable "Qcache_hits" is not valid around position 14 for expression `Com_select + Qcache_hits > 0 && !fired('Query cache disabled')`.
- Failed calculating value for rule 'Query Cache usage'. Error when evaluating: Variable "Qcache_free_memory" is not valid around position 7 for expression `100 - Qcache_free_memory / query_cache_size * 100`.
- Failed calculating value for rule 'Query cache fragmentation'. Error when evaluating: Variable "Qcache_free_blocks" is not valid around position 1 for expression `Qcache_free_blocks / (Qcache_total_blocks / 2) * 100`.
- Failed evaluating precondition for rule 'Query cache low memory prunes'. Error when evaluating: Variable "Qcache_inserts" is not valid around position 1 for expression `Qcache_inserts > 0 && !fired('Query cache disabled')`.
- Failed calculating value for rule 'Query cache max size'. Error when evaluating: Variable "query_cache_size" is not valid around position 1 for expression `query_cache_size`.
- Failed calculating value for rule 'Query cache min result size'. Error when evaluating: Variable "query_cache_limit" is not valid around position 1 for expression `query_cache_limit`.

Server configuration

Operating system:
Windows 10 Pro x64

Web server:
Apache 2.4.33 (Win64)

Database:
MySQL 8.0.11

PHP version:
7.2.5 x64 (ApacheLounge)

phpMyAdmin version:
4.8.0.1

Client configuration

Browser:
Chrome

Operating system:
Windows 10 Home x64

@devenbansod devenbansod added the Bug A problem or regression with an existing feature label May 5, 2018
@rotech1
Copy link

rotech1 commented Sep 12, 2018

Seeing this also in Server version: 8.0.12 - MySQL Community Server - GPL ( running on CentOS 7)

Version information: 4.8.3 (up to date)

Apache/2.4.6 (CentOS) PHP/7.1.21
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407
PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
PHP version: 7.1.21

@olokos
Copy link

olokos commented Jan 5, 2019

So what is the solution? Referenced issue is also closed now, but no solution by following those issues.

@olokos
Copy link

olokos commented Feb 1, 2019

Still present in 4.8.5

@tm8544
Copy link
Author

tm8544 commented Feb 11, 2019

Probably needs an update to libraries\advisory_rules.txt?

@williamdes williamdes added this to To be sorted in issues May 2, 2019
@williamdes williamdes moved this from To be sorted to Medium priority in issues May 4, 2019
@Tithugues
Copy link
Contributor

Tithugues commented Aug 22, 2019

Just to be clear for developers that would like to work on this issue: some MySQL variables were removed in 8.0.3, like query_cache_size (see https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html).

I think that we will need to differentiate rules, regarding the MySQL version (and maybe regarding the MariaDB version).
Possible ways to fix it:

  • if rule precondition allows to check MySQL version, then we can just update the preconditions
  • have separated rules files

@Tithugues
Copy link
Contributor

@tm8544 , would it be please possible that you test the branch in this PR: #15457?

@tm8544
Copy link
Author

tm8544 commented Aug 23, 2019

This is the result:

Errors occurred while executing rule expressions:

  • Failed evaluating precondition for rule 'Query cache efficiency (%)'. Error when evaluating: Variable "Qcache_hits" is not valid around position 70 for expression (IS_MYSQL == false || PMA_MYSQL_INT_VERSION < 80003) && Com_select + Qcache_hits > 0 && !fired('Query cache disabled').
  • Failed evaluating precondition for rule 'Query cache low memory prunes'. Error when evaluating: Variable "Qcache_inserts" is not valid around position 57 for expression (IS_MYSQL == false || PMA_MYSQL_INT_VERSION < 80003) && Qcache_inserts > 0 && !fired('Query cache disabled').

@Tithugues
Copy link
Contributor

OK, sorry for that, I had some difficulties to use a real MySQL ≥8.0.3, so I didn't have this error…
Unfortunately, I'm not sure that the current changes will help us to fix these last bugs… So maybe we should really think about having many files and use the right one(s) regarding the MySQL version.

@Tithugues
Copy link
Contributor

@tm8544 , based on what I already did, I split the rules file in 2 files and load the needed file(s) regarding the DBMS.
Can you please have another try?

Thank you.

@tm8544
Copy link
Author

tm8544 commented Aug 24, 2019

Tested, there are no errors anymore in advisor output.

@williamdes
Copy link
Member

@tm8544 Can you close this issue if 4.9.1 solves it ?

@tm8544
Copy link
Author

tm8544 commented Sep 22, 2019

Can you confirm that this includes two separate advisory rule files as in 99b2dfa ?
Otherwise it will not work.

@Tithugues
Copy link
Contributor

Yes, it is.

@tm8544
Copy link
Author

tm8544 commented Sep 22, 2019

When I download phpMyAdmin-4.9.1-english.zip, the libraries folder has only one advisory rule file, advisory_rules.txt.
It still produces the same error when Mysql > 8.0.3

@williamdes
Copy link
Member

@tm8544 I forgot to merge the PR..
can you try the patch #15461 ?

@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 Sep 22, 2019
@williamdes williamdes self-assigned this Sep 22, 2019
@tm8544
Copy link
Author

tm8544 commented Sep 22, 2019

#15461 works ok.
I will close this when it is merged .

williamdes added a commit that referenced this issue Sep 22, 2019
Fixes: #14245
Pull-request: #15461
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Sep 22, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes added this to the 4.9.2 milestone Sep 22, 2019
issues automation moved this from Medium priority to Closed Sep 22, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 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

No branches or pull requests

6 participants