From 2b46d621e66030d83797d7634796379ac71c1efb Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 16 May 2007 21:04:46 +0000 Subject: Upgraded libsqlite3 to SQLite 3.3 --- ext/pdo_sqlite/sqlite/src/vtab.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'ext/pdo_sqlite/sqlite/src/vtab.c') diff --git a/ext/pdo_sqlite/sqlite/src/vtab.c b/ext/pdo_sqlite/sqlite/src/vtab.c index 862b3835eb..540940e7ce 100644 --- a/ext/pdo_sqlite/sqlite/src/vtab.c +++ b/ext/pdo_sqlite/sqlite/src/vtab.c @@ -132,10 +132,12 @@ void sqlite3VtabBeginParse( int iDb; /* The database the table is being created in */ Table *pTable; /* The new virtual table */ +#ifndef SQLITE_OMIT_SHARED_CACHE if( sqlite3ThreadDataReadOnly()->useSharedData ){ sqlite3ErrorMsg(pParse, "Cannot use virtual tables in shared-cache mode"); return; } +#endif sqlite3StartTable(pParse, pName1, pName2, 0, 0, 1, 0); pTable = pParse->pNewTable; @@ -531,16 +533,18 @@ int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab) */ static void callFinaliser(sqlite3 *db, int offset){ int i; - for(i=0; inVTrans && db->aVTrans[i]; i++){ - sqlite3_vtab *pVtab = db->aVTrans[i]; - int (*x)(sqlite3_vtab *); - x = *(int (**)(sqlite3_vtab *))((char *)pVtab->pModule + offset); - if( x ) x(pVtab); - sqlite3VtabUnlock(db, pVtab); + if( db->aVTrans ){ + for(i=0; inVTrans && db->aVTrans[i]; i++){ + sqlite3_vtab *pVtab = db->aVTrans[i]; + int (*x)(sqlite3_vtab *); + x = *(int (**)(sqlite3_vtab *))((char *)pVtab->pModule + offset); + if( x ) x(pVtab); + sqlite3VtabUnlock(db, pVtab); + } + sqliteFree(db->aVTrans); + db->nVTrans = 0; + db->aVTrans = 0; } - sqliteFree(db->aVTrans); - db->nVTrans = 0; - db->aVTrans = 0; } /* -- cgit v1.2.1