Bug #30269 | Query cache eats memory | ||
---|---|---|---|
Submitted: | 7 Aug 2007 7:09 | Modified: | 31 Aug 2007 15:38 |
Reporter: | Vadim TKACHENKO | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Query Cache | Severity: | S3 (Non-critical) |
Version: | 5.0.45 | OS: | Any |
Assigned to: | Kristofer Pettersson | CPU Architecture: | Any |
Tags: | qc |
[7 Aug 2007 7:09]
Vadim TKACHENKO
[7 Aug 2007 7:16]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[8 Aug 2007 20:54]
Martin Friebe
I am not sure, but I don't see the Problem with caching this query. It is true the user vadim can not read it back from the cache, due to his usage of column level privileges. But the query cache is global, all users are sharing it. Log in as root after Vadim executed the select, and execute the same select as root (or any user which isn't restricted by his privileges). Executing the query as root, will hit the query cache. So the stored result was no loss at all.
[9 Aug 2007 10:35]
Peter Zaitsev
Martin, If other users use this query they would populate the query cache quickly by themselves so it still looks like most likely waste to me. I think the consistent way would be either not store the query in case of column level privileges or make them work.
[15 Aug 2007 13:48]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/32562 ChangeSet@1.2480, 2007-08-15 15:48:06+02:00, thek@adventure.(none) +3 -0 Bug #30269 Query cache eats memory Although the query cache doesn't support retrieval of statements containing column level access control, it was still possible to cache such statements thus wasting memory. This patch extends the access control check on the target tables to avoid caching a statement with column level restrictions.
[17 Aug 2007 12:31]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/32696 ChangeSet@1.2480, 2007-08-17 14:31:35+02:00, thek@adventure.(none) +4 -0 Bug #30269 Query cache eats memory Although the query cache doesn't support retrieval of statements containing column level access control, it was still possible to cache such statements thus wasting memory. This patch extends the access control check on the target tables to avoid caching a statement with column level restrictions.
[17 Aug 2007 14:57]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/32700 ChangeSet@1.2480, 2007-08-17 16:55:20+02:00, thek@adventure.(none) +4 -0 Bug #30269 Query cache eats memory Although the query cache doesn't support retrieval of statements containing column level access control, it was still possible to cache such statements thus wasting memory. This patch extends the access control check on the target tables to avoid caching a statement with column level restrictions.
[21 Aug 2007 11:43]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/32805 ChangeSet@1.2481, 2007-08-21 13:43:09+02:00, thek@adventure.(none) +5 -0 Bug#30269 Query cache eats memory Although the query cache doesn't support retrieval of statements containing column level access control, it was still possible to cache such statements thus wasting memory. This patch extends the access control check on the target tables to avoid caching a statement with column level restrictions. Views are excepted and can be cached but only retrieved by super user account.
[21 Aug 2007 23:21]
Bugs System
Pushed into 5.1.22-beta
[21 Aug 2007 23:22]
Bugs System
Pushed into 5.0.48
[27 Aug 2007 13:07]
Paul DuBois
Pushed to 5.1.23, not 5.1.22.
[31 Aug 2007 15:38]
Paul DuBois
Noted in 5.0.48, 5.1.23 changelogs. The query cache does not support retrieval of statements for which column level access control applies, but the server was still caching such statements, thus wasting memory.