Merge accidentally created fork.

FossilOrigin-Name: b7d080b8e850bd262f53f29ba4687a62cf76d4ef
This commit is contained in:
dan 2011-01-11 17:40:30 +00:00
commit da56b15e95
3 changed files with 22 additions and 11 deletions

View File

@ -1,5 +1,5 @@
C Add\sthe\sSQLITE_FCNTL_SYNC\sfile-control.
D 2011-01-11T17:39:38
C Merge\saccidentally\screated\sfork.
D 2011-01-11T17:40:31
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in de6498556d536ae60bb8bb10e8c1ba011448658c
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -116,7 +116,7 @@ F src/alter.c 6a0c176e64a34929a4436048066a84ef4f1445b3
F src/analyze.c 3af3fdb5edea9e69496b078935a3e6a2a1118b30
F src/attach.c 252c4f7e36cc219349451ed63e278c60e80b26f3
F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34
F src/backup.c d5b0137bc20327af08c14772227cc35134839c30
F src/backup.c ce552d975069f65ab1fc798950ff3582d8e76d58
F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff
F src/btree.c b70bf1dc563ec532851715ce51aa1ea0c0c592b9
@ -895,7 +895,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P ece7efce2733b4fdd71db385abebbde464ac8f30
R 8f29fed661ee1ba7528f6d53e5a1b035
P b3f2f465c310a2cfef8731a0dae3453593b68de9 a5e4e0caad788318bc973e2550488a3b83128b8b
R 6faced81a82ecb4ba54df893c5e6a297
U dan
Z 8ca27a923058f8ea50b31a1627ccbb6c
Z f0f3daac9da086373a27e5813015c53d

View File

@ -1 +1 @@
b3f2f465c310a2cfef8731a0dae3453593b68de9
b7d080b8e850bd262f53f29ba4687a62cf76d4ef

View File

@ -117,6 +117,16 @@ static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
return pDb->aDb[i].pBt;
}
/*
** Attempt to set the page size of the destination to match the page size
** of the source.
*/
static int setDestPgsz(sqlite3_backup *p){
int rc;
rc = sqlite3BtreeSetPageSize(p->pDest,sqlite3BtreeGetPageSize(p->pSrc),-1,0);
return rc;
}
/*
** Create an sqlite3_backup process to copy the contents of zSrcDb from
** connection handle pSrcDb to zDestDb in pDestDb. If successful, return
@ -170,10 +180,11 @@ sqlite3_backup *sqlite3_backup_init(
p->iNext = 1;
p->isAttached = 0;
if( 0==p->pSrc || 0==p->pDest ){
/* One (or both) of the named databases did not exist. An error has
** already been written into the pDestDb handle. All that is left
** to do here is free the sqlite3_backup structure.
if( 0==p->pSrc || 0==p->pDest || setDestPgsz(p)==SQLITE_NOMEM ){
/* One (or both) of the named databases did not exist or an OOM
** error was hit. The error has already been written into the
** pDestDb handle. All that is left to do here is free the
** sqlite3_backup structure.
*/
sqlite3_free(p);
p = 0;