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:
@@ -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 ){
|
||||
|
Reference in New Issue
Block a user