List:Internals« Previous MessageNext Message »
From:msvensson Date:April 7 2005 8:21pm
Subject:bk commit into 4.1 tree (msvensson:1.2165)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2165 05/04/07 20:21:17 msvensson@neptunus.(none) +1 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-4.1
  into neptunus.(none):/home/msvensson/mysql/mysql-4.1

  sql/ha_ndbcluster.cc
    1.138 05/04/07 20:21:16 msvensson@neptunus.(none) +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-4.1/RESYNC

--- 1.137/sql/ha_ndbcluster.cc	2005-04-04 17:09:52 +02:00
+++ 1.138/sql/ha_ndbcluster.cc	2005-04-07 20:21:16 +02:00
@@ -2946,7 +2946,11 @@
   DBUG_PRINT("enter", ("rows: %d", (int)rows));
   
   m_rows_inserted= 0;
-  m_rows_to_insert= rows; 
+  if (rows == 0)
+    /* We don't know how many will be inserted, guess */
+    m_rows_to_insert= m_autoincrement_prefetch;
+  else
+    m_rows_to_insert= rows; 
 
   /* 
     Calculate how many rows that should be inserted
@@ -3955,6 +3959,10 @@
   DBUG_ENTER("get_auto_increment");
   DBUG_PRINT("enter", ("m_tabname: %s", m_tabname));
   Ndb *ndb= get_ndb();
+  
+  if (m_rows_inserted > m_rows_to_insert)
+    /* We guessed too low */
+    m_rows_to_insert+= m_autoincrement_prefetch;
   int cache_size= 
     (m_rows_to_insert - m_rows_inserted < m_autoincrement_prefetch) ?
     m_rows_to_insert - m_rows_inserted 
Thread
bk commit into 4.1 tree (msvensson:1.2165)msvensson7 Apr