-C Fix\sa\scorner\scase\sin\sthe\sopcode-array\sreuse\slogic\swhere\sthe\snumber\sof\sbytes\sof\nreusable\sspace\smight\sbe\scomputed\sto\sbe\sa\snegative\snumber,\sdue\sto\sunusual\nsystem\salignment\srestrictions\sand\srounding\serror.
-D 2016-01-04T23:43:47.141
+C Permit\sthe\s'test_fs'\stest\smodule\sto\sbe\scompiled\sand\sused\son\sMinGW.
+D 2016-01-05T01:48:29.005
F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751
F src/test_config.c 0dee90328e3dedf8ba002ee94b6a7e7ea7726fe4
F src/test_demovfs.c 0de72c2c89551629f58486fde5734b7d90758852
F src/test_devsym.c e7498904e72ba7491d142d5c83b476c4e76993bc
-F src/test_fs.c 993c7eab65bed6add4bb48cca29775e963f710cf
+F src/test_fs.c a61f54247fdb843761d709879c3bcd1989b2050c
F src/test_func.c 0d9c25956152adefee8881c6fadc8354793764d0
F src/test_hexio.c abfdecb6fa58c354623978efceb088ca18e379cd
F src/test_init.c 66b33120ffe9cd853b5a905ec850d51151337b32
F test/vtabD.test 05b3f1d77117271671089e48719524b676842e96
F test/vtabE.test d5024aa42754962f6bb0afd261681686488e7afe
F test/vtabF.test fd5ad376f5a34fe0891df1f3cddb4fe7c3eb077e
-F test/vtabH.test 7a21f18546cb9ab38df009e718300c40b552bb2b
+F test/vtabH.test 492ba03dcb7bb8fedcc53f258c410d04013adbc9
F test/vtabI.test 751b07636700dbdea328e4265b6077ccd6811a3f
F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P b779ca8a7580e2a0bb1176316c4540867b635229
-R 3b3e1e83b8e4867e299c87ba108024a8
-U drh
-Z b5772777614dc8e4c77919f902a0659c
+P 1aa530144643582658c8c1dd66548662f950efe3
+R 6490ec858048a3d7899751e10a44fa21
+U mistachkin
+Z b205e33bbbedd23793ff52ce1287fb1d
-1aa530144643582658c8c1dd66548662f950efe3
\ No newline at end of file
+ac27f38eef7a241d56124c263d9f8c91f372a77f
\ No newline at end of file
#include <sys/stat.h>
#include <fcntl.h>
-#if SQLITE_OS_UNIX
+#if SQLITE_OS_UNIX || defined(__MINGW_H)
# include <unistd.h>
# include <dirent.h>
# ifndef DIRENT
#endif
#if SQLITE_OS_WIN
# include <io.h>
-# include "test_windirent.h"
+# if !defined(__MINGW_H)
+# include "test_windirent.h"
+# endif
# ifndef S_ISREG
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
# endif
if( pCsr->pDir ){
struct DIRENT *pRes = 0;
+#if defined(__MINGW_H)
+ pRes = readdir(pCsr->pDir);
+ if( pRes!=0 ){
+ memcpy(&pCsr->entry, pRes, sizeof(struct DIRENT));
+ }
+#else
readdir_r(pCsr->pDir, &pCsr->entry, &pRes);
+#endif
if( pRes==0 ){
closedir(pCsr->pDir);
pCsr->pDir = 0;
foreach {tn sql expect} {
1 "SELECT * FROM e6 WHERE b LIKE 'abc'" {
- xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b like ?}
+ xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b like ?}
xFilter {SELECT rowid, a, b FROM 't6' WHERE b like ?} abc
}
2 "SELECT * FROM e6 WHERE b GLOB 'abc'" {
- xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b glob ?}
+ xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b glob ?}
xFilter {SELECT rowid, a, b FROM 't6' WHERE b glob ?} abc
}
} {
SELECT name FROM fsdir WHERE dir = '.' AND name = 'test.db';
SELECT name FROM fsdir WHERE dir = '.' AND name = '.'
} {test.db .}
-
+
proc list_root_files {} {
if {$::tcl_platform(platform) eq "windows"} {
set res [list]
}
}
- # Read the first 5 entries from the root directory. Except, ignore
- # files that contain the "$" character in their names as these are
- # special files on some Windows platforms.
- #
- set res [list]
- foreach p [lrange [list_root_files] 0 4] {
- if {$::tcl_platform(platform) eq "windows"} {
- if {![regexp {\$} $p]} {lappend res $p}
- } else {
- lappend res "/$p"
- }
- }
- do_execsql_test 3.1 {
- SELECT path FROM fstree WHERE path NOT GLOB '*$*' LIMIT 5;
- } $res
-
# Read all entries in the current directory.
#
proc contents {pattern} {
do_execsql_test 3.2 {
SELECT path FROM fstree WHERE path GLOB $pwd ORDER BY 1
} [lsort $res]
-
+
# Add some sub-directories and files to the current directory.
#
do_test 3.3 {
foreach {path sz} {
subdir/x1.txt 143
subdir/x2.txt 153
- } {
+ } {
set dir [file dirname $path]
catch { file mkdir $dir }
set fd [open $path w]
close $fd
}
} {}
-
+
set pwd [pwd]
do_execsql_test 3.5 {
SELECT path, size FROM fstree WHERE path GLOB $pwd || '/subdir/*' ORDER BY 1