List:Commits« Previous MessageNext Message »
From:Kristofer Pettersson Date:June 17 2009 2:28pm
Subject:bzr commit into mysql-5.1-bugteam branch (kristofer.pettersson:2950)
Bug#43758
View as plain text  
#At file:///home/thek/Development/cpp/mysqlbzr/mysql-5.1-bugteam/ based on revid:joro@stripped

 2950 Kristofer Pettersson	2009-06-17
      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.

    modified:
      mysql-test/r/query_cache_debug.result
      mysql-test/t/query_cache_debug.test
=== modified file 'mysql-test/r/query_cache_debug.result'
--- a/mysql-test/r/query_cache_debug.result	2009-06-16 08:34:47 +0000
+++ b/mysql-test/r/query_cache_debug.result	2009-06-17 14:28:11 +0000
@@ -141,9 +141,9 @@ KILL QUERY @flush_thread_id;
 ** and finally release the mutex. The threads will continue to wait
 ** until a broadcast signal reaches them causing both threads to 
 ** 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;
 **
 ** Finally signal the DELETE statement on THD1 one last time.

=== modified file 'mysql-test/t/query_cache_debug.test'
--- a/mysql-test/t/query_cache_debug.test	2009-06-16 08:34:47 +0000
+++ b/mysql-test/t/query_cache_debug.test	2009-06-17 14:28:11 +0000
@@ -206,10 +206,11 @@ LET $wait_condition= SELECT SQL_NO_CACHE
 --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 


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-5.1-bugteam branch (kristofer.pettersson:2950)Bug#43758Kristofer Pettersson17 Jun