diff options
author | Kristofer Pettersson <kristofer.pettersson@sun.com> | 2009-06-17 16:28:11 +0200 |
---|---|---|
committer | Kristofer Pettersson <kristofer.pettersson@sun.com> | 2009-06-17 16:28:11 +0200 |
commit | 389fba8403df5cb0bbf109245cc9c9c4d39463e7 (patch) | |
tree | bc22d1ba6aa4d6331b79cc8c5ef1a3d10e858654 /mysql-test/t/query_cache_debug.test | |
parent | 48d911e70834af190a0650e77584f644525af538 (diff) | |
download | mariadb-git-389fba8403df5cb0bbf109245cc9c9c4d39463e7.tar.gz |
Bug#43758 Query cache can lock up threads in 'freeing items' state
This patch corrects a misstake in the test case for bug patch 43658.
There was a race in the test case when the thread id was retrieved from the processlist.
The result was that the same thread id was signalled twice and one thread id wasn't
signalled at all.
The affected platforms appears to be limited to linux.
mysql-test/r/query_cache_debug.result:
There was a race in the test case when the thread id was retrieved from the processlist.
The result was that the same thread id was signalled twice and one thread id wasn't
signalled at all.
mysql-test/t/query_cache_debug.test:
There was a race in the test case when the thread id was retrieved from the processlist.
The result was that the same thread id was signalled twice and one thread id wasn't
signalled at all.
Diffstat (limited to 'mysql-test/t/query_cache_debug.test')
-rw-r--r-- | mysql-test/t/query_cache_debug.test | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mysql-test/t/query_cache_debug.test b/mysql-test/t/query_cache_debug.test index f54e7105807..d30cd458e99 100644 --- a/mysql-test/t/query_cache_debug.test +++ b/mysql-test/t/query_cache_debug.test @@ -206,10 +206,11 @@ LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 1 FROM information_schema.pro --echo ** and finally release the mutex. The threads will continue to wait --echo ** until a broadcast signal reaches them causing both threads to --echo ** come alive and check the condition. -SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' LIMIT 1 INTO @thread_id; +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id ASC LIMIT 1 INTO @thread_id; KILL QUERY @thread_id; -SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' LIMIT 1 INTO @thread_id; +SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id DESC LIMIT 1 INTO @thread_id; KILL QUERY @thread_id; + --echo ** --echo ** Finally signal the DELETE statement on THD1 one last time. --echo ** The stmt will complete the query cache invalidation and return |