MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:August 24 2009 5:52pm
Subject:bzr push into mysql-5.4 branch (alik:2873 to 2874) Bug#37431
View as plain text  
 2874 Alexander Nozdrin	2009-08-24
      A test case for Bug#37431 (DROP TABLE does not report errors correctly).

    modified:
      mysql-test/r/drop.result
      mysql-test/t/drop.test
 2873 Dmitry Lenev	2009-08-21
      Fix for bug #46748 "Assertion in MDL_context::wait_for_locks()
      on INSERT + CREATE TRIGGER".
      
      Concurrent execution of statements involving stored functions or triggers
      which were using several tables and DDL statements which affected those
      tables on debug build of server might have led to assertion failures in
      MDL_context::wait_for_locks(). Non-debug build was not affected.
      
      The problem was that during back-off which happens when open_tables()
      encounters conflicting metadata lock for one of the tables being open
      we didn't reset MDL_request::ticket value for requests which correspond
      to tables from extended prelocking set. Since these requests are part 
      of of list of requests to be waited for in Open_table_context this broke 
      assumption that ticket value for them is 0 in MDL_context::wait_for_locks() 
      and caused assertion failure.
      
      This fix ensures that close_tables_for_reopen(), which performs this back-off 
      resets MDL_request::ticket value not only for tables directly used by the
      statement but also for tables from extended prelocking set, thus satisfying
      assumption described above.
     @ mysql-test/r/mdl_sync.result
        Added test case for bug #46748 "Assertion in MDL_context::wait_for_locks()
        on INSERT + CREATE TRIGGER".
     @ mysql-test/t/mdl_sync.test
        Added test case for bug #46748 "Assertion in MDL_context::wait_for_locks()
        on INSERT + CREATE TRIGGER".
     @ sql/sql_base.cc
        Since metadata lock requests for tables from extended part of prelocking 
        set are also part of list of requests to be waited for in Open_table_context
        in close_tables_for_reopen() we have to reset MDL_request::ticket values for 
        them to assumptions in MDL_context::wait_for_locks().

    modified:
      mysql-test/r/mdl_sync.result
      mysql-test/t/mdl_sync.test
      sql/sql_base.cc
=== modified file 'mysql-test/r/drop.result'
--- a/mysql-test/r/drop.result	2009-05-01 13:37:34 +0000
+++ b/mysql-test/r/drop.result	2009-08-24 17:52:09 +0000
@@ -141,3 +141,17 @@ Error	1146	Table 'mysql.proc' doesn't ex
 # --
 
 End of 5.1 tests
+
+# --
+# -- Bug#37431 (DROP TABLE does not report errors correctly).
+# --
+DROP TABLE IF EXISTS t1;
+DROP TABLE t1;
+ERROR 42S02: Unknown table 't1'
+SHOW WARNINGS;
+Level	Code	Message
+Error	1051	Unknown table 't1'
+
+# --
+# -- End of Bug#37431.
+# --

=== modified file 'mysql-test/t/drop.test'
--- a/mysql-test/t/drop.test	2009-05-25 10:10:18 +0000
+++ b/mysql-test/t/drop.test	2009-08-24 17:52:09 +0000
@@ -235,3 +235,24 @@ DROP DATABASE mysql_test;
 
 --echo
 --echo End of 5.1 tests
+
+###########################################################################
+
+--echo
+--echo # --
+--echo # -- Bug#37431 (DROP TABLE does not report errors correctly).
+--echo # --
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+--error ER_BAD_TABLE_ERROR
+DROP TABLE t1;
+
+SHOW WARNINGS;
+
+--echo
+--echo # --
+--echo # -- End of Bug#37431.
+--echo # --


Attachment: [text/bzr-bundle] bzr/alik@sun.com-20090824175209-hi2v13y7svh8i9ki.bundle
Thread
bzr push into mysql-5.4 branch (alik:2873 to 2874) Bug#37431Alexander Nozdrin24 Aug