forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: do not increase row-count if INSERT OR IGNORE fails
If INSERT statement is executed with IGNORE error action (i.e. INSERT OR IGNORE ...), it will return number of rows inserted. For example: CREATE TABLE t (i INT PRIMARY KEY, a INT check (a > 0)); INSERT OR IGNORE INTO t VALUES (1, 1), (2, -1), (3, 2); Should return: --- - row_count: 2 ... However it was three before this patch. So, let's account number of successful insertions in case of INSERT OR IGNORE. Follow-up tarantool#4188
- Loading branch information
Showing
3 changed files
with
61 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters