/ Check-in [713071c4]
Login

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

Overview
Comment:Fix for the xFileSize method of test_multiplex.c when used on a file opened with the DELETEONCLOSE flag set.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:713071c493e9937a20c436b07299df428249e378
User & Date: dan 2011-12-12 18:21:44
Context
2011-12-12
18:55
Change the multiplexor VFS so that xTruncate is a no-op on database files. check-in: ee1e0122 user: dan tags: trunk
18:21
Fix for the xFileSize method of test_multiplex.c when used on a file opened with the DELETEONCLOSE flag set. check-in: 713071c4 user: dan tags: trunk
16:51
Add magic comments to shell.c to make it easier for scripts to insert additional version information displays for custom builds. check-in: 9b2691aa user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_multiplex.c.

810
811
812
813
814
815
816




817
818

819
820
821
822
823
824
825
    sqlite3_vfs *pOrigVfs = gMultiplex.pOrigVfs;
    *pSize = 0;
    for(i=0; 1; i++){
      sqlite3_file *pSubOpen = 0;
      int exists = 0;
      rc = multiplexSubFilename(pGroup, i);
      if( rc ) break;




      rc2 = pOrigVfs->xAccess(pOrigVfs, pGroup->aReal[i].z,
          SQLITE_ACCESS_EXISTS, &exists);

      if( rc2==SQLITE_OK && exists){
        /* if it exists, open it */
        pSubOpen = multiplexSubOpen(pGroup, i, &rc, NULL);
      }else{
        /* stop at first "gap" */
        break;
      }







>
>
>
>
|
|
>







810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
    sqlite3_vfs *pOrigVfs = gMultiplex.pOrigVfs;
    *pSize = 0;
    for(i=0; 1; i++){
      sqlite3_file *pSubOpen = 0;
      int exists = 0;
      rc = multiplexSubFilename(pGroup, i);
      if( rc ) break;
      if( pGroup->flags & SQLITE_OPEN_DELETEONCLOSE ){
        exists = pGroup->nReal>=i && pGroup->aReal[i].p!=0;
        rc2 = SQLITE_OK;
      }else{
        rc2 = pOrigVfs->xAccess(pOrigVfs, pGroup->aReal[i].z,
            SQLITE_ACCESS_EXISTS, &exists);
      }
      if( rc2==SQLITE_OK && exists){
        /* if it exists, open it */
        pSubOpen = multiplexSubOpen(pGroup, i, &rc, NULL);
      }else{
        /* stop at first "gap" */
        break;
      }