List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:April 30 2010 12:12pm
Subject:bzr push into mysql-trunk-bugfixing branch (alik:3026 to 3027)
Bug#52356
View as plain text  
 3027 Alexander Nozdrin	2010-04-30
      Patch for Bug#52356: query_cache_debug fails on Linux.
      
      There were two problems here:
        1. misleading error message
        2. abusing KILL QUERY in the test case
      
      1. The server reported "'DELETE FROM t1' failed: 1689: Wait on a lock was
      aborted due to a pending exclusive lock", while the proper error message
      should be "'DELETE FROM t1' failed: 1317: Query execution was interrupted".
      
      The problem is that the server has two different flags for
      signalling that a query is being killed: THD::killed and
      mysys_var::abort. The test case triggers a race: sometimes
      mysys_var::abort is set earlier than THD::killed. That leads
      to the following situation:
      
        - thr_lock() checks mysys_var::abort and returns error status,
          since mysys_var::abort is set;
      
        - the caller (mysql_lock_tables()) gets an error from thr_lock(),
          but THD::killed is not set, so it decides that thr_lock() couldn't
          get a lock due to a pending exclusive lock.
      
      This is a known issue with the server and it's not going to be fixed soon.
      
      5.5 differs from 5.1 here as follows: when thr_lock() returns an error:
        - 5.1 continues trying thr_lock() until success;
        - 5.5 propagates the error
      
      2. The test case uses KILL QUERY is a highly concurent environment.
      
      The fix is to wait for the dying statement to rest in peace before
      executing another DELETE FROM t1.

    modified:
      mysql-test/collections/default.experimental
      mysql-test/t/query_cache_debug.test
 3026 Alfranio Correia	2010-04-29
      Post-merge fix for BUG#51894, BUG#53075
      
      thread_temporary_used is not initialized causing
      valgrind's warnings.

    modified:
      sql/sql_class.cc
=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2010-04-26 14:51:56 +0000
+++ b/mysql-test/collections/default.experimental	2010-04-30 12:12:41 +0000
@@ -16,7 +16,6 @@ main.mysqlbinlog_row_innodb @solaris    
 main.mysqlbinlog_row_myisam @solaris     # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
 main.outfile_loaddata @solaris           # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
 main.plugin* @solaris                    # Bug#47146 Linking problem with example plugin when dtrace enabled
-main.query_cache_debug @linux            # Bug#52356 2010-04-10 alik query_cache_debug fails on Linux
 main.signal_demo3 @solaris               # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
 main.sp @solaris                         # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
 main.wait_timeout @solaris               # Bug#51244 2010-04-26 alik wait_timeout fails on OpenSolaris

=== modified file 'mysql-test/t/query_cache_debug.test'
--- a/mysql-test/t/query_cache_debug.test	2009-06-17 14:28:11 +0000
+++ b/mysql-test/t/query_cache_debug.test	2010-04-30 12:12:41 +0000
@@ -221,6 +221,9 @@ KILL QUERY @thread_id;
 SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate2' LIMIT 1 INTO @flush_thread_id;
 KILL QUERY @flush_thread_id;
 
+LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE Id = @flush_thread_id AND Command = 'Sleep';
+--source include/wait_condition.inc
+
 --echo **
 --echo *************************************************************************
 --echo ** No tables should be locked


Attachment: [text/bzr-bundle] bzr/alik@sun.com-20100430121241-7xl8oi36f7aek0ja.bundle
Thread
bzr push into mysql-trunk-bugfixing branch (alik:3026 to 3027)Bug#52356Alexander Nozdrin30 Apr