Bug #20988 Query cache size is limited to unsigned int size (2 gb)
Submitted: 12 Jul 2006 9:13 Modified: 26 Jan 2009 14:18
Reporter: Oli Sennhauser Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Query Cache Severity:S4 (Feature request)
Version:5.0.21 OS:Any
Assigned to: CPU Architecture:Any
Tags: 2 gb, cache, limit, query, size

[12 Jul 2006 9:13] Oli Sennhauser
Description:
When Query cache size is set above 2 gb (yes i know it is to huge). It is set back to 0 (does it mean query cache is disabled then?). This is IMHO not appropriate in 64bit world anymore!

How to repeat:
mysql> show global variables like 'query_cache_size%';
+------------------+-----------+
| Variable_name    | Value     |
+------------------+-----------+
| query_cache_size | 536870912 |
+------------------+-----------+

mysql> set global query_cache_size=3*1024*1024*1024;

mysql> show global variables like 'query_cache_size%';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| query_cache_size | 0     |
+------------------+-------+

mysql> set global query_cache_size=512*1024*1024;

mysql> show global variables like 'query_cache_size%';
+------------------+-----------+
| Variable_name    | Value     |
+------------------+-----------+
| query_cache_size | 536870912 |
+------------------+-----------+

Suggested fix:
I generally recommend to use bigints for all suche size metrics (also for the future). We will always run into the same troubles. And 64bit world started since long time ago!
[14 Jul 2006 10:43] Valeriy Kravchuk
Thank you for a reasonable feature request.
[26 Jan 2009 14:03] Mattias Jonsson
Bug#22239 is related.
[26 Jan 2009 14:18] Mattias Jonsson
Duplicate of bug#32213