[MDEV-4516] SELECT from I_S.QUERY_CACHE_INFO produces ER_UNKNOWN_ERROR when query cache size is 0 Created: 2013-05-12 Updated: 2013-06-11 Resolved: 2013-05-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.31 |
| Fix Version/s: | 5.5.32 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
bzr version-info
|
| Comments |
| Comment by roberto spadim [ 2013-05-24 ] |
|
1)flush query cache don't work (DISCONSIDER THIS, I SHOULD USE reset query cache) ------- Qcache_queries_in_cache=1 ------- that's not a plugin problem, maybe a mariadb query cache problem 2) file #sqlc24_7_1a6.MAD hum.. temporary file isn't deleted 3)when query_cache_size=0 set global query_cache_size=0; 4)DELETE? 5)more columns 6)how to use "query_cache_strip_comments" var? |
| Comment by roberto spadim [ 2013-05-24 ] |
|
i was reading review: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3705#plugin/qc_info/qc_info.cc 79 HASH *queries = qc->get_queries(); shouldn't it be after line 85 if (qc->try_lock(thd)) and before line: 88 /* loop through all queries in the query cache */ 2) when query_cache_size=0, queries->records = null? shouldn't the lock (qc->try_lock) return a "can't" information? 3) the internal key on line 119, is a "primary key" of query cache? could it be exposed for future "delete from query_cache_information where key = 'xyz' "? 119 key = (const char*)query_cache_query_get_key(query_cache_block_raw, |
| Comment by Sergei Golubchik [ 2013-05-24 ] |
|
1) doesn't matter. qc->get_queries() simply returns a pointer to the data structure. This pointer is always (char*)qc + offsetof(Query_cache, queries), that is, it is qc plus fixed constant. So one can call get_queries() any time with or without a lock. But, of course, one should never look into the returned "queries" HASH without a lock. 2) when query_cache_size==0, qc->try_lock() fails. This is what this bug — 3) no, I_S tables are strictly read-only views into the internal system data. At least for now. There's no way to modify them. |
| Comment by roberto spadim [ 2013-05-24 ] |
|
nice =) thanks about source code and memory format information =) |
| Comment by roberto spadim [ 2013-05-24 ] |
|
what about the temporary file not being deleted? |
| Comment by Sergei Golubchik [ 2013-05-24 ] |
|
yes. please don't report new bugs as comments to existing bugs. |
| Comment by roberto spadim [ 2013-05-24 ] |
| Comment by roberto spadim [ 2013-05-25 ] |
|
set global query_cache_type=0, global query_cache_size=1000000; get the same error code |
| Comment by roberto spadim [ 2013-05-25 ] |
|
this is a "patch" (my first one in mariadb!! =) ) of mariadb 5.5.31 query cache plugin that's all =) |
| Comment by Sergei Golubchik [ 2013-05-25 ] |
|
Thanks! But this particular bug is already fixed. Could you create a new issue — for adding more columns to the table — and attach your patch there please? |
| Comment by roberto spadim [ 2013-06-11 ] |
|
yes, it's: |