mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
Fix an assertion failure that occurs when attempting to delete all rows of
a table while the "count_changes" pragma is turned on. Up the version number to 2.6.1. (CVS 690) FossilOrigin-Name: 612df004017b241651074ee859096dd0ee5062b8
This commit is contained in:
11
src/delete.c
11
src/delete.c
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle DELETE FROM statements.
|
||||
**
|
||||
** $Id: delete.c,v 1.40 2002/07/18 00:34:11 drh Exp $
|
||||
** $Id: delete.c,v 1.41 2002/07/19 18:52:41 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -170,13 +170,12 @@ void sqliteDeleteFrom(
|
||||
int endOfLoop = sqliteVdbeMakeLabel(v);
|
||||
int addr;
|
||||
openOp = pTab->isTemp ? OP_OpenAux : OP_Open;
|
||||
assert( base==0 );
|
||||
sqliteVdbeAddOp(v, openOp, 0, pTab->tnum);
|
||||
sqliteVdbeAddOp(v, OP_Rewind, 0, sqliteVdbeCurrentAddr(v)+2);
|
||||
sqliteVdbeAddOp(v, openOp, base, pTab->tnum);
|
||||
sqliteVdbeAddOp(v, OP_Rewind, base, sqliteVdbeCurrentAddr(v)+2);
|
||||
addr = sqliteVdbeAddOp(v, OP_AddImm, 1, 0);
|
||||
sqliteVdbeAddOp(v, OP_Next, 0, addr);
|
||||
sqliteVdbeAddOp(v, OP_Next, base, addr);
|
||||
sqliteVdbeResolveLabel(v, endOfLoop);
|
||||
sqliteVdbeAddOp(v, OP_Close, 0, 0);
|
||||
sqliteVdbeAddOp(v, OP_Close, base, 0);
|
||||
}
|
||||
sqliteVdbeAddOp(v, OP_Clear, pTab->tnum, pTab->isTemp);
|
||||
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.90 2002/07/19 18:13:36 drh Exp $
|
||||
** $Id: main.c,v 1.91 2002/07/19 18:52:41 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -115,7 +115,7 @@ int upgrade_3_callback(void *pInit, int argc, char **argv, char **NotUsed){
|
||||
int rc;
|
||||
Table *pTab;
|
||||
Trigger *pTrig;
|
||||
char *zErr;
|
||||
char *zErr = 0;
|
||||
|
||||
pTab = sqliteFindTable(pData->db, argv[0]);
|
||||
if( pTab ){
|
||||
@@ -302,7 +302,7 @@ int sqliteInit(sqlite *db, char **pzErrMsg){
|
||||
/*
|
||||
** The version of the library
|
||||
*/
|
||||
static const char rcsid[] = "@(#) $Id: main.c,v 1.90 2002/07/19 18:13:36 drh Exp $";
|
||||
static const char rcsid[] = "@(#) $Id: main.c,v 1.91 2002/07/19 18:52:41 drh Exp $";
|
||||
const char sqlite_version[] = SQLITE_VERSION;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user