mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add the tentative sqlite3_allocate_queryplan() API. (CVS 3228)
FossilOrigin-Name: 7a3e97f76b1f4f97a04f7c5a9daa400402b2ff25
This commit is contained in:
13
src/vtab.c
13
src/vtab.c
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to help implement virtual tables.
|
||||
**
|
||||
** $Id: vtab.c,v 1.6 2006/06/13 10:24:43 danielk1977 Exp $
|
||||
** $Id: vtab.c,v 1.7 2006/06/13 15:00:55 danielk1977 Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
#include "sqliteInt.h"
|
||||
@@ -277,6 +277,17 @@ int sqlite3VtabCallConnect(Parse *pParse, Table *pTab){
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** Resize pInfo->zPlan to nBytes bytes using realloc(). Set pInfo->nPlan
|
||||
** to nBytes and return a pointer to the allocated memory.
|
||||
*/
|
||||
char *sqlite3_allocate_queryplan(sqlite3_index_info *pInfo, int nBytes){
|
||||
pInfo->nPlan = nBytes;
|
||||
sqlite3ReallocOrFree(&pInfo->zPlan, nBytes);
|
||||
return pInfo->zPlan;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** This function is used to set the schema of a virtual table. It is only
|
||||
** valid to call this function from within the xCreate() or xConnect() of a
|
||||
|
Reference in New Issue
Block a user