diff options
author | unknown <thek@adventure.(none)> | 2007-06-18 17:46:29 +0200 |
---|---|---|
committer | unknown <thek@adventure.(none)> | 2007-06-18 17:46:29 +0200 |
commit | b9dc6ad7abb8daaf57ff009d3e11fbd96e0d95ea (patch) | |
tree | 427d3838911bfff0059a0a7616998356f48b4a93 /server-tools | |
parent | ad4da53510fe17b7b20912753232719fd8d3e033 (diff) | |
download | mariadb-git-b9dc6ad7abb8daaf57ff009d3e11fbd96e0d95ea.tar.gz |
Bug#28211 RENAME DATABASE and query cache don't play nicely together
When all table blocks were removed from the query cache the client session
hung in a tight loop waiting on an impossible condition while consuming a lot
of CPU.
This patch also corrects an error which caused valid tables to sometimes be
removed from the query cache.
mysql-test/r/query_cache.result:
Added test case to make sure server doesn't hang in a tight loop if last
table block is removed from the cache.
mysql-test/t/query_cache.test:
Added test case to make sure server doesn't hang in a tight loop if last
table block is removed from the cache.
sql/sql_cache.cc:
- Refactored loop over table blocks. The invalidate_table() function effects
the elements over which we iterate. The previous stop condition was broken
due to a compiler optimization error probably caused by the goto-statement
pointing out of the loop. The effect being that tables_blocks was never
checked for null values and thus the loop never terminated.
- The new implementation uses two while loops instead of a goto-statement.
The tables_blocks is a circular list which becomes null if the last table
block is removed from the list.
Diffstat (limited to 'server-tools')
0 files changed, 0 insertions, 0 deletions