1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Make sure new sqlite3_vtab objects created by the xCreate() virtual table

method are initialized by the system, in accordance with the documentation.

FossilOrigin-Name: eab82330631187dcc3e5d2dddd23dbda5752904b
This commit is contained in:
drh
2014-10-14 20:25:43 +00:00
parent 8dd8362d64
commit 5604cc0d3b
3 changed files with 8 additions and 7 deletions

View File

@@ -519,6 +519,7 @@ static int vtabCallConstructor(
}else if( ALWAYS(pVTable->pVtab) ){
/* Justification of ALWAYS(): A correct vtab constructor must allocate
** the sqlite3_vtab object if successful. */
memset(pVTable->pVtab, 0, sizeof(pVTable->pVtab[0]));
pVTable->pVtab->pModule = pMod->pModule;
pVTable->nRef = 1;
if( sCtx.pTab ){