? Failure

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
18 Dec 2016

Pull Request for Issue #13265.

Summary of Changes

This PR makes the query cache disabled when db driver runs in debug mode.
Only for mysql, because the profiling only seems to work there.

Also add checks for profiling in pdomysql (was missing), which meand pdo mysql driver now as the "Profile" in debug console too.

Testing Instructions

  1. Apply patch
  2. Enable debug mode in global config and system debug plugin
  3. Test Mysql, MySqli and PDO Mysql drivers: Reload the pages and confirm in debug console "Database Queries" "Profile" that each query in run without using db cache

Example

With query cache
image

Without query cache
image

Documentation Changes Required

None.

Notes

avatar andrepereiradasilva andrepereiradasilva - open - 18 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 18 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Dec 2016
Category Libraries
avatar andrepereiradasilva andrepereiradasilva - change - 18 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 18 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 18 Dec 2016
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - change - 18 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 18 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 18 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 18 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 18 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 18 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 18 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 18 Dec 2016
avatar csthomas
csthomas - comment - 19 Dec 2016

There is also option DEMAND which may add some flexibility.
http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_query_cache_type
https://mariadb.com/kb/en/mariadb/server-system-variables/#query_cache_type

I do not know if anybody care but for mysql driver missing line:
mysql_query($this->connection, 'SET profiling_history_size = 100;');

avatar andrepereiradasilva
andrepereiradasilva - comment - 19 Dec 2016

Yeah i noticed that too. Didn't add it because i have no MySQL drivers to test. If anyone confirms it works i can add it.

avatar csthomas
csthomas - comment - 19 Dec 2016

IMHO It does not depend on type of driver like mysql or mysqli or pdomysql.
http://stackoverflow.com/questions/8443674/profiling-and-optimising-php-mysql-websites

avatar andrepereiradasilva
andrepereiradasilva - comment - 19 Dec 2016

ok added to mysql too, but his needs to be tested in mysql also

avatar csthomas
csthomas - comment - 20 Dec 2016

I have tested this item successfully on eecd48e

Code review + I have tested it before and after patch on mysql, mysqli and pdomysql with successful.
On debug mode is now with out checking query cache.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13268.

avatar csthomas csthomas - test_item - 20 Dec 2016 - Tested successfully
avatar waader
waader - comment - 28 Mar 2017

Profil comes with this message: "No SHOW PROFILE (maybe because there are more than 100 queries)"
But I have only 26 queries logged. The system plugin is enabled with each option set to yes.

Does somebody know what´s going on here?

avatar brianteeman
brianteeman - comment - 4 Jan 2018

The query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

as of MySQL 5.6.8 query cache is now disabled by default
source https://dev.mysql.com/doc/refman/5.7/en/query-cache-configuration.html

avatar csthomas
csthomas - comment - 4 Jan 2018

@brianteeman Is there any rule? How to become a new owner?

avatar mbabker
mbabker - comment - 4 Jan 2018

Fork the source branch of the PR, make your changes, and open a new PR.

avatar brianteeman
brianteeman - comment - 8 May 2018

@csthomas will you be able to take over this?

avatar csthomas
csthomas - comment - 9 May 2018

I created a new PR #20322.

avatar joomla-cms-bot joomla-cms-bot - change - 9 May 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 9 May 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 9 May 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-05-09 10:05:17
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 9 May 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 May 2018

closed in favor of PR #20322 as stated above.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13268.

Add a Comment

Login with GitHub to post a comment