1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Ensure sqlite3_finalize() can be called from within the xDisconnect() method of virtual tables. (CVS 3845)

FossilOrigin-Name: 8d6c3bfc4dfdd380a2915d778e256d3e49d22d72
This commit is contained in:
danielk1977
2007-04-16 15:06:25 +00:00
parent 86a88114fa
commit a04a34ff1a
12 changed files with 89 additions and 55 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.551 2007/04/12 03:54:39 drh Exp $
** @(#) $Id: sqliteInt.h,v 1.552 2007/04/16 15:06:25 danielk1977 Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -381,6 +381,14 @@ struct Db {
/*
** An instance of the following structure stores a database schema.
**
** If there are no virtual tables configured in this schema, the
** Schema.db variable is set to NULL. After the first virtual table
** has been added, it is set to point to the database connection
** used to create the connection. Once a virtual table has been
** added to the Schema structure and the Schema.db variable populated,
** only that database connection may use the Schema to prepare
** statements.
*/
struct Schema {
int schema_cookie; /* Database schema version number for this file */
@@ -393,6 +401,9 @@ struct Schema {
u8 enc; /* Text encoding used by this database */
u16 flags; /* Flags associated with this schema */
int cache_size; /* Number of pages to use in the cache */
#ifndef SQLITE_OMIT_VIRTUALTABLE
sqlite3 *db; /* "Owner" connection. See comment above */
#endif
};
/*
@@ -1632,7 +1643,7 @@ void sqlite3CreateView(Parse*,Token*,Token*,Token*,Select*,int,int);
#endif
void sqlite3DropTable(Parse*, SrcList*, int, int);
void sqlite3DeleteTable(sqlite3*, Table*);
void sqlite3DeleteTable(Table*);
void sqlite3Insert(Parse*, SrcList*, ExprList*, Select*, IdList*, int);
void *sqlite3ArrayAllocate(void*,int,int,int*,int*,int*);
IdList *sqlite3IdListAppend(IdList*, Token*);
@@ -1890,7 +1901,7 @@ int sqlite3OpenTempDatabase(Parse *);
int sqlite3VtabCommit(sqlite3 *db);
#endif
void sqlite3VtabLock(sqlite3_vtab*);
void sqlite3VtabUnlock(sqlite3_vtab*);
void sqlite3VtabUnlock(sqlite3*, sqlite3_vtab*);
void sqlite3VtabBeginParse(Parse*, Token*, Token*, Token*);
void sqlite3VtabFinishParse(Parse*, Token*);
void sqlite3VtabArgInit(Parse*);