]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Do now allow a COMMIT to occur while even a single write operating is
authordrh <drh@noemail.net>
Fri, 19 Jun 2009 22:23:41 +0000 (22:23 +0000)
committerdrh <drh@noemail.net>
Fri, 19 Jun 2009 22:23:41 +0000 (22:23 +0000)
in progress. (CVS 6790)

FossilOrigin-Name: 605520ec04061e389226fbec59f7aedf674b3c4e

manifest
manifest.uuid
src/vdbe.c
test/incrblob.test

index 07ef76f2483bfc05f104f92c8f394bd2289e1e43..4e76bd5179b553def5c9faf92e994307262484d3 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sthe\scomment\son\sthe\ssqlite3PExpr()\ssubroutine.\s\sTicket\s#3924.\s(CVS\s6789)
-D 2009-06-19T18:32:55
+C Do\snow\sallow\sa\sCOMMIT\sto\soccur\swhile\seven\sa\ssingle\swrite\soperating\sis\nin\sprogress.\s(CVS\s6790)
+D 2009-06-19T22:23:42
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 8b8fb7823264331210cddf103831816c286ba446
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -203,7 +203,7 @@ F src/update.c 6ae6c26adff8dc34532d578f66e6cfde04b5d177
 F src/utf.c 9541d28f40441812c0b40f00334372a0542c00ff
 F src/util.c a7e981e032c3c9c0887d50d7e658a33cb355b43d
 F src/vacuum.c 0e14f371ea3326c6b8cfba257286d798cd20db59
-F src/vdbe.c ad47fc3df73544d25e47ebb116b6d4777306256c
+F src/vdbe.c 51b0d7394f70a114b11bf0263dfe7c59b802f932
 F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
 F src/vdbeInt.h f5147efa8ead0ae78496487a83c7e87c54ffa405
 F src/vdbeapi.c 73bd1d2c57b953bc688d1d8c84b24c2084c2aec7
@@ -396,7 +396,7 @@ F test/in.test d49419c6df515852f477fa513f3317181d46bc92
 F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
 F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
 F test/in4.test 64f3cc1acde1b9161ccdd8e5bde3daefdb5b2617
-F test/incrblob.test 4b9437bbb38724343dadbbcca6356bc2a9b435d1
+F test/incrblob.test c80087a8ec28b4a58b5299251074048e17754f8f
 F test/incrblob2.test 7ef4581745dd80155a451637aa779b49df90787d
 F test/incrblob_err.test c577c91d4ed9e8336cdb188b15d6ee2a6fe9604e
 F test/incrvacuum.test d0fb6ef6d747ef5c5ebe878aafa72dd3e178856b
@@ -736,7 +736,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P 62db08bc0de936e4a418ae583a3bdbbf33d7787e
-R ac56c8a806f7dbc960ad044fa18040b8
+P 4bb96db6b4d2cfa71430a2646c1082a494e3519f
+R 08dcdc73da6a8280bf5856390715cfc3
 U drh
-Z d0d0a90f42959f30bda016cc31abe318
+Z 895f5e5e40c3bf3e476a61fb4fd77290
index 48d39d33cc34b20a836e9e643b1274415d156311..6f7471ccfdcb90285a8011b57532b75f9ea8478c 100644 (file)
@@ -1 +1 @@
-4bb96db6b4d2cfa71430a2646c1082a494e3519f
\ No newline at end of file
+605520ec04061e389226fbec59f7aedf674b3c4e
\ No newline at end of file
index 7dccdc4fe6a01147e38e610b59a7bf406a08ffdc..e46a3ff69b54c637ff1a9ef6d4341dd3b0ec3cae 100644 (file)
@@ -43,7 +43,7 @@
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: vdbe.c,v 1.856 2009/06/19 14:06:03 drh Exp $
+** $Id: vdbe.c,v 1.857 2009/06/19 22:23:42 drh Exp $
 */
 #include "sqliteInt.h"
 #include "vdbeInt.h"
@@ -2651,7 +2651,7 @@ case OP_AutoCommit: {
     sqlite3SetString(&p->zErrMsg, db, "cannot rollback transaction - "
         "SQL statements in progress");
     rc = SQLITE_BUSY;
-  }else if( turnOnAC && !iRollback && db->writeVdbeCnt>1 ){
+  }else if( turnOnAC && !iRollback && db->writeVdbeCnt>0 ){
     /* If this instruction implements a COMMIT and other VMs are writing
     ** return an error indicating that the other VMs must complete first. 
     */
index cf76b5101c2950a9ac4a4ec49cede086a2ce3f45..7d8d8e3e7f2b37958190f45e95e3b801e5eb8e57 100644 (file)
@@ -9,7 +9,7 @@
 #
 #***********************************************************************
 #
-# $Id: incrblob.test,v 1.23 2008/11/05 16:37:35 drh Exp $
+# $Id: incrblob.test,v 1.24 2009/06/19 22:23:42 drh Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -451,8 +451,8 @@ do_test incrblob-6.9 {
 } {}
 
 # At this point rollback should be illegal (because 
-# there is an open blob channel).  But commit is allowed because
-# the blob is read-only.
+# there is an open blob channel).  But commit is also illegal because
+# the open blob is read-write.
 #
 do_test incrblob-6.10 {
   catchsql {
@@ -463,7 +463,7 @@ do_test incrblob-6.11 {
   catchsql {
     COMMIT;
   } db2
-} {0 {}}
+} {1 {cannot commit transaction - SQL statements in progress}}
 
 do_test incrblob-6.12 {
   execsql {
@@ -474,6 +474,11 @@ do_test incrblob-6.13 {
   close $::blob
 } {}
 do_test incrblob-6.14 {
+  catchsql {
+    COMMIT;
+  } db2
+} {0 {}}
+do_test incrblob-6.15 {
   execsql {
     SELECT * FROM blobs WHERE rowid = 4;
   }