1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Registerify the SRT_Subroutine destination for SELECT results. (CVS 4690)

FossilOrigin-Name: 8201f71729c3afbb41764cea3cda65b03150cb0c
This commit is contained in:
drh
2008-01-06 00:25:21 +00:00
parent 477df4b3ac
commit 1013c9320d
12 changed files with 85 additions and 61 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.334 2008/01/05 16:29:28 drh Exp $
** $Id: expr.c,v 1.335 2008/01/06 00:25:22 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1738,10 +1738,11 @@ void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
** Generate code to write the results of the select into the temporary
** table allocated and opened above.
*/
SelectDest dest = {SRT_Set, 0, 0};
dest.iParm = pExpr->iTable;
dest.affinity = (int)affinity;
SelectDest dest;
ExprList *pEList;
sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
dest.affinity = (int)affinity;
assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
if( sqlite3Select(pParse, pExpr->pSelect, &dest, 0, 0, 0, 0) ){
return;
@@ -1803,7 +1804,7 @@ void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
SelectDest dest;
pSel = pExpr->pSelect;
dest.iParm = ++pParse->nMem;
sqlite3SelectDestInit(&dest, 0, ++pParse->nMem);
if( pExpr->op==TK_SELECT ){
dest.eDest = SRT_Mem;
sqlite3VdbeAddOp2(v, OP_Null, 0, dest.iParm);