Fix for Bug #9675 Auto-increment not working with INSERT..SELECT and NDB storage, post review fix

This commit is contained in:
unknown 2005-04-07 20:08:01 +02:00
parent 7259aabc37
commit ae2f0d9872

View File

@ -3933,7 +3933,10 @@ longlong ha_ndbcluster::get_auto_increment()
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