summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2005-05-07 22:04:52 +0200
committerunknown <mskold@mysql.com>2005-05-07 22:04:52 +0200
commit7aa73081df14ba172456289d7f2201587bc24792 (patch)
treecf45b96eb20b18356b588662632cdbc48da25ec9 /sql/ha_ndbcluster.cc
parent5a50551504afb19430d9872ad4681b711395b699 (diff)
downloadmariadb-git-7aa73081df14ba172456289d7f2201587bc24792.tar.gz
bug#9813: Post review fixes
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index a1166641f7d..53706b4a9ba 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -3003,8 +3003,10 @@ void ha_ndbcluster::start_bulk_insert(ha_rows rows)
m_rows_inserted= (ha_rows) 0;
if (rows == (ha_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;
@@ -4021,8 +4023,10 @@ longlong ha_ndbcluster::get_auto_increment()
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=
(int)
(m_rows_to_insert - m_rows_inserted < m_autoincrement_prefetch) ?