From: danielk1977 Date: Sat, 2 Aug 2008 15:10:08 +0000 (+0000) Subject: Increase the ref-count on the sqlite3_vtab structure before calling either the xNext... X-Git-Tag: version-3.6.10~653 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a114caddf052922d7990f57ee203987081060f5;p=thirdparty%2Fsqlite.git Increase the ref-count on the sqlite3_vtab structure before calling either the xNext or xFilter methods. (CVS 5524) FossilOrigin-Name: 6e41455f2c7ee57c60578541040631b899e1481f --- diff --git a/manifest b/manifest index b0a696ef27..f78f10959b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Additional\scoverage\stesting.\s\sFix\sa\ssegfault\sfollowing\sOOM\sin\nsqltie3_load_extension().\s(CVS\s5523) -D 2008-08-02T03:50:39 +C Increase\sthe\sref-count\son\sthe\ssqlite3_vtab\sstructure\sbefore\scalling\seither\sthe\sxNext\sor\sxFilter\smethods.\s(CVS\s5524) +D 2008-08-02T15:10:09 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in bbb62eecc851379aef5a48a1bf8787eb13e6ec06 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -183,7 +183,7 @@ F src/update.c 79b77a3cc8ed5f8903a7f37055fcedd69388dcae F src/utf.c a7004436a6ef2aee012ace93de274dd0f3c7624e F src/util.c afe659ccc05d1f8af9e8631dabfec3ee3a7144af F src/vacuum.c ef342828002debc97514617af3424aea8ef8522c -F src/vdbe.c a548d1dd6c5d99b2bd38e522aba2fa401340c99c +F src/vdbe.c 96e0527ad121b1308ed4ab5d02ff5b8a5f434e7f F src/vdbe.h 647fcf33a551ba10a974162c56846cb9aef2276b F src/vdbeInt.h 6f04c2bf65a0d5c2bb8318b226278a35d1f7a8f5 F src/vdbeapi.c 803f365b77a22c1b2680a0dee9202bc75c02bf4a @@ -617,7 +617,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 2cd6bae80984126023bcf479e5f3db5eaa5c4134 -R cea4eb266e996617279acd70a132ce2a -U drh -Z 7dbeb8531e58c51f99b7f023b4b1da67 +P f1e44eb323f05495cbae25113aebcc50d16b40df +R 4025f2f9c936b96cf13e66989019ddc4 +U danielk1977 +Z 390cd1c9dbb285f76023a2fbf1f44c44 diff --git a/manifest.uuid b/manifest.uuid index 9a9062a7d2..917346ef83 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f1e44eb323f05495cbae25113aebcc50d16b40df \ No newline at end of file +6e41455f2c7ee57c60578541040631b899e1481f \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index eb4cfe6afb..b326c79c07 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -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.771 2008/08/01 20:10:08 drh Exp $ +** $Id: vdbe.c,v 1.772 2008/08/02 15:10:09 danielk1977 Exp $ */ #include "sqliteInt.h" #include @@ -4708,12 +4708,14 @@ case OP_VFilter: { /* jump */ } if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; + sqlite3VtabLock(pVtab); p->inVtabMethod = 1; rc = pModule->xFilter(pVtabCursor, iQuery, pOp->p4.z, nArg, apArg); p->inVtabMethod = 0; sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = pVtab->zErrMsg; pVtab->zErrMsg = 0; + sqlite3VtabUnlock(db, pVtab); if( rc==SQLITE_OK ){ res = pModule->xEof(pVtabCursor); } @@ -4847,12 +4849,14 @@ case OP_VNext: { /* jump */ ** some other method is next invoked on the save virtual table cursor. */ if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; + sqlite3VtabLock(pVtab); p->inVtabMethod = 1; rc = pModule->xNext(pCur->pVtabCursor); p->inVtabMethod = 0; sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = pVtab->zErrMsg; pVtab->zErrMsg = 0; + sqlite3VtabUnlock(db, pVtab); if( rc==SQLITE_OK ){ res = pModule->xEof(pCur->pVtabCursor); }