Simplifications to btree.c and vdbeaux.c in support of structural coverage

testing. (CVS 6853)

FossilOrigin-Name: fc2a40a9db23285da16f40f5131613907fb80f02
This commit is contained in:
drh 2009-07-07 02:44:07 +00:00
parent d5bc725f0b
commit fa3be90471
4 changed files with 16 additions and 21 deletions

View File

@ -1,5 +1,5 @@
C Fix\sthe\spager\sso\sthat\sit\sremembers\sthe\sname\sof\sthe\sjournal\sfor\san\sin-memory\ndatabase\sas\san\sempty\sstring.\s\sThis\sis\simportant\swhen\scommitting\sa\smulti-database\ntransaction\sthat\sincludes\sone\sor\smore\sattached\smemory\sdatabases.\s(CVS\s6852)
D 2009-07-06T21:54:41
C Simplifications\sto\sbtree.c\sand\svdbeaux.c\sin\ssupport\sof\sstructural\scoverage\ntesting.\s(CVS\s6853)
D 2009-07-07T02:44:07
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -106,7 +106,7 @@ F src/auth.c 802a9439dfa0b8c208b10055cba400e82ef18025
F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
F src/btree.c 1a7caa2b0dfd76a7e28049e2333997e6f317c9f3
F src/btree.c efad7a5ac6c460aa326de8df290e72af54b2a96e
F src/btree.h e761619e76a1125d2d82bd3613b5a7ac7d1ee6f7
F src/btreeInt.h b31e5ac04181c7e2892c33ab06228c551df6233c
F src/build.c 867028ee9f63f7bc8eb8d4a720bb98cf9b9a12b4
@ -208,7 +208,7 @@ F src/vdbe.c bdf25930bddbf57b18a0be7b1127b357306d2094
F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
F src/vdbeInt.h 831c254a6eef237ef4664c8381a0137586567007
F src/vdbeapi.c 0ab8ada7260b32031ca97f338caecf0812460624
F src/vdbeaux.c f62c8c83e9f21e13df6acaace8851f1de17cadc0
F src/vdbeaux.c 67fb11dbb83fb18bebc877c5a2e23fbe07a5df77
F src/vdbeblob.c a3f3e0e877fc64ea50165eec2855f5ada4477611
F src/vdbemem.c 1618f685d19b4bcc96e40b3c478487bafd2ae246
F src/vtab.c 00902f289521041712fb0293d0bf8688c7af8e48
@ -740,7 +740,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
P 471b92f2514aedecb5773825a7ae472190375727
R ef6e25ecc3f3fe23089721c79b7f9768
P 31a5e8192e164f01c5d7c2744b67cfb517251fad
R 100495e4081a84deef5f1cdee7a55f95
U drh
Z 349e16f4481329396dd2c2a2c8daa3ce
Z 8f0c5bdca0336a3f4c49fe6be74bffd7

View File

@ -1 +1 @@
31a5e8192e164f01c5d7c2744b67cfb517251fad
fc2a40a9db23285da16f40f5131613907fb80f02

View File

@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.653 2009/07/06 18:56:13 danielk1977 Exp $
** $Id: btree.c,v 1.654 2009/07/07 02:44:07 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@ -3496,8 +3496,8 @@ int sqlite3BtreeDataSize(BtCursor *pCur, u32 *pSize){
** *ppPage is set to zero.
*/
static int getOverflowPage(
BtShared *pBt,
Pgno ovfl, /* Overflow page */
BtShared *pBt, /* The database file */
Pgno ovfl, /* Current overflow page number */
MemPage **ppPage, /* OUT: MemPage handle (may be NULL) */
Pgno *pPgnoNext /* OUT: Next overflow page number */
){

View File

@ -14,7 +14,7 @@
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
** $Id: vdbeaux.c,v 1.468 2009/07/06 00:44:09 drh Exp $
** $Id: vdbeaux.c,v 1.469 2009/07/07 02:44:07 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@ -1616,7 +1616,7 @@ static void invalidateCursorsOnModifiedBtrees(sqlite3 *db){
int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
sqlite3 *const db = p->db;
int rc = SQLITE_OK;
if( p->iStatement && db->nStatement ){
if( p->iStatement && ALWAYS(db->nStatement) ){
int i;
const int iSavepoint = p->iStatement-1;
@ -1725,6 +1725,7 @@ int sqlite3VdbeHalt(Vdbe *p){
/* Check for one of the special errors */
mrc = p->rc & 0xff;
assert( p->rc!=SQLITE_IOERR_BLOCKED ); /* This error no longer exists */
isSpecialError = mrc==SQLITE_NOMEM || mrc==SQLITE_IOERR
|| mrc==SQLITE_INTERRUPT || mrc==SQLITE_FULL;
if( isSpecialError ){
@ -1732,11 +1733,7 @@ int sqlite3VdbeHalt(Vdbe *p){
** proceed with the special handling.
*/
if( !p->readOnly || mrc!=SQLITE_INTERRUPT ){
if( p->rc==SQLITE_IOERR_BLOCKED && p->usesStmtJournal ){
eStatementOp = SAVEPOINT_ROLLBACK;
p->rc = SQLITE_BUSY;
}else if( (mrc==SQLITE_NOMEM || mrc==SQLITE_FULL)
&& p->usesStmtJournal ){
if( (mrc==SQLITE_NOMEM || mrc==SQLITE_FULL) && p->usesStmtJournal ){
eStatementOp = SAVEPOINT_ROLLBACK;
}else{
/* We are forced to roll back the active transaction. Before doing
@ -1958,8 +1955,6 @@ int sqlite3VdbeFinalize(Vdbe *p){
if( p->magic==VDBE_MAGIC_RUN || p->magic==VDBE_MAGIC_HALT ){
rc = sqlite3VdbeReset(p);
assert( (rc & p->db->errMask)==rc );
}else if( p->magic!=VDBE_MAGIC_INIT ){
return SQLITE_MISUSE;
}
sqlite3VdbeDelete(p);
return rc;
@ -1991,7 +1986,7 @@ void sqlite3VdbeDelete(Vdbe *p){
int i;
sqlite3 *db;
if( p==0 ) return;
if( NEVER(p==0) ) return;
db = p->db;
if( p->pPrev ){
p->pPrev->pNext = p->pNext;