Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: return last_insert_id via IPROTO
After this patch client will get last_insert_id as additional metadata when he executes some queries. Part of ... ... document Title: SQL function last_insert_id. Function last_insert_id returns first autogenerated ID in last INSERT/REPLACE statement in current session. Return value of function is undetermined when more than one INSERT/REPLACE statements executed asynchronously. Example: CREATE TABLE test (id INTEGER PRIMARY KEY AUTOINCREMENT, a INTEGER); INSERT INTO test VALUES (NULL, 1); SELECT last_insert_id(); Temporary commit. TODO: 1) Check that PK != NULL and delete unnesessary 'if' if so. 2) Add tests into gh-2981: insert ... (null, null, null). 3) Review fix. 4) Revert secuence back in case of quety failture. 5) Find out purpose of deleted 'if' in vdbe.c.
- Loading branch information
Showing
12 changed files
with
258 additions
and
43 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
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
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
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
Oops, something went wrong.