diff options
author | 2012-05-22 09:02:29 +0000 | |
---|---|---|
committer | 2012-05-22 09:02:29 +0000 | |
commit | f962b6f71abebd72afa58d78eab055d750d49d0c (patch) | |
tree | 490fe4a0a2c05408cd845d4a35f25c6c8f35c9a3 /lib/libsqlite3/src/vtab.c | |
parent | Fix ftell() to return EOVERFLOW if the file offset is greater than (diff) | |
download | wireguard-openbsd-f962b6f71abebd72afa58d78eab055d750d49d0c.tar.xz wireguard-openbsd-f962b6f71abebd72afa58d78eab055d750d49d0c.zip |
import sqlite 3.7.12 (tested by landry@)
Diffstat (limited to 'lib/libsqlite3/src/vtab.c')
-rw-r--r-- | lib/libsqlite3/src/vtab.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libsqlite3/src/vtab.c b/lib/libsqlite3/src/vtab.c index c7221cd3b7e..c561f7198f8 100644 --- a/lib/libsqlite3/src/vtab.c +++ b/lib/libsqlite3/src/vtab.c @@ -447,7 +447,7 @@ static int vtabCallConstructor( int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**), char **pzErr ){ - VtabCtx sCtx; + VtabCtx sCtx, *pPriorCtx; VTable *pVTable; int rc; const char *const*azArg = (const char *const*)pTab->azModuleArg; @@ -472,9 +472,10 @@ static int vtabCallConstructor( assert( xConstruct ); sCtx.pTab = pTab; sCtx.pVTable = pVTable; + pPriorCtx = db->pVtabCtx; db->pVtabCtx = &sCtx; rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr); - db->pVtabCtx = 0; + db->pVtabCtx = pPriorCtx; if( rc==SQLITE_NOMEM ) db->mallocFailed = 1; if( SQLITE_OK!=rc ){ |