]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Propagate detected database corruption up through the call stack. (CVS 2279)
authordrh <drh@noemail.net>
Wed, 26 Jan 2005 21:55:31 +0000 (21:55 +0000)
committerdrh <drh@noemail.net>
Wed, 26 Jan 2005 21:55:31 +0000 (21:55 +0000)
FossilOrigin-Name: 2c54aba5ba781f4da1f14ed7a3986b6dc17728d7

manifest
manifest.uuid
src/vdbe.c
src/vdbeaux.c

index bc0f633a7c60a05bf1b2aa31984fc73c372d08c4..200cd669a353e7ab0c504467dc62143dfd9fd5b6 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C An\soptimization\sto\ssqlite3VdbeSerialType().\s(CVS\s2278)
-D 2005-01-26T17:47:03
+C Propagate\sdetected\sdatabase\scorruption\sup\sthrough\sthe\scall\sstack.\s(CVS\s2279)
+D 2005-01-26T21:55:32
 F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
@@ -75,11 +75,11 @@ F src/update.c 6e5c6eb660a5508c449c6d637571e24ef13f70a1
 F src/utf.c 9bece2c7b94d9002ab1bb900a7658c6f826b0f74
 F src/util.c a858b93ba06bbafab55ba41e4d58538eb51f4b6a
 F src/vacuum.c 1a9db113a027461daaf44724c71dd1ebbd064203
-F src/vdbe.c 4fb54fd01cf00b90dfd02f73785adc3f043e89e3
+F src/vdbe.c 2f2fc0c785022384a2914ff1f1e1d0768bd67829
 F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181
 F src/vdbeInt.h 24d411de9efc6919a1e580069a597182be269bcf
 F src/vdbeapi.c 467caa6e6fb9247528b1c7ab9132ae1b4748e8ac
-F src/vdbeaux.c 82e2c87e6028ce8b7ee5eb2e1787b941c757be10
+F src/vdbeaux.c 083c5fcde08120d7857dcac2b296a1eb7e390a18
 F src/vdbemem.c 62fe89471b656a922e9879be005abf690509ead3
 F src/where.c f4127cc2633ee0f74790ab7f09f5af832489e44e
 F tclinstaller.tcl 36478c3bbfc5b93ceac42d94e3c736937b808432
@@ -272,7 +272,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
 F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
 F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
-P 12defe8cd6a0d7434c8f74b88169155d47299079
-R 10797ec718abc66577c37fb254251e5c
+P db36773830cc81c38b78d1776a495d49475523be
+R 14737fbdc610c888f2122625dc951acf
 U drh
-Z 3208deb2a90b07f23b987f55fb0e2b1e
+Z 2ab7fa6f90cabec8fa7c878d19342500
index a10315f0346f373a7130e3969a49703a65fc52d7..7194651337cdbd2a11068bc9bfa1eb5d59c11259 100644 (file)
@@ -1 +1 @@
-db36773830cc81c38b78d1776a495d49475523be
\ No newline at end of file
+2c54aba5ba781f4da1f14ed7a3986b6dc17728d7
\ No newline at end of file
index e581d1c4263552b9f72b6af24f3db879692f4539..b579e3ef054b773bc6be64dafc2dafb697a9ae96 100644 (file)
@@ -43,7 +43,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.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 "os.h"
@@ -1738,7 +1738,8 @@ case OP_Column: {
     pCrsr = 0;
   }else if( (pC = p->apCsr[p1])->pCursor!=0 ){
     /* The record is stored in a B-Tree */
-    sqlite3VdbeCursorMoveto(pC);
+    rc = sqlite3VdbeCursorMoveto(pC);
+    if ( rc ) return rc;
     zRec = 0;
     pCrsr = pC->pCursor;
     if( pC->nullRow ){
@@ -3083,7 +3084,8 @@ case OP_Delete: {
   pC = p->apCsr[i];
   assert( pC!=0 );
   if( pC->pCursor!=0 ){
-    sqlite3VdbeCursorMoveto(pC);
+    rc = sqlite3VdbeCursorMoveto(pC);
+    if ( rc ) return rc;
     rc = sqlite3BtreeDelete(pC->pCursor);
     pC->nextRowidValid = 0;
     pC->cacheValid = 0;
@@ -3156,7 +3158,8 @@ case OP_RowData: {
     pTos->flags = MEM_Null;
   }else if( pC->pCursor!=0 ){
     BtCursor *pCrsr = pC->pCursor;
-    sqlite3VdbeCursorMoveto(pC);
+    rc = sqlite3VdbeCursorMoveto(pC);
+    if ( rc ) return rc;
     if( pC->nullRow ){
       pTos->flags = MEM_Null;
       break;
@@ -3211,7 +3214,8 @@ case OP_Recno: {
   assert( i>=0 && i<p->nCursor );
   pC = p->apCsr[i];
   assert( pC!=0 );
-  sqlite3VdbeCursorMoveto(pC);
+  rc = sqlite3VdbeCursorMoveto(pC);
+  if ( rc ) return rc;
   pTos++;
   if( pC->recnoIsValid ){
     v = pC->lastRecno;
@@ -3257,7 +3261,8 @@ case OP_FullKey: {
     i64 amt;
     char *z;
 
-    sqlite3VdbeCursorMoveto(pC);
+    rc = sqlite3VdbeCursorMoveto(pC);
+    if ( rc ) return rc;
     assert( pC->intKey==0 );
     sqlite3BtreeKeySize(pCrsr, &amt);
     if( amt<=0 ){
index 763f803feb28f723c3979ae23627e0de4d819cbb..28a83f54dac61fe3ba739bcdffd695c9c8f2436e 100644 (file)
@@ -1428,19 +1428,22 @@ void sqlite3VdbeDelete(Vdbe *p){
 */
 int sqlite3VdbeCursorMoveto(Cursor *p){
   if( p->deferredMoveto ){
-    int res;
+    int res, rc;
     extern int sqlite3_search_count;
     assert( p->intKey );
     if( p->intKey ){
-      sqlite3BtreeMoveto(p->pCursor, 0, p->movetoTarget, &res);
+      rc = sqlite3BtreeMoveto(p->pCursor, 0, p->movetoTarget, &res);
     }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->lastRecno = keyToInt(p->movetoTarget);
     p->recnoIsValid = res==0;
     if( res<0 ){
-      sqlite3BtreeNext(p->pCursor, &res);
+      rc = sqlite3BtreeNext(p->pCursor, &res);
+      if( rc ) return rc;
     }
     sqlite3_search_count++;
     p->deferredMoveto = 0;