From: danielk1977 Date: Thu, 30 Apr 2009 16:41:00 +0000 (+0000) Subject: Fix a problem with in-memory sub-journals and exclusive locking mode. Also a test... X-Git-Tag: version-3.6.15~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9d1a21421de11418ad087414eea3230d5576130;p=thirdparty%2Fsqlite.git Fix a problem with in-memory sub-journals and exclusive locking mode. Also a test script problem introduced by (6575). (CVS 6580) FossilOrigin-Name: d67af3f5a21329e133aa6cf2be745a9f8c1a6562 --- diff --git a/manifest b/manifest index b7dbe3d39b..bc82d4627d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Documentation\supdates\sfor\ssqlite3_set_authorizer().\s\sNo\schanges\sto\scode.\s(CVS\s6579) -D 2009-04-30T15:59:56 +C Fix\sa\sproblem\swith\sin-memory\ssub-journals\sand\sexclusive\slocking\smode.\sAlso\sa\stest\sscript\sproblem\sintroduced\sby\s(6575).\s(CVS\s6580) +D 2009-04-30T16:41:00 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -146,7 +146,7 @@ F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 F src/os_unix.c 9ad9f45049a3c9eb0b0713b162ff0d7024ff7259 F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405 -F src/pager.c 4c9c51dd73d778ba835a2f922b6c39b680a660d0 +F src/pager.c 059490959c4481eaaf8f9d868b655603e2c8830c F src/pager.h 73f481a308a873ccd626d97331c081db3b53e2e5 F src/parse.y b7e4341b21736a90b952aa6bb663ec98529b778e F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d @@ -317,7 +317,7 @@ F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea F test/enc2.test 6d91a5286f59add0cfcbb2d0da913b76f2242398 F test/enc3.test 5c550d59ff31dccdba5d1a02ae11c7047d77c041 F test/eval.test bc269c365ba877554948441e91ad5373f9f91be3 -F test/exclusive.test ff298dccdcbb70d76db0216cab7074d8b4418fef +F test/exclusive.test b4fcbaa74163ade20e90286b958d7530c1192b49 F test/exclusive2.test 6bdf254770a843c2933b54bee9ed239934f0a183 F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7 F test/expr.test 80f3cf99f786ffbac19d2b0083673e7fc797030f @@ -726,7 +726,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 715f14f1dcaf604d4794bf3e18e245d4f8c5d5a9 -R 9ff6d5fc60c668574c7837abdc1a2449 -U drh -Z c4b3358b3d2850b6c0907aa2ba7de5e1 +P 41f39c3145f2659fdb636cae07cdd424a10ac6e9 +R af3d649def4c08d27e9db23379bab6cd +U danielk1977 +Z 5988bf8ceaa81fb5cf47ab98cac14b56 diff --git a/manifest.uuid b/manifest.uuid index b2467258d5..a0899d4565 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -41f39c3145f2659fdb636cae07cdd424a10ac6e9 \ No newline at end of file +d67af3f5a21329e133aa6cf2be745a9f8c1a6562 \ No newline at end of file diff --git a/src/pager.c b/src/pager.c index 4f2954064f..dcb052a3f4 100644 --- a/src/pager.c +++ b/src/pager.c @@ -18,7 +18,7 @@ ** file simultaneously, or one process from reading the database while ** another is writing. ** -** @(#) $Id: pager.c,v 1.584 2009/04/30 09:10:38 danielk1977 Exp $ +** @(#) $Id: pager.c,v 1.585 2009/04/30 16:41:00 danielk1977 Exp $ */ #ifndef SQLITE_OMIT_DISKIO #include "sqliteInt.h" @@ -1062,7 +1062,7 @@ static void releaseAllSavepoints(Pager *pPager){ for(ii=0; iinSavepoint; ii++){ sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint); } - if( !pPager->exclusiveMode ){ + if( !pPager->exclusiveMode || sqlite3IsMemJournal(pPager->sjfd) ){ sqlite3OsClose(pPager->sjfd); } sqlite3_free(pPager->aSavepoint); diff --git a/test/exclusive.test b/test/exclusive.test index 7f42dd1004..43ef78df4a 100644 --- a/test/exclusive.test +++ b/test/exclusive.test @@ -12,7 +12,7 @@ # of these tests is exclusive access mode (i.e. the thing activated by # "PRAGMA locking_mode = EXCLUSIVE"). # -# $Id: exclusive.test,v 1.13 2009/04/30 12:25:59 drh Exp $ +# $Id: exclusive.test,v 1.14 2009/04/30 16:41:00 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -435,7 +435,7 @@ do_test exclusive-5.3 { # Two files open: the db and journal. set sqlite_open_file_count expr $sqlite_open_file_count-$extrafds -} [expr 2 - ($TEMP_STORE>=2)] +} {2} do_test exclusive-5.4 { execsql { INSERT INTO abc SELECT a+10, b+10, c+10 FROM abc;