if( p->rc==SQLITE_OK ){
otaFileSuffix3(zBase, zWal);
otaFileSuffix3(zBase, zOal);
- rename(zOal, zWal);
/* Re-open the databases. */
otaObjIterFinalize(&p->objiter);
sqlite3_close(p->dbMain);
sqlite3_close(p->dbOta);
- p->dbMain = 0;
- p->dbOta = 0;
- otaOpenDatabase(p);
- otaSetupCheckpoint(p, 0);
+ p->rc = rename(zOal, zWal) ? SQLITE_IOERR : SQLITE_OK;
+ if( p->rc==SQLITE_OK ){
+ p->dbMain = 0;
+ p->dbOta = 0;
+ otaOpenDatabase(p);
+ otaSetupCheckpoint(p, 0);
+ }
}
}
-C Merge\sall\srecent\strunk\senhancements\sand\sfixes\sinto\sthe\sota-update\sbranch.
-D 2015-04-15T14:26:04.771
+C Avoid\sattempting\sto\srename\sthe\s*-oal\sfile\swhile\sit\sis\sstill\sopen.
+D 2015-04-16T10:55:58.879
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5f78b1ab81b64e7c57a75d170832443e66c0880a
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F ext/ota/otacrash.test a078d34e2edbcedac5f894e3e7d08d452a327007
F ext/ota/otafault.test 8c43586c2b96ca16bbce00b5d7e7d67316126db8
F ext/ota/otafault2.test fa202a98ca221faec318f3e5c5f39485b1256561
-F ext/ota/sqlite3ota.c 9c16cd3bf99d2591a8a0b56b114ebbf839d42399
+F ext/ota/sqlite3ota.c 8c0d30482bf31fe31d3bb565cf8f8271244dd57d
F ext/ota/sqlite3ota.h f1a9dd98b00fa622c7e2eb68e580ee02e194c4d6
F ext/ota/test_ota.c e34c801c665d64b4b9e00b71f1acf8c652404b2b
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P ec9d907a57fcea72c8a64e521e8a1b5777d67568 bd06eeb8d06237dc2d54d8a03e8bf525cb811c9e
-R 6f95f9c15975aab2be755a8183ba89a7
-U drh
-Z 38e5b36fa5e6d50108fc54dc3af0e0b9
+P 9bd3e4453d4ad416f7e3f08f0bd283d34f1c319c
+R 4663dac775a3f1bb6d41bcf6b3ecb7b2
+U dan
+Z 579dc8fee06cffd2aee7945473c8d821