List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:July 23 2008 11:29am
Subject:bzr commit into mysql-6.0-backup branch (kgeorge:2738)
View as plain text  
#At file:///home/kgeorge/mysql/bzr/fix-6.0-bugteam/

 2738 Georgi Kodinov	2008-07-23 [merge]
      merged 5.1-bugteam
modified:
  mysys/my_uuid.c
  sql/handler.cc

=== modified file 'mysys/my_uuid.c'
--- a/mysys/my_uuid.c	2008-07-18 13:30:53 +0000
+++ b/mysys/my_uuid.c	2008-07-23 11:28:20 +0000
@@ -145,12 +145,12 @@ void my_uuid(uchar *to)
     */
     if (nanoseq)
     {
-      longlong delta;
+      uint delta;
       DBUG_ASSERT((tv > uuid_time) && (nanoseq > 0));
       /*
         -1 so we won't make tv= uuid_time for nanoseq >= (tv - uuid_time)
       */
-      delta= (longlong) min(nanoseq, tv - uuid_time -1);
+      delta= min(nanoseq, (uint)(tv - uuid_time -1));
       tv-= delta;
       nanoseq-= delta;
     }

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2008-07-09 07:12:43 +0000
+++ b/sql/handler.cc	2008-07-23 11:28:20 +0000
@@ -1630,23 +1630,23 @@ bool mysql_xa_recover(THD *thd)
   @return
     always 0
 */
-static my_bool release_temporary_latches(THD *thd, plugin_ref plugin,
-                                 void *unused)
-{
-  handlerton *hton= plugin_data(plugin, handlerton *);
-
-  if (hton->state == SHOW_OPTION_YES && hton->release_temporary_latches)
-    hton->release_temporary_latches(hton, thd);
-
-  return FALSE;
-}
-
 
 int ha_release_temporary_latches(THD *thd)
 {
-  plugin_foreach(thd, release_temporary_latches, MYSQL_STORAGE_ENGINE_PLUGIN, 
-                 NULL);
+  Ha_trx_info *info;
 
+  /*
+    Note that below we assume that only transactional storage engines
+    may need release_temporary_latches(). If this will ever become false,
+    we could iterate on thd->open_tables instead (and remove duplicates
+    as if (!seen[hton->slot]) { seen[hton->slot]=1; ... }).
+  */
+  for (info= thd->transaction.stmt.ha_list; info; info= info->next())
+  {
+    handlerton *hton= info->ht();
+    if (hton && hton->release_temporary_latches)
+        hton->release_temporary_latches(hton, thd);
+  }
   return 0;
 }
 

Thread
bzr commit into mysql-6.0-backup branch (kgeorge:2738) Georgi Kodinov23 Jul