diff options
author | Marco Bubke <[email protected]> | 2018-04-03 14:34:51 +0200 |
---|---|---|
committer | Marco Bubke <[email protected]> | 2018-04-04 13:35:37 +0000 |
commit | 23865a102d9225ac3167cf9454d30a16f8c4f4ee (patch) | |
tree | 6e29eea1f935e25bce466ed87564ccdc42a71a86 /src/libs/sqlite/sqlitebasestatement.cpp | |
parent | c5f9765c9379df0433c8811d7bf41534ff118925 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/libs/sqlite/sqlitebasestatement.cpp')
-rw-r--r-- | src/libs/sqlite/sqlitebasestatement.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/sqlite/sqlitebasestatement.cpp b/src/libs/sqlite/sqlitebasestatement.cpp index 1db31ffabd8..e67468673a2 100644 --- a/src/libs/sqlite/sqlitebasestatement.cpp +++ b/src/libs/sqlite/sqlitebasestatement.cpp @@ -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 |