-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-C When\srunning\sa\scheckpoint\swhile\sin\slocking_mode=EXCLUSIVE,\sbe\ssure\sto\smove\nthe\swal-index\slock\sto\sUNLOCK\sfrom\sREAD\sprior\sto\spromoting\sto\sCHECKPOINT.
-D 2010-05-07T20:34:17
+C Enhance\sthe\sOP_JournalMode\sopcode\swith\san\signore-errors\soption\sand\suse\sthat\noption\sthe\sATTACH\scommand.
+D 2010-05-10T11:20:06
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F sqlite3.pc.in ae6f59a76e862f5c561eb32a380228a02afc3cad
F src/alter.c a9ff6f14b3935502537e90194b66c7bc79bed317
F src/analyze.c 8dfd781ac326496746ecdfc3e099250ed5d79be5
-F src/attach.c 0d7c4c820d193161238bce8900b4bc4bed7577b6
+F src/attach.c 7f1f760bacd9c5b6cbf6fbc3ceb159ed19ee910a
F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34
F src/backup.c de9809091b3b99f69e37261c133f7f8b19f6eca6
F src/bitvec.c 06ad2c36a9c3819c0b9cbffec7b15f58d5d834e0
F src/utf.c 1baeeac91707a4df97ccc6141ec0f808278af685
F src/util.c 32aebf04c10e51ad3977a928b7416bed671b620b
F src/vacuum.c 90a32e098cf06c5524c76b21027ee7520a821065
-F src/vdbe.c 267e0431ccd1a7536c1c8160288ad44c6efeb27d
+F src/vdbe.c 066dab3af747cb56a8277b26695f88b17b189b3d
F src/vdbe.h 471f6a3dcec4817ca33596fe7f6654d56c0e75f3
F src/vdbeInt.h 19ebc8c2a2e938340051ee65af3f377fb99102d1
F src/vdbeapi.c dc3138f10afbc95ed3c21dd25abb154504b1db9d
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P a65c2939267ef6acec4e355a207f98f217e263d6
-R a46357f982ebdd4520842ec1c873b4c4
+P be114bdf9bb98c7287f8cb54340c630b0c412e9d
+R 338d6602848868b4fdc5f43d8042cacf
U drh
-Z 46431e902a37a907f9e07e8180abbf8b
+Z 84070859675575cea6f23c42561ae695
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-iD8DBQFL5HlMoxKgR168RlERAnrAAKCMJ4zxVnnT86OHLDJpyko7/j+9/QCgjflR
-YUDucsN2KcpF/NWFDOXGwZ8=
-=xUef
+iD8DBQFL5+vqoxKgR168RlERAhAYAJ9X+wZ4rOhzhAxjTWIMsJCrOuKhnQCeMjaZ
+7HQKFwCzaUZuXQ/pI06hEvs=
+=kH/t
-----END PGP SIGNATURE-----
-be114bdf9bb98c7287f8cb54340c630b0c412e9d
\ No newline at end of file
+0bdea4cfbd7832f2a00c01b93c92ba13d20139ef
\ No newline at end of file
*/
sqlite3VdbeAddOp3(v, OP_JournalMode, db->nDb, regArgs+3,
db->dfltJournalMode);
+ sqlite3VdbeChangeP5(v, 1);
}
/* Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this
};
#endif
-/* Opcode: JournalMode P1 P2 P3 * *
+/* Opcode: JournalMode P1 P2 P3 * P5
**
** Change the journal mode of database P1 to P3. P3 must be one of the
** PAGER_JOURNALMODE_XXX values. If changing between the various rollback
** If changing into or out of WAL mode the procedure is more complicated.
**
** Write a string containing the final journal-mode to register P2.
+**
+** If an attempt to change in to or out of WAL mode fails because another
+** connection also has the same database open, then an SQLITE_BUSY error
+** is raised if P5==0, or of P5!=0 the journal mode changed is skipped
+** without signaling the error.
*/
case OP_JournalMode: { /* out2-prerelease */
Btree *pBt; /* Btree to change journal mode of */
** after a successful return.
*/
rc = sqlite3PagerCloseWal(pPager);
- if( rc!=SQLITE_OK ) goto abort_due_to_error;
- sqlite3PagerJournalMode(pPager, eNew);
+ if( rc==SQLITE_OK ){
+ sqlite3PagerJournalMode(pPager, eNew);
+ }else if( rc==SQLITE_BUSY && pOp->p5==0 ){
+ goto abort_due_to_error;
+ }
}else{
sqlite3PagerJournalMode(pPager, PAGER_JOURNALMODE_DELETE);
+ rc = SQLITE_OK;
}
/* Open a transaction on the database file. Regardless of the journal
** mode, this transaction always uses a rollback journal.
*/
assert( sqlite3BtreeIsInTrans(pBt)==0 );
- rc = sqlite3BtreeSetVersion(pBt, (eNew==PAGER_JOURNALMODE_WAL ? 2 : 1));
- if( rc!=SQLITE_OK ) goto abort_due_to_error;
+ if( rc==SQLITE_OK ){
+ rc = sqlite3BtreeSetVersion(pBt,
+ (eNew==PAGER_JOURNALMODE_WAL ? 2 : 1));
+ if( rc==SQLITE_BUSY && pOp->p5==0 ) goto abort_due_to_error;
+ }else if( rc==SQLITE_BUSY ){
+ rc = SQLITE_OK;
+ }
}
}
}