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

Registerify the AUTOINCREMENT processing and the OP_IsNull and OP_NotNull

operators. (CVS 4692)

FossilOrigin-Name: aa48867cfa04da265b906e5b583bc7ac6b6a1157
This commit is contained in:
drh
2008-01-07 19:20:24 +00:00
parent 738bdcfbf8
commit 6a288a33f9
9 changed files with 186 additions and 162 deletions

View File

@@ -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.391 2008/01/07 10:16:41 danielk1977 Exp $
** $Id: select.c,v 1.392 2008/01/07 19:20:25 drh Exp $
*/
#include "sqliteInt.h"
@@ -809,12 +809,16 @@ static void generateSortTail(
}
#ifndef SQLITE_OMIT_SUBQUERY
case SRT_Set: {
int j1, j2;
assert( nColumn==1 );
sqlite3VdbeAddOp2(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);
sqlite3VdbeAddOp2(v, OP_Pop, 1, 0);
sqlite3VdbeAddOp2(v, OP_Goto, 0, sqlite3VdbeCurrentAddr(v)+3);
sqlite3VdbeAddOp0(v, OP_SCopy);
j1 = sqlite3VdbeAddOp0(v, OP_NotNull);
sqlite3VdbeAddOp1(v, OP_Pop, 1);
j2 = sqlite3VdbeAddOp0(v, OP_Goto);
sqlite3VdbeJumpHere(v, j1);
sqlite3VdbeAddOp4(v, OP_MakeRecord, 1, 0, 0, &p->affinity, 1);
sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm, 0);
sqlite3VdbeJumpHere(v, j2);
break;
}
case SRT_Mem: {