mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix the backup logic so that it detects a failure to sqlite3BtreeUpdateMeta()
and reports that failure back up to the top level. (CVS 6851) FossilOrigin-Name: 471b92f2514aedecb5773825a7ae472190375727
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
||||
C Make\sthe\ssqlite3BtreeMoveto\sfunction\sstatic,\ssince\sit\sis\sonly\sused\sfrom\swithin\sbtree.c.\sRemove\sunused\sfunction\slockBtreeWithRetry\sfrom\sbtree.c.\s(CVS\s6850)
|
||||
D 2009-07-06T18:56:13
|
||||
C Fix\sthe\sbackup\slogic\sso\sthat\sit\sdetects\sa\sfailure\sto\ssqlite3BtreeUpdateMeta()\nand\sreports\sthat\sfailure\sback\sup\sto\sthe\stop\slevel.\s(CVS\s6851)
|
||||
D 2009-07-06T19:03:13
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@@ -103,7 +103,7 @@ F src/alter.c 95f41d957f56407aac6224041ca5b954042318d1
|
||||
F src/analyze.c e239496cfb5394ac8867f1c112905ddab8d01cd9
|
||||
F src/attach.c 13995348fc5a26cdd136a50806faf292aabc173f
|
||||
F src/auth.c 802a9439dfa0b8c208b10055cba400e82ef18025
|
||||
F src/backup.c 97a3859d8585eb4fcb1e81a795cf4b3fdd82f30f
|
||||
F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
|
||||
F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
|
||||
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
|
||||
F src/btree.c 1a7caa2b0dfd76a7e28049e2333997e6f317c9f3
|
||||
@@ -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 1636e7831a21d401a48aa74d884444a287f14f72
|
||||
R 7e38f383918ece6e29e3d7609123e090
|
||||
U danielk1977
|
||||
Z e5cf1d022d5f233619186bb620497925
|
||||
P 30d5ec62ab6a85ee60ee4128e20959842f8c7ad1
|
||||
R f51708f39711f3df96d46a6137854687
|
||||
U drh
|
||||
Z adb1cb8068914d918224f5f7ac9e9136
|
||||
|
@@ -1 +1 @@
|
||||
30d5ec62ab6a85ee60ee4128e20959842f8c7ad1
|
||||
471b92f2514aedecb5773825a7ae472190375727
|
15
src/backup.c
15
src/backup.c
@@ -12,7 +12,7 @@
|
||||
** This file contains the implementation of the sqlite3_backup_XXX()
|
||||
** API functions and the related features.
|
||||
**
|
||||
** $Id: backup.c,v 1.18 2009/07/02 07:47:33 danielk1977 Exp $
|
||||
** $Id: backup.c,v 1.19 2009/07/06 19:03:13 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "btreeInt.h"
|
||||
@@ -358,17 +358,18 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
|
||||
}
|
||||
}
|
||||
|
||||
if( rc==SQLITE_DONE ){
|
||||
const int nSrcPagesize = sqlite3BtreeGetPageSize(p->pSrc);
|
||||
const int nDestPagesize = sqlite3BtreeGetPageSize(p->pDest);
|
||||
int nDestTruncate;
|
||||
|
||||
/* Update the schema version field in the destination database. This
|
||||
** is to make sure that the schema-version really does change in
|
||||
** the case where the source and destination databases have the
|
||||
** same schema version.
|
||||
*/
|
||||
sqlite3BtreeUpdateMeta(p->pDest, 1, p->iDestSchema+1);
|
||||
if( rc==SQLITE_DONE
|
||||
&& (rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1))==SQLITE_OK
|
||||
){
|
||||
const int nSrcPagesize = sqlite3BtreeGetPageSize(p->pSrc);
|
||||
const int nDestPagesize = sqlite3BtreeGetPageSize(p->pDest);
|
||||
int nDestTruncate;
|
||||
|
||||
if( p->pDestDb ){
|
||||
sqlite3ResetInternalSchema(p->pDestDb, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user