ndb - bug#14509 [related] setAutoIncrement: add error handling

ndb/include/ndbapi/Ndb.hpp:
  setAutoIncrement: add error handling
ndb/src/ndbapi/Ndb.cpp:
  setAutoIncrement: add error handling
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  setAutoIncrement: add error handling
ndb/tools/restore/consumer_restore.cpp:
  setAutoIncrement: add error handling
sql/ha_ndbcluster.cc:
  setAutoIncrement: add error handling
This commit is contained in:
unknown 2006-05-16 12:58:41 +02:00
commit 0219f8b003
5 changed files with 36 additions and 40 deletions

View file

@ -150,7 +150,7 @@ BackupRestore::finalize_table(const TableS & table){
Uint64 max_val= table.get_max_auto_val();
Uint64 auto_val= m_ndb->readAutoIncrementValue(get_table(table.m_dictTable));
if (max_val+1 > auto_val || auto_val == ~(Uint64)0)
ret= m_ndb->setAutoIncrementValue(get_table(table.m_dictTable), max_val+1, false);
ret= m_ndb->setAutoIncrementValue(get_table(table.m_dictTable), max_val+1, false) != ~(Uint64)0;
}
return ret;
}