List:Commits« Previous MessageNext Message »
From:Dmitry Lenev Date:October 25 2010 6:11pm
Subject:bzr commit into mysql-5.5-runtime branch (Dmitry.Lenev:3179)
View as plain text  
#At file:///home/dlenev/src/bzr/mysql-5.5-rt-grl-ps-fix/ based on revid:kostja@stripped

 3179 Dmitry Lenev	2010-10-25
      More changes to draft patch refactoring global read
      lock implementation. Makes GRL yet another type of
      metadata lock and thus exposes it to deadlock detector
      in MDL subsystem.
      
      Solves bugs #54673 "It takes too long to get readlock for
      'FLUSH TABLES WITH READ LOCK'" and #57006 "Deadlock between
      HANDLER and FLUSH TABLES WITH READ LOCK".
      
      Work-in-progress.
      
      Fix sporadical failures of perfschema.global_read_lock test.

    modified:
      mysql-test/suite/perfschema/r/func_file_io.result
      mysql-test/suite/perfschema/r/func_mutex.result
      mysql-test/suite/perfschema/r/global_read_lock.result
      mysql-test/suite/perfschema/t/func_file_io.test
      mysql-test/suite/perfschema/t/func_mutex.test
      mysql-test/suite/perfschema/t/global_read_lock.test
      sql/sql_parse.cc
=== modified file 'mysql-test/suite/perfschema/r/func_file_io.result'
--- a/mysql-test/suite/perfschema/r/func_file_io.result	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/r/func_file_io.result	2010-10-25 18:11:22 +0000
@@ -115,3 +115,4 @@ LEFT JOIN information_schema.PROCESSLIST
 GROUP BY i.user, h.operation
 HAVING BYTES > 0
 ORDER BY i.user, h.operation;
+UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES';

=== modified file 'mysql-test/suite/perfschema/r/func_mutex.result'
--- a/mysql-test/suite/perfschema/r/func_mutex.result	2010-01-12 01:47:27 +0000
+++ b/mysql-test/suite/perfschema/r/func_mutex.result	2010-10-25 18:11:22 +0000
@@ -110,4 +110,5 @@ WHERE (EVENT_NAME = 'wait/synch/rwlock/s
 SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_fm2_rw_timed;
 test_fm2_rw_timed
 Success
+UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES';
 DROP TABLE t1;

=== modified file 'mysql-test/suite/perfschema/r/global_read_lock.result'
--- a/mysql-test/suite/perfschema/r/global_read_lock.result	2010-10-18 12:33:49 +0000
+++ b/mysql-test/suite/perfschema/r/global_read_lock.result	2010-10-25 18:11:22 +0000
@@ -1,4 +1,5 @@
 use performance_schema;
+update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
 grant SELECT, UPDATE, LOCK TABLES on performance_schema.* to pfsuser@localhost;
 flush privileges;
 connect (con1, localhost, pfsuser, , test);

=== modified file 'mysql-test/suite/perfschema/t/func_file_io.test'
--- a/mysql-test/suite/perfschema/t/func_file_io.test	2010-08-12 14:08:52 +0000
+++ b/mysql-test/suite/perfschema/t/func_file_io.test	2010-10-25 18:11:22 +0000
@@ -190,3 +190,6 @@ GROUP BY i.user, h.operation
 HAVING BYTES > 0
 ORDER BY i.user, h.operation;
 --enable_result_log
+
+# Clean-up.
+UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES';

=== modified file 'mysql-test/suite/perfschema/t/func_mutex.test'
--- a/mysql-test/suite/perfschema/t/func_mutex.test	2010-01-12 01:47:27 +0000
+++ b/mysql-test/suite/perfschema/t/func_mutex.test	2010-10-25 18:11:22 +0000
@@ -128,4 +128,6 @@ SET @after_count = (SELECT SUM(TIMER_WAI
 
 SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_fm2_rw_timed;
 
+# Clean-up.
+UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES';
 DROP TABLE t1;

=== modified file 'mysql-test/suite/perfschema/t/global_read_lock.test'
--- a/mysql-test/suite/perfschema/t/global_read_lock.test	2010-10-18 12:33:49 +0000
+++ b/mysql-test/suite/perfschema/t/global_read_lock.test	2010-10-25 18:11:22 +0000
@@ -22,6 +22,10 @@
 
 use performance_schema;
 
+# Make test robust against errors in other tests.
+# Ensure that instrumentation is turned on when we create new connection.
+update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+
 grant SELECT, UPDATE, LOCK TABLES on performance_schema.* to pfsuser@localhost;
 flush privileges;
 
@@ -64,15 +68,6 @@ let $wait_condition= select 1 from perfo
 
 --source include/wait_condition.inc
 
-if (!$success)
-{
-select * from performance_schema.EVENTS_WAITS_CURRENT;
-show status like '%perf%';
-show processlist;
-select * from performance_schema.THREADS;
-set session debug="+d,execute_command_crash";
-}
-
 # Observe the blocked thread in the performance schema :)
 select event_name,
   left(source, locate(":", source)) as short_source,

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2010-10-25 15:16:12 +0000
+++ b/sql/sql_parse.cc	2010-10-25 18:11:22 +0000
@@ -4334,8 +4334,6 @@ finish:
     DEBUG_SYNC(thd, "execute_command_after_close_tables");
 #endif
 
-  DBUG_EVALUATE_IF("execute_command_crash", (abort(), 0), 0);
-
   /*
     It is time to release metadata lock protecting against global read
     lock if it is one of statements which require explicit protection.


Attachment: [text/bzr-bundle] bzr/dmitry.lenev@oracle.com-20101025181122-u0ucz9ygjq5om3hk.bundle
Thread
bzr commit into mysql-5.5-runtime branch (Dmitry.Lenev:3179) Dmitry Lenev25 Oct