1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

VDBE cursors numbers for tables in a join do not have to be consecutive.

This is one step on the road to fixing ticket #272. (CVS 947)

FossilOrigin-Name: be7aed2011b4af868b6a0c370c3d41354ae0cdf4
This commit is contained in:
drh
2003-05-02 14:32:12 +00:00
parent 56e452cf3a
commit 6a3ea0e6ef
15 changed files with 315 additions and 322 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.220 2003/04/25 15:37:58 drh Exp $
** $Id: vdbe.c,v 1.221 2003/05/02 14:32:14 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -3520,27 +3520,6 @@ case OP_OpenPseudo: {
break;
}
/*
** Opcode: RenameCursor P1 P2 *
**
** Rename cursor number P1 as cursor number P2. If P2 was previously
** opened is is closed before the renaming occurs.
*/
case OP_RenameCursor: {
int from = pOp->p1;
int to = pOp->p2;
VERIFY( if( from<0 || to<0 ) goto bad_instruction; )
if( to<p->nCursor && p->aCsr[to].pCursor ){
cleanupCursor(&p->aCsr[to]);
}
expandCursorArraySize(p, to);
if( from<p->nCursor ){
memcpy(&p->aCsr[to], &p->aCsr[from], sizeof(p->aCsr[0]));
memset(&p->aCsr[from], 0, sizeof(p->aCsr[0]));
}
break;
}
/* Opcode: Close P1 * *
**
** Close a cursor previously opened as P1. If P1 is not