mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
SQLite: handle existing keys when overwrite=F correctly
This commit is contained in:
parent
ba9cf1e4db
commit
3d7fcfb428
3 changed files with 44 additions and 10 deletions
|
@ -291,6 +291,8 @@ OperationResult SQLite::Step(sqlite3_stmt* stmt, bool parse_value) {
|
|||
else if ( step_status == SQLITE_BUSY )
|
||||
// TODO: this could retry a number of times instead of just failing
|
||||
ret = {ReturnCode::TIMEOUT};
|
||||
else if ( step_status == SQLITE_CONSTRAINT )
|
||||
ret = {ReturnCode::KEY_EXISTS};
|
||||
else
|
||||
ret = {ReturnCode::OPERATION_FAILED};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue