/ Check-in [6fb7cfc2]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:In the multiplexor, close auxiliary files before deleting them when doing a truncate.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6fb7cfc2efb32dd5c8921a90b853390bc44d4794
User & Date: drh 2011-07-23 13:11:02
Context
2011-07-23
13:54
Merge the winAccess retry logic from the anti-antivirus branch into the trunk. check-in: 08d0e879 user: drh tags: trunk
13:11
In the multiplexor, close auxiliary files before deleting them when doing a truncate. check-in: 6fb7cfc2 user: drh tags: trunk
2011-07-22
11:23
Also add the sqlite3-all.c target to the MSVC makefile. check-in: 8ce2b74a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_multiplex.c.

410
411
412
413
414
415
416
417
418

419
420
421
422
423
424
425
static void multiplexSubClose(
  multiplexGroup *pGroup,
  int iChunk,
  sqlite3_vfs *pOrigVfs
){
  sqlite3_file *pSubOpen = pGroup->aReal[iChunk].p;
  if( pSubOpen ){
    if( pOrigVfs ) pOrigVfs->xDelete(pOrigVfs, pGroup->aReal[iChunk].z, 0);
    pSubOpen->pMethods->xClose(pSubOpen);

    sqlite3_free(pGroup->aReal[iChunk].p);
  }
  sqlite3_free(pGroup->aReal[iChunk].z);
  memset(&pGroup->aReal[iChunk], 0, sizeof(pGroup->aReal[iChunk]));
}

/*







<

>







410
411
412
413
414
415
416

417
418
419
420
421
422
423
424
425
static void multiplexSubClose(
  multiplexGroup *pGroup,
  int iChunk,
  sqlite3_vfs *pOrigVfs
){
  sqlite3_file *pSubOpen = pGroup->aReal[iChunk].p;
  if( pSubOpen ){

    pSubOpen->pMethods->xClose(pSubOpen);
    if( pOrigVfs ) pOrigVfs->xDelete(pOrigVfs, pGroup->aReal[iChunk].z, 0);
    sqlite3_free(pGroup->aReal[iChunk].p);
  }
  sqlite3_free(pGroup->aReal[iChunk].z);
  memset(&pGroup->aReal[iChunk], 0, sizeof(pGroup->aReal[iChunk]));
}

/*