mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
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:
parent
cda752e3cf
commit
0219f8b003
5 changed files with 36 additions and 40 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue