List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:August 24 2010 2:39pm
Subject:bzr commit into mysql-5.5-runtime branch (jon.hauglid:3119)
View as plain text  
#At file:///export/home/x/mysql-5.5-runtime-test/ based on revid:jon.hauglid@stripped

 3119 Jon Olav Hauglid	2010-08-24 [merge]
      Merge from mysql-5.5-bugfixing to mysql-5.5-runtime.

    modified:
      mysql-test/include/mysqlhotcopy.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/mysqlbinlog_row.result
      sql/log_event.cc
      sql/sql_insert.cc
      sql/sql_table.cc
=== modified file 'mysql-test/include/mysqlhotcopy.inc'
--- a/mysql-test/include/mysqlhotcopy.inc	2010-06-07 08:47:04 +0000
+++ b/mysql-test/include/mysqlhotcopy.inc	2010-08-23 08:48:27 +0000
@@ -5,7 +5,7 @@
 --source include/not_windows.inc
 --source include/not_embedded.inc
 
-if ($MYSQLHOTCOPY)
+if (!$MYSQLHOTCOPY)
 {
   die due to missing mysqlhotcopy tool;
 }

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2010-08-16 06:46:21 +0000
+++ b/mysql-test/mysql-test-run.pl	2010-08-23 08:48:27 +0000
@@ -2158,7 +2158,10 @@ sub environment_setup {
     mtr_pl_maybe_exists("$bindir/scripts/mysqlhotcopy");
   # Since mysqltest interprets the real path as "false" in an if,
   # use 1 ("true") to indicate "not exists" so it can be tested for
-  $ENV{'MYSQLHOTCOPY'}= $mysqlhotcopy || 1;
+  if ($mysqlhotcopy)
+  {
+    $ENV{'MYSQLHOTCOPY'}= $mysqlhotcopy;
+  }
 
   # ----------------------------------------------------
   # perror

=== modified file 'mysql-test/r/mysqlbinlog_row.result'
--- a/mysql-test/r/mysqlbinlog_row.result	2009-11-15 19:19:53 +0000
+++ b/mysql-test/r/mysqlbinlog_row.result	2010-08-23 22:31:12 +0000
@@ -385,7 +385,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -567,7 +567,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -595,7 +595,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -673,7 +673,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -759,7 +759,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -806,7 +806,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -850,7 +850,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -894,7 +894,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -960,7 +960,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1004,7 +1004,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1070,7 +1070,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1114,7 +1114,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1180,7 +1180,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1224,7 +1224,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1290,7 +1290,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1334,7 +1334,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1378,7 +1378,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1439,7 +1439,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1483,7 +1483,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1527,7 +1527,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1572,7 +1572,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1616,7 +1616,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1660,7 +1660,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1704,7 +1704,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1748,7 +1748,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1792,7 +1792,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1836,7 +1836,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1880,7 +1880,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1924,7 +1924,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -1968,7 +1968,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2032,7 +2032,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2076,7 +2076,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2120,7 +2120,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2164,7 +2164,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2230,7 +2230,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2274,7 +2274,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2318,7 +2318,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2362,7 +2362,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2406,7 +2406,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2450,7 +2450,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2494,7 +2494,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2558,7 +2558,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2622,7 +2622,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2666,7 +2666,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2710,7 +2710,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2754,7 +2754,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2798,7 +2798,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2876,7 +2876,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2920,7 +2920,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -2998,7 +2998,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3076,7 +3076,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3120,7 +3120,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3198,7 +3198,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3276,7 +3276,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3320,7 +3320,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3364,7 +3364,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3408,7 +3408,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3452,7 +3452,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3496,7 +3496,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3540,7 +3540,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3584,7 +3584,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3628,7 +3628,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3672,7 +3672,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3716,7 +3716,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3760,7 +3760,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3804,7 +3804,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3848,7 +3848,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3994,7 +3994,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1
+DROP TABLE `t1` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -4127,7 +4127,7 @@ COMMIT
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
-DROP TABLE t1,t2
+DROP TABLE `t1`,`t2` /* generated by server */
 /*!*/;
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Rotate to master-bin.000002  pos: 4

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-08-20 02:59:58 +0000
+++ b/sql/log_event.cc	2010-08-23 22:31:12 +0000
@@ -674,7 +674,8 @@ const char* Log_event::get_type_str()
 
 #ifndef MYSQL_CLIENT
 Log_event::Log_event(THD* thd_arg, uint16 flags_arg, bool using_trans)
-  :log_pos(0), temp_buf(0), exec_time(0), flags(flags_arg), thd(thd_arg)
+  :log_pos(0), temp_buf(0), exec_time(0), flags(flags_arg),
+  cache_type(Log_event::EVENT_INVALID_CACHE), thd(thd_arg)
 {
   server_id=	thd->server_id;
   when=		thd->start_time;

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2010-08-23 15:42:53 +0000
+++ b/sql/sql_insert.cc	2010-08-24 14:00:17 +0000
@@ -563,15 +563,6 @@ bool open_and_lock_for_insert_delayed(TH
     */
     DBUG_RETURN(TRUE);
 
-  /*
-    If a lock was acquired above, we should release it after delayed_get_table()
-    has cloned the ticket for the handler thread. Note that acquire_lock() can
-    succeed because of a lock already held by the connection. In this case we
-    should not release it here.
-  */
-  MDL_ticket *table_ticket = mdl_savepoint == thd->mdl_context.mdl_savepoint() ?
-    NULL: thd->mdl_context.mdl_savepoint();
-
   bool error= FALSE;
   if (delayed_get_table(thd, table_list))
     error= TRUE;
@@ -597,12 +588,18 @@ bool open_and_lock_for_insert_delayed(TH
     }
   }
 
-  if (table_ticket)
-    thd->mdl_context.release_lock(table_ticket);
   /*
-    Clone_ticket() in delayed_get_table() causes TABLE_LIST::MDL_REQUEST::ticket
-    to be overwritten with the cloned ticket. Reset the ticket here in case
-    we end up having to use normal insert.
+    If a lock was acquired above, we should release it after
+    handle_delayed_insert() has cloned the ticket. Note that acquire_lock() can
+    succeed because the connection already has the lock. In this case the ticket
+    will be before the mdl_savepoint and we should not release it here.
+  */
+  if (!thd->mdl_context.has_lock(mdl_savepoint, table_list->mdl_request.ticket))
+    thd->mdl_context.release_lock(table_list->mdl_request.ticket);
+
+  /*
+    Reset the ticket in case we end up having to use normal insert and
+    therefore will reopen the table and reacquire the metadata lock.
   */
   table_list->mdl_request.ticket= NULL;
 
@@ -1839,14 +1836,25 @@ public:
   mysql_cond_t cond, cond_client;
   volatile uint tables_in_use,stacked_inserts;
   volatile bool status;
+  /*
+    When the handler thread starts, it clones a metadata lock ticket
+    for the table to be inserted. This is done to allow the deadlock
+    detector to detect deadlocks resulting from this lock.
+    Before this is done, the connection thread cannot safely exit
+    without causing problems for clone_ticket().
+    Once handler_thread_initialized has been set, it is safe for the
+    connection thread to exit.
+    Access to handler_thread_initialized is protected by di->mutex.
+  */
+  bool handler_thread_initialized;
   COPY_INFO info;
   I_List<delayed_row> rows;
   ulong group_count;
   TABLE_LIST table_list;			// Argument
 
   Delayed_insert()
-    :locks_in_memory(0),
-     table(0),tables_in_use(0),stacked_inserts(0), status(0), group_count(0)
+    :locks_in_memory(0), table(0),tables_in_use(0),stacked_inserts(0),
+     status(0), handler_thread_initialized(FALSE), group_count(0)
   {
     DBUG_ENTER("Delayed_insert constructor");
     thd.security_ctx->user=thd.security_ctx->priv_user=(char*) delayed_user;
@@ -2063,19 +2071,9 @@ bool delayed_get_table(THD *thd, TABLE_L
       /* Replace volatile strings with local copies */
       di->table_list.alias= di->table_list.table_name= di->thd.query();
       di->table_list.db= di->thd.db;
-
-      /*
-        Clone the ticket representing the lock on the target table for
-        the insert and add it to the list of granted metadata locks held by
-        the handler thread. This is safe since the handler thread is
-        not holding nor waiting on any metadata locks.
-      */
-      if (di->thd.mdl_context.clone_ticket(&table_list->mdl_request))
-      {
-        delete di;
-        my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
-        goto end_create;
-      }
+      /* We need the ticket so that it can be cloned in handle_delayed_insert */
+      init_mdl_requests(&di->table_list);
+      di->table_list.mdl_request.ticket= table_list->mdl_request.ticket;
 
       di->lock();
       mysql_mutex_lock(&di->mutex);
@@ -2088,15 +2086,20 @@ bool delayed_get_table(THD *thd, TABLE_L
 		    error));
         mysql_mutex_unlock(&di->mutex);
 	di->unlock();
-        di->thd.mdl_context.release_lock(table_list->mdl_request.ticket);
 	delete di;
 	my_error(ER_CANT_CREATE_THREAD, MYF(ME_FATALERROR), error);
         goto end_create;
       }
 
-      /* Wait until table is open */
+      /*
+        Wait until table is open unless the handler thread or the connection
+        thread has been killed. Note that we in all cases must wait until the
+        handler thread has been properly initialized before exiting. Otherwise
+        we risk doing clone_ticket() on a ticket that is no longer valid.
+      */
       thd_proc_info(thd, "waiting for handler open");
-      while (!di->thd.killed && !di->table && !thd->killed)
+      while (!di->handler_thread_initialized ||
+             (!di->thd.killed && !di->table && !thd->killed))
       {
         mysql_cond_wait(&di->cond_client, &di->mutex);
       }
@@ -2524,6 +2527,7 @@ pthread_handler_t handle_delayed_insert(
     /* Can't use my_error since store_globals has not yet been called */
     thd->stmt_da->set_error_status(thd, ER_OUT_OF_RESOURCES,
                                    ER(ER_OUT_OF_RESOURCES), NULL);
+    di->handler_thread_initialized= TRUE;
   }
   else
   {
@@ -2534,6 +2538,7 @@ pthread_handler_t handle_delayed_insert(
       /* Can't use my_error since store_globals has perhaps failed */
       thd->stmt_da->set_error_status(thd, ER_OUT_OF_RESOURCES,
                                      ER(ER_OUT_OF_RESOURCES), NULL);
+      di->handler_thread_initialized= TRUE;
       thd->fatal_error();
       goto err;
     }
@@ -2546,7 +2551,24 @@ pthread_handler_t handle_delayed_insert(
     thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_INSERT_DELAYED);
     thd->set_current_stmt_binlog_format_row_if_mixed();
 
-    init_mdl_requests(&di->table_list);
+    /*
+      Clone the ticket representing the lock on the target table for
+      the insert and add it to the list of granted metadata locks held by
+      the handler thread. This is safe since the handler thread is
+      not holding nor waiting on any metadata locks.
+    */
+    if (thd->mdl_context.clone_ticket(&di->table_list.mdl_request))
+    {
+      di->handler_thread_initialized= TRUE;
+      goto err;
+    }
+
+    /*
+      Now that the ticket has been cloned, it is safe for the connection
+      thread to exit.
+    */
+    di->handler_thread_initialized= TRUE;
+    di->table_list.mdl_request.ticket= NULL;
 
     if (di->open_and_lock_table())
       goto err;

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2010-08-20 17:15:48 +0000
+++ b/sql/sql_table.cc	2010-08-23 22:31:12 +0000
@@ -4268,6 +4268,7 @@ bool mysql_create_table(THD *thd, TABLE_
                         Alter_info *alter_info)
 {
   bool result;
+  bool is_trans= FALSE;
   DBUG_ENTER("mysql_create_table");
 
   /*
@@ -4282,7 +4283,6 @@ bool mysql_create_table(THD *thd, TABLE_
   /* Got lock. */
   DEBUG_SYNC(thd, "locked_table_name");
 
-  bool is_trans;
   result= mysql_create_table_no_lock(thd, create_table->db,
                                      create_table->table_name, create_info,
                                      alter_info, FALSE, 0, &is_trans);
@@ -4454,6 +4454,7 @@ bool mysql_create_like_table(THD* thd, T
   HA_CREATE_INFO local_create_info;
   Alter_info local_alter_info;
   bool res= TRUE;
+  bool is_trans= FALSE;
   uint not_used;
   DBUG_ENTER("mysql_create_like_table");
 
@@ -4503,7 +4504,6 @@ bool mysql_create_like_table(THD* thd, T
   /* Reset auto-increment counter for the new table. */
   local_create_info.auto_increment_value= 0;
 
-  bool is_trans;
   if ((res= mysql_create_table_no_lock(thd, table->db, table->table_name,
                                        &local_create_info, &local_alter_info,
                                        FALSE, 0, &is_trans)))


Attachment: [text/bzr-bundle] bzr/jon.hauglid@oracle.com-20100824143918-lz3why52hhhh079a.bundle
Thread
bzr commit into mysql-5.5-runtime branch (jon.hauglid:3119) Jon Olav Hauglid24 Aug