]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a problem with journal files being created unnecessarily when doing
authordrh <drh@noemail.net>
Thu, 1 May 2008 18:01:46 +0000 (18:01 +0000)
committerdrh <drh@noemail.net>
Thu, 1 May 2008 18:01:46 +0000 (18:01 +0000)
an atomic write in exclusive access locking mode.  Fix a test script problem. (CVS 5075)

FossilOrigin-Name: 70e708660fec0b6f6c41efc2e29f1d7ae6785b7e

manifest
manifest.uuid
src/journal.c
test/io.test
test/nan.test

index 669b49e838757967969b2ff3ca21e3ad4f124c49..73b117ce9448d7cbfbd3bc3776efd1445d7c3d85 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\smore\scompiler\swarnings.\s(CVS\s5074)
-D 2008-05-01T17:16:53
+C Fix\sa\sproblem\swith\sjournal\sfiles\sbeing\screated\sunnecessarily\swhen\sdoing\nan\satomic\swrite\sin\sexclusive\saccess\slocking\smode.\s\sFix\sa\stest\sscript\sproblem.\s(CVS\s5075)
+D 2008-05-01T18:01:47
 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
 F Makefile.in 25b3282a4ac39388632c2fb0e044ff494d490952
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -100,7 +100,7 @@ F src/func.c 77a910a1ca7613d291fd0b5cba3be14c02f0dce0
 F src/hash.c 522a8f5a23cf18fe5845afee7263c5be76c25ca2
 F src/hash.h 031cd9f915aff27e12262cb9eb570ac1b8326b53
 F src/insert.c 77f0829b3e2edd19e9238195c56b0d56ab000f17
-F src/journal.c 807bed7a158979ac8d63953e1774e8d85bff65e2
+F src/journal.c cffd2cd214e58c0e99c3ff632b3bee6c7cbb260e
 F src/legacy.c 8267890e6a0a71f13b680794520999c642299081
 F src/loadext.c 48455156d6044141d7e332c1b0b4647b3b8b8e66
 F src/main.c d40ed2bf7b63002726b19951cae14d0bcf7debd9
@@ -341,7 +341,7 @@ F test/insert4.test 6e382eaf7295a4463e6f29ea20fcd8e63d097eeb
 F test/insert5.test 509017213328147d3acdfa2c441bfd82362dda41
 F test/interrupt.test 42e7cf98646fd9cb4a3b131a93ed3c50b9e149f1
 F test/intpkey.test 537669fd535f62632ca64828e435b9e54e8d677f
-F test/io.test cfb907b433a46d5cc3266b292cbfc7cd56ae1234
+F test/io.test 833a1746518ec3005aa7792f9bcb8f01923ff544
 F test/ioerr.test 5382046b2ef19b9084652e7d2d1e82ab33c0deda
 F test/ioerr2.test b9c9a0491a812707762a7c002876553be54d9969
 F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd
@@ -398,7 +398,7 @@ F test/misc5.test c1bc7b8cbc6694dccfc4c0b03c00c8f2dc55c46b
 F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
 F test/misc7.test 26e0d948a413bca61ed031159907a03d64647409
 F test/misuse.test 30b3a458e5a70c31e74c291937b6c82204c59f33
-F test/nan.test bda46bce39d14bbe23b97feb390a0b54961a0de9
+F test/nan.test c2a4562a3cbd5c78eb0592e08495bfdef077a76e
 F test/notnull.test 44d600f916b770def8b095a9962dbe3be5a70d82
 F test/null.test a8b09b8ed87852742343b33441a9240022108993
 F test/onefile.test 5af2867a8097cea08f15de5382b8d57d1219d8e3
@@ -633,7 +633,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 227a6f67c21c87a7cf98f84b9d57a6dc9da93ebb
-R 6c9957669f2cdfef69a7c4eb23ccdec1
+P 59568844e774dbe89fd20bbc8f49a3665cc54717
+R e2a57e4ed5ebffb17e923008220d6df9
 U drh
-Z 1e991c3831da5b5ff3ab383f3c915b8e
+Z 7cc0f21a84152e1247ee9d012e672d4f
index 273e9634e150ef119b8c6367aa280b6ea8b33adb..d635ef191f6df97ff8dba9df8af922977e43b48a 100644 (file)
@@ -1 +1 @@
-59568844e774dbe89fd20bbc8f49a3665cc54717
\ No newline at end of file
+70e708660fec0b6f6c41efc2e29f1d7ae6785b7e
\ No newline at end of file
index 7cbe5bc9ff6ba84ba5e1d3aa89f0e88d093d3b5c..bdc36bcaecbaf94063a829b9090e9bff5b348a2f 100644 (file)
@@ -10,7 +10,7 @@
 **
 *************************************************************************
 **
-** @(#) $Id: journal.c,v 1.7 2007/09/06 13:49:37 drh Exp $
+** @(#) $Id: journal.c,v 1.8 2008/05/01 18:01:47 drh Exp $
 */
 
 #ifdef SQLITE_ENABLE_ATOMIC_WRITE
@@ -149,9 +149,10 @@ static int jrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
 static int jrnlSync(sqlite3_file *pJfd, int flags){
   int rc;
   JournalFile *p = (JournalFile *)pJfd;
-  rc = createFile(p);
-  if( rc==SQLITE_OK ){
+  if( p->pReal ){
     rc = sqlite3OsSync(p->pReal, flags);
+  }else{
+    rc = SQLITE_OK;
   }
   return rc;
 }
index 1801d9b88d01df6138c872005cbc1e8180261fb0..b0a6063e7fec84a9aab93236b45d34f803deeed2 100644 (file)
@@ -13,7 +13,7 @@
 # IO traffic generated by SQLite (making sure SQLite is not writing out
 # more database pages than it has to, stuff like that).
 #
-# $Id: io.test,v 1.15 2008/03/28 17:41:14 drh Exp $
+# $Id: io.test,v 1.16 2008/05/01 18:01:47 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -346,14 +346,12 @@ do_test io-2.11.0 {
     PRAGMA locking_mode;
   }
 } {exclusive exclusive}
-breakpoint
 do_test io-2.11.1 {
   execsql { 
     INSERT INTO abc VALUES(11, 12);
   }
   file exists test.db-journal
 } {0}
-breakpoint
 
 do_test io-2.11.2 {
   execsql { 
index ff60d58f17282e2f763ee62a8a2955041069c0b4..0344811bdaae006f826a7840b8adb11b3dc276ab 100644 (file)
@@ -14,7 +14,7 @@
 # Make sure IEEE floating point NaN values are handled properly.
 # SQLite should always convert NaN into NULL.
 #
-# $Id: nan.test,v 1.1 2008/04/29 00:15:21 drh Exp $
+# $Id: nan.test,v 1.2 2008/05/01 18:01:47 drh Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -34,6 +34,8 @@ set inf [string repeat 9 5000].0
 
 do_test nan-1.1 {
   db eval {
+    PRAGMA auto_vacuum=OFF;
+    PRAGMA page_size=1024;
     CREATE TABLE t1(x FLOAT);
   }
   db eval "INSERT INTO t1 VALUES($nan)"