Bug #2525 --query-cache-type=0 does not block query cache memory allocation
Submitted: 26 Jan 2004 18:13 Modified: 4 Feb 2004 17:00
Reporter: Peter Zaitsev (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0 OS:
Assigned to: Bugs System CPU Architecture:Any

[26 Jan 2004 18:13] Peter Zaitsev
Description:
If you have query cache disabled by its size set to non zero value it is allocated.

[mysqld]
query-cache-type=0
query-cache-size=256M

Will result in 256M of memory allocated which is never used 

This is not how user would expect it to work - expecting what if you disable query
cache, its variables should not matter (consider --skip-innodb as analog) 

How to repeat:
Just try starting MySQL with large query cache which is disabled.
[4 Feb 2004 1:32] Victor Vagin
bk commit - 4.0 tree (vva:1.1692)
[4 Feb 2004 5:52] Sergei Golubchik
--skip-innodb is not an analog, you cannot turn innodb support ON runtime, while query cache you can switch on and off in a running server as may times as you wish.

That's why with --skip-innodb you know for sure that no innodb buffer will ever be used, while with --query-cache-type=0 you cannot say it.

Better to document this behaviour properly
[4 Feb 2004 17:00] Michael Widenius
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
product(s).