← Back to team overview

maria-developers team mailing list archive

[Branch ~maria-captains/maria/5.1] Rev 2778: Fixed Bug#47017 rpl_timezone fails on PB-2 with mismatch error

 

------------------------------------------------------------
revno: 2778
committer: Michael Widenius <monty@xxxxxxxxxxxx>
branch nick: maria-5.1
timestamp: Fri 2009-12-04 17:12:22 +0200
message:
  Fixed Bug#47017 rpl_timezone fails on PB-2 with mismatch error
  Fixed coredump in sql_plugin.cc:intern_plugin_lock() on mysqld start with PBXT
modified:
  sql/mysqld.cc
  sql/share/errmsg.txt
  sql/sql_base.cc
  sql/sql_class.cc
  sql/sql_insert.cc


--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1

Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
=== modified file 'sql/mysqld.cc'
--- sql/mysqld.cc	2009-12-03 11:34:11 +0000
+++ sql/mysqld.cc	2009-12-04 15:12:22 +0000
@@ -4169,8 +4169,10 @@
         Need to unlock as global_system_variables.table_plugin
         was acquired during plugin_init()
       */
+      pthread_mutex_lock(&LOCK_global_system_variables);
       plugin_unlock(0, global_system_variables.table_plugin);
       global_system_variables.table_plugin= plugin;
+      pthread_mutex_unlock(&LOCK_global_system_variables);
     }
   }
 #if defined(WITH_MARIA_STORAGE_ENGINE) && defined(USE_MARIA_FOR_TMP_TABLES)

=== modified file 'sql/share/errmsg.txt'
--- sql/share/errmsg.txt	2009-12-03 11:19:05 +0000
+++ sql/share/errmsg.txt	2009-12-04 15:12:22 +0000
@@ -5322,8 +5322,8 @@
         eng "Division by 0"
         ger "Division durch 0"
 ER_TRUNCATED_WRONG_VALUE_FOR_FIELD  
-        eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld"
-        ger "Falscher %-.32s-Wert: '%-.128s' für Feld '%.192s' in Zeile %ld"
+        eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %lu"
+        ger "Falscher %-.32s-Wert: '%-.128s' für Feld '%.192s' in Zeile %lu"
 ER_ILLEGAL_VALUE_FOR_TYPE 22007 
         eng "Illegal %s '%-.192s' value found during parsing"
         ger "Nicht zulässiger %s-Wert '%-.192s' beim Parsen gefunden"

=== modified file 'sql/sql_base.cc'
--- sql/sql_base.cc	2009-12-03 11:34:11 +0000
+++ sql/sql_base.cc	2009-12-04 15:12:22 +0000
@@ -8488,19 +8488,26 @@
   	  result=1;
         }
         /* Kill delayed insert threads */
-        if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT) &&
-            ! in_use->killed)
+        if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT))
         {
-	  in_use->killed= THD::KILL_CONNECTION;
-	  pthread_mutex_lock(&in_use->mysys_var->mutex);
-	  if (in_use->mysys_var->current_cond)
-	  {
-	    pthread_mutex_lock(in_use->mysys_var->current_mutex);
-            signalled= 1;
-	    pthread_cond_broadcast(in_use->mysys_var->current_cond);
-	    pthread_mutex_unlock(in_use->mysys_var->current_mutex);
-	  }
-	  pthread_mutex_unlock(&in_use->mysys_var->mutex);
+          if (!in_use->killed)
+          {
+            in_use->killed= THD::KILL_CONNECTION;
+            pthread_mutex_lock(&in_use->mysys_var->mutex);
+            if (in_use->mysys_var->current_cond)
+            {
+              pthread_mutex_lock(in_use->mysys_var->current_mutex);
+              signalled= 1;
+              pthread_cond_broadcast(in_use->mysys_var->current_cond);
+              pthread_mutex_unlock(in_use->mysys_var->current_mutex);
+            }
+            pthread_mutex_unlock(&in_use->mysys_var->mutex);
+          }
+          /*
+            Don't abort locks. Instead give the delayed insert thread
+            time to finish it's inserts and die gracefully. 
+          */
+          continue;
         }
         /*
 	  Now we must abort all tables locks used by this thread

=== modified file 'sql/sql_class.cc'
--- sql/sql_class.cc	2009-12-03 11:34:11 +0000
+++ sql/sql_class.cc	2009-12-04 15:12:22 +0000
@@ -2046,7 +2046,7 @@
                             ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
                             ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
                             "string", printable_buff,
-                            item->name, row_count);
+                            item->name, (ulong) row_count);
       }
       cvt_str.length(bytes);
       res= &cvt_str;

=== modified file 'sql/sql_insert.cc'
--- sql/sql_insert.cc	2009-12-03 11:34:11 +0000
+++ sql/sql_insert.cc	2009-12-04 15:12:22 +0000
@@ -2618,7 +2618,7 @@
       or if another thread is removing the current table definition
       from the table cache.
     */
-    my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
+    my_error(ER_DELAYED_CANT_CHANGE_LOCK, MYF(ME_FATALERROR | ME_NOREFRESH),
              table->s->table_name.str);
     goto err;
   }
@@ -2791,10 +2791,11 @@
 	query_cache_invalidate3(&thd, table, 1);
 	if (thr_reschedule_write_lock(*thd.lock->locks))
 	{
-    /* This is not known to happen. */
-    my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
-             table->s->table_name.str);
-    goto err;
+          /* This is not known to happen. */
+          my_error(ER_DELAYED_CANT_CHANGE_LOCK,
+                   MYF(ME_FATALERROR | ME_NOREFRESH),
+                   table->s->table_name.str);
+          goto err;
 	}
 	if (!using_bin_log)
 	  table->file->extra(HA_EXTRA_WRITE_CACHE);