mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Bug fixes. Trying to make it go faster. (CVS 254)
FossilOrigin-Name: 8f28a83abac59a2161d486c96386b8df726468d0
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.20 2001/09/16 00:13:27 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.21 2001/09/18 02:02:23 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "pager.h"
|
||||
@ -947,14 +947,12 @@ void *sqlitepager_lookup(Pager *pPager, Pgno pgno){
|
||||
** removed.
|
||||
*/
|
||||
int sqlitepager_unref(void *pData){
|
||||
Pager *pPager;
|
||||
PgHdr *pPg;
|
||||
|
||||
/* Decrement the reference count for this page
|
||||
*/
|
||||
pPg = DATA_TO_PGHDR(pData);
|
||||
assert( pPg->nRef>0 );
|
||||
pPager = pPg->pPager;
|
||||
pPg->nRef--;
|
||||
REFINFO(pPg);
|
||||
|
||||
@ -962,6 +960,8 @@ int sqlitepager_unref(void *pData){
|
||||
** destructor and add the page to the freelist.
|
||||
*/
|
||||
if( pPg->nRef==0 ){
|
||||
Pager *pPager;
|
||||
pPager = pPg->pPager;
|
||||
pPg->pNextFree = 0;
|
||||
pPg->pPrevFree = pPager->pLast;
|
||||
pPager->pLast = pPg;
|
||||
|
@ -30,7 +30,7 @@
|
||||
** But other routines are also provided to help in building up
|
||||
** a program instruction by instruction.
|
||||
**
|
||||
** $Id: vdbe.c,v 1.70 2001/09/16 00:13:27 drh Exp $
|
||||
** $Id: vdbe.c,v 1.71 2001/09/18 02:02:23 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@ -2332,7 +2332,11 @@ case OP_NewRecno: {
|
||||
v = ux.i;
|
||||
rx = sqliteBtreeMoveto(p->aCsr[i].pCursor, &v, sizeof(v), &res);
|
||||
cnt++;
|
||||
}while( cnt<10 && rx==SQLITE_OK && res==0 );
|
||||
}while( cnt<200 && rx==SQLITE_OK && res==0 );
|
||||
if( rx==SQLITE_OK && res==0 ){
|
||||
rc = SQLITE_FULL;
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
}
|
||||
VERIFY( NeedStack(p, p->tos+1); )
|
||||
p->tos++;
|
||||
|
@ -13,7 +13,7 @@
|
||||
** the WHERE clause of SQL statements. Also found here are subroutines
|
||||
** to generate VDBE code to evaluate expressions.
|
||||
**
|
||||
** $Id: where.c,v 1.20 2001/09/16 00:13:27 drh Exp $
|
||||
** $Id: where.c,v 1.21 2001/09/18 02:02:23 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@ -344,7 +344,7 @@ WhereInfo *sqliteWhereBegin(
|
||||
if( i==pTabList->nId-1 && pushKey ){
|
||||
haveKey = 1;
|
||||
}else{
|
||||
sqliteVdbeAddOp(v, OP_MoveTo, base+idx, 0, 0, 0);
|
||||
sqliteVdbeAddOp(v, OP_NotFound, base+idx, brk, 0, 0);
|
||||
haveKey = 0;
|
||||
}
|
||||
}else if( pIdx==0 ){
|
||||
|
Reference in New Issue
Block a user