3172 Dmitry Lenev 2010-10-21
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. Improved comments in test scripts.
modified:
mysql-test/include/check_ftwrl_compatible.inc
mysql-test/include/check_ftwrl_incompatible.inc
3171 Dmitry Lenev 2010-10-21
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. Remove resolved questions.
modified:
mysql-test/r/flush_read_lock.result
mysql-test/r/mdl_sync.result
mysql-test/t/flush_read_lock.test
mysql-test/t/mdl_sync.test
sql/sql_parse.cc
=== modified file 'mysql-test/include/check_ftwrl_compatible.inc'
--- a/mysql-test/include/check_ftwrl_compatible.inc 2010-10-20 20:18:59 +0000
+++ b/mysql-test/include/check_ftwrl_compatible.inc 2010-10-21 07:23:30 +0000
@@ -4,16 +4,14 @@
#
# PARAMETERS
# $con_aux1 Name of the 1st aux connection to be used by this script.
-# $con_aux2 Name of the 1st aux connection to be used by this script.
+# $con_aux2 Name of the 2nd aux connection to be used by this script.
# $statement Statement to be checked.
# $cleanup_stmt Statement to be run in order to revert effects of
# statement to be checked.
# $skip_3rd_chk Skip the 3rd stage of checking.
#
-#
# EXAMPLE
-# flush.test
-#
+# flush_read_lock.test
#
--disable_result_log
--disable_query_log
@@ -70,6 +68,11 @@ if ($success)
--echo Success: Was able to run '$statement' with FTWRL active in another connection.
connection default;
+# Apparently statement was successfully executed and so
+# was not blocked by FTWRL.
+# To be safe against wait_condition.inc succeeding due to
+# races let us first reap the statement being checked to
+# ensure that it has been successfully executed.
--reap
connection $con_aux1;
@@ -118,6 +121,10 @@ if ($success)
{
--echo Success: Was able to run FTWRL while '$statement' was active in another connection.
connection $con_aux1;
+# Apparently FTWRL was successfully executed and so was not blocked by
+# the statement being checked. To be safe against wait_condition.inc
+# succeeding due to races let us first reap the FTWRL to ensure that it
+# has been successfully executed.
--reap
unlock tables;
set debug_sync="now SIGNAL go";
=== modified file 'mysql-test/include/check_ftwrl_incompatible.inc'
--- a/mysql-test/include/check_ftwrl_incompatible.inc 2010-10-20 20:18:59 +0000
+++ b/mysql-test/include/check_ftwrl_incompatible.inc 2010-10-21 07:23:30 +0000
@@ -13,8 +13,7 @@
# $skip_3rd_chk Skip the 3rd stage of checking.
#
# EXAMPLE
-# flush.test
-#
+# flush_read_lock.test
#
--disable_result_log
--disable_query_log
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-runtime branch (Dmitry.Lenev:3171 to 3172) | Dmitry Lenev | 21 Oct |