]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove the SQLITE_CommitBusy flag. This was an attempt to block recursion
authordrh <drh@noemail.net>
Mon, 13 Jul 2009 15:52:38 +0000 (15:52 +0000)
committerdrh <drh@noemail.net>
Mon, 13 Jul 2009 15:52:38 +0000 (15:52 +0000)
on the sqlite3_commit_hook() interface.  But such recursion is explicitly
disallowed, so the flag is pointless. (CVS 6889)

FossilOrigin-Name: 1c2bfc43a4fd5b779a3b5b5b8ca5b41cb7250b5a

manifest
manifest.uuid
src/pager.c
src/sqliteInt.h
src/vdbeaux.c

index a8f0900d05c106fc5a9a57ea9d333c635533ae54..15b7f833e6f0866a7f369571fe1d273e05430c1f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Change\san\sunreachable\scondition\sin\sbtree.c\sto\sa\sNEVER().\s(CVS\s6888)
-D 2009-07-13T13:18:07
+C Remove\sthe\sSQLITE_CommitBusy\sflag.\s\sThis\swas\san\sattempt\sto\sblock\srecursion\non\sthe\ssqlite3_commit_hook()\sinterface.\s\sBut\ssuch\srecursion\sis\sexplicitly\ndisallowed,\sso\sthe\sflag\sis\spointless.\s(CVS\s6889)
+D 2009-07-13T15:52:38
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -147,7 +147,7 @@ F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
 F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
 F src/os_unix.c cdb2a08b9ce4aa13b3f7b91d4dd60fb48be9f56a
 F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405
-F src/pager.c 3bad5d2bfe5947b6accc3c47a97dce8ace90fa0c
+F src/pager.c 283d4e9c64d4a4555a9a15cf870180b4fc102f7e
 F src/pager.h 5aec418bf99f568b92ae82816a1463400513726d
 F src/parse.y bcd46d43fbd23a22b8c020a3eb1806b794794ed5
 F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
@@ -163,7 +163,7 @@ F src/select.c 71748b8e244112cf73df9446c4246c192276c30d
 F src/shell.c db2643650b9268df89a4bedca3f1c6d9e786f1bb
 F src/sqlite.h.in ccc67f14d5661240d05eadb8ab308aa637b0630c
 F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
-F src/sqliteInt.h 336d10317b991fda9019d8dcc6f67e936fc55ae9
+F src/sqliteInt.h c638fff6a05bb1c546f361e8527385fef0638917
 F src/sqliteLimit.h ffe93f5a0c4e7bd13e70cd7bf84cfb5c3465f45d
 F src/status.c 237b193efae0cf6ac3f0817a208de6c6c6ef6d76
 F src/table.c cc86ad3d6ad54df7c63a3e807b5783c90411a08d
@@ -208,7 +208,7 @@ F src/vdbe.c 4f702761ce1829192e191de461671e214a778386
 F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
 F src/vdbeInt.h 831c254a6eef237ef4664c8381a0137586567007
 F src/vdbeapi.c 0ab8ada7260b32031ca97f338caecf0812460624
-F src/vdbeaux.c e70a9851d6c8d0a0f152925d3dc03eae656c14f2
+F src/vdbeaux.c a032d0eceee52b6d8334eca50e7ad56740894ddd
 F src/vdbeblob.c a3f3e0e877fc64ea50165eec2855f5ada4477611
 F src/vdbemem.c 1618f685d19b4bcc96e40b3c478487bafd2ae246
 F src/vtab.c 00902f289521041712fb0293d0bf8688c7af8e48
@@ -740,7 +740,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P b9be365d85fddedbfa93eebf3ee62a140cbaa426
-R f4d839ed396486ac6b8a446143ddd531
-U danielk1977
-Z 4c8b9a4f20989cfa0c1c1e32007e46e0
+P 9f800e11391a108d7aa57f5a96d9a58711129132
+R f8d0ae220937cd02626c27ace66322f8
+U drh
+Z fc143e85c113c8856af7ddc393d5518c
index c77ffa0666758e04f14624e5573ec9e7642a2e65..d471c17e54e0eb81fb499bf11cc25257a543b0ae 100644 (file)
@@ -1 +1 @@
-9f800e11391a108d7aa57f5a96d9a58711129132
\ No newline at end of file
+1c2bfc43a4fd5b779a3b5b5b8ca5b41cb7250b5a
\ No newline at end of file
index 0b2c7870caf9da58efdd4ea52953997080ae0183..1294fd979092c506a5554560a5e29889e9267785 100644 (file)
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.607 2009/07/13 11:22:10 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.608 2009/07/13 15:52:38 drh Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 #include "sqliteInt.h"
@@ -1624,7 +1624,7 @@ static int pager_playback_one_page(
 ** by a valid checksum.
 **
 ** The pager never needs to know this in order to do its job.   This
-** routine is only used from with assert() and testcase() macros.
+** routine is only used from within assert() and testcase() macros.
 */
 static int pagerNextJournalPageIsValid(Pager *pPager){
   Pgno pgno;           /* The page number of the page */
index 8420425a502c837f14bf355bb12c9ebb9f9fa8f1..5427fc7aa71c53678bd9d74b1cde3faa718c6024 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.892 2009/07/03 22:54:37 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.893 2009/07/13 15:52:38 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -906,8 +906,7 @@ struct sqlite3 {
 
 #define SQLITE_RecoveryMode   0x00040000  /* Ignore schema errors */
 #define SQLITE_SharedCache    0x00080000  /* Cache sharing is enabled */
-#define SQLITE_CommitBusy     0x00200000  /* In the process of committing */
-#define SQLITE_ReverseOrder   0x00400000  /* Reverse unordered SELECTs */
+#define SQLITE_ReverseOrder   0x00100000  /* Reverse unordered SELECTs */
 
 /*
 ** Possible values for the sqlite.magic field.
index 881c1423aef0b7d3a2a9882e9dd3a03f7e94d800..9e98db2459c6da0f572981ab1e3e1de723c7a649 100644 (file)
@@ -14,7 +14,7 @@
 ** to version 2.8.7, all this code was combined into the vdbe.c source file.
 ** But that file was getting too big so this subroutines were split out.
 **
-** $Id: vdbeaux.c,v 1.470 2009/07/08 08:05:35 danielk1977 Exp $
+** $Id: vdbeaux.c,v 1.471 2009/07/13 15:52:38 drh Exp $
 */
 #include "sqliteInt.h"
 #include "vdbeInt.h"
@@ -1368,12 +1368,9 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
 
   /* If there are any write-transactions at all, invoke the commit hook */
   if( needXcommit && db->xCommitCallback ){
-    assert( (db->flags & SQLITE_CommitBusy)==0 );
-    db->flags |= SQLITE_CommitBusy;
     (void)sqlite3SafetyOff(db);
     rc = db->xCommitCallback(db->pCommitArg);
     (void)sqlite3SafetyOn(db);
-    db->flags &= ~SQLITE_CommitBusy;
     if( rc ){
       return SQLITE_CONSTRAINT;
     }
@@ -1620,8 +1617,9 @@ int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
   /* If p->iStatement is greater than zero, then this Vdbe opened a 
   ** statement transaction that should be closed here. The only exception
   ** is that an IO error may have occured, causing an emergency rollback.
-  ** In this case (db->nStatement==0), and there is nothing to do.  */
-  if( p->iStatement && db->nStatement ){
+  ** In this case (db->nStatement==0), and there is nothing to do.
+  */
+  if( db->nStatement && p->iStatement ){
     int i;
     const int iSavepoint = p->iStatement-1;
 
@@ -1761,7 +1759,6 @@ int sqlite3VdbeHalt(Vdbe *p){
     if( !sqlite3VtabInSync(db) 
      && db->autoCommit 
      && db->writeVdbeCnt==(p->readOnly==0) 
-     && (db->flags & SQLITE_CommitBusy)==0
     ){
       if( p->rc==SQLITE_OK || (p->errorAction==OE_Fail && !isSpecialError) ){
         /* The auto-commit flag is true, and the vdbe program was