forked from qt-creator/qt-creator
Clang: Handle constraint exceptions in the file path storage
It can be happen that the entry is written by an other connection after we tried to read and before we write. This would lead to a double entry which be prevented by the unique index in the database. In that case we simply try again and read the id from the database. Change-Id: I6c9d94e95ae11556bb446813f64be0855be4ddbe Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -372,7 +372,7 @@ void BaseStatement::throwStatementIsMisused(const char *whatHasHappened) const
|
||||
|
||||
void BaseStatement::throwConstraintPreventsModification(const char *whatHasHappened) const
|
||||
{
|
||||
throw ContraintPreventsModification(whatHasHappened, sqlite3_errmsg(sqliteDatabaseHandle()));
|
||||
throw ConstraintPreventsModification(whatHasHappened, sqlite3_errmsg(sqliteDatabaseHandle()));
|
||||
}
|
||||
|
||||
void BaseStatement::throwNoValuesToFetch(const char *whatHasHappened) const
|
||||
|
||||
Reference in New Issue
Block a user