8000 Snapshot of upstream SQLite 3.8.0.1 · magic-coder/sqlcipher@679f2be · GitHub
[go: up one dir, main page]

Skip to content

Commit 679f2be

Browse files
Snapshot of upstream SQLite 3.8.0.1
1 parent 7c0cc33 commit 679f2be

File tree

9 files changed

+142
-30
lines changed

9 files changed

+142
-30
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8.0
1+
3.8.0.1

configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.62 for sqlite 3.8.0.
3+
# Generated by GNU Autoconf 2.62 for sqlite 3.8.0.1.
44
#
55
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
66
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
743743
# Identity of this package.
744744
PACKAGE_NAME='sqlite'
745745
PACKAGE_TARNAME='sqlite'
746-
PACKAGE_VERSION='3.8.0'
747-
PACKAGE_STRING='sqlite 3.8.0'
746+
PACKAGE_VERSION='3.8.0.1'
747+
PACKAGE_STRING='sqlite 3.8.0.1'
748748
PACKAGE_BUGREPORT=''
749749

750750
# Factoring default headers for most tests.
@@ -1484,7 +1484,7 @@ if test "$ac_init_help" = "long"; then
14841484
# Omit some internal or obsolete options to make the list less imposing.
14851485
# This message is too long to be a string in the A/UX 3.1 sh.
14861486
cat <<_ACEOF
1487-
\`configure' configures sqlite 3.8.0 to adapt to many kinds of systems.
1487+
\`configure' configures sqlite 3.8.0.1 to adapt to many kinds of systems.
14881488
14891489
Usage: $0 [OPTION]... [VAR=VALUE]...
14901490
@@ -1549,7 +1549,7 @@ fi
15491549

15501550
if test -n "$ac_init_help"; then
15511551
case $ac_init_help in
1552-
short | recursive ) echo "Configuration of sqlite 3.8.0:";;
1552+
short | recursive ) echo "Configuration of sqlite 3.8.0.1:";;
15531553
esac
15541554
cat <<\_ACEOF
15551555
@@ -1665,7 +1665,7 @@ fi
16651665
test -n "$ac_init_help" && exit $ac_status
16661666
if $ac_init_version; then
16671667
cat <<\_ACEOF
1668-
sqlite configure 3.8.0
1668+
sqlite configure 3.8.0.1
16691669
generated by GNU Autoconf 2.62
16701670
16711671
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1679,7 +1679,7 @@ cat >config.log <<_ACEOF
16791679
This file contains any messages produced by compilers while
16801680
running configure, to aid debugging if configure makes a mistake.
16811681
1682-
It was created by sqlite $as_me 3.8.0, which was
1682+
It was created by sqlite $as_me 3.8.0.1, which was
16831683
generated by GNU Autoconf 2.62. Invocation command line was
16841684
16851685
$ $0 $@
@@ -14032,7 +14032,7 @@ exec 6>&1
1403214032
# report actual input values of CONFIG_FILES etc. instead of their
1403314033
# values after options handling.
1403414034
ac_log="
14035-
This file was extended by sqlite $as_me 3.8.0, which was
14035+
This file was extended by sqlite $as_me 3.8.0.1, which was
1403614036
generated by GNU Autoconf 2.62. Invocation command line was
1403714037
1403814038
CONFIG_FILES = $CONFIG_FILES
@@ -14085,7 +14085,7 @@ Report bugs to <bug-autoconf@gnu.org>."
1408514085
_ACEOF
1408614086
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1408714087
ac_cs_version="\\
14088-
sqlite config.status 3.8.0
14088+
sqlite config.status 3.8.0.1
1408914089
configured by $0, generated by GNU Autoconf 2.62,
1409014090
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
1409114091

manifest

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
C Version\s3.8.0
2-
D 2013-08-26T04:50:08.905
1+
C Version\s3.8.0.1
2+
D 2013-08-29T17:35:01.986
33
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
44
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
55
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
66
F Makefile.msc e9f41f89111627baaabd95cab4988b8d1c3e47c9
77
F Makefile.vxworks db21ed42a01d5740e656b16f92cb5d8d5e5dd315
88
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
9-
F VERSION f135b651727f978b7191bd6fa12c7fc1e13e13ac
9+
F VERSION 087a4ef56b220aeb0fbef8ae45871be9668cd970
1010
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
1111
F addopcodes.awk 17dc593f791f874d2c23a0f9360850ded0286531
1212
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
@@ -38,7 +38,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
3838
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
3939
F config.h.in 0921066a13130082764ab4ab6456f7b5bebe56de
4040
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
41-
F configure 27e9279a219b652bd1c53439353a5e5be70214b2 x
41+
F configure 9af276330ddd63041537a88323705690d02df76e x
4242
F configure.ac 81c43d151d0b0e406be056394cc9ff4cb3fd0444
4343
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
4444
F doc/lemon.html 334dbf6621b8fb8790297ec1abf3cfa4621709d1
@@ -155,7 +155,7 @@ F mptest/multiwrite01.test 499ad0310da8dff8e8f98d2e272fc2a8aa741b2e
155155
F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca
156156
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
157157
F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc
158-
F sqlite3.pc.in ae6f59a76e862f5c561eb32a380228a02afc3cad
158+
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
159159
F src/alter.c f8db986c03eb0bfb221523fc9bbb9d0b70de3168
160160
F src/analyze.c a33fcb0b3a399d966951feb9f32115106b3ecc2e
161161
F src/attach.c fea00cab11c854646a27641a263f5876569a51f9
@@ -217,7 +217,7 @@ F src/random.c 0b2dbc37fdfbfa6bd455b091dfcef5bdb32dba68
217217
F src/resolve.c 9d53899cc6e1f4ec0b4632d07e97d57827bf63b9
218218
F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
219219
F src/select.c 8b148eb851f384412aea57091659d14b369918ca
220-
F src/shell.c 1c317a4c96d61d8d9fdad9fd1811d9b10b8c7f57
220+
F src/shell.c 0fb2ce9876596e99ed64caffaec6c4bf224cb22d
221221
F src/sqlite.h.in bd1451ba1ab681022a53bccc3c39580ba094a3ff
222222
F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0
223223
F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc
@@ -290,7 +290,7 @@ F src/vtab.c 165ce0e797c2cd23badb104c9f2ae9042d6d942c
290290
F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
291291
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
292292
F src/walker.c 4fa43583d0a84b48f93b1e88f11adf2065be4e73
293-
F src/where.c 6e718c39d6b2964f15f6c96ce5938b4652e3538e
293+
F src/where.c a9ec7caba7697f152bd34853b98500dd54c4b240
294294
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
295295
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
296296
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
@@ -857,6 +857,7 @@ F test/tkt-868145d012.test a5f941107ece6a64410ca4755c6329b7eb57a356
857857
F test/tkt-91e2e8ba6f.test 08c4f94ae07696b05c9b822da0b4e5337a2f54c5
858858
F test/tkt-94c04eaadb.test fa9c71192f7e2ea2d51bf078bc34e8da6088bf71
859859
F test/tkt-9d68c883.test 458f7d82a523d7644b54b497c986378a7d8c8b67
860+
F test/tkt-9f2eb3abac.test 85bc63e749f050e6a61c8f9207f1eee65c9d3395
860861
F test/tkt-a7b7803e.test 159ef554234fa1f9fb318c751b284bd1cf858da4
861862
F test/tkt-b1d3a2e531.test 610ef582413171b379652663111b1f996d9f8f78
862863
F test/tkt-b351d95f9.test d14a503c414c5c58fdde3e80f9a3cfef986498c0
@@ -1047,7 +1048,7 @@ F test/where6.test 5da5a98cec820d488e82708301b96cb8c18a258b
10471048
F test/where7.test 5a4b0abc207d71da4deecd734ad8579e8dd40aa8
10481049
F test/where8.test 6f95896633cf2d307b5263145b942b7d33e837c6
10491050
F test/where8m.test da346596e19d54f0aba35ebade032a7c47d79739
1050-
F test/where9.test 9a7fda4a4512abc26a855e8b2b6572b200f6019b
1051+
F test/where9.test 167a89495715db4d6a7d1e6a1aadf934ddc06516
10511052
F test/whereA.test 4d253178d135ec46d1671e440cd8f2b916aa6e6b
10521053
F test/whereB.test 0def95db3bdec220a731c7e4bec5930327c1d8c5
10531054
F test/whereC.test d6f4ecd4fa2d9429681a5b22a25d2bda8e86ab8a
@@ -1105,10 +1106,9 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
11051106
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
11061107
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
11071108
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
1108-
P ed310201628cf79c0f57674ae7478ee6738b1c6e
1109-
R 5a6ead2576f296902c1b2ccbdf985254
1110-
T +bgcolor * #d0c0ff
1109+
P c5857808c0707baa30994dd6aa3b9c93a74c0073
1110+
R f09fdab74837e6353df38f5d2273681e
11111111
T +sym-release *
1112-
T +sym-version-3.8.0 *
1112+
T +sym-version-3.8.0.1 *
11131113
U drh
1114-
Z 16184cb835825e1de42c653d441df656
1114+
Z 3c028394a3a00a433c82a9881b010566

manifest.uuid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f64cd21e2e23ed7cff48f7dafa5e76adde9321c2
1+
352362bc01660edfbda08179d60f09e2038a2f49

sqlite3.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ includedir=@includedir@
77

88
Name: SQLite
99
Description: SQL database engine
10-
Version: @RELEASE@
10+
Version: @PACKAGE_VERSION@
1111
Libs: -L${libdir} -lsqlite3
1212
Libs.private: @LIBS@
1313
Cflags: -I${includedir}

src/shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,7 @@ static char *csv_read_one_field(CSVReader *p){
17171717
}
17181718
if( (c==cSep && pc==cQuote)
17191719
|| (c=='\n' && pc==cQuote)
1720-
|| (c=='\n' && pc=='\r' && p->n>2 && p->z[p->n-2]==cQuote)
1720+
|| (c=='\n' && pc=='\r' && p->n>=2 && p->z[p->n-2]==cQuote)
17211721
|| (c==EOF && pc==cQuote)
17221722
){
17231723
do{ p->n--; }while( p->z[p->n]!=cQuote );

src/where.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,8 +1205,10 @@ static int isMatchOfColumn(
12051205
** a join, then transfer the appropriate markings over to derived.
12061206
*/
12071207
static void transferJoinMarkings(Expr *pDerived, Expr *pBase){
1208-
pDerived->flags |= pBase->flags & EP_FromJoin;
1209-
pDerived->iRightJoinTable = pBase->iRightJoinTable;
1208+
if( pDerived ){
1209+
pDerived->flags |= pBase->flags & EP_FromJoin;
1210+
pDerived->iRightJoinTable = pBase->iRightJoinTable;
1211+
}
12101212
}
12111213

12121214
#if !defined(SQLITE_OMIT_OR_OPTIMIZATION) && !defined(SQLITE_OMIT_SUBQUERY)
@@ -1663,6 +1665,7 @@ static void exprAnalyze(
16631665
pNewExpr = sqlite3PExpr(pParse, ops[i],
16641666
sqlite3ExprDup(db, pExpr->pLeft, 0),
16651667
sqlite3ExprDup(db, pList->a[i].pExpr, 0), 0);
1668+
transferJoinMarkings(pNewExpr, pExpr);
16661669
idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);
16671670
testcase( idxNew==0 );
16681671
exprAnalyze(pSrc, pWC, idxNew);
@@ -1730,13 +1733,15 @@ static void exprAnalyze(
17301733
pNewExpr1 = sqlite3PExpr(pParse, TK_GE,
17311734
sqlite3ExprAddCollateToken(pParse,pNewExpr1,&sCollSeqName),
17321735
pStr1, 0);
1736+
transferJoinMarkings(pNewExpr1, pExpr);
17331737
idxNew1 = whereClauseInsert(pWC, pNewExpr1, TERM_VIRTUAL|TERM_DYNAMIC);
17341738
testcase( idxNew1==0 );
17351739
exprAnalyze(pSrc, pWC, idxNew1);
17361740
pNewExpr2 = sqlite3ExprDup(db, pLeft, 0);
17371741
pNewExpr2 = sqlite3PExpr(pParse, TK_LT,
17381742
sqlite3ExprAddCollateToken(pParse,pNewExpr2,&sCollSeqName),
17391743
pStr2, 0);
1744+
transferJoinMarkings(pNewExpr2, pExpr);
17401745
idxNew2 = whereClauseInsert(pWC, pNewExpr2, TERM_VIRTUAL|TERM_DYNAMIC);
17411746
testcase( idxNew2==0 );
17421747
exprAnalyze(pSrc, pWC, idxNew2);
@@ -5546,11 +5551,15 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){
55465551
pLoop->rRun = 33; /* 33==whereCost(10) */
55475552
}else{
55485553
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
5549-
if( pIdx->onError==OE_None || pIdx->pPartIdxWhere!=0 ) continue;
5554+
assert( pLoop->aLTermSpace==pLoop->aLTerm );
5555+
assert( ArraySize(pLoop->aLTermSpace)==4 );
5556+
if( pIdx->onError==OE_None
5557+
|| pIdx->pPartIdxWhere!=0
5558+
|| pIdx->nColumn>ArraySize(pLoop->aLTermSpace)
5559+
) continue;
55505560
for(j=0; j<pIdx->nColumn; j++){
55515561
pTerm = findTerm(pWC, iCur, pIdx->aiColumn[j], 0, WO_EQ, pIdx);
55525562
if( pTerm==0 ) break;
5553-
whereLoopResize(pWInfo->pParse->db, pLoop, j);
55545563
pLoop->aLTerm[j] = pTerm;
55555564
}
55565565
if( j!=pIdx->nColumn ) continue;

test/tkt-9f2eb3abac.test

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
# 2013 August 29
3+
#
4+
# The author disclaims copyright to this source code. In place of
5+
# a legal notice, here is a blessing:
6+
#
7+
# May you do good and not evil.
8+
# May you find forgiveness for yourself and forgive others.
9+
# May you share freely, never taking more than you give.
10+
#
11+
#***********************************************************************
12+
# This file implements regression tests for SQLite library.
13+
#
14+
15+
set testdir [file dirname $argv0]
16+
source $testdir/tester.tcl
17+
source $testdir/malloc_common.tcl
18+
set ::testprefix tkt-9f2eb3abac
19+
20+
do_execsql_test 1.1 {
21+
CREATE TABLE t1(a,b,c,d,e, PRIMARY KEY(a,b,c,d,e));
22+
SELECT * FROM t1 WHERE a=? AND b=? AND c=? AND d=? AND e=?;
23+
} {}
24+
25+
do_execsql_test 1.2 {
26+
CREATE TABLE "a" (
27+
"b" integer NOT NULL,
28+
"c" integer NOT NULL,
29+
PRIMARY KEY ("b", "c")
30+
);
31+
32+
CREATE TABLE "d" (
33+
"e" integer NOT NULL,
34+
"g" integer NOT NULL,
35+
"f" integer NOT NULL,
36+
"h" integer NOT NULL,
37+
"i" character(10) NOT NULL,
38+
"j" int,
39+
PRIMARY KEY ("e", "g", "f", "h")
40+
);
41+
42+
CREATE TABLE "d_to_a" (
43+
"f_e" integer NOT NULL,
44+
"f_g" integer NOT NULL,
45+
"f_f" integer NOT NULL,
46+
"f_h" integer NOT NULL,
47+
"t_b" integer NOT NULL,
48+
"t_c" integer NOT NULL,
49+
"r" character NOT NULL,
50+
"s" integer,
51+
PRIMARY KEY ("f_e", "f_g", "f_f", "f_h", "t_b", "t_c")
52+
);
53+
54+
INSERT INTO d (g, e, h, f, j, i) VALUES ( 1, 1, 1, 1, 1, 1 );
55+
INSERT INTO a (b, c) VALUES ( 1, 1 );
56+
INSERT INTO d_to_a VALUES (1, 1, 1, 1, 1, 1, 1, 1);
57+
58+
DELETE FROM d_to_a
59+
WHERE f_g = 1 AND f_e = 1 AND f_h = 1 AND f_f = 1 AND t_b = 1 AND t_c = 1;
60+
61+
SELECT * FROM d_to_a;
62+
} {}
63+
64+
faultsim_delete_and_reopen
65+
do_execsql_test 2.0 { CREATE TABLE t1(a,b,c,d,e, PRIMARY KEY(a,b,c,d,e)) }
66+
do_execsql_test 2.1 { CREATE TABLE t2(x) }
67+
faultsim_save_and_close
68+
69+
do_faultsim_test 3 -faults oom* -prep {
70+
faultsim_restore_and_reopen
71+
execsql { SELECT 1 FROM sqlite_master }
72+
} -body {
73+
execsql { SELECT * FROM t1,t2 WHERE a=? AND b=? AND c=? AND d=? AND e=? }
74+
} -test {
75+
faultsim_test_result {0 {}}
76+
}
77+
78+
finish_test
79+

test/where9.test

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,4 +951,28 @@ do_test where9-9.1 {
951951
}
952952
} {1 2 3 4 8 9}
953953

954+
# Fix for ticket [bc878246eafe0f52c519e29049b2fe4a99491b27]
955+
# Incorrect result when OR is used in a join to the right of a LEFT JOIN
956+
#
957+
do_test where9-10.1 {
958+
db eval {
959+
CREATE TABLE t101 (id INTEGER PRIMARY KEY);
960+
INSERT INTO t101 VALUES (1);
961+
SELECT * FROM t101 AS t0
962+
LEFT JOIN t101 AS t1 ON t1.id BETWEEN 10 AND 20
963+
JOIN t101 AS t2 ON (t2.id = t0.id OR (t2.id<>555 AND t2.id=t1.id));
964+
}
965+
} {1 {} 1}
966+
do_test where9-10.2 {
967+
db eval {
968+
CREATE TABLE t102 (id TEXT UNIQUE NOT NULL);
969+
INSERT INTO t102 VALUES ('1');
970+
SELECT * FROM t102 AS t0
971+
LEFT JOIN t102 AS t1 ON t1.id GLOB 'abc%'
972+
JOIN t102 AS t2 ON (t2.id = t0.id OR (t2.id<>555 AND t2.id=t1.id));
973+
}
974+
} {1 {} 1}
975+
976+
977+
954978
finish_test

0 commit comments

Comments
 (0)
0