mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
development: Fix pool index when the first insert fails
This commit is contained in:
parent
f174b71b4b
commit
5d9c92d0d9
@ -148,7 +148,14 @@ int PoolSQL::allocate(PoolObjectSQL *objsql, string& error_str)
|
||||
|
||||
if( rc == -1 )
|
||||
{
|
||||
_set_lastOID(--lastOID, db, table);
|
||||
lastOID = lastOID - 1;
|
||||
|
||||
if ( lastOID < 0 )
|
||||
{
|
||||
lastOID = 0;
|
||||
}
|
||||
|
||||
_set_lastOID(lastOID, db, table);
|
||||
}
|
||||
|
||||
unlock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user