Merge updates from trunk.

FossilOrigin-Name: 5cbab63756f6f276996f39d16d70b178581f63cd
This commit is contained in:
mistachkin
2016-01-06 20:50:02 +00:00
15 changed files with 75 additions and 71 deletions
+1 -1
View File
@@ -550,7 +550,7 @@ TESTOPTS = --verbose=file --output=test-out.txt
#
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
# This is the default Makefile target. The objects listed here
# are what get build when you type just "make" with no arguments.
+1 -1
View File
@@ -1218,7 +1218,7 @@ FUZZDATA = \
#
SHELL_COMPILE_OPTS = -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
# Standard options to testfixture
#
+1 -1
View File
@@ -460,7 +460,7 @@ TESTOPTS = --verbose=file --output=test-out.txt
#
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
# This is the default Makefile target. The objects listed here
# are what get build when you type just "make" with no arguments.
+18 -21
View File
@@ -1,8 +1,8 @@
C Alternative\sto\s[76f5efa6],\smove\sdefinition\sof\sutf8_printf\sup.
D 2016-01-03T18:59:28.715
F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d
C Merge\supdates\sfrom\strunk.
D 2016-01-06T20:50:02.942
F Makefile.in 7c8cc4c2f0179efc6fa9492141d1fb65f4807054
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751
F Makefile.msc e45d8b9b56dfa3f2cd860b2c28bd9d304513b042
F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
F VERSION 8b9d3ac6f1962f94e06ba05462422a544f9c4e36
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
@@ -257,7 +257,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
F main.mk ed77cbb97848c8dae1ab928245432f74b0580162
F main.mk 20e46c09ac8732a74a9e2d55e8d90257d97eb844
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
@@ -338,7 +338,7 @@ F src/shell.c 3ecb7a857c4595fef9ae4141fc8bb8dc53021be2
F src/sqlite.h.in 7d87d71b9a4689c51fa092f48f16590ff71558e3
F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad
F src/sqlite3ext.h dfbe62ffd95b99afe2140d8c35b180d11924072d
F src/sqliteInt.h 30f7e8957ed7d244be027be72ded385154c635df
F src/sqliteInt.h f97614d43833bae0ed6c51ac8e550f0099a1d0ba
F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46
F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba
F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e
@@ -360,7 +360,7 @@ F src/test_btree.c 2e9978eca99a9a4bfa8cae949efb00886860a64f
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
@@ -398,11 +398,11 @@ F src/update.c 17332f9fe818cbc0444c36a811800af8498af4c3
F src/utf.c 32d7f82aa921322f3e1c956f4b58f019ebd2c6b3
F src/util.c e802e8e311a0d6c48cd1b3e89db164f6f0248d70
F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701
F src/vdbe.c 638c20bae996d8037a114294016768b6bc8ebc14
F src/vdbe.c 6ac8e5d808d48afc369316e147c191102f0584c1
F src/vdbe.h efb7a8c1459e31f3ea4377824c6a7e4cb5068637
F src/vdbeInt.h 75c2e82ee3357e9210c06474f8d9bdf12c81105d
F src/vdbeapi.c 020681b943e77766b32ae1cddf86d7831b7374ca
F src/vdbeaux.c 66b546a1da82dfa6e67985ae0442ba5fd9efe0ff
F src/vdbeaux.c 3308a07a6b0b64e22e83cbcc76773eaf330b056a
F src/vdbeblob.c fdc4a81605ae7a35ae94a55bd768b66d6be16f15
F src/vdbemem.c fdd1578e47bea61390d472de53c565781d81e045
F src/vdbesort.c a7ec02da4494c59dfd071126dd3726be5a11459d
@@ -441,7 +441,7 @@ F test/analyzeB.test 8bf35ee0a548aea831bf56762cb8e7fdb1db083d
F test/analyzeC.test 555a6cc388b9818b6eda6df816f01ce0a75d3a93
F test/analyzeD.test 08f9d0bee4e118a66fff3a32d02dbe0ee0a2b594
F test/analyzeE.test 8684e8ac5722fb97c251887ad97e5d496a98af1d
F test/analyzeF.test 7ccd7a04f7d3061bde1a8a4dacc4792edccf6bf2
F test/analyzeF.test 5d1fe1024ba2dfea3c18bede8c1ccef8aba1ab34
F test/analyzer1.test 498e2ff4b62740c2751c3a2f8b744fe26689fae9
F test/async.test 1d0e056ba1bb9729283a0f22718d3a25e82c277b
F test/async2.test c0a9bd20816d7d6a2ceca7b8c03d3d69c28ffb8b
@@ -524,7 +524,7 @@ F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
F test/colmeta.test 2c765ea61ee37bc43bbe6d6047f89004e6508eb1
F test/colname.test 08948a4809d22817e0e5de89c7c0a8bd90cb551b
F test/conflict.test 841bcf7cabbfca39c577eb8411ea8601843b46a8
F test/conflict2.test 0f0e810aef6739650d7f442164975e932cf18afc
F test/conflict2.test a82dd3b9b41fceb5dd6ff0707c5c7ffba208d538
F test/conflict3.test dec0634c0f31dec9a4b01c63063e939f0cd21b6b
F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4
F test/corrupt.test 141c39ea650c1365e85a49e402fa05cb9617fb97
@@ -562,7 +562,7 @@ F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
F test/createtab.test b5de160630b209c4b8925bdcbbaf48cc90b67fe8
F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c
F test/ctime.test 7bd009071e242aac4f18521581536b652b789a47
F test/cursorhint.test 432811b62bd5ffb812729f49bba3b9ad687550bb
F test/cursorhint.test 7bc346788390475e77a345da2b92270d04d35856
F test/date.test 984ac1e3e5e031386866f034006148d3972b4a65
F test/dbstatus.test 8de104bb5606f19537d23cd553b41349b5ab1204
F test/dbstatus2.test 10418e62b3db5dca070f0c3eef3ea13946f339c2
@@ -749,7 +749,7 @@ F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1
F test/fuzz3.test 53fabcd5f0f430f8b221282f6c12c4d0903c21eb
F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b
F test/fuzz_malloc.test 328f70aaca63adf29b4c6f06505ed0cf57ca7c26
F test/fuzzcheck.c ccdcdc28579b2c9744696bca8726bdbd729eea11
F test/fuzzcheck.c 3309d793165ca61a9996271cb799694839348f9a
F test/fuzzdata1.db 7ee3227bad0e7ccdeb08a9e6822916777073c664
F test/fuzzdata2.db f03a420d3b822cc82e4f894ca957618fbe9c4973
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
@@ -947,7 +947,7 @@ F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736
F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8
F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
F test/releasetest.tcl f84ff16fef79ee5d328eee7c48da084a775d101c
F test/releasetest.tcl 975449bf742b8bb9025208292208af816a1fcb58
F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea
F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14
@@ -1274,7 +1274,7 @@ F test/vtabC.test 4528f459a13136f982e75614d120aef165f17292
F test/vtabD.test 05b3f1d77117271671089e48719524b676842e96
F test/vtabE.test d5024aa42754962f6bb0afd261681686488e7afe
F test/vtabF.test fd5ad376f5a34fe0891df1f3cddb4fe7c3eb077e
F test/vtabH.test f77296bbf55675b72817cc10fbbcb236ac986abf
F test/vtabH.test 492ba03dcb7bb8fedcc53f258c410d04013adbc9
F test/vtabI.test 751b07636700dbdea328e4265b6077ccd6811a3f
F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
@@ -1406,10 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P e30062e9f6cae980150dda7df440b36dfdcb7bbe
R ebd31578448110e2087f3d6a13f40257
T *branch * altShellFix
T *sym-altShellFix *
T -sym-trunk *
P 54c5522dda239cb9775709495ed7eb56a5dd8e11 55a11fd627eaf046b3783622b2925399a50a65b4
R 46885463c2d1961463db4e0c7cb78c41
U mistachkin
Z f75cb2b820513d79cf30ddfb170e4e99
Z ce7926bdc7f3770ecae13f71c2dc0750
+1 -1
View File
@@ -1 +1 @@
54c5522dda239cb9775709495ed7eb56a5dd8e11
5cbab63756f6f276996f39d16d70b178581f63cd
+3 -3
View File
@@ -2964,9 +2964,9 @@ struct StrAccum {
sqlite3 *db; /* Optional database for lookaside. Can be NULL */
char *zBase; /* A base allocation. Not from malloc. */
char *zText; /* The string collected so far */
int nChar; /* Length of the string so far */
int nAlloc; /* Amount of space allocated in zText */
int mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
u32 nChar; /* Length of the string so far */
u32 nAlloc; /* Amount of space allocated in zText */
u32 mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
u8 accError; /* STRACCUM_NOMEM or STRACCUM_TOOBIG */
u8 bMalloced; /* zText points to allocated space */
};
+11 -2
View File
@@ -70,7 +70,7 @@
#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
@@ -79,7 +79,9 @@
#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
@@ -231,7 +233,14 @@ static int fsdirNext(sqlite3_vtab_cursor *cur){
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;
+1 -1
View File
@@ -2524,7 +2524,7 @@ case OP_Column: {
goto op_column_error;
}
}else{
VVA_ONLY( t = 0; ) /* Only needed by assert() statements */
t = 0;
}
/* If after trying to extract new entries from the header, nHdrParsed is
+14 -6
View File
@@ -1848,19 +1848,27 @@ void sqlite3VdbeMakeReady(
*/
nMem += nCursor;
/* Allocate space for memory registers, SQL variables, VDBE cursors and
** an array to marshal SQL function arguments in.
/* zCsr will initially point to nFree bytes of unused space at the
** end of the opcode array, p->aOp. The computation of nFree is
** conservative - it might be smaller than the true number of free
** bytes, but never larger. nFree must be a multiple of 8 - it is
** rounded down if is not.
*/
zCsr = ((u8*)p->aOp) + ROUND8(sizeof(Op)*p->nOp); /* Available space */
nFree = pParse->szOpAlloc - ROUND8(sizeof(Op)*p->nOp); /* Size of zCsr */
n = ROUND8(sizeof(Op)*p->nOp); /* Bytes of opcode space used */
zCsr = &((u8*)p->aOp)[n]; /* Unused opcode space */
assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused space */
assert( nFree>=0 );
if( nFree>0 ){
memset(zCsr, 0, nFree);
assert( EIGHT_BYTE_ALIGNMENT(&zCsr[nFree]) );
}
resolveP2Values(p, &nArg);
p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort);
if( pParse->explain && nMem<10 ){
nMem = 10;
}
memset(zCsr, 0, nFree);
assert( EIGHT_BYTE_ALIGNMENT(&zCsr[nFree]) );
p->expired = 0;
/* Memory for registers, parameters, cursor, etc, is allocated in two
+1 -4
View File
@@ -106,7 +106,7 @@ do_catchsql_test 4.1 {
} {1 {error one}}
do_catchsql_test 4.2 {
SELECT * FROM t1 WHERE x = zeroblob(2000000000) AND y = 4;
SELECT * FROM t1 WHERE x = zeroblob(2200000000) AND y = 4;
} {1 {string or blob too big}}
sqlite3_limit db SQLITE_LIMIT_LENGTH 1000000
@@ -122,6 +122,3 @@ do_catchsql_test 4.4 {
finish_test
+4 -4
View File
@@ -289,11 +289,11 @@ do_test conflict2-6.0 {
#
foreach {i conf1 cmd t0 t1 t2 t3 t4} {
1 {} UPDATE 1 {6 7 8 9} 1 0 1
2 REPLACE UPDATE 0 {7 6 9} 1 1 0
3 IGNORE UPDATE 0 {6 7 3 9} 1 1 0
4 FAIL UPDATE 1 {6 7 3 4} 1 1 0
2 REPLACE UPDATE 0 {7 6 9} 1 0 1
3 IGNORE UPDATE 0 {6 7 3 9} 1 0 1
4 FAIL UPDATE 1 {6 7 3 4} 1 0 1
5 ABORT UPDATE 1 {1 2 3 4} 1 0 1
6 ROLLBACK UPDATE 1 {1 2 3 4} 0 1 0
6 ROLLBACK UPDATE 1 {1 2 3 4} 0 0 1
7 REPLACE {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0
8 IGNORE {UPDATE OR REPLACE} 0 {7 6 9} 1 0 1
9 FAIL {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0
+6 -6
View File
@@ -46,10 +46,10 @@ proc p4_of_opcode {db opcode sql} {
# Run EXPLAIN on $sql. Return a list of P5 values for all $opcode
# opcodes that contain regexp $comment in their comment
#
proc p5_of_opcode {db opcode comment sql} {
proc p5_of_opcode {db opcode sql} {
set res {}
$db eval "EXPLAIN $sql" x {
if {$x(opcode)==$opcode && [regexp $comment $x(comment)]} {
if {$x(opcode)==$opcode} {
lappend res $x(p5)
}
}
@@ -66,7 +66,7 @@ do_test 1.1 {
}
} {{EQ(r[1],c0)}}
do_test 1.2 {
p5_of_opcode db OpenRead . {
p5_of_opcode db OpenRead {
SELECT * FROM t1 CROSS JOIN t2 WHERE a=x
}
} {00 00}
@@ -79,7 +79,7 @@ do_test 2.1 {
}
} {{EQ(c0,r[1])}}
do_test 2.2 {
p5_of_opcode db OpenRead . {
p5_of_opcode db OpenRead {
SELECT * FROM t2 CROSS JOIN t1 WHERE a=x
}
} {00 00}
@@ -114,7 +114,7 @@ do_test 4.1desc {
}
} {GT(c0,11)}
do_test 4.2 {
p5_of_opcode db OpenRead . {
p5_of_opcode db OpenRead {
SELECT * FROM t1 WHERE b>11;
}
} {02 00}
@@ -129,7 +129,7 @@ do_test 4.3desc {
}
} {}
do_test 4.4 {
p5_of_opcode db OpenRead . {
p5_of_opcode db OpenRead {
SELECT c FROM t1 WHERE b<11;
}
} {00}
+5
View File
@@ -865,8 +865,13 @@ int main(int argc, char **argv){
return 0;
}else
if( strcmp(z,"limit-mem")==0 ){
#if !defined(SQLITE_ENABLE_MEMSYS3) && !defined(SQLITE_ENABLE_MEMSYS5)
fatalError("the %s option requires -DSQLITE_ENABLE_MEMSYS5 or _MEMSYS3",
argv[i]);
#else
if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]);
nMem = integerValue(argv[++i]);
#endif
}else
if( strcmp(z,"limit-vdbe")==0 ){
vdbeLimitFlag = 1;
+2
View File
@@ -86,6 +86,8 @@ array set ::Configs [strip_comments {
-DSQLITE_DEFAULT_FILE_FORMAT=4
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
-DSQLITE_ENABLE_STMT_SCANSTATUS
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS
-DSQLITE_ENABLE_CURSOR_HINTS
--enable-json1
}
"Check-Symbols" {
+6 -20
View File
@@ -32,12 +32,12 @@ do_execsql_test 1.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
}
} {
@@ -115,7 +115,7 @@ if {1} {
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]
@@ -142,20 +142,6 @@ if {1} {
}
}
# Read the first 5 entries from the root directory.
#
set res [list]
foreach p [lrange [list_root_files] 0 4] {
if {$::tcl_platform(platform) eq "windows"} {
lappend res $p
} else {
lappend res "/$p"
}
}
do_execsql_test 3.1 {
SELECT path FROM fstree LIMIT 5;
} $res
# Read all entries in the current directory.
#
proc contents {pattern} {
@@ -173,7 +159,7 @@ if {1} {
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 {
@@ -181,7 +167,7 @@ if {1} {
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]
@@ -189,7 +175,7 @@ if {1} {
close $fd
}
} {}
set pwd [pwd]
do_execsql_test 3.5 {
SELECT path, size FROM fstree WHERE path GLOB $pwd || '/subdir/*' ORDER BY 1