diff options
author | drh <drh@noemail.net> | 2003-06-24 10:39:46 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2003-06-24 10:39:46 +0000 |
commit | d60ccc6a7552e902212c40dbf04d78fe683a0bdd (patch) | |
tree | 0a97a8f0b70e5739c960ae0e90dcbd62b964d1b5 /src | |
parent | 18706c08cb5a995c69ee7213a927cde5bbffcb1f (diff) | |
download | sqlite-d60ccc6a7552e902212c40dbf04d78fe683a0bdd.tar.gz sqlite-d60ccc6a7552e902212c40dbf04d78fe683a0bdd.zip |
In a SELECT, the rowid of a view or subquery which is really a join is
set to NULL if the join is flattened. Ticket #364. (CVS 1034)
FossilOrigin-Name: bad8b55833f5120003a19883154dac5146cc36a3
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index 9570ce1a6..6a2add247 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -36,7 +36,7 @@ ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** -** $Id: vdbe.c,v 1.229 2003/06/22 01:41:49 drh Exp $ +** $Id: vdbe.c,v 1.230 2003/06/24 10:39:46 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -4213,11 +4213,11 @@ case OP_Recno: { assert( i>=0 && i<p->nCursor ); if( (pC = &p->aCsr[i])->recnoIsValid ){ v = pC->lastRecno; - }else if( pC->nullRow ){ - aStack[tos].flags = STK_Null; - break; }else if( pC->pseudoTable ){ v = keyToInt(pC->iKey); + }else if( pC->nullRow || pC->pCursor==0 ){ + aStack[tos].flags = STK_Null; + break; }else{ assert( pC->pCursor!=0 ); sqliteBtreeKey(pC->pCursor, 0, sizeof(u32), (char*)&v); |