diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
|---|---|---|
| committer | <> | 2015-03-17 16:26:24 +0000 |
| commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
| tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /lang/sql/adapter/sqlite-patches/16_bdb_deadlock.patch | |
| parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
| download | berkeleydb-master.tar.gz | |
Diffstat (limited to 'lang/sql/adapter/sqlite-patches/16_bdb_deadlock.patch')
| -rw-r--r-- | lang/sql/adapter/sqlite-patches/16_bdb_deadlock.patch | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/lang/sql/adapter/sqlite-patches/16_bdb_deadlock.patch b/lang/sql/adapter/sqlite-patches/16_bdb_deadlock.patch index 21f57b1c..52771eb2 100644 --- a/lang/sql/adapter/sqlite-patches/16_bdb_deadlock.patch +++ b/lang/sql/adapter/sqlite-patches/16_bdb_deadlock.patch @@ -1,6 +1,6 @@ --- src/vdbe.c +++ src/vdbe.c -@@ -1112,7 +1112,10 @@ case OP_ResultRow: { +@@ -1215,7 +1215,10 @@ ** The statement transaction is never a top-level transaction. Hence ** the RELEASE call below can never fail. */ @@ -12,22 +12,16 @@ rc = sqlite3VdbeCloseStatement(p, SAVEPOINT_RELEASE); if( NEVER(rc!=SQLITE_OK) ){ break; -@@ -2786,9 +2781,12 @@ case OP_Transaction: { +@@ -3001,7 +3004,7 @@ goto abort_due_to_error; } - if( pOp->p2 && p->usesStmtJournal -+ /*if( pOp->p2 && p->usesStmtJournal - && (db->autoCommit==0 || db->activeVdbeCnt>1) -- ){ -+ ){*/ -+ /* In Berkeley DB create a statement transaction for every update -+ * statement. BDB */ -+ if ( pOp->p2 && (db->autoCommit==0 || db->activeVdbeCnt>1)) { ++ if( pOp->p2 && (!db->aVTrans || p->usesStmtJournal) + && (db->autoCommit==0 || db->nVdbeRead>1) + ){ assert( sqlite3BtreeIsInTrans(pBt) ); - if( p->iStatement==0 ){ - assert( db->nStatement>=0 && db->nSavepoint>=0 ); -@@ -5907,6 +5913,14 @@ vdbe_error_halt: +@@ -6273,6 +6276,14 @@ testcase( sqlite3GlobalConfig.xLog!=0 ); sqlite3_log(rc, "statement aborts at %d: [%s] %s", pc, p->zSql, p->zErrMsg); @@ -44,7 +38,7 @@ rc = SQLITE_ERROR; --- src/vdbeblob.c +++ src/vdbeblob.c -@@ -155,6 +155,7 @@ int sqlite3_blob_open( +@@ -156,6 +156,7 @@ Table *pTab; Parse *pParse = 0; Incrblob *pBlob = 0; @@ -52,7 +46,7 @@ flags = !!flags; /* flags = (flags ? 1 : 0); */ *ppBlob = 0; -@@ -254,7 +255,7 @@ int sqlite3_blob_open( +@@ -259,7 +260,7 @@ assert( pBlob->pStmt || db->mallocFailed ); if( pBlob->pStmt ){ Vdbe *v = (Vdbe *)pBlob->pStmt; @@ -61,9 +55,9 @@ sqlite3VdbeAddOpList(v, sizeof(openBlob)/sizeof(VdbeOpList), openBlob); -@@ -298,6 +299,10 @@ int sqlite3_blob_open( - if( !db->mallocFailed ){ - sqlite3VdbeMakeReady(v, 1, 1, 1, 0, 0, 0); +@@ -307,6 +308,10 @@ + pParse->nTab = 1; + sqlite3VdbeMakeReady(v, pParse); } + /* This will prevent the statement transaction from being committed, + * which would invalidate the incrblob cursor. BDB */ |
