From: drh Date: Wed, 5 May 2010 04:11:44 +0000 (+0000) Subject: Make sure the page size of the main database is fixed following a X-Git-Tag: version-3.7.2~432 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16adb77623c833b16b2422cdfb21a2c79a0eb2d1;p=thirdparty%2Fsqlite.git Make sure the page size of the main database is fixed following a failed VACUUM attempt. Otherwise, two consecutive failed VACUUM attempts with attempted page_size changes on encrypted or WAL databases could result in database corruption. FossilOrigin-Name: 208e7d5d3a8915433dbf50c6cc6698ec6c8df944 --- diff --git a/manifest b/manifest index 9433333242..e24ff2998e 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C Do\snot\sattempt\sto\smodify\sthe\spage_size\swhen\srunning\sVACUUM\son\sa\sWAL\sdatabase. -D 2010-05-05T03:39:53 +C Make\ssure\sthe\spage\ssize\sof\sthe\smain\sdatabase\sis\sfixed\sfollowing\sa\nfailed\sVACUUM\sattempt.\s\sOtherwise,\stwo\sconsecutive\sfailed\sVACUUM\sattempts\nwith\sattempted\spage_size\schanges\son\sencrypted\sor\sWAL\sdatabases\scould\nresult\sin\sdatabase\scorruption. +D 2010-05-05T04:11:45 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in d83a0ffef3dcbfb08b410a6c6dd6c009ec9167fb F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -214,7 +214,7 @@ F src/trigger.c 8927588cb9e6d47f933b53bfe74200fbb504100d F src/update.c c0dc6b75ad28b76b619042d934f337b02acee208 F src/utf.c 1baeeac91707a4df97ccc6141ec0f808278af685 F src/util.c 32aebf04c10e51ad3977a928b7416bed671b620b -F src/vacuum.c 15db45c738d8c4414e535d027a35f15d5edff0a4 +F src/vacuum.c 90a32e098cf06c5524c76b21027ee7520a821065 F src/vdbe.c 8be37a1b18786b5c026adcb2e9edc93e3a940885 F src/vdbe.h 471f6a3dcec4817ca33596fe7f6654d56c0e75f3 F src/vdbeInt.h 19ebc8c2a2e938340051ee65af3f377fb99102d1 @@ -812,14 +812,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P df19928f7ee94bca3989313ff16507c15d6efe2b -R 069bb5f53fdfcba24cfeb576b63f1beb +P 58a1a59be89b33c6d5fa8b43571037d7d96625a1 +R 066bf2576a40b4c0c16f4225fc3d2e48 U drh -Z 8a5d544d9196499f84a43f63f2529a8f +Z cb782788a922488bfa66a64e6b6463a6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFL4OiMoxKgR168RlERAjEXAJ9ODmY13dc7A8c10DMd/YLHkGk71QCePYVs -bLofxrhxIuLx1i3pAamMk0s= -=gO6s +iD8DBQFL4PAEoxKgR168RlERAj4kAJ9RhM+s29Nfkv269nD6t7X4gUmQ3gCfW1vO +GdUgzvdErwr4cFc4x4yLGro= +=aer0 -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index b7e6560c90..b8d9686c31 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -58a1a59be89b33c6d5fa8b43571037d7d96625a1 \ No newline at end of file +208e7d5d3a8915433dbf50c6cc6698ec6c8df944 \ No newline at end of file diff --git a/src/vacuum.c b/src/vacuum.c index b5eb7789a2..2e3c899124 100644 --- a/src/vacuum.c +++ b/src/vacuum.c @@ -310,6 +310,7 @@ end_of_vacuum: db->nChange = saved_nChange; db->nTotalChange = saved_nTotalChange; db->xTrace = saved_xTrace; + sqlite3BtreeSetPageSize(pMain, -1, -1, 1); /* Currently there is an SQL level transaction open on the vacuum ** database. No locks are held on any other files (since the main file