mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Use a vdbe memory cell to allocate the space required for vdbe cursors. (CVS 4912)
FossilOrigin-Name: 047153648155654b0cd70b811935209d2e21776c
This commit is contained in:
11
src/select.c
11
src/select.c
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle SELECT statements in SQLite.
|
||||
**
|
||||
** $Id: select.c,v 1.417 2008/03/22 01:07:18 drh Exp $
|
||||
** $Id: select.c,v 1.418 2008/03/25 09:47:35 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -789,8 +789,8 @@ static void generateSortTail(
|
||||
iTab = pOrderBy->iECursor;
|
||||
if( eDest==SRT_Callback || eDest==SRT_Subroutine ){
|
||||
pseudoTab = pParse->nTab++;
|
||||
sqlite3VdbeAddOp2(v, OP_SetNumColumns, 0, nColumn);
|
||||
sqlite3VdbeAddOp2(v, OP_OpenPseudo, pseudoTab, 0);
|
||||
sqlite3VdbeAddOp2(v, OP_SetNumColumns, pseudoTab, nColumn);
|
||||
}
|
||||
addr = 1 + sqlite3VdbeAddOp2(v, OP_Sort, iTab, brk);
|
||||
codeOffset(v, p, cont);
|
||||
@@ -3316,10 +3316,9 @@ int sqlite3Select(
|
||||
*/
|
||||
sAggInfo.sortingIdx = pParse->nTab++;
|
||||
pKeyInfo = keyInfoFromExprList(pParse, pGroupBy);
|
||||
addrSortingIdx =
|
||||
sqlite3VdbeAddOp4(v, OP_OpenEphemeral, sAggInfo.sortingIdx,
|
||||
sAggInfo.nSortingColumn, 0,
|
||||
(char*)pKeyInfo, P4_KEYINFO_HANDOFF);
|
||||
addrSortingIdx = sqlite3VdbeAddOp4(v, OP_OpenEphemeral,
|
||||
sAggInfo.sortingIdx, sAggInfo.nSortingColumn,
|
||||
0, (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
|
||||
|
||||
/* Initialize memory locations used by GROUP BY aggregate processing
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user