mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Registerify the comparison opcodes. (CVS 4697)
FossilOrigin-Name: 8862ce9ceefba4f5d1ffbd51d824c05f42a58c22
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.392 2008/01/07 19:20:25 drh Exp $
|
||||
** $Id: select.c,v 1.393 2008/01/08 23:54:25 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -3525,7 +3525,7 @@ int sqlite3Select(
|
||||
sqlite3VdbeAddOp2(v, OP_Return, 0, 0);
|
||||
finalizeAggFunctions(pParse, &sAggInfo);
|
||||
if( pHaving ){
|
||||
sqlite3ExprIfFalse(pParse, pHaving, addrOutputRow+1, 1);
|
||||
sqlite3ExprIfFalse(pParse, pHaving, addrOutputRow+1, SQLITE_JUMPIFNULL);
|
||||
}
|
||||
rc = selectInnerLoop(pParse, p, p->pEList, 0, 0, pOrderBy,
|
||||
distinct, pDest,
|
||||
@@ -3603,11 +3603,12 @@ int sqlite3Select(
|
||||
}
|
||||
sqlite3VdbeAddOp2(v, OP_SCopy, iAMem+j, 0);
|
||||
if( j==0 ){
|
||||
sqlite3VdbeAddOp2(v, OP_Eq, 0x200, addrProcessRow);
|
||||
sqlite3VdbeAddOp2(v, OP_Eq, 0, addrProcessRow);
|
||||
}else{
|
||||
sqlite3VdbeAddOp2(v, OP_Ne, 0x200, addrGroupByChange);
|
||||
sqlite3VdbeAddOp2(v, OP_Ne, 0, addrGroupByChange);
|
||||
}
|
||||
sqlite3VdbeChangeP4(v, -1, (void*)pKeyInfo->aColl[j], P4_COLLSEQ);
|
||||
sqlite3VdbeChangeP5(v, SQLITE_NULLEQUAL);
|
||||
}
|
||||
|
||||
/* Generate code that runs whenever the GROUP BY changes.
|
||||
@@ -3712,7 +3713,7 @@ int sqlite3Select(
|
||||
finalizeAggFunctions(pParse, &sAggInfo);
|
||||
pOrderBy = 0;
|
||||
if( pHaving ){
|
||||
sqlite3ExprIfFalse(pParse, pHaving, addrEnd, 1);
|
||||
sqlite3ExprIfFalse(pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL);
|
||||
}
|
||||
selectInnerLoop(pParse, p, p->pEList, 0, 0, 0, -1,
|
||||
pDest, addrEnd, addrEnd, aff);
|
||||
|
||||
Reference in New Issue
Block a user