/ Check-in [240f7252]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:For the vtshim module, always zero out the xChildDestroy function pointer after calling it.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 240f7252c66ad3ff5ae0ef06455c1ff9bd78bbb4
User & Date: mistachkin 2013-08-05 21:54:17
Context
2013-08-05
22:05
Performance optimization: Avoid calling convertCompoundSelecctToSubquery() on queries that do not use the UNION, EXCEPT, or INTERSECT operators. check-in: c589b2fe user: drh tags: trunk
21:54
For the vtshim module, always zero out the xChildDestroy function pointer after calling it. check-in: 240f7252 user: mistachkin tags: trunk
19:11
Factor all KeyInfo object allocations into a single function: sqlite3KeyInfoAlloc(). Always allocate enough space so that sqlite3VdbeRecordCompare() can avoid checking boundaries and hence run faster. check-in: 7301bedd user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/vtshim.c.

   425    425   
   426    426   /* The destructor function for a disposible module */
   427    427   static void vtshimAuxDestructor(void *pXAux){
   428    428     vtshim_aux *pAux = (vtshim_aux*)pXAux;
   429    429     assert( pAux->pAllVtab==0 );
   430    430     if( !pAux->bDisposed && pAux->xChildDestroy ){
   431    431       pAux->xChildDestroy(pAux->pChildAux);
          432  +    pAux->xChildDestroy = 0;
   432    433     }
   433    434     sqlite3_free(pAux->zName);
   434    435     sqlite3_free(pAux->pMod);
   435    436     sqlite3_free(pAux);
   436    437   }
   437    438   
   438    439   static int vtshimCopyModule(
................................................................................
   523    524       for(pVtab=pAux->pAllVtab; pVtab; pVtab=pVtab->pNext){
   524    525         for(pCur=pVtab->pAllCur; pCur; pCur=pCur->pNext){
   525    526           pAux->pMod->xClose(pCur->pChild);
   526    527         }
   527    528         pAux->pMod->xDisconnect(pVtab->pChild);
   528    529       }
   529    530       pAux->bDisposed = 1;
   530         -    if( pAux->xChildDestroy ) pAux->xChildDestroy(pAux->pChildAux);
          531  +    if( pAux->xChildDestroy ){
          532  +      pAux->xChildDestroy(pAux->pChildAux);
          533  +      pAux->xChildDestroy = 0;
          534  +    }
   531    535     }
   532    536   }
   533    537   
   534    538   
   535    539   #endif /* SQLITE_OMIT_VIRTUALTABLE */
   536    540   
   537    541   #ifdef _WIN32