mirror of https://github.com/sqlite/sqlite
Propagate detected database corruption up through the call stack. (CVS 2279)
FossilOrigin-Name: 2c54aba5ba781f4da1f14ed7a3986b6dc17728d7
This commit is contained in:
parent
5742b63e4a
commit
536065afef
14
manifest
14
manifest
|
@ -1,5 +1,5 @@
|
||||||
C An\soptimization\sto\ssqlite3VdbeSerialType().\s(CVS\s2278)
|
C Propagate\sdetected\sdatabase\scorruption\sup\sthrough\sthe\scall\sstack.\s(CVS\s2279)
|
||||||
D 2005-01-26T17:47:03
|
D 2005-01-26T21:55:32
|
||||||
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
|
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
|
||||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||||
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
||||||
|
@ -75,11 +75,11 @@ F src/update.c 6e5c6eb660a5508c449c6d637571e24ef13f70a1
|
||||||
F src/utf.c 9bece2c7b94d9002ab1bb900a7658c6f826b0f74
|
F src/utf.c 9bece2c7b94d9002ab1bb900a7658c6f826b0f74
|
||||||
F src/util.c a858b93ba06bbafab55ba41e4d58538eb51f4b6a
|
F src/util.c a858b93ba06bbafab55ba41e4d58538eb51f4b6a
|
||||||
F src/vacuum.c 1a9db113a027461daaf44724c71dd1ebbd064203
|
F src/vacuum.c 1a9db113a027461daaf44724c71dd1ebbd064203
|
||||||
F src/vdbe.c 4fb54fd01cf00b90dfd02f73785adc3f043e89e3
|
F src/vdbe.c 2f2fc0c785022384a2914ff1f1e1d0768bd67829
|
||||||
F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181
|
F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181
|
||||||
F src/vdbeInt.h 24d411de9efc6919a1e580069a597182be269bcf
|
F src/vdbeInt.h 24d411de9efc6919a1e580069a597182be269bcf
|
||||||
F src/vdbeapi.c 467caa6e6fb9247528b1c7ab9132ae1b4748e8ac
|
F src/vdbeapi.c 467caa6e6fb9247528b1c7ab9132ae1b4748e8ac
|
||||||
F src/vdbeaux.c 82e2c87e6028ce8b7ee5eb2e1787b941c757be10
|
F src/vdbeaux.c 083c5fcde08120d7857dcac2b296a1eb7e390a18
|
||||||
F src/vdbemem.c 62fe89471b656a922e9879be005abf690509ead3
|
F src/vdbemem.c 62fe89471b656a922e9879be005abf690509ead3
|
||||||
F src/where.c f4127cc2633ee0f74790ab7f09f5af832489e44e
|
F src/where.c f4127cc2633ee0f74790ab7f09f5af832489e44e
|
||||||
F tclinstaller.tcl 36478c3bbfc5b93ceac42d94e3c736937b808432
|
F tclinstaller.tcl 36478c3bbfc5b93ceac42d94e3c736937b808432
|
||||||
|
@ -272,7 +272,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
|
||||||
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
|
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
|
||||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||||
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
|
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
|
||||||
P 12defe8cd6a0d7434c8f74b88169155d47299079
|
P db36773830cc81c38b78d1776a495d49475523be
|
||||||
R 10797ec718abc66577c37fb254251e5c
|
R 14737fbdc610c888f2122625dc951acf
|
||||||
U drh
|
U drh
|
||||||
Z 3208deb2a90b07f23b987f55fb0e2b1e
|
Z 2ab7fa6f90cabec8fa7c878d19342500
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
db36773830cc81c38b78d1776a495d49475523be
|
2c54aba5ba781f4da1f14ed7a3986b6dc17728d7
|
17
src/vdbe.c
17
src/vdbe.c
|
@ -43,7 +43,7 @@
|
||||||
** in this file for details. If in doubt, do not deviate from existing
|
** in this file for details. If in doubt, do not deviate from existing
|
||||||
** commenting and indentation practices when changing or adding code.
|
** commenting and indentation practices when changing or adding code.
|
||||||
**
|
**
|
||||||
** $Id: vdbe.c,v 1.446 2005/01/24 10:25:59 danielk1977 Exp $
|
** $Id: vdbe.c,v 1.447 2005/01/26 21:55:32 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
@ -1738,7 +1738,8 @@ case OP_Column: {
|
||||||
pCrsr = 0;
|
pCrsr = 0;
|
||||||
}else if( (pC = p->apCsr[p1])->pCursor!=0 ){
|
}else if( (pC = p->apCsr[p1])->pCursor!=0 ){
|
||||||
/* The record is stored in a B-Tree */
|
/* The record is stored in a B-Tree */
|
||||||
sqlite3VdbeCursorMoveto(pC);
|
rc = sqlite3VdbeCursorMoveto(pC);
|
||||||
|
if ( rc ) return rc;
|
||||||
zRec = 0;
|
zRec = 0;
|
||||||
pCrsr = pC->pCursor;
|
pCrsr = pC->pCursor;
|
||||||
if( pC->nullRow ){
|
if( pC->nullRow ){
|
||||||
|
@ -3083,7 +3084,8 @@ case OP_Delete: {
|
||||||
pC = p->apCsr[i];
|
pC = p->apCsr[i];
|
||||||
assert( pC!=0 );
|
assert( pC!=0 );
|
||||||
if( pC->pCursor!=0 ){
|
if( pC->pCursor!=0 ){
|
||||||
sqlite3VdbeCursorMoveto(pC);
|
rc = sqlite3VdbeCursorMoveto(pC);
|
||||||
|
if ( rc ) return rc;
|
||||||
rc = sqlite3BtreeDelete(pC->pCursor);
|
rc = sqlite3BtreeDelete(pC->pCursor);
|
||||||
pC->nextRowidValid = 0;
|
pC->nextRowidValid = 0;
|
||||||
pC->cacheValid = 0;
|
pC->cacheValid = 0;
|
||||||
|
@ -3156,7 +3158,8 @@ case OP_RowData: {
|
||||||
pTos->flags = MEM_Null;
|
pTos->flags = MEM_Null;
|
||||||
}else if( pC->pCursor!=0 ){
|
}else if( pC->pCursor!=0 ){
|
||||||
BtCursor *pCrsr = pC->pCursor;
|
BtCursor *pCrsr = pC->pCursor;
|
||||||
sqlite3VdbeCursorMoveto(pC);
|
rc = sqlite3VdbeCursorMoveto(pC);
|
||||||
|
if ( rc ) return rc;
|
||||||
if( pC->nullRow ){
|
if( pC->nullRow ){
|
||||||
pTos->flags = MEM_Null;
|
pTos->flags = MEM_Null;
|
||||||
break;
|
break;
|
||||||
|
@ -3211,7 +3214,8 @@ case OP_Recno: {
|
||||||
assert( i>=0 && i<p->nCursor );
|
assert( i>=0 && i<p->nCursor );
|
||||||
pC = p->apCsr[i];
|
pC = p->apCsr[i];
|
||||||
assert( pC!=0 );
|
assert( pC!=0 );
|
||||||
sqlite3VdbeCursorMoveto(pC);
|
rc = sqlite3VdbeCursorMoveto(pC);
|
||||||
|
if ( rc ) return rc;
|
||||||
pTos++;
|
pTos++;
|
||||||
if( pC->recnoIsValid ){
|
if( pC->recnoIsValid ){
|
||||||
v = pC->lastRecno;
|
v = pC->lastRecno;
|
||||||
|
@ -3257,7 +3261,8 @@ case OP_FullKey: {
|
||||||
i64 amt;
|
i64 amt;
|
||||||
char *z;
|
char *z;
|
||||||
|
|
||||||
sqlite3VdbeCursorMoveto(pC);
|
rc = sqlite3VdbeCursorMoveto(pC);
|
||||||
|
if ( rc ) return rc;
|
||||||
assert( pC->intKey==0 );
|
assert( pC->intKey==0 );
|
||||||
sqlite3BtreeKeySize(pCrsr, &amt);
|
sqlite3BtreeKeySize(pCrsr, &amt);
|
||||||
if( amt<=0 ){
|
if( amt<=0 ){
|
||||||
|
|
|
@ -1428,19 +1428,22 @@ void sqlite3VdbeDelete(Vdbe *p){
|
||||||
*/
|
*/
|
||||||
int sqlite3VdbeCursorMoveto(Cursor *p){
|
int sqlite3VdbeCursorMoveto(Cursor *p){
|
||||||
if( p->deferredMoveto ){
|
if( p->deferredMoveto ){
|
||||||
int res;
|
int res, rc;
|
||||||
extern int sqlite3_search_count;
|
extern int sqlite3_search_count;
|
||||||
assert( p->intKey );
|
assert( p->intKey );
|
||||||
if( p->intKey ){
|
if( p->intKey ){
|
||||||
sqlite3BtreeMoveto(p->pCursor, 0, p->movetoTarget, &res);
|
rc = sqlite3BtreeMoveto(p->pCursor, 0, p->movetoTarget, &res);
|
||||||
}else{
|
}else{
|
||||||
sqlite3BtreeMoveto(p->pCursor,(char*)&p->movetoTarget,sizeof(i64),&res);
|
rc = sqlite3BtreeMoveto(p->pCursor,(char*)&p->movetoTarget,
|
||||||
|
sizeof(i64),&res);
|
||||||
}
|
}
|
||||||
|
if( rc ) return rc;
|
||||||
*p->pIncrKey = 0;
|
*p->pIncrKey = 0;
|
||||||
p->lastRecno = keyToInt(p->movetoTarget);
|
p->lastRecno = keyToInt(p->movetoTarget);
|
||||||
p->recnoIsValid = res==0;
|
p->recnoIsValid = res==0;
|
||||||
if( res<0 ){
|
if( res<0 ){
|
||||||
sqlite3BtreeNext(p->pCursor, &res);
|
rc = sqlite3BtreeNext(p->pCursor, &res);
|
||||||
|
if( rc ) return rc;
|
||||||
}
|
}
|
||||||
sqlite3_search_count++;
|
sqlite3_search_count++;
|
||||||
p->deferredMoveto = 0;
|
p->deferredMoveto = 0;
|
||||||
|
|
Loading…
Reference in New Issue