/ Check-in [7ce4e71c]
Login

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

Overview
Comment:Fix an issue with the fsdir() table-valued function not resetting correctly after each pass of a join.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7ce4e71c1b7251be9e922b21dfeba1f9aef6a47ce6495ecb7f94fd785ab564f2
User & Date: drh 2018-03-15 15:09:45
Context
2018-03-15
17:46
Fix a typo in a comment used to generate documentation. No code changes. check-in: f1784aff user: drh tags: trunk
15:09
Fix an issue with the fsdir() table-valued function not resetting correctly after each pass of a join. check-in: 7ce4e71c user: drh tags: trunk
05:25
Draft fix for an fsdir() issue reported via the mailing list. Closed-Leaf check-in: 48641010 user: mistachkin tags: fsDirFix
2018-03-14
15:25
Add the SQLITE_DBSTATUS_CACHE_SPILL option to sqlite3_db_status(). check-in: 48a06eb0 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/fileio.c.

   492    492     }
   493    493     sqlite3_free(pCur->zPath);
   494    494     sqlite3_free(pCur->aLvl);
   495    495     pCur->aLvl = 0;
   496    496     pCur->zPath = 0;
   497    497     pCur->zBase = 0;
   498    498     pCur->nBase = 0;
          499  +  pCur->nLvl = 0;
   499    500     pCur->iLvl = -1;
   500    501     pCur->iRowid = 1;
   501    502   }
   502    503   
   503    504   /*
   504    505   ** Destructor for an fsdir_cursor.
   505    506   */

Changes to test/zipfile.test.

   510    510         ORDER BY name
   511    511       }
   512    512     } [list {*}{
   513    513       test_unzip/a.txt 946684800
   514    514       test_unzip/b.txt 1000000000 
   515    515       test_unzip/c.txt 1111111000 
   516    516     }]
          517  +
          518  +  # fsdir() issue reported on the mailing list on 2018-03-14 by Jack Thaw.
          519  +  do_test 6.0b {
          520  +    db eval {
          521  +      SELECT sum(name LIKE '%/a.txt')
          522  +      FROM (VALUES(1),(2),(3)) CROSS JOIN fsdir('test_unzip')
          523  +    }
          524  +  } {3}
   517    525   
   518    526     do_execsql_test 6.1 {
   519    527       SELECT name, mtime, data FROM zipfile('test1.zip')
   520    528     } {
   521    529       a.txt 946684800   abc
   522    530       b.txt 1000000000  abc
   523    531       c.txt 1111111000  abc