Compare commits

...

25 Commits

Author SHA1 Message Date
drh f71009aeb1 Version 3.15.2
FossilOrigin-Name: bbd85d235f7037c6a033a9690534391ffeacecc8
2016-11-28 19:13:37 +00:00
dan c6a12f7f16 Fix a test case in vacuum5.test so that it works with the in-memory journal
permutation. Cherrypick of [81c86401].

FossilOrigin-Name: e31d646a319e03587a913d8e23e8c9f767a3481e
2016-11-24 13:42:48 +00:00
drh 3cb099ffc4 Updates makefiles and build scripts on windows to used Tcl 8.6.
FossilOrigin-Name: f693850affc70c6996ca61b95f9632f8429b1bec
2016-11-23 21:33:14 +00:00
drh e7a625483d Update the version number to 3.15.2.
FossilOrigin-Name: 86dc74cb107a6cce7bdf74ab7ebbac56d32add69
2016-11-23 21:14:31 +00:00
drh b3c4a1f04e Code constant vector components outside of any loops in CASE and BETWEEN
expressions. Fix for [1a684656].

FossilOrigin-Name: 4c6efe600debf783e1cbb3db5df3b4097a707d33
2016-11-23 21:13:41 +00:00
drh fd630b2135 Prevent a possible use-after-free bug in the query optimizer.
FossilOrigin-Name: 661b45068fc8bb885899d6d8ef403f987f5f1a08
2016-11-23 21:08:01 +00:00
drh 018d5d7642 Disable the query flattener optimization for SELECT statements that are on
the RHS of vector IN operators.  This is a hack that fixes the bug
described in ticket [da7841375186386c]. A better solution that does not
disable the query flattener is needed, but this will server for the time
being.

FossilOrigin-Name: 27438fb43db4eae90fa005e7872debbb1db22c88
2016-11-23 21:01:38 +00:00
drh 02e84703e8 Fix a potential use-after-free error during parsing of malformed
CREATE TABLE statement.

FossilOrigin-Name: 0f956597995ca0007c51a32c71cf5fb723ed4134
2016-11-23 20:44:04 +00:00
drh 5bb897448e Fix an fts5 problem causing a crash in phrase queries where the first token of
the phrase matches one or more rows but some other token within the phrase
matches zero.

FossilOrigin-Name: 4efd331e9c680e1eb9c2bf58c5f45c03c0a31772
2016-11-23 20:37:36 +00:00
drh 01f75c078a Fix OOM error reporting in the json1_group_object() SQL function. Remove
an unreachable branch from the JSON1 logic.

FossilOrigin-Name: 6492e57e65118bc6366bd92c553f4494a99f97e6
2016-11-23 20:31:09 +00:00
drh 2151673425 Fix the JSON1 extension so that the JSON validator correctly rejects malformed
backslash escapes within string literals.

FossilOrigin-Name: 7c46628380e6c6aae0f1a6175ec6136d88d10f44
2016-11-23 20:24:40 +00:00
drh 2451c8fd38 Avoid a crash that can occur after an obscure OOM in the built-in INSTR()
function.

FossilOrigin-Name: 8a55b8e179f3fd14ae656680ed4ebd462800e2f6
2016-11-23 20:19:00 +00:00
drh ae0f43ec66 Mark the ICU extension functions as deterministic.
FossilOrigin-Name: 8fd2fccefb8885c7e8bae312c184d78187889d32
2016-11-23 20:12:37 +00:00
drh 33d2795554 Handle some obscure "row value misused" cases that could cause segfaults or
assertion failures.

FossilOrigin-Name: 794763fd6c04cabb16300421ade169131b7d308d
2016-11-23 19:43:48 +00:00
drh c657d8c2a9 Take care not to try to generate code for the ATTACH and DETACH commands
if there were syntax errors during parsing.
Fix for ticket [2f1b168ab4d4844]

FossilOrigin-Name: f8cf7ff1560dbd0dde5e6d4c9c22cd8ff43cce09
2016-11-23 19:40:23 +00:00
drh dc2ac4e2b1 Version 3.15.1
FossilOrigin-Name: 1136863c76576110e710dd5d69ab6bf347c65e36
2016-11-04 12:08:49 +00:00
dan 57bb0e3568 Fix a test case in vacuum5.test so that it works with -DSQLITE_TEMP_STORE=2
and -DSQLITE_ENABLE_ATOMIC_WRITE..

FossilOrigin-Name: 752e14d9b4ca9eec5531bccbde1548e6f06c9474
2016-11-03 19:27:20 +00:00
drh ac0e8a198d Add the SQLITE_FCNTL_WIN32_GET_HANDLE file control.
FossilOrigin-Name: 5221e3cc6f81d078766a607408d4e8aa3be0a90e
2016-11-03 18:49:15 +00:00
drh eaff412e6a Increase the version number to 3.15.1.
FossilOrigin-Name: ccdcce468f51439b353cbf723f1710ac38110b28
2016-11-03 18:44:07 +00:00
drh a7d42bca4f Escape non-ASCII character from an ICU extension comment.
FossilOrigin-Name: ee16fedd2006e2eb25a519edb4bda2d838e90410
2016-11-03 18:38:40 +00:00
drh e876607623 Fix an issue that was causing the new database image to be assembled entirely
in heap memory when VACUUMing a database, even if it should use a temp file.
This could cause SQLITE_NOMEM errors when vacuuming very large databases on
32-bit systems.

FossilOrigin-Name: 3fae483faea3370785ac44ac65dbd03c21b9f6f2
2016-11-03 18:36:26 +00:00
drh 15f3a25ffb Make sure left-join markings are transferred to the virtual scalar
subexpressions when decomposing a vector comparison in the ON clause of
a LEFT JOIN.
Fix for ticket [fef4bb4bd9185ec8f].

FossilOrigin-Name: aba1e22bbae1cd21f6e1d10773ccbfc4682db52c
2016-11-03 18:35:19 +00:00
drh 5e12e946f3 If all branches of an OR optimize scan that is the rhs of a LEFT JOIN use the
same index, set the index cursor to return NULL values if there are no matches
for a row on the lhs.  Fix for ticket [34a579141b2c5ac]

FossilOrigin-Name: 54eeddeceb7545c9843d4ddf4ff73a894214c43b
2016-11-03 18:33:52 +00:00
drh 32dbb674ba In the sessions module, avoid recording a change if an UPDATE statement
overwrites a column with REAL affinity containing an integer value with 
the same value.

FossilOrigin-Name: 0fc4f0f4c270d29ec9c03d2954ef57f98461ede8
2016-11-03 18:31:40 +00:00
drh fcb704549f Avoid using the "direct overflow read" optimization to read large blobs if the
pager layer has a wal file open - even if the database header indicates that
the db is not a wal database.

FossilOrigin-Name: 63cfe19724b5856bd246c6fb98d3d79f8e022f71
2016-11-03 18:30:26 +00:00
41 changed files with 882 additions and 109 deletions
+3 -3
View File
@@ -794,11 +794,11 @@ TCLLIBDIR = c:\tcl\lib
!ENDIF
!IFNDEF LIBTCL
LIBTCL = tcl85.lib
LIBTCL = tcl86.lib
!ENDIF
!IFNDEF LIBTCLSTUB
LIBTCLSTUB = tclstub85.lib
LIBTCLSTUB = tclstub86.lib
!ENDIF
!IFNDEF LIBTCLPATH
@@ -828,7 +828,7 @@ LIBICU = icuuc.lib icuin.lib
# specific Tcl shell to use.
#
!IFNDEF TCLSH_CMD
TCLSH_CMD = tclsh85
TCLSH_CMD = tclsh
!ENDIF
# <</mark>>
+1 -1
View File
@@ -1 +1 @@
3.15.0
3.15.2
Vendored
+9 -9
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for sqlite 3.15.0.
# Generated by GNU Autoconf 2.69 for sqlite 3.15.2.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
PACKAGE_VERSION='3.15.0'
PACKAGE_STRING='sqlite 3.15.0'
PACKAGE_VERSION='3.15.2'
PACKAGE_STRING='sqlite 3.15.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1463,7 +1463,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sqlite 3.15.0 to adapt to many kinds of systems.
\`configure' configures sqlite 3.15.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1528,7 +1528,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sqlite 3.15.0:";;
short | recursive ) echo "Configuration of sqlite 3.15.2:";;
esac
cat <<\_ACEOF
@@ -1652,7 +1652,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sqlite configure 3.15.0
sqlite configure 3.15.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2071,7 +2071,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sqlite $as_me 3.15.0, which was
It was created by sqlite $as_me 3.15.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -12151,7 +12151,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sqlite $as_me 3.15.0, which was
This file was extended by sqlite $as_me 3.15.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12217,7 +12217,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
sqlite config.status 3.15.0
sqlite config.status 3.15.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
+1 -1
View File
@@ -920,7 +920,7 @@ static int fts5ExprNodeTest_STRING(
}
}else{
Fts5IndexIter *pIter = pPhrase->aTerm[j].pIter;
if( pIter->iRowid==iLast ) continue;
if( pIter->iRowid==iLast || pIter->bEof ) continue;
bMatch = 0;
if( fts5ExprAdvanceto(pIter, bDesc, &iLast, &rc, &pNode->bEof) ){
return rc;
+1
View File
@@ -2840,6 +2840,7 @@ static void fts5MultiIterNext(
i64 iFrom /* Advance at least as far as this */
){
int bUseFrom = bFrom;
assert( pIter->base.bEof==0 );
while( p->rc==SQLITE_OK ){
int iFirst = pIter->aFirst[1].iFirst;
int bNewTerm = 0;
+34
View File
@@ -80,6 +80,40 @@ do_execsql_test 3.0 {
SELECT * FROM x3('x OR y OR z');
}
#-------------------------------------------------------------------------
# Test that a crash occuring when the second or subsequent tokens in a
# phrase matched zero rows has been fixed.
#
do_execsql_test 4.0 {
CREATE VIRTUAL TABLE t1 USING fts5(x);
INSERT INTO t1 VALUES('ab');
INSERT INTO t1 VALUES('cd');
INSERT INTO t1 VALUES('ab cd');
INSERT INTO t1 VALUES('ab cdXXX');
INSERT INTO t1 VALUES('abXXX cd');
}
do_execsql_test 4.1 {
SELECT * FROM t1('"ab cd" OR "ab cd" *');
} {{ab cd} {ab cdXXX}}
do_execsql_test 4.2 {
SELECT * FROM t1('"xy zz" OR "ab cd" *');
} {{ab cd} {ab cdXXX}}
do_execsql_test 4.3 {
SELECT * FROM t1('"xy zz" OR "xy zz" *');
}
do_execsql_test 4.4 {
SELECT * FROM t1('"ab cd" OR "xy zz" *');
} {{ab cd}}
do_execsql_test 4.5 {
CREATE VIRTUAL TABLE t2 USING fts5(x);
INSERT INTO t2 VALUES('ab');
INSERT INTO t2 VALUES('cd');
INSERT INTO t2 VALUES('ef');
}
do_execsql_test 4.6 {
SELECT * FROM t2('ab + xyz');
}
finish_test
+12 -12
View File
@@ -349,7 +349,7 @@ static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){
** of upper() or lower().
**
** lower('I', 'en_us') -> 'i'
** lower('I', 'tr_tr') -> 'ı' (small dotless i)
** lower('I', 'tr_tr') -> '\u131' (small dotless i)
**
** http://www.icu-project.org/userguide/posix.html#case_mappings
*/
@@ -500,20 +500,20 @@ int sqlite3IcuInit(sqlite3 *db){
void *pContext; /* sqlite3_user_data() context */
void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
} scalars[] = {
{"regexp", 2, SQLITE_ANY, 0, icuRegexpFunc},
{"regexp", 2, SQLITE_ANY|SQLITE_DETERMINISTIC, 0, icuRegexpFunc},
{"lower", 1, SQLITE_UTF16, 0, icuCaseFunc16},
{"lower", 2, SQLITE_UTF16, 0, icuCaseFunc16},
{"upper", 1, SQLITE_UTF16, (void*)1, icuCaseFunc16},
{"upper", 2, SQLITE_UTF16, (void*)1, icuCaseFunc16},
{"lower", 1, SQLITE_UTF16|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
{"lower", 2, SQLITE_UTF16|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
{"upper", 1, SQLITE_UTF16|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
{"upper", 2, SQLITE_UTF16|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
{"lower", 1, SQLITE_UTF8, 0, icuCaseFunc16},
{"lower", 2, SQLITE_UTF8, 0, icuCaseFunc16},
{"upper", 1, SQLITE_UTF8, (void*)1, icuCaseFunc16},
{"upper", 2, SQLITE_UTF8, (void*)1, icuCaseFunc16},
{"lower", 1, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
{"lower", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
{"upper", 1, SQLITE_UTF8|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
{"upper", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
{"like", 2, SQLITE_UTF8, 0, icuLikeFunc},
{"like", 3, SQLITE_UTF8, 0, icuLikeFunc},
{"like", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuLikeFunc},
{"like", 3, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuLikeFunc},
{"icu_load_collation", 2, SQLITE_UTF8, (void*)db, icuLoadCollation},
};
+25 -9
View File
@@ -49,13 +49,15 @@ SQLITE_EXTENSION_INIT1
#ifdef sqlite3Isdigit
/* Use the SQLite core versions if this routine is part of the
** SQLite amalgamation */
# define safe_isdigit(x) sqlite3Isdigit(x)
# define safe_isalnum(x) sqlite3Isalnum(x)
# define safe_isdigit(x) sqlite3Isdigit(x)
# define safe_isalnum(x) sqlite3Isalnum(x)
# define safe_isxdigit(x) sqlite3Isxdigit(x)
#else
/* Use the standard library for separate compilation */
#include <ctype.h> /* amalgamator: keep */
# define safe_isdigit(x) isdigit((unsigned char)(x))
# define safe_isalnum(x) isalnum((unsigned char)(x))
# define safe_isdigit(x) isdigit((unsigned char)(x))
# define safe_isalnum(x) isalnum((unsigned char)(x))
# define safe_isxdigit(x) isxdigit((unsigned char)(x))
#endif
/*
@@ -702,6 +704,15 @@ static int jsonParseAddNode(
return pParse->nNode++;
}
/*
** Return true if z[] begins with 4 (or more) hexadecimal digits
*/
static int jsonIs4Hex(const char *z){
int i;
for(i=0; i<4; i++) if( !safe_isxdigit(z[i]) ) return 0;
return 1;
}
/*
** Parse a single JSON value which begins at pParse->zJson[i]. Return the
** index of the first character past the end of the value parsed.
@@ -776,8 +787,13 @@ static int jsonParseValue(JsonParse *pParse, u32 i){
if( c==0 ) return -1;
if( c=='\\' ){
c = pParse->zJson[++j];
if( c==0 ) return -1;
jnFlags = JNODE_ESCAPE;
if( c=='"' || c=='\\' || c=='/' || c=='b' || c=='f'
|| c=='n' || c=='r' || c=='t'
|| (c=='u' && jsonIs4Hex(pParse->zJson+j+1)) ){
jnFlags = JNODE_ESCAPE;
}else{
return -1;
}
}else if( c=='"' ){
break;
}
@@ -1645,7 +1661,7 @@ static void jsonObjectFinal(sqlite3_context *ctx){
if( pStr ){
jsonAppendChar(pStr, '}');
if( pStr->bErr ){
if( pStr->bErr==0 ) sqlite3_result_error_nomem(ctx);
if( pStr->bErr==1 ) sqlite3_result_error_nomem(ctx);
assert( pStr->bStatic );
}else{
sqlite3_result_text(ctx, pStr->zBuf, pStr->nUsed,
@@ -1923,9 +1939,9 @@ static int jsonEachColumn(
/* For json_each() path and root are the same so fall through
** into the root case */
}
case JEACH_ROOT: {
default: {
const char *zRoot = p->zRoot;
if( zRoot==0 ) zRoot = "$";
if( zRoot==0 ) zRoot = "$";
sqlite3_result_text(ctx, zRoot, -1, SQLITE_STATIC);
break;
}
+59
View File
@@ -0,0 +1,59 @@
# 2016 October 21
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
#
# This test file focuses on interactions between RBU and the feature
# enabled by SQLITE_DIRECT_OVERFLOW_READ - Direct Overflow Read.
#
if {![info exists testdir]} {
set testdir [file join [file dirname [info script]] .. .. test]
}
source $testdir/tester.tcl
set ::testprefix rbudor
set bigA [string repeat a 5000]
set bigB [string repeat b 5000]
do_execsql_test 1.0 {
PRAGMA page_size = 1024;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB);
INSERT INTO t1 VALUES(1, $bigA);
} {}
do_test 1.1 {
forcedelete rbu.db
sqlite3 rbu rbu.db
rbu eval {
CREATE TABLE data_t1(a, b, rbu_control);
INSERT INTO data_t1 VALUES(2, $bigB, 0);
}
rbu close
} {}
do_test 1.2 {
sqlite3rbu rbu test.db rbu.db
while {[rbu state]!="checkpoint"} {
rbu step
}
rbu step
db eval { SELECT * FROM t1 }
} [list 1 $bigA 2 $bigB]
do_test 1.3 {
while {[rbu step]=="SQLITE_OK"} {}
rbu close
} {SQLITE_DONE}
do_execsql_test 1.4 {
SELECT * FROM t1
} [list 1 $bigA 2 $bigB]
finish_test
+12
View File
@@ -569,5 +569,17 @@ do_changeset_test 10.1.2 S "
"
do_test 10.1.4 { S delete } {}
#-------------------------------------------------------------------------
# Test the effect of updating a column from 0.0 to 0.0.
#
reset_db
do_execsql_test 11.1 {
CREATE TABLE t1(a INTEGER PRIMARY KEY, b REAL);
INSERT INTO t1 VALUES(1, 0.0);
}
do_iterator_test 11.2 * {
UPDATE t1 SET b = 0.0;
} {
}
finish_test
+45 -43
View File
@@ -1,10 +1,10 @@
C Version\s3.15.0
D 2016-10-14T10:20:30.806
C Version\s3.15.2
D 2016-11-28T19:13:37.853
F Makefile.in 6fd48ffcf7c2deea7499062d1f3747f986c19678
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 5151cc64c4c05f3455f4f692ad11410a810d937f
F Makefile.msc e0217f2d35a0448abbe4b066132ae20136e8b408
F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
F VERSION 25e2e333adeff5965520bc8db999c658898c972d
F VERSION 1efaccf9d0764b8f1ca730ded1f5530961a11844
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
@@ -30,7 +30,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
F configure 3f44893bc0e51c30653e02b0fd4dc2ab585e446a x
F configure b2d6400d41ea39410a111b698a91dc78ecacd13d x
F configure.ac b5d3df43161374f8dffd2e5f4b88fbb51685b975
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/lemon.html b5a3c07d33ecb8e019ce8f7660fe2dbbad9d7977
@@ -102,9 +102,9 @@ F ext/fts5/fts5Int.h b2eda36e0f224365c8e23dc8f559311834f1c13f
F ext/fts5/fts5_aux.c 67acf8d51723cf28ffc3828210ba662df4b8d267
F ext/fts5/fts5_buffer.c 4c1502d4c956cd092c89ce4480867f9d8bf325cd
F ext/fts5/fts5_config.c 5af9c360e99669d29f06492c370892394aba0857
F ext/fts5/fts5_expr.c c65c5629f4b3a49850fd84ea0731dee2360e144f
F ext/fts5/fts5_expr.c e12421946774482f4d49e334c974571177adbc70
F ext/fts5/fts5_hash.c 880998e596b60f078348d48732ca4ad9a90caad2
F ext/fts5/fts5_index.c 2d146d5c547f60d22d6fc4014d5e2b64248cd7c4
F ext/fts5/fts5_index.c fdbe46da11e81c1817cd4cb2de25ffdb4dd83711
F ext/fts5/fts5_main.c f85281445dcf8be32d18841c93a6f90fe27dbfe2
F ext/fts5/fts5_storage.c de0ed8a06738bde433afe11e92295ceaffbc4e58
F ext/fts5/fts5_tcl.c 4a901f00c8553740dba63511603f5527d741c26a
@@ -183,7 +183,7 @@ F ext/fts5/test/fts5restart.test c17728fdea26e7d0f617d22ad5b4b2862b994c17
F ext/fts5/test/fts5rowid.test 16908a99d6efc9ba21081b4f2b86b3fc699839a6
F ext/fts5/test/fts5simple.test 5da9b15ed534eb0be9f279d8a2bb2e24d30e4e38
F ext/fts5/test/fts5simple2.test 98377ae1ff7749a42c21fe1a139c1ed312522c46
F ext/fts5/test/fts5simple3.test 8e71733b3d1b0e695011d02c68ebc5ca40b6124e
F ext/fts5/test/fts5simple3.test 25faa8cb8ad470c6f01f670bcc1317c19a89f091
F ext/fts5/test/fts5synonym.test 6475d189c2e20d60795808f83e36bf9318708d48
F ext/fts5/test/fts5synonym2.test aa4c43bd3b691ff80f658cb064f5ab40690e834e
F ext/fts5/test/fts5tok1.test beb894c6f3468f10a574302f69ebe4436b0287c7
@@ -202,7 +202,7 @@ F ext/fts5/tool/loadfts5.tcl 95b03429ee6b138645703c6ca192c3ac96eaf093
F ext/fts5/tool/mkfts5c.tcl d1c2a9ab8e0ec690a52316f33dd9b1d379942f45
F ext/fts5/tool/showfts5.tcl d54da0e067306663e2d5d523965ca487698e722c
F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43
F ext/icu/icu.c 43df9d8ef2fae7a325100ebd713ab089dc829dd7
F ext/icu/icu.c 03ff6f90f3004a7e5a86205b581b2b7035ebf6e1
F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
F ext/misc/amatch.c 211108e201105e4bb0c076527b8cfd34330fc234
F ext/misc/carray.c 40c27641010a4dc67e3690bdb7c9d36ca58b3c2d
@@ -213,7 +213,7 @@ F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2
F ext/misc/fileio.c d4171c815d6543a9edef8308aab2951413cd8d0f
F ext/misc/fuzzer.c 7c64b8197bb77b7d64eff7cac7848870235d4c25
F ext/misc/ieee754.c f190d0cc5182529acb15babd177781be1ac1718c
F ext/misc/json1.c 9799e4252b305edcbe659329eec3ca80ed85f968
F ext/misc/json1.c f2ff73bb3f54cc643409766162174ffec3d7ea64
F ext/misc/memvfs.c e5225bc22e79dde6b28380f3a068ddf600683a33
F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342
F ext/misc/percentile.c 92699c8cd7d517ff610e6037e56506f8904dae2e
@@ -247,6 +247,7 @@ F ext/rbu/rbuC.test efe47db508a0269b683cb2a1913a425ffd39a831
F ext/rbu/rbu_common.tcl a38e8e2d4a50fd6aaf151633714c1b1d2fae3ead
F ext/rbu/rbucrash.test 8d2ed5d4b05fef6c00c2a6b5f7ead71fa172a695
F ext/rbu/rbudiff.test 3e605cf624d00d04d0fb1316a3acec4fbe3b3ac5
F ext/rbu/rbudor.test 99b05cc0df613e962c2c8085cfb05686a09cf315
F ext/rbu/rbufault.test cc0be8d5d392d98b0c2d6a51be377ea989250a89
F ext/rbu/rbufault2.test 9a7f19edd6ea35c4c9f807d8a3db0a03a5670c06
F ext/rbu/rbufault3.test 54a399888ac4af44c68f9f58afbed23149428bca
@@ -283,7 +284,7 @@ F ext/rtree/sqlite3rtree.h 9c5777af3d2921c7b4ae4954e8e5697502289d28
F ext/rtree/tkt3363.test 142ab96eded44a3615ec79fba98c7bde7d0f96de
F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
F ext/session/changeset.c 4ccbaa4531944c24584bf6a61ba3a39c62b6267a
F ext/session/session1.test 98f384736e2bc21ccf5ed81bdadcff4ad863393b
F ext/session/session1.test e5125b216d1e8c91e0984b361b0b68529e7c5dfb
F ext/session/session2.test 284de45abae4cc1082bc52012ee81521d5ac58e0
F ext/session/session3.test a7a9ce59b8d1e49e2cc23d81421ac485be0eea01
F ext/session/session4.test 457b02bdc349eb01151e54de014df77abd3c08c8
@@ -324,12 +325,12 @@ F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
F src/alter.c 299117695b1f21ac62dfc5b608588810ba22ed0d
F src/analyze.c 8b62b2cf4da85451534ac0af82cafc418d837f68
F src/attach.c 8c19066b4b5357b5d66154e856c61df01e71203a
F src/attach.c f6725410c184a80d8141b294fdf98a854c8a52b5
F src/auth.c 930b376a9c56998557367e6f7f8aaeac82a2a792
F src/backup.c faf17e60b43233c214aae6a8179d24503a61e83b
F src/bitvec.c 3ee4c8b2c94ed3a7377256e18199e6ff5cf33f63
F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73
F src/btree.c 7a45743fb947c89bd6c972bfb18c8f80c070ad51
F src/btree.c 72965b023102daacc042443c707f4d415e88cbd7
F src/btree.h d05b2fcc290991a8a3d9ea1816ddd55a4359dcde
F src/btreeInt.h c18b7d2a3494695133e4e60ee36061d37f45d9a5
F src/build.c 59dcfdc1ee55439d069af301ef7f2e84421b5102
@@ -339,10 +340,10 @@ F src/ctime.c e77f3dc297b4b65c96da78b4ae4272fdfae863d7
F src/date.c 95c9a8d00767e7221a8e9a31f4e913fc8029bf6b
F src/dbstat.c 19ee7a4e89979d4df8e44cfac7a8f905ec89b77d
F src/delete.c cb3f6300df24c26c609778b2731f82644b5532ec
F src/expr.c aac0b8d39373ce8f1d47829ce12c3d7af90c46a6
F src/expr.c bf9c58cf9b6d9be4d2deb2b64aa96f25660a1e7f
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
F src/fkey.c b9ca262f6ad4d030a3cab737ebf9b0b3c8b4ac80
F src/func.c 29cc9acb170ec1387b9f63eb52cd85f8de96c771
F src/func.c 7057bc2c105b82faa668d8e2ec85fad4540e5c51
F src/global.c 9da4ca5d74b90715f0ec4957f3d17a4749009f34
F src/hash.c 63d0ee752a3b92d4695b2b1f5259c4621b2cfebd
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
@@ -371,10 +372,10 @@ F src/os.h 8e976e59eb4ca1c0fca6d35ee803e38951cb0343
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
F src/os_unix.c be9ca0f901a2b6c1bc93dc338f4863675180c189
F src/os_win.c 520f23475f1de530c435d30b67b7b15fe90874b0
F src/os_win.c cf90abd4e50d9f56d2c20ce8e005aff55d7bd8e9
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/pager.c bf5b71bde3e9b6110e7d6990607db881f6a471a2
F src/pager.h 966d2769e76ae347c8a32c4165faf6e6cb64546d
F src/pager.c b1ee3ec0e58a0f8ca090aec67b2d0c4d256d6bea
F src/pager.h ec9140e5349491e561bb76aeac7a756f191191a1
F src/parse.y 0338f906b61e311c2b7e11a3f89b0092c780b664
F src/pcache.c 5ff2a08f76a9c1b22f43eb063b7068fb085465ac
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
@@ -384,19 +385,19 @@ F src/pragma.h 64c78a648751b9f4f297276c4eb7507b14b4628c
F src/prepare.c b1140c3d0cf59bc85ace00ce363153041b424b7a
F src/printf.c a5f0ca08ddede803c241266abb46356ec748ded1
F src/random.c ba2679f80ec82c4190062d756f22d0c358180696
F src/resolve.c 3fac1b2737ea5a724f20b921ac7e259c9be2100b
F src/resolve.c bb070cf5f23611c44ab7e4788803684e385fc3fb
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
F src/select.c ea3af83e2d0f245fef81ea4cf04cb730ce67f722
F src/shell.c b80396d2fadce4681397707e30078bf416e1dec2
F src/sqlite.h.in 2683a291ed8db5228024267be6421f0de507b80e
F src/sqlite.h.in 1011de924a6a7340c74e5442cb76f7b49c134512
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 8648034aa702469afb553231677306cc6492a1ae
F src/sqliteInt.h 8d241c2c0a1a7b6611d3e9398f41d69426da850d
F src/sqliteInt.h 9fbddc799b0ea6ca61fce4a0ef8ed2a11358d515
F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247
F src/status.c a9e66593dfb28a9e746cba7153f84d49c1ddc4b1
F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9
F src/tclsqlite.c aef87dcd8cb66564d560ab48d43d19ac812a1eab
F src/test1.c 61a08ed5861f3396ea4ff83931387696b692e1f8
F src/test1.c 1f1a399956c8730d5f7b09c729e98764f2082162
F src/test2.c b7174313e993754303a8b33c43df7c44b46857ab
F src/test3.c d03f5b5da9a2410b7a91c64b0d3306ed28ab6fee
F src/test4.c 18ec393bb4d0ad1de729f0b94da7267270f3d8e6
@@ -452,12 +453,12 @@ F src/trigger.c 3419bb9862983d84d70735fb4c94b21b934cd0c5
F src/update.c 8179e699dbd45b92934fd02d3d8e3732e8da8802
F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
F src/util.c 3e2da6101888d073e79ecc6af5e0a2f70fa1e498
F src/vacuum.c 913970b9d86dd6c2b8063ef1af421880f1464ec3
F src/vacuum.c 33c174b28886b2faf26e503b5a49a1c01a9b1c16
F src/vdbe.c f43aa96f2efe9bc8a06d17115661af527a3318fa
F src/vdbe.h c044be7050ac6bf596eecc6ab159f5dbc020a3b7
F src/vdbeInt.h 0a18713d0a2fec6807d076bd333d9bf3e57530cd
F src/vdbeapi.c 8272f9342c39ab8d7eb4b9decc6caa7bc75b7d83
F src/vdbeaux.c 7229203e4e4a3b6eaeeddc807c2287d912c0da74
F src/vdbeInt.h d8a56a491b752dbb5f671963b8c861ec72ea875e
F src/vdbeapi.c 97129bec6b1553da50d8e73f523c278bda66d9f6
F src/vdbeaux.c 52d9b840859f260ce8418be9333dd77c902e1c74
F src/vdbeblob.c 3e82a797b60c3b9fed7b8de8c539ca7607874937
F src/vdbemem.c fcdd73a2001a673f48a244a77b1038928ae729c9
F src/vdbesort.c 91fda3909326860382b0ca8aa251e609c6a9d62c
@@ -467,10 +468,10 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
F src/wal.c 02eeecc265f6ffd0597378f5d8ae9070b62a406a
F src/wal.h 6dd221ed384afdc204bc61e25c23ef7fd5a511f2
F src/walker.c 91a6df7435827e41cff6bb7df50ea00934ee78b0
F src/where.c 5f846d94bb3d35b3146d9915eb301ee362957b0a
F src/where.c 125af074723cf390d0e71ed1ca385240e6d4ea7c
F src/whereInt.h 2bcc3d176e6091cb8f50a30b65c006e88a73614d
F src/wherecode.c 717a65294df46f30e9b9933d2a63a4bcbca5a9a8
F src/whereexpr.c 379d0017fb7bc9e5a4d8cd4b056c747de946430e
F src/wherecode.c e895f34fe8cd06c386524f84da63eea5040b19b1
F src/whereexpr.c c19a84ac530835d37217db2181e4fe75901b7b97
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -623,7 +624,7 @@ F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c
F test/csv01.test e0ba3caaa57e4c667a0b45977689fb8082f14348
F test/ctime.test 0b995accd44a52914bd4744d5c1b6e1a56c7897c
F test/cursorhint.test 7bc346788390475e77a345da2b92270d04d35856
F test/cursorhint2.test 2b45341d32d1aae9991a00ef31ebca339b274255
F test/cursorhint2.test fa41f0d997e67db921d08c31e73111b32811201a
F test/date.test 984ac1e3e5e031386866f034006148d3972b4a65
F test/dbstatus.test 73149851b3aff14fc6db478e58f9083a66422cf5
F test/dbstatus2.test e93ab03bfae6d62d4d935f20de928c19ca0ed0ab
@@ -679,7 +680,7 @@ F test/expr.test 66a2c9ac34f74f036faa4092f5402c7d3162fc93
F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9
F test/extraquick.test cb254400bd42bfb777ff675356aabf3287978f79
F test/fallocate.test 3e979af17dfa7e5e9dda5eba1a696c04fa9d47f7
F test/filectrl.test 7c13f96457435238da99aff7343ad6a3a4885787
F test/filectrl.test c6547e6c3c4c3ef9707a0b3dc147de718135cacc
F test/filefmt.test e4edbdc637ca9576ccf4337a3cce627d9df7a56c
F test/fkey1.test 13e3d48236a2b9f5c5ebd232eef9b3ab682a8a2c
F test/fkey2.test f3d27ecba480a348c328965d154214719bb158a9
@@ -806,7 +807,7 @@ F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
F test/func3.test d202a7606d23f90988a664e88e268aed1087c11c
F test/func4.test 6beacdfcb0e18c358e6c2dcacf1b65d1fa80955f
F test/func5.test cdd224400bc3e48d891827cc913a57051a426fa4
F test/fuzz-oss1.test 4912e528ec9cf2f42134456933659d371c9e0d74
F test/fuzz-oss1.test e58330d01cbbd8215ee636b17a03fe220b37dbfa
F test/fuzz.test 96083052bf5765e4518c1ba686ce2bab785670d1
F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1
F test/fuzz3.test b47377143f0c80f91ed29d722861077ff34415d5
@@ -861,6 +862,7 @@ F test/insert3.test 1b7db95a03ad9c5013fdf7d6722b6cd66ee55e30
F test/insert4.test a20432f1c0fbbcff8f11d0e6ab4acb8c9db58023
F test/insert5.test 394f96728d1258f406fe5f5aeb0aaf29487c39a6
F test/instr.test 737bbf80685232033f3abedc6ae92f75860b5dd2
F test/instrfault.test aa90b7c3486a069151b28384ae525644a1f79d51
F test/intarray.test 066b7d7ac38d25bf96f87f1b017bfc687551cdd4
F test/interrupt.test dfe9a67a94b0b2d8f70545ba1a6cca10780d71cc
F test/intpkey.test ac71107a49a06492b69b82aafaf225400598d3c8
@@ -883,7 +885,7 @@ F test/journal3.test ff8af941f9e06161d3db1b46bb9f965ff0e7f307
F test/jrnlmode.test 7864d59cf7f6e552b9b99ba0f38acd167edc10fa
F test/jrnlmode2.test 81610545a4e6ed239ea8fa661891893385e23a1d
F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa
F test/json101.test 865776ed8580703e1684fe4b8ee2e473333bb121
F test/json101.test c0897616f32d95431f37fd291cb78742181980ac
F test/json102.test bf3fe7a706d30936a76a0f7a0375e1e8e73aff5a
F test/json103.test c5f6b85e69de05f6b3195f9f9d5ce9cd179099a0
F test/keyword1.test 37ef6bba5d2ed5b07ecdd6810571de2956599dff
@@ -1023,9 +1025,9 @@ F test/rollbackfault.test 0e646aeab8840c399cfbfa43daab46fd609cf04a
F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
F test/rowid.test 5b7509f384f4f6fae1af3c8c104c8ca299fea18d
F test/rowvalue.test 753eb744b7efeb5ac643d35d6e1e5066452ccf79
F test/rowvalue.test f4dc97fe52d4e206e25b3395588b9497a8eed3ff
F test/rowvalue2.test 060d238b7e5639a7c5630cb5e63e311b44efef2b
F test/rowvalue3.test 01399b7bf150b0d41abce76c18072da777c2500c
F test/rowvalue3.test 3068f508753af69884b12125995f023da0dbb256
F test/rowvalue4.test 4b556d7de161a0dd8cff095c336e913986398bea
F test/rowvalue5.test c81c7d8cf36711ab37675ad7376084ae2a359cb6
F test/rowvalue6.test d19b54feb604d5601f8614b15e214e0774c01087
@@ -1341,7 +1343,7 @@ F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
F test/vacuum2.test aa048abee196c16c9ba308465494009057b79f9b
F test/vacuum3.test 77ecdd54592b45a0bcb133339f99f1ae0ae94d0d
F test/vacuum4.test d3f8ecff345f166911568f397d2432c16d2867d9
F test/vacuum5.test 0b7ac80c64eed657b4ce2dd6535092c0d6afec6c
F test/vacuum5.test c87234e8ca4107f349da4edbeda3e4ea5adc93f3
F test/vacuummem.test 7b42abb3208bd82dd23a7536588396f295a314f2
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
F test/veryquick.test 57ab846bacf7b90cf4e9a672721ea5c5b669b661
@@ -1408,7 +1410,7 @@ F test/where9.test 729c3ba9b47e8f9f1aab96bae7dad2a524f1d1a2
F test/whereA.test 4d253178d135ec46d1671e440cd8f2b916aa6e6b
F test/whereB.test 0def95db3bdec220a731c7e4bec5930327c1d8c5
F test/whereC.test cae295158703cb3fc23bf1a108a9ab730efff0f6
F test/whereD.test 51366b07cb6f546cd30cc803f7e754f063b940de
F test/whereD.test 711d4df58d6d4fb9b3f5ce040b818564198be002
F test/whereE.test b3a055eef928c992b0a33198a7b8dc10eea5ad2f
F test/whereF.test 5b2ba0dbe8074aa13e416b37c753991f0a2492d7
F test/whereG.test dde4c52a97385a55be6a7cd46be8373f0cf35501
@@ -1440,7 +1442,7 @@ F tool/GetFile.cs a15e08acb5dd7539b75ba23501581d7c2b462cb5
F tool/GetTclKit.bat f94784e3bdc2f50c539266f5467cbf1f27612cb3
F tool/Replace.cs 02c67258801c2fb5f63231e0ac0f220b4b36ba91
F tool/addopcodes.tcl 10c889c4a65ec6c5604e4a47306fa77ff57ae189
F tool/build-all-msvc.bat 3e4e4043b53f1aede4308e0d2567bbd773614630 x
F tool/build-all-msvc.bat 018c1b273458a90c8ba633c6f0c5654cfcb138bf x
F tool/build-shell.sh 950f47c6174f1eea171319438b93ba67ff5bf367
F tool/cg_anno.tcl 692ce4b8693d59e3a3de77ca97f4139ecfa641b0 x
F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
@@ -1469,7 +1471,7 @@ F tool/mksqlite3c-noext.tcl fef88397668ae83166735c41af99d79f56afaabb
F tool/mksqlite3c.tcl 06b2e6a0f21cc0a5d70fbbd136b3e0a96470645e
F tool/mksqlite3h.tcl c006c4e5da57c649b24b689511dcd270dd7b0249
F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b
F tool/mkvsix.tcl 4abcaf3267171b2faadaf9b82a0dfbaa6e98f8b7
F tool/mkvsix.tcl b9e0777a213c23156b6542842c238479e496ebf5
F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
F tool/omittest.tcl 34d7ac01fe4fd18e3637f64abe12c40eca0f6b97
F tool/opcodesum.tcl 740ed206ba8c5040018988129abbf3089a0ccf4a
@@ -1525,10 +1527,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 4d66ac98deaa85218be7ff0eb254f78b96d8e8d4
R a065c821855a0dd84a6e1c87c8d5ef05
P e31d646a319e03587a913d8e23e8c9f767a3481e
R 1d14b6b58ab1fcbf27ff915cd0c67140
T +bgcolor * #d0c0ff
T +sym-release *
T +sym-version-3.15.0 *
T +sym-version-3.15.2 *
U drh
Z 64923968438b03dca07652ab710e8b24
Z 790edc877406989babf0a6b5cdc9cbe9
+1 -1
View File
@@ -1 +1 @@
707875582fcba352b4906a595ad89198d84711d8
bbd85d235f7037c6a033a9690534391ffeacecc8
+1
View File
@@ -325,6 +325,7 @@ static void codeAttach(
sqlite3* db = pParse->db;
int regArgs;
if( pParse->nErr ) goto attach_end;
memset(&sName, 0, sizeof(NameContext));
sName.pParse = pParse;
+1 -1
View File
@@ -4601,7 +4601,7 @@ static int accessPayload(
&& (bEnd || a==ovflSize) /* (6) */
&& pBt->inTransaction==TRANS_READ /* (4) */
&& (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (3) */
&& pBt->pPage1->aData[19]==0x01 /* (5) */
&& 0==sqlite3PagerUseWal(pBt->pPager) /* (5) */
&& &pBuf[-4]>=pBufStart /* (7) */
){
u8 aSave[4];
+1 -1
View File
@@ -3296,7 +3296,7 @@ static int exprCodeVector(Parse *pParse, Expr *p, int *piFreeable){
iResult = pParse->nMem+1;
pParse->nMem += nResult;
for(i=0; i<nResult; i++){
sqlite3ExprCode(pParse, p->x.pList->a[i].pExpr, i+iResult);
sqlite3ExprCodeFactorable(pParse, p->x.pList->a[i].pExpr, i+iResult);
}
}
}
+2
View File
@@ -208,6 +208,8 @@ static void instrFunc(
zHaystack = sqlite3_value_text(argv[0]);
zNeedle = sqlite3_value_text(argv[1]);
isText = 1;
if( zNeedle==0 ) return;
assert( zHaystack );
}
while( nNeedle<=nHaystack && memcmp(zHaystack, zNeedle, nNeedle)!=0 ){
N++;
+6
View File
@@ -3488,6 +3488,12 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_WIN32_GET_HANDLE: {
LPHANDLE phFile = (LPHANDLE)pArg;
*phFile = pFile->h;
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
#ifdef SQLITE_TEST
case SQLITE_FCNTL_WIN32_SET_HANDLE: {
LPHANDLE phFile = (LPHANDLE)pArg;
+2 -1
View File
@@ -817,9 +817,10 @@ static const unsigned char aJournalMagic[] = {
** rollback journal. Otherwise false.
*/
#ifndef SQLITE_OMIT_WAL
static int pagerUseWal(Pager *pPager){
int sqlite3PagerUseWal(Pager *pPager){
return (pPager->pWal!=0);
}
# define pagerUseWal(x) sqlite3PagerUseWal(x)
#else
# define pagerUseWal(x) 0
# define pagerRollbackWal(x) 0
+3
View File
@@ -178,10 +178,13 @@ int sqlite3PagerSharedLock(Pager *pPager);
int sqlite3PagerWalCallback(Pager *pPager);
int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
int sqlite3PagerCloseWal(Pager *pPager);
int sqlite3PagerUseWal(Pager *pPager);
# ifdef SQLITE_ENABLE_SNAPSHOT
int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
# endif
#else
# define sqlite3PagerUseWal(x) 0
#endif
#ifdef SQLITE_ENABLE_ZIPVFS
+15 -2
View File
@@ -400,6 +400,10 @@ static int lookupName(
sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs);
return WRC_Abort;
}
if( sqlite3ExprVectorSize(pOrig)!=1 ){
sqlite3ErrorMsg(pParse, "row value misused");
return WRC_Abort;
}
resolveAlias(pParse, pEList, j, pExpr, "", nSubquery);
cnt = 1;
pMatch = 0;
@@ -776,6 +780,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
notValid(pParse, pNC, "parameters", NC_IsCheck|NC_PartIdx|NC_IdxExpr);
break;
}
case TK_BETWEEN:
case TK_EQ:
case TK_NE:
case TK_LT:
@@ -786,10 +791,17 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
case TK_ISNOT: {
int nLeft, nRight;
if( pParse->db->mallocFailed ) break;
assert( pExpr->pRight!=0 );
assert( pExpr->pLeft!=0 );
nLeft = sqlite3ExprVectorSize(pExpr->pLeft);
nRight = sqlite3ExprVectorSize(pExpr->pRight);
if( pExpr->op==TK_BETWEEN ){
nRight = sqlite3ExprVectorSize(pExpr->x.pList->a[0].pExpr);
if( nRight==nLeft ){
nRight = sqlite3ExprVectorSize(pExpr->x.pList->a[1].pExpr);
}
}else{
assert( pExpr->pRight!=0 );
nRight = sqlite3ExprVectorSize(pExpr->pRight);
}
if( nLeft!=nRight ){
testcase( pExpr->op==TK_EQ );
testcase( pExpr->op==TK_NE );
@@ -799,6 +811,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
testcase( pExpr->op==TK_GE );
testcase( pExpr->op==TK_IS );
testcase( pExpr->op==TK_ISNOT );
testcase( pExpr->op==TK_BETWEEN );
sqlite3ErrorMsg(pParse, "row value misused");
}
break;
+7
View File
@@ -978,6 +978,12 @@ struct sqlite3_io_methods {
** on whether or not the file has been renamed, moved, or deleted since it
** was first opened.
**
** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]
** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
** underlying native file handle associated with a file handle. This file
** control interprets its argument as a pointer to a native file handle and
** writes the resulting value there.
**
** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
** opcode causes the xFileControl method to swap the file handle with the one
@@ -1028,6 +1034,7 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_RBU 26
#define SQLITE_FCNTL_VFS_POINTER 27
#define SQLITE_FCNTL_JOURNAL_POINTER 28
#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
/* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
+4 -4
View File
@@ -2946,15 +2946,15 @@ struct Parse {
} aColCache[SQLITE_N_COLCACHE]; /* One for each column cache entry */
int aTempReg[8]; /* Holding area for temporary registers */
Token sNameToken; /* Token with unqualified schema object name */
Token sLastToken; /* The last token parsed */
/************************************************************************
** Above is constant between recursions. Below is reset before and after
** each recursion. The boundary between these two regions is determined
** using offsetof(Parse,nVar) so the nVar field must be the first field
** in the recursive region.
** using offsetof(Parse,sLastToken) so the sLastToken field must be the
** first field in the recursive region.
************************************************************************/
Token sLastToken; /* The last token parsed */
ynVar nVar; /* Number of '?' variables seen in the SQL so far */
int nzVar; /* Number of available slots in azVar[] */
u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */
@@ -2988,7 +2988,7 @@ struct Parse {
** Sizes and pointers of various parts of the Parse object.
*/
#define PARSE_HDR_SZ offsetof(Parse,aColCache) /* Recursive part w/o aColCache*/
#define PARSE_RECURSE_SZ offsetof(Parse,nVar) /* Recursive part */
#define PARSE_RECURSE_SZ offsetof(Parse,sLastToken) /* Recursive part */
#define PARSE_TAIL_SZ (sizeof(Parse)-PARSE_RECURSE_SZ) /* Non-recursive part */
#define PARSE_TAIL(X) (((char*)(X))+PARSE_RECURSE_SZ) /* Pointer to tail */
+33
View File
@@ -5677,6 +5677,38 @@ static int SQLITE_TCLAPI file_control_win32_av_retry(
return TCL_OK;
}
/*
** tclcmd: file_control_win32_get_handle DB
**
** This TCL command runs the sqlite3_file_control interface with
** the SQLITE_FCNTL_WIN32_GET_HANDLE opcode.
*/
static int file_control_win32_get_handle(
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
int objc, /* Number of arguments */
Tcl_Obj *CONST objv[] /* Command arguments */
){
sqlite3 *db;
int rc;
HANDLE hFile = NULL;
char z[100];
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB", 0);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
return TCL_ERROR;
}
rc = sqlite3_file_control(db, NULL, SQLITE_FCNTL_WIN32_GET_HANDLE,
(void*)&hFile);
sqlite3_snprintf(sizeof(z), z, "%d %p", rc, (void*)hFile);
Tcl_AppendResult(interp, z, (char*)0);
return TCL_OK;
}
/*
** tclcmd: file_control_win32_set_handle DB HANDLE
**
@@ -7441,6 +7473,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "file_control_sizehint_test", file_control_sizehint_test, 0 },
#if SQLITE_OS_WIN
{ "file_control_win32_av_retry", file_control_win32_av_retry, 0 },
{ "file_control_win32_get_handle", file_control_win32_get_handle, 0 },
{ "file_control_win32_set_handle", file_control_win32_set_handle, 0 },
#endif
{ "file_control_persist_wal", file_control_persist_wal, 0 },
+1 -1
View File
@@ -191,7 +191,7 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db, int iDb){
sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF);
sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL);
/* Begin a transaction and take an exclusive lock on the main database
** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
+1 -1
View File
@@ -430,8 +430,8 @@ struct PreUpdate {
int iNewReg; /* Register for new.* values */
i64 iKey1; /* First key value passed to hook */
i64 iKey2; /* Second key value passed to hook */
int iPKey; /* If not negative index of IPK column */
Mem *aNew; /* Array of new.* values */
Table *pTab; /* Schema object being upated */
};
/*
+9 -4
View File
@@ -1710,9 +1710,14 @@ int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
if( iIdx>=p->pUnpacked->nField ){
*ppValue = (sqlite3_value *)columnNullValue();
}else{
Mem *pMem = *ppValue = &p->pUnpacked->aMem[iIdx];
*ppValue = &p->pUnpacked->aMem[iIdx];
if( iIdx==p->iPKey ){
sqlite3VdbeMemSetInt64(*ppValue, p->iKey1);
if( iIdx==p->pTab->iPKey ){
sqlite3VdbeMemSetInt64(pMem, p->iKey1);
}else if( p->pTab->aCol[iIdx].affinity==SQLITE_AFF_REAL ){
if( pMem->flags & MEM_Int ){
sqlite3VdbeMemRealify(pMem);
}
}
}
@@ -1789,7 +1794,7 @@ int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
pMem = (sqlite3_value *)columnNullValue();
}else{
pMem = &pUnpack->aMem[iIdx];
if( iIdx==p->iPKey ){
if( iIdx==p->pTab->iPKey ){
sqlite3VdbeMemSetInt64(pMem, p->iKey2);
}
}
@@ -1810,7 +1815,7 @@ int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
assert( iIdx>=0 && iIdx<p->pCsr->nField );
pMem = &p->aNew[iIdx];
if( pMem->flags==0 ){
if( iIdx==p->iPKey ){
if( iIdx==p->pTab->iPKey ){
sqlite3VdbeMemSetInt64(pMem, p->iKey2);
}else{
rc = sqlite3VdbeMemCopy(pMem, &p->v->aMem[p->iNewReg+1+iIdx]);
+1 -1
View File
@@ -4617,7 +4617,7 @@ void sqlite3VdbePreUpdateHook(
preupdate.keyinfo.aSortOrder = (u8*)&fakeSortOrder;
preupdate.iKey1 = iKey1;
preupdate.iKey2 = iKey2;
preupdate.iPKey = pTab->iPKey;
preupdate.pTab = pTab;
db->pPreUpdate = &preupdate;
db->xPreUpdateCallback(db->pPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2);
+6 -4
View File
@@ -4860,13 +4860,15 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
}
#endif
if( pLevel->iLeftJoin ){
int ws = pLoop->wsFlags;
addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin); VdbeCoverage(v);
assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0
|| (pLoop->wsFlags & WHERE_INDEXED)!=0 );
if( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 ){
assert( (ws & WHERE_IDX_ONLY)==0 || (ws & WHERE_INDEXED)!=0 );
if( (ws & WHERE_IDX_ONLY)==0 ){
sqlite3VdbeAddOp1(v, OP_NullRow, pTabList->a[i].iCursor);
}
if( pLoop->wsFlags & WHERE_INDEXED ){
if( (ws & WHERE_INDEXED)
|| ((ws & WHERE_MULTI_OR) && pLevel->u.pCovidx)
){
sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);
}
if( pLevel->op==OP_Return ){
+3
View File
@@ -446,6 +446,7 @@ static int codeEqualityTerm(
}else{
Select *pSelect = pX->x.pSelect;
sqlite3 *db = pParse->db;
u16 savedDbOptFlags = db->dbOptFlags;
ExprList *pOrigRhs = pSelect->pEList;
ExprList *pOrigLhs = pX->pLeft->x.pList;
ExprList *pRhs = 0; /* New Select.pEList for RHS */
@@ -489,7 +490,9 @@ static int codeEqualityTerm(
testcase( aiMap==0 );
}
pSelect->pEList = pRhs;
db->dbOptFlags |= SQLITE_QueryFlattener;
eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap);
db->dbOptFlags = savedDbOptFlags;
testcase( aiMap!=0 && aiMap[0]!=0 );
pSelect->pEList = pOrigRhs;
pLeft->x.pList = pOrigLhs;
+3
View File
@@ -1198,6 +1198,7 @@ static void exprAnalyze(
Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i);
pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight, 0);
transferJoinMarkings(pNew, pExpr);
idxNew = whereClauseInsert(pWC, pNew, TERM_DYNAMIC);
exprAnalyze(pSrc, pWC, idxNew);
}
@@ -1269,6 +1270,8 @@ static void exprAnalyze(
/* Prevent ON clause terms of a LEFT JOIN from being used to drive
** an index for tables to the left of the join.
*/
testcase( pTerm!=&pWC->a[idxTerm] );
pTerm = &pWC->a[idxTerm];
pTerm->prereqRight |= extraRight;
}
+8 -6
View File
@@ -164,17 +164,19 @@ do_extract_hints_test 2.10 {
x2 {AND(EQ(c1,ADD(32,32)),EQ(c0,r[2]))}
}
do_extract_hints_test 2.11 {
SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE x2.b LIKE 'abc%'
} {
x2 {AND(expr,EQ(c0,r[2]))}
ifcapable !icu {
# This test only works using the built-in LIKE, not the ICU LIKE extension.
do_extract_hints_test 2.11 {
SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE x2.b LIKE 'abc%'
} {
x2 {AND(expr,EQ(c0,r[2]))}
}
}
do_extract_hints_test 2.11 {
do_extract_hints_test 2.12 {
SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE coalesce(x2.b, 1)
} {
x2 {EQ(c0,r[2])}
}
finish_test
+26
View File
@@ -43,4 +43,30 @@ do_test filectrl-1.6 {
} {/etilqs_/}
db close
forcedelete .test_control_lockproxy.db-conch test.proxy
forcedelete test.db test2.db
if {$tcl_platform(platform)=="windows"} {
do_test filectrl-2.1 {
sqlite3 db test2.db
set size [file size test2.db]
set handle [file_control_win32_get_handle db]
db close
forcedelete test2.db
list $size $handle [expr {$handle != 0}]
} {/^0 \{0 \d+\} 1$/}
do_test filectrl-2.2 {
sqlite3 db test2.db
execsql {
CREATE TABLE t1(x);
INSERT INTO t1 (x) VALUES(RANDOMBLOB(1048576));
}
set size [file size test2.db]
set handle [file_control_win32_get_handle db]
db close
forcedelete test2.db
list $size $handle [expr {$handle != 0}]
} {/^1\d+ \{0 \d+\} 1$/}
}
finish_test
+4
View File
@@ -1997,5 +1997,9 @@ NULL AND ("9_u" COLLATE NOCASE = ? COLLATE NOCASE))) FROM (SELECT
}
} {/.* Goto .*/}
# Crash reported by OSS-FUZZ on 2016-11-10
do_catchsql_test fuzz-oss1-detach {
DETACH x IS #1;
} {1 {near "#1": syntax error}}
finish_test
+68
View File
@@ -0,0 +1,68 @@
# 2016 November 4
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library. The
# focus of this file is testing OOM error handling within the built-in
# INSTR() function.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix instrfault
# Use big NEEDLE and HAYSTACK strings. Strings so large they cannot
# use lookaside buffers.
#
set ::NEEDLE [string repeat "abcdefghijklmnopqrstuvwxyz" 10]
set ::HAYSTACK "[string repeat 123 10]$NEEDLE[string repeat 456 10]"
foreach {enc} {
utf8
utf16
} {
reset_db
execsql "PRAGMA encoding = $enc"
do_execsql_test 1.$enc.1 {
CREATE TABLE t1(n, h);
INSERT INTO t1 VALUES($::NEEDLE, $::HAYSTACK);
} {}
do_faultsim_test 1.$enc.1 -faults oom-t* -prep {
execsql { SELECT instr(h, n) FROM t1 }
} -body {
execsql { SELECT instr(h, n) FROM t1 }
} -test {
faultsim_test_result {0 31}
}
do_faultsim_test 1.$enc.2 -faults oom-t* -prep {
execsql { SELECT instr($::HAYSTACK, $::NEEDLE) FROM t1 }
} -body {
execsql { SELECT instr($::HAYSTACK, $::NEEDLE) FROM t1 }
} -test {
faultsim_test_result {0 31}
}
do_faultsim_test 1.$enc.3 -faults oom-t* -prep {
set ::stmt [sqlite3_prepare_v2 db "SELECT instr(?, ?)" -1 dummy]
sqlite3_bind_text $::stmt 1 $::HAYSTACK [string length $::HAYSTACK]
sqlite3_bind_text $::stmt 2 $::NEEDLE [string length $::NEEDLE]
} -body {
set rc [sqlite3_step $::stmt]
if {$rc=="SQLITE_NOMEM"} { error "out of memory" }
sqlite3_column_int $::stmt 0
} -test {
faultsim_test_result {0 31}
sqlite3_finalize $::stmt
}
}
finish_test
+305 -2
View File
@@ -382,8 +382,311 @@ do_catchsql_test json-9.7 {
SELECT json_quote()
} {1 {wrong number of arguments to function json_quote()}}
# Make sure only valid backslash-escapes are accepted.
#
do_execsql_test json-10.1 {
SELECT json_valid('" \ "');
} {0}
do_execsql_test json-10.2 {
SELECT json_valid('" \! "');
} {0}
do_execsql_test json-10.3 {
SELECT json_valid('" \" "');
} {1}
do_execsql_test json-10.4 {
SELECT json_valid('" \# "');
} {0}
do_execsql_test json-10.5 {
SELECT json_valid('" \$ "');
} {0}
do_execsql_test json-10.6 {
SELECT json_valid('" \% "');
} {0}
do_execsql_test json-10.7 {
SELECT json_valid('" \& "');
} {0}
do_execsql_test json-10.8 {
SELECT json_valid('" \'' "');
} {0}
do_execsql_test json-10.9 {
SELECT json_valid('" \( "');
} {0}
do_execsql_test json-10.10 {
SELECT json_valid('" \) "');
} {0}
do_execsql_test json-10.11 {
SELECT json_valid('" \* "');
} {0}
do_execsql_test json-10.12 {
SELECT json_valid('" \+ "');
} {0}
do_execsql_test json-10.13 {
SELECT json_valid('" \, "');
} {0}
do_execsql_test json-10.14 {
SELECT json_valid('" \- "');
} {0}
do_execsql_test json-10.15 {
SELECT json_valid('" \. "');
} {0}
do_execsql_test json-10.16 {
SELECT json_valid('" \/ "');
} {1}
do_execsql_test json-10.17 {
SELECT json_valid('" \0 "');
} {0}
do_execsql_test json-10.18 {
SELECT json_valid('" \1 "');
} {0}
do_execsql_test json-10.19 {
SELECT json_valid('" \2 "');
} {0}
do_execsql_test json-10.20 {
SELECT json_valid('" \3 "');
} {0}
do_execsql_test json-10.21 {
SELECT json_valid('" \4 "');
} {0}
do_execsql_test json-10.22 {
SELECT json_valid('" \5 "');
} {0}
do_execsql_test json-10.23 {
SELECT json_valid('" \6 "');
} {0}
do_execsql_test json-10.24 {
SELECT json_valid('" \7 "');
} {0}
do_execsql_test json-10.25 {
SELECT json_valid('" \8 "');
} {0}
do_execsql_test json-10.26 {
SELECT json_valid('" \9 "');
} {0}
do_execsql_test json-10.27 {
SELECT json_valid('" \: "');
} {0}
do_execsql_test json-10.28 {
SELECT json_valid('" \; "');
} {0}
do_execsql_test json-10.29 {
SELECT json_valid('" \< "');
} {0}
do_execsql_test json-10.30 {
SELECT json_valid('" \= "');
} {0}
do_execsql_test json-10.31 {
SELECT json_valid('" \> "');
} {0}
do_execsql_test json-10.32 {
SELECT json_valid('" \? "');
} {0}
do_execsql_test json-10.33 {
SELECT json_valid('" \@ "');
} {0}
do_execsql_test json-10.34 {
SELECT json_valid('" \A "');
} {0}
do_execsql_test json-10.35 {
SELECT json_valid('" \B "');
} {0}
do_execsql_test json-10.36 {
SELECT json_valid('" \C "');
} {0}
do_execsql_test json-10.37 {
SELECT json_valid('" \D "');
} {0}
do_execsql_test json-10.38 {
SELECT json_valid('" \E "');
} {0}
do_execsql_test json-10.39 {
SELECT json_valid('" \F "');
} {0}
do_execsql_test json-10.40 {
SELECT json_valid('" \G "');
} {0}
do_execsql_test json-10.41 {
SELECT json_valid('" \H "');
} {0}
do_execsql_test json-10.42 {
SELECT json_valid('" \I "');
} {0}
do_execsql_test json-10.43 {
SELECT json_valid('" \J "');
} {0}
do_execsql_test json-10.44 {
SELECT json_valid('" \K "');
} {0}
do_execsql_test json-10.45 {
SELECT json_valid('" \L "');
} {0}
do_execsql_test json-10.46 {
SELECT json_valid('" \M "');
} {0}
do_execsql_test json-10.47 {
SELECT json_valid('" \N "');
} {0}
do_execsql_test json-10.48 {
SELECT json_valid('" \O "');
} {0}
do_execsql_test json-10.49 {
SELECT json_valid('" \P "');
} {0}
do_execsql_test json-10.50 {
SELECT json_valid('" \Q "');
} {0}
do_execsql_test json-10.51 {
SELECT json_valid('" \R "');
} {0}
do_execsql_test json-10.52 {
SELECT json_valid('" \S "');
} {0}
do_execsql_test json-10.53 {
SELECT json_valid('" \T "');
} {0}
do_execsql_test json-10.54 {
SELECT json_valid('" \U "');
} {0}
do_execsql_test json-10.55 {
SELECT json_valid('" \V "');
} {0}
do_execsql_test json-10.56 {
SELECT json_valid('" \W "');
} {0}
do_execsql_test json-10.57 {
SELECT json_valid('" \X "');
} {0}
do_execsql_test json-10.58 {
SELECT json_valid('" \Y "');
} {0}
do_execsql_test json-10.59 {
SELECT json_valid('" \Z "');
} {0}
do_execsql_test json-10.60 {
SELECT json_valid('" \[ "');
} {0}
do_execsql_test json-10.61 {
SELECT json_valid('" \\ "');
} {1}
do_execsql_test json-10.62 {
SELECT json_valid('" \] "');
} {0}
do_execsql_test json-10.63 {
SELECT json_valid('" \^ "');
} {0}
do_execsql_test json-10.64 {
SELECT json_valid('" \_ "');
} {0}
do_execsql_test json-10.65 {
SELECT json_valid('" \` "');
} {0}
do_execsql_test json-10.66 {
SELECT json_valid('" \a "');
} {0}
do_execsql_test json-10.67 {
SELECT json_valid('" \b "');
} {1}
do_execsql_test json-10.68 {
SELECT json_valid('" \c "');
} {0}
do_execsql_test json-10.69 {
SELECT json_valid('" \d "');
} {0}
do_execsql_test json-10.70 {
SELECT json_valid('" \e "');
} {0}
do_execsql_test json-10.71 {
SELECT json_valid('" \f "');
} {1}
do_execsql_test json-10.72 {
SELECT json_valid('" \g "');
} {0}
do_execsql_test json-10.73 {
SELECT json_valid('" \h "');
} {0}
do_execsql_test json-10.74 {
SELECT json_valid('" \i "');
} {0}
do_execsql_test json-10.75 {
SELECT json_valid('" \j "');
} {0}
do_execsql_test json-10.76 {
SELECT json_valid('" \k "');
} {0}
do_execsql_test json-10.77 {
SELECT json_valid('" \l "');
} {0}
do_execsql_test json-10.78 {
SELECT json_valid('" \m "');
} {0}
do_execsql_test json-10.79 {
SELECT json_valid('" \n "');
} {1}
do_execsql_test json-10.80 {
SELECT json_valid('" \o "');
} {0}
do_execsql_test json-10.81 {
SELECT json_valid('" \p "');
} {0}
do_execsql_test json-10.82 {
SELECT json_valid('" \q "');
} {0}
do_execsql_test json-10.83 {
SELECT json_valid('" \r "');
} {1}
do_execsql_test json-10.84 {
SELECT json_valid('" \s "');
} {0}
do_execsql_test json-10.85 {
SELECT json_valid('" \t "');
} {1}
do_execsql_test json-10.86.0 {
SELECT json_valid('" \u "');
} {0}
do_execsql_test json-10.86.1 {
SELECT json_valid('" \ua "');
} {0}
do_execsql_test json-10.86.2 {
SELECT json_valid('" \uab "');
} {0}
do_execsql_test json-10.86.3 {
SELECT json_valid('" \uabc "');
} {0}
do_execsql_test json-10.86.4 {
SELECT json_valid('" \uabcd "');
} {1}
do_execsql_test json-10.86.5 {
SELECT json_valid('" \uFEDC "');
} {1}
do_execsql_test json-10.86.6 {
SELECT json_valid('" \u1234 "');
} {1}
do_execsql_test json-10.87 {
SELECT json_valid('" \v "');
} {0}
do_execsql_test json-10.88 {
SELECT json_valid('" \w "');
} {0}
do_execsql_test json-10.89 {
SELECT json_valid('" \x "');
} {0}
do_execsql_test json-10.90 {
SELECT json_valid('" \y "');
} {0}
do_execsql_test json-10.91 {
SELECT json_valid('" \z "');
} {0}
do_execsql_test json-10.92 {
SELECT json_valid('" \{ "');
} {0}
do_execsql_test json-10.93 {
SELECT json_valid('" \| "');
} {0}
do_execsql_test json-10.94 {
SELECT json_valid('" \} "');
} {0}
do_execsql_test json-10.95 {
SELECT json_valid('" \~ "');
} {0}
finish_test
+37
View File
@@ -255,5 +255,42 @@ do_catchsql_test 11.8 {
SELECT * FROM t11 WHERE (a,a) IS NOT 1;
} {1 {row value misused}}
# 2016-10-27: https://www.sqlite.org/src/tktview/fef4bb4bd9185ec8f
# Incorrect result from a LEFT JOIN with a row-value constraint
#
do_execsql_test 12.1 {
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a,b); INSERT INTO t1 VALUES(1,2);
DROP TABLE IF EXISTS t2;
CREATE TABLE t2(x,y); INSERT INTO t2 VALUES(3,4);
SELECT *,'x' FROM t1 LEFT JOIN t2 ON (a,b)=(x,y);
} {1 2 {} {} x}
foreach {tn sql} {
0 "SELECT (1,2) AS x WHERE x=3"
1 "SELECT (1,2) BETWEEN 1 AND 2"
2 "SELECT 1 BETWEEN (1,2) AND 2"
3 "SELECT 2 BETWEEN 1 AND (1,2)"
4 "SELECT (1,2) FROM (SELECT 1) ORDER BY 1"
5 "SELECT (1,2) FROM (SELECT 1) GROUP BY 1"
} {
do_catchsql_test 13.$tn $sql {1 {row value misused}}
}
do_execsql_test 14.0 {
CREATE TABLE t12(x);
INSERT INTO t12 VALUES(2), (4);
}
do_execsql_test 14.1 "SELECT 1 WHERE (2,2) BETWEEN (1,1) AND (3,3)" 1
do_execsql_test 14.2 "SELECT CASE (2,2) WHEN (1, 1) THEN 2 ELSE 1 END" 1
do_execsql_test 14.3 "SELECT CASE (SELECT 2,2) WHEN (1, 1) THEN 2 ELSE 1 END" 1
do_execsql_test 14.4 "SELECT 1 WHERE (SELECT 2,2) BETWEEN (1,1) AND (3,3)" 1
do_execsql_test 14.5 "SELECT 1 FROM t12 WHERE (x,1) BETWEEN (1,1) AND (3,3)" 1
do_execsql_test 14.6 {
SELECT 1 FROM t12 WHERE (1,x) BETWEEN (1,1) AND (3,3)
} {1 1}
finish_test
+14
View File
@@ -202,5 +202,19 @@ foreach {tn idx} {
#-------------------------------------------------------------------------
# 2016-11-17. Query flattening in a vector SELECT on the RHS of an IN
# operator. Ticket https://www.sqlite.org/src/info/da7841375186386c
#
do_execsql_test 5.0 {
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
CREATE TABLE T1(a TEXT);
INSERT INTO T1(a) VALUES ('aaa');
CREATE TABLE T2(a TEXT PRIMARY KEY,n INT);
INSERT INTO T2(a, n) VALUES('aaa',0);
SELECT * FROM T2
WHERE (a,n) IN (SELECT T1.a, V.n FROM T1, (SELECT * FROM (SELECT 0 n)) V);
} {aaa 0}
finish_test
+39
View File
@@ -14,6 +14,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix vacuum5
# If the VACUUM statement is disabled in the current build, skip all
# the tests in this file.
@@ -111,4 +112,42 @@ do_catchsql_test vacuum5-2.0 {
VACUUM olaf;
} {1 {unknown database olaf}}
#-------------------------------------------------------------------------
# Test that a temp file is opened as part of VACUUM.
#
if {$::TEMP_STORE<3 && [permutation]!="inmemory_journal"} {
db close
testvfs tvfs
tvfs filter xOpen
tvfs script open_cb
forcedelete test.db
set ::openfiles [list]
proc open_cb {method args} {
lappend ::openfiles [file tail [lindex $args 0]]
}
sqlite3 db test.db -vfs tvfs
do_execsql_test 3.0 {
PRAGMA temp_store = file;
PRAGMA page_size = 1024;
PRAGMA cache_size = 50;
CREATE TABLE t1(i INTEGER PRIMARY KEY, j UNIQUE);
WITH s(i) AS (
VALUES(1) UNION ALL SELECT i+1 FROM s WHERE i<1000
)
INSERT INTO t1 SELECT NULL, randomblob(100) FROM s;
}
do_execsql_test 3.1 { VACUUM }
db close
tvfs delete
do_test 3.2 {
lrange $::openfiles 0 4
} {test.db test.db-journal test.db-journal {} test.db-journal}
}
finish_test
+77
View File
@@ -337,4 +337,81 @@ do_searchcount_test 6.6.4 {
SELECT c FROM x1 WHERE b=6 OR c=11 OR a=1
} {7 11 3 search 7}
#-------------------------------------------------------------------------
#
do_execsql_test 7.0 {
CREATE TABLE y1(a, b);
CREATE TABLE y2(x, y);
CREATE INDEX y2xy ON y2(x, y);
INSERT INTO y1 VALUES(1, 1);
INSERT INTO y2 VALUES(3, 3);
}
do_execsql_test 7.1 {
SELECT * FROM y1 LEFT JOIN y2 ON ((x=1 AND y=b) OR (x=2 AND y=b))
} {1 1 {} {}}
do_execsql_test 7.3 {
CREATE TABLE foo (Id INTEGER PRIMARY KEY, fa INTEGER, fb INTEGER);
CREATE TABLE bar (Id INTEGER PRIMARY KEY, ba INTEGER, bb INTEGER);
INSERT INTO foo VALUES(1, 1, 1);
INSERT INTO foo VALUES(2, 1, 2);
INSERT INTO foo VALUES(3, 1, 3);
INSERT INTO foo VALUES(4, 1, 4);
INSERT INTO foo VALUES(5, 1, 5);
INSERT INTO foo VALUES(6, 1, 6);
INSERT INTO foo VALUES(7, 1, 7);
INSERT INTO foo VALUES(8, 1, 8);
INSERT INTO foo VALUES(9, 1, 9);
INSERT INTO bar VALUES(NULL, 1, 1);
INSERT INTO bar VALUES(NULL, 2, 2);
INSERT INTO bar VALUES(NULL, 3, 3);
INSERT INTO bar VALUES(NULL, 1, 4);
INSERT INTO bar VALUES(NULL, 2, 5);
INSERT INTO bar VALUES(NULL, 3, 6);
INSERT INTO bar VALUES(NULL, 1, 7);
INSERT INTO bar VALUES(NULL, 2, 8);
INSERT INTO bar VALUES(NULL, 3, 9);
}
do_execsql_test 7.4 {
SELECT
bar.Id, bar.ba, bar.bb, foo.fb
FROM foo LEFT JOIN bar
ON (bar.ba = 1 AND bar.bb = foo.fb)
OR (bar.ba = 5 AND bar.bb = foo.fb);
} {
1 1 1 1
{} {} {} 2
{} {} {} 3
4 1 4 4
{} {} {} 5
{} {} {} 6
7 1 7 7
{} {} {} 8
{} {} {} 9
}
do_execsql_test 7.5 {
CREATE INDEX idx_bar ON bar(ba, bb);
SELECT
bar.Id, bar.ba, bar.bb, foo.fb
FROM foo LEFT JOIN bar
ON (bar.ba = 1 AND bar.bb = foo.fb)
OR (bar.ba = 5 AND bar.bb = foo.fb);
} {
1 1 1 1
{} {} {} 2
{} {} {} 3
4 1 4 4
{} {} {} 5
{} {} {} 6
7 1 7 7
{} {} {} 8
{} {} {} 9
}
finish_test
+1 -1
View File
@@ -268,7 +268,7 @@ REM
IF DEFINED TCLSH_CMD (
SET TCLSH_FILE=%TCLSH_CMD%
) ELSE (
SET TCLSH_FILE=tclsh85.exe
SET TCLSH_FILE=tclsh.exe
)
FOR %%T IN (%TCLSH_FILE%) DO (
+1 -1
View File
@@ -77,7 +77,7 @@
# command prompt:
#
# CD /D C:\dev\sqlite\core
# tclsh85 tool\mkvsix.tcl C:\Temp
# tclsh tool\mkvsix.tcl C:\Temp
#
# In the example above, "C:\dev\sqlite\core" represents the root of the source
# tree for SQLite and "C:\Temp" represents the top-level directory containing