List:Commits« Previous MessageNext Message »
From:Dmitry Lenev Date:September 13 2010 9:30am
Subject:bzr commit into mysql-trunk branch (dlenev:3193)
View as plain text  
#At file:///home/dlenev/src/bzr/mysql-trunk-mrg/ based on revid:alik@stripped

 3193 Dmitry Lenev	2010-09-13 [merge]
      Merge changes from mysql-5.5.6-m3-release into
      mysql-trunk tree.

    modified:
      mysql-test/r/sp-destruct.result
      mysql-test/t/sp-destruct.test
      sql/CMakeLists.txt
      sql/sp.cc
=== modified file 'mysql-test/r/sp-destruct.result'
--- a/mysql-test/r/sp-destruct.result	2010-03-03 09:24:53 +0000
+++ b/mysql-test/r/sp-destruct.result	2010-09-13 09:29:25 +0000
@@ -134,3 +134,19 @@ Warning	1405	Failed to revoke all privil
 # Restore the procs_priv table
 RENAME TABLE procs_priv_backup TO mysql.procs_priv;
 FLUSH TABLE mysql.procs_priv;
+#
+# Bug #56137 "Assertion `thd->lock == 0' failed on upgrading from
+#             5.1.50 to 5.5.6".
+#
+drop database if exists mysqltest;
+# Backup mysql.proc.
+flush table mysql.proc;
+create database mysqltest;
+# Corrupt mysql.proc to make it unusable by current version of server.
+alter table mysql.proc drop column type;
+# The below statement should not cause assertion failure.
+drop database mysqltest;
+Warnings:
+Error	1695	Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
+# Restore mysql.proc.
+drop table mysql.proc;

=== modified file 'mysql-test/t/sp-destruct.test'
--- a/mysql-test/t/sp-destruct.test	2010-04-16 14:24:06 +0000
+++ b/mysql-test/t/sp-destruct.test	2010-09-13 09:29:25 +0000
@@ -222,3 +222,33 @@ SHOW WARNINGS;
 --echo # Restore the procs_priv table
 RENAME TABLE procs_priv_backup TO mysql.procs_priv;
 FLUSH TABLE mysql.procs_priv;
+
+
+--echo #
+--echo # Bug #56137 "Assertion `thd->lock == 0' failed on upgrading from
+--echo #             5.1.50 to 5.5.6".
+--echo #
+--disable_warnings
+drop database if exists mysqltest;
+--enable_warnings
+--echo # Backup mysql.proc.
+flush table mysql.proc;
+let $MYSQLD_DATADIR= `select @@datadir`;
+--copy_file $MYSQLD_DATADIR/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/proc.frm
+--copy_file $MYSQLD_DATADIR/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/proc.MYD
+--copy_file $MYSQLD_DATADIR/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/proc.MYI
+
+create database mysqltest;
+--echo # Corrupt mysql.proc to make it unusable by current version of server.
+alter table mysql.proc drop column type;
+--echo # The below statement should not cause assertion failure.
+drop database mysqltest;
+
+--echo # Restore mysql.proc.
+drop table mysql.proc;
+--copy_file $MYSQLTEST_VARDIR/tmp/proc.frm $MYSQLD_DATADIR/mysql/proc.frm
+--copy_file $MYSQLTEST_VARDIR/tmp/proc.MYD $MYSQLD_DATADIR/mysql/proc.MYD
+--copy_file $MYSQLTEST_VARDIR/tmp/proc.MYI $MYSQLD_DATADIR/mysql/proc.MYI 
+--remove_file $MYSQLTEST_VARDIR/tmp/proc.frm
+--remove_file $MYSQLTEST_VARDIR/tmp/proc.MYD
+--remove_file $MYSQLTEST_VARDIR/tmp/proc.MYI

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2010-08-20 08:48:59 +0000
+++ b/sql/CMakeLists.txt	2010-09-13 09:29:25 +0000
@@ -289,8 +289,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
      COMMAND ${CMAKE_COMMAND}
      ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_initial_db.cmake
      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data
-     COMMAND  ${CMAKE_COMMAND} -E touch initdb.dep
-     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+     COMMAND  ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/initdb.dep
      DEPENDS mysqld
   )
   ADD_CUSTOM_TARGET(initial_database  

=== modified file 'sql/sp.cc'
--- a/sql/sp.cc	2010-07-29 13:37:49 +0000
+++ b/sql/sp.cc	2010-09-13 09:29:25 +0000
@@ -440,6 +440,7 @@ static TABLE *open_proc_table_for_update
 {
   TABLE_LIST table_list;
   TABLE *table;
+  MDL_ticket *mdl_savepoint= thd->mdl_context.mdl_savepoint();
   DBUG_ENTER("open_proc_table_for_update");
 
   table_list.init_one_table("mysql", 5, "proc", 4, "proc", TL_WRITE);
@@ -450,6 +451,9 @@ static TABLE *open_proc_table_for_update
   if (!proc_table_intact.check(table, &proc_table_def))
     DBUG_RETURN(table);
 
+  close_thread_tables(thd);
+  thd->mdl_context.rollback_to_savepoint(mdl_savepoint);
+
   DBUG_RETURN(NULL);
 }
 


Attachment: [text/bzr-bundle] bzr/dlenev@mysql.com-20100913092925-cr3p4dlhwyixuct1.bundle
Thread
bzr commit into mysql-trunk branch (dlenev:3193)Dmitry Lenev13 Sep