Revision cfd29830 src/pool/PoolSQL.cc

View differences:

src/pool/PoolSQL.cc
137 137

  
138 138
    objsql->oid = ++lastOID;
139 139

  
140
    _set_lastOID(lastOID, db, table);
141

  
140 142
    rc = objsql->insert(db, error_str);
141 143

  
142 144
    if ( rc != 0 )
......
151 153

  
152 154
    delete objsql;
153 155

  
154
    if( rc != -1 )
156
    if( rc == -1 )
155 157
    {
156
        _set_lastOID(lastOID, db, table);
158
        _set_lastOID(--lastOID, db, table);
157 159
    }
158 160

  
159 161
    unlock();

Also available in: Unified diff