mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Combine the eDest and iParm arguments to sqlite3Select() into a single type - "SelectDest". (CVS 4657)
FossilOrigin-Name: 86dcdfe6d7d629618ccb3c3ff0ca09f2da2d06c7
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle INSERT statements in SQLite.
|
||||
**
|
||||
** $Id: insert.c,v 1.200 2008/01/02 11:50:51 danielk1977 Exp $
|
||||
** $Id: insert.c,v 1.201 2008/01/02 16:27:10 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -476,13 +476,15 @@ void sqlite3Insert(
|
||||
if( pSelect ){
|
||||
/* Data is coming from a SELECT. Generate code to implement that SELECT
|
||||
*/
|
||||
SelectDest dest = {SRT_Subroutine, 0, 0};
|
||||
int rc, iInitCode;
|
||||
iInitCode = sqlite3VdbeAddOp(v, OP_Goto, 0, 0);
|
||||
iSelectLoop = sqlite3VdbeCurrentAddr(v);
|
||||
iInsertBlock = sqlite3VdbeMakeLabel(v);
|
||||
dest.iParm = iInsertBlock;
|
||||
|
||||
/* Resolve the expressions in the SELECT statement and execute it. */
|
||||
rc = sqlite3Select(pParse, pSelect, SRT_Subroutine, iInsertBlock,0,0,0,0);
|
||||
rc = sqlite3Select(pParse, pSelect, &dest, 0, 0, 0, 0);
|
||||
if( rc || pParse->nErr || db->mallocFailed ){
|
||||
goto insert_cleanup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user