1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

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
This commit is contained in:
drh
2003-06-24 10:39:46 +00:00
parent 18706c08cb
commit d60ccc6a75
4 changed files with 31 additions and 13 deletions

View File

@ -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);