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

Enable Profiling tab for mysql (PDO) queries and disable cache in debug mode #20322

Merged
merged 1 commit into from Nov 17, 2018

Conversation

csthomas
Copy link
Contributor

@csthomas csthomas commented May 9, 2018

Pull Request for Issue #13265.

Summary of Changes

  1. This PR makes the query cache disabled when db driver runs in debug mode.
  2. Enable Profile for Mysql PDO.

Not direct forked but based on #13268.

Testing Instructions

Details at #13268

  1. Enable debug mode in global config and system debug plugin
  2. Test at least one of driver: Mysql, MySqli or PDO Mysql.
  3. Check debug console "Database Queries" and "Profile" tab. Each query should run without using database cache.

Expected result

No cached query.
On PDOMYSQL driver profile tab is enabled.

Actual result

On debug mode queries use database cache.
On PDOMYSQL driver profile tab is disabled.

Documentation Changes Required

No

@csthomas csthomas changed the title Disable sql query cache in debug mode Enable Profiling for mysql (PDO) queries and disable cache in debug mode May 15, 2018
@csthomas csthomas changed the title Enable Profiling for mysql (PDO) queries and disable cache in debug mode Enable Profiling tab for mysql (PDO) queries and disable cache in debug mode May 15, 2018
@alikon
Copy link
Contributor

alikon commented Aug 8, 2018

I have tested this item ✅ successfully on 8b23be5


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

@csthomas
Copy link
Contributor Author

csthomas commented Sep 9, 2018

At now it may be hard to follow the test instruction because the cache is disabled by default in mysql 5.7.

You will only see the difference in PDOMYSQL driver, in which the Profile tab will be visible.

To enable the cache, you can add the following lines to the mysql configuration file.
In case of Ubuntu 18 is /etc/mysql/mysql.conf.d/mysqld.cnf

query_cache_type = 1
query_cache_size = 10M
query_cache_limit = 10M 

@csthomas
Copy link
Contributor Author

This PR is designed to display more relevant information when the debug mode is enabled.

Maybe there is one more person to test any driver and do simple code review on the rest.

@SharkyKZ
Copy link
Contributor

I have tested this item ✅ successfully on 8b23be5


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

@Quy
Copy link
Contributor

Quy commented Nov 15, 2018

RTC


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

@joomla-cms-bot joomla-cms-bot added RTC This Pull Request is Ready To Commit and removed PR-staging labels Nov 15, 2018
@mbabker mbabker added this to the Joomla 3.9.1 milestone Nov 17, 2018
@mbabker mbabker merged commit 0da37c6 into joomla:staging Nov 17, 2018
@joomla-cms-bot joomla-cms-bot added PR-staging and removed RTC This Pull Request is Ready To Commit labels Nov 17, 2018
@csthomas csthomas deleted the query-cache branch November 17, 2018 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants