List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:June 5 2009 9:12am
Subject:bzr commit into mysql-5.1-telco-7.1 branch (jonas:2898)
View as plain text  
#At file:///home/jonas/src/telco-7.1/ based on revid:magnus.blaudd@stripped

 2898 Jonas Oreland	2009-06-05
      ndb - fix compiler warning on win

    modified:
      sql/ha_ndbcluster.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2009-06-04 13:14:14 +0000
+++ b/sql/ha_ndbcluster.cc	2009-06-05 09:12:38 +0000
@@ -8203,7 +8203,6 @@ void ha_ndbcluster::get_auto_increment(u
                                        ulonglong *first_value,
                                        ulonglong *nb_reserved_values)
 {
-  Uint32 cache_size;
   Uint64 auto_value;
   THD *thd= current_thd;
   DBUG_ENTER("get_auto_increment");
@@ -8217,11 +8216,11 @@ void ha_ndbcluster::get_auto_increment(u
   }
   ha_rows remaining= m_rows_to_insert - m_rows_inserted;
   ha_rows prefetch= THDVAR(thd, autoincrement_prefetch_sz);
-  Uint32 min_prefetch= 
-    (remaining < prefetch) ? prefetch : (Uint32)remaining;
-  cache_size= ((remaining < m_autoincrement_prefetch) ?
-	       min_prefetch
-	       : (Uint32)remaining);
+  ha_rows min_prefetch= (remaining < prefetch) ? prefetch : remaining;
+  ha_rows cache_size= (remaining < m_autoincrement_prefetch) ? 
+    min_prefetch : remaining;
+  assert(Uint64(cache_size) < (Uint64(1) << 32));
+  Uint32 cache_size32 = Uint32(cache_size);
   uint retries= NDB_AUTO_INCREMENT_RETRIES;
   int retry_sleep= 30; /* 30 milliseconds, transaction */
   for (;;)
@@ -8229,7 +8228,8 @@ void ha_ndbcluster::get_auto_increment(u
     Ndb_tuple_id_range_guard g(m_share);
     if (m_skip_auto_increment &&
         ndb->readAutoIncrementValue(m_table, g.range, auto_value) ||
-        ndb->getAutoIncrementValue(m_table, g.range, auto_value, cache_size, increment, offset))
+        ndb->getAutoIncrementValue(m_table, g.range, auto_value, cache_size32, 
+                                   increment, offset))
     {
       if (--retries && !thd->killed &&
           ndb->getNdbError().status == NdbError::TemporaryError)


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090605091238-uce481pu0o1s1kmm.bundle
Thread
bzr commit into mysql-5.1-telco-7.1 branch (jonas:2898)Jonas Oreland5 Jun