Bug #68241 Query cache disabled by default
Submitted: 1 Feb 2013 8:50 Modified: 1 Feb 2013 13:18
Reporter: Martijn Otto Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S5 (Performance)
Version:5.6.9 OS:Any
Assigned to: Paul Dubois CPU Architecture:Any

[1 Feb 2013 8:50] Martijn Otto
Description:
Without providing any command-line switch or mentioning the query-cache-type in the my.cnf file, the query cache is disabled. This is not in line with the documentation, which specifies the query cache is enabled by default.

Note that to enable the query cache a command-line switch must be given, due to a bug in the options parsing (as specified in bug #68240)

How to repeat:
Start the mysqld process and run the following query:

mysql> select @@query_cache_type;
+--------------------+
| @@query_cache_type |
+--------------------+
| OFF                |
+--------------------+
1 row in set (0.00 sec)

Suggested fix:
Enable the query cache by default.
[1 Feb 2013 9:04] Shane Bester
The query cache is meant to be disabled by default (for performance reasons).
So, the docs are wrong in one place I can see:

The default value for "query_cache_type" is really OFF in 5.6.9 but docs falsely claim it's ON.

http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_query_cache_typ...
[1 Feb 2013 13:18] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

There was a change to the query_cache_default in 5.6.8, as indicated here:

http://dev.mysql.com/doc/refman/5.6/en/server-default-changes.html

The change in default is also noted in the table at the beginning of:

http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_query_cache_typ...

Unfortunately, the following text still says the default is ON. I'll correct that. Thanks for pointing this out.