List:Commits« Previous MessageNext Message »
From:Kristofer Pettersson Date:September 15 2008 9:31pm
Subject:bzr commit into mysql-6.0 branch (kpettersson:2812)
View as plain text  
#At file:///home/thek/Development/cpp/mysqlbzr/mysql-6.0-bugteam/

 2812 Kristofer Pettersson	2008-09-15 [merge]
      Auto merge
modified:
  sql/sql_insert.cc

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2008-09-10 10:40:14 +0000
+++ b/sql/sql_insert.cc	2008-09-15 21:31:19 +0000
@@ -2583,8 +2583,13 @@ bool Delayed_insert::handle_inserts(void
   thd_proc_info(&thd, "upgrading lock");
   if (thr_upgrade_write_delay_lock(*thd.lock->locks))
   {
-    /* This can only happen if thread is killed by shutdown */
-    sql_print_error(ER(ER_DELAYED_CANT_CHANGE_LOCK),table->s->table_name.str);
+    /*
+      This can happen if thread is killed either by a shutdown
+      or if another thread is removing the current table definition
+      from the table cache.
+    */
+    my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
+             table->s->table_name.str);
     goto err;
   }
 
@@ -2739,9 +2744,10 @@ bool Delayed_insert::handle_inserts(void
 	query_cache_invalidate3(&thd, table, 1);
 	if (thr_reschedule_write_lock(*thd.lock->locks))
 	{
-	  /* This should never happen */
-	  sql_print_error(ER(ER_DELAYED_CANT_CHANGE_LOCK),
-                          table->s->table_name.str);
+    /* This is not known to happen. */
+    my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
+             table->s->table_name.str);
+    goto err;
 	}
 	if (!using_bin_log)
 	  table->file->extra(HA_EXTRA_WRITE_CACHE);

Thread
bzr commit into mysql-6.0 branch (kpettersson:2812) Kristofer Pettersson15 Sep