Compare commits

...

5 Commits

Author SHA1 Message Date
drh 935f96de1f Add a single test case to fts4unicode.test to verify that title-case
maps to lower case.

FossilOrigin-Name: 46f7c9301eae7a4d80a5282aa8538a500639755b
2013-01-26 19:26:11 +00:00
drh 54319fad68 Version 3.7.15.2 release candidate
FossilOrigin-Name: c0e09560d26f0a6456be9dd3447f5311eb4f238f
2013-01-09 11:53:05 +00:00
drh 66bebacaad Fix an over-aggressive optimization of ORDER BY on a three-way join where the
second table is UNIQUE and the ORDER BY occurs on the third table.
Ticket [598f5f7596b0557].

FossilOrigin-Name: 3d0609c958040d049b86f69d750ffcef764417df
2013-01-09 11:44:20 +00:00
drh 308be2d0ae Version 3.7.15.1
FossilOrigin-Name: 6b85b767d0ff7975146156a99ad673f2c1a23318
2012-12-19 20:39:10 +00:00
drh be8c95ef6e Backport to the 3.7.15 branch
the fix to the segfault problem of ticket [a7b7803e8d1e869] which involved
the use of "AS" named result columns as logical terms of the WHERE clause.
Also, change the version number to 3.7.15.1.

FossilOrigin-Name: bae528f486f51d0516c3ff2a983cb2e61a6a173f
2012-12-19 17:10:16 +00:00
7 changed files with 121 additions and 37 deletions
+1 -1
View File
@@ -1 +1 @@
3.7.15
3.7.15.2
Vendored
+11 -11
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.62 for sqlite 3.7.15.
# Generated by GNU Autoconf 2.62 for sqlite 3.7.15.2.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
PACKAGE_VERSION='3.7.15'
PACKAGE_STRING='sqlite 3.7.15'
PACKAGE_VERSION='3.7.15.2'
PACKAGE_STRING='sqlite 3.7.15.2'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -1484,7 +1484,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.7.15 to adapt to many kinds of systems.
\`configure' configures sqlite 3.7.15.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1549,7 +1549,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sqlite 3.7.15:";;
short | recursive ) echo "Configuration of sqlite 3.7.15.2:";;
esac
cat <<\_ACEOF
@@ -1665,7 +1665,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sqlite configure 3.7.15
sqlite configure 3.7.15.2
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1679,7 +1679,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.7.15, which was
It was created by sqlite $as_me 3.7.15.2, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -14033,7 +14033,7 @@ exec 6>&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.7.15, which was
This file was extended by sqlite $as_me 3.7.15.2, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14086,7 +14086,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
sqlite config.status 3.7.15
sqlite config.status 3.7.15.2
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -14519,7 +14519,8 @@ $debug ||
if test -n "$CONFIG_FILES"; then
ac_cr=' '
ac_cr='
'
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
ac_cs_awk_cr='\\r'
@@ -15754,4 +15755,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+11 -13
View File
@@ -1,12 +1,12 @@
C Version\s3.7.15
D 2012-12-12T13:36:53.477
C Add\sa\ssingle\stest\scase\sto\sfts4unicode.test\sto\sverify\sthat\stitle-case\nmaps\sto\slower\scase.
D 2013-01-26T19:26:11.931
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 690d441a758cbffd13e814dc2724a721a6ebd400
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F Makefile.msc 5a3b6f34d263b01f8b798c291fac1529fd650308
F Makefile.vxworks b18ad88e9a8c6a001f5cf4a389116a4f1a7ab45f
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
F VERSION edab4af5a4623f8198833ea481ce98ab53750a8d
F VERSION b5fc9136ddbcdd63702e99fea1b4e83960f52006
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
F addopcodes.awk 17dc593f791f874d2c23a0f9360850ded0286531
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
@@ -15,7 +15,7 @@ F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
F config.h.in 0921066a13130082764ab4ab6456f7b5bebe56de
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
F configure 252992f6588107ebd5d17c956d90cf7484580c6f x
F configure a417189892a5a3c54a73ac96583e3671bddc8db7 x
F configure.ac 81c43d151d0b0e406be056394cc9ff4cb3fd0444
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/lemon.html 334dbf6621b8fb8790297ec1abf3cfa4621709d1
@@ -250,7 +250,7 @@ F src/vtab.c b05e5f1f4902461ba9f5fc49bb7eb7c3a0741a83
F src/wal.c f5c7b5027d0ed0e9bc9afeb4a3a8dfea762ec7d2
F src/wal.h 29c197540b19044e6cd73487017e5e47a1d3dac6
F src/walker.c 3d75ba73de15e0f8cd0737643badbeb0e002f07b
F src/where.c 53b991af50dab230b319b098bcb90fc7cd82da47
F src/where.c 613a89f1c9cf965b66e9d90f7f3e7a870596ac80
F test/8_3_names.test 631ea964a3edb091cf73c3b540f6bcfdb36ce823
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
@@ -503,7 +503,7 @@ F test/fts4langid.test 24a6e41063b416bbdf371ff6b4476fa41c194aa7
F test/fts4merge.test c424309743fdd203f8e56a1f1cd7872cd66cc0ee
F test/fts4merge2.test 5faa558d1b672f82b847d2a337465fa745e46891
F test/fts4merge3.test aab02a09f50fe6baaddc2e159c3eabc116d45fc7
F test/fts4unicode.test aad033abdcfa0f87ce5f56468f59fdf2a0acbcef
F test/fts4unicode.test 25ccad45896f8e50f6a694cff738a35f798cdb40
F test/full.test 6b3c8fb43c6beab6b95438c1675374b95fab245d
F test/func.test 0d89043dab9a8853358d14c68e028ee0093bf066
F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
@@ -783,6 +783,7 @@ F test/tkt-8454a207b9.test c583a9f814a82a2b5ba95207f55001c9f0cd816c
F test/tkt-91e2e8ba6f.test 08c4f94ae07696b05c9b822da0b4e5337a2f54c5
F test/tkt-94c04eaadb.test fa9c71192f7e2ea2d51bf078bc34e8da6088bf71
F test/tkt-9d68c883.test 458f7d82a523d7644b54b497c986378a7d8c8b67
F test/tkt-a7b7803e.test 159ef554234fa1f9fb318c751b284bd1cf858da4
F test/tkt-b1d3a2e531.test 610ef582413171b379652663111b1f996d9f8f78
F test/tkt-b351d95f9.test d14a503c414c5c58fdde3e80f9a3cfef986498c0
F test/tkt-b72787b1.test a95e8cdad0b98af1853ac7f0afd4ab27b77bf5f3
@@ -1025,10 +1026,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
P 81d9ee0f0df7f283e69ba1c2845339ea3318cd66
R 6da93546e03c634583a9df9f228276ed
T +bgcolor * #d0c0ff
T +sym-release *
T +sym-version-3.7.15 *
U dan
Z c2b6a5ded805ac723be241fad17cc751
P c0e09560d26f0a6456be9dd3447f5311eb4f238f
R 3e0c5cc4b9c96b0e0609f8d891db3502
U drh
Z 5d42eca2a5a6e0b7349db0e503335417
+1 -1
View File
@@ -1 +1 @@
cd0b37c52658bfdf992b1e3dc467bae1835a94ae
46f7c9301eae7a4d80a5282aa8538a500639755b
+4 -3
View File
@@ -403,7 +403,7 @@ static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
}
pTerm = &pWC->a[idx = pWC->nTerm++];
pTerm->pExpr = p;
pTerm->pExpr = sqlite3ExprSkipCollate(p);
pTerm->wtFlags = wtFlags;
pTerm->pWC = pWC;
pTerm->iParent = -1;
@@ -1188,7 +1188,8 @@ static void exprAnalyze(
}
pTerm = &pWC->a[idxTerm];
pMaskSet = pWC->pMaskSet;
pExpr = sqlite3ExprSkipCollate(pTerm->pExpr);
pExpr = pTerm->pExpr;
assert( pExpr->op!=TK_AS && pExpr->op!=TK_COLLATE );
prereqLeft = exprTableUsage(pMaskSet, pExpr->pLeft);
op = pExpr->op;
if( op==TK_IN ){
@@ -3269,7 +3270,7 @@ static void bestBtreeIndex(WhereBestIdx *p){
pc.plan.nOBSat = isSortingIndex(p, pProbe, iCur, &bRev);
WHERETRACE((" --> after isSortingIndex: bRev=%d nOBSat=%d\n",
bRev, pc.plan.nOBSat));
if( nPriorSat<pc.plan.nOBSat || (pc.plan.wsFlags & WHERE_UNIQUE)!=0 ){
if( nPriorSat<pc.plan.nOBSat || (pc.plan.wsFlags & WHERE_ALL_UNIQUE)!=0 ){
pc.plan.wsFlags |= WHERE_ORDERED;
}
if( nOrderBy==pc.plan.nOBSat ){
+9 -8
View File
@@ -44,12 +44,12 @@ proc do_unicode_token_test3 {tn args} {
}
do_unicode_token_test 1.0 {a B c D} {0 a a 1 b B 2 c c 3 d D}
do_unicode_token_test 1.1 {Ä Ö Ü} {0 ä Ä 1 ö Ö 2 ü Ü}
do_unicode_token_test 1.2 {xÄx xÖx xÜx} {0 xäx xÄx 1 xöx xÖx 2 xüx xÜx}
do_unicode_token_test 1.1 {Ä Ö Ü} {0 ä Ä 1 ö Ö 2 ü Ü}
do_unicode_token_test 1.2 {xÄx xÖx xÜx} {0 xäx xÄx 1 xöx xÖx 2 xüx xÜx}
# 0x00DF is a small "sharp s". 0x1E9E is a capital sharp s.
do_unicode_token_test 1.3 "\uDF" "0 \uDF \uDF"
do_unicode_token_test 1.4 "\u1E9E" "0 ß \u1E9E"
do_unicode_token_test 1.4 "\u1E9E" "0 ß \u1E9E"
do_unicode_token_test 1.5 "\u1E9E" "0 \uDF \u1E9E"
do_unicode_token_test 1.6 "The quick brown fox" {
@@ -60,12 +60,15 @@ do_unicode_token_test 1.7 "The\u00bfquick\u224ebrown\u2263fox" {
}
do_unicode_token_test2 1.8 {a B c D} {0 a a 1 b B 2 c c 3 d D}
do_unicode_token_test2 1.9 {Ä Ö Ü} {0 a Ä 1 o Ö 2 u Ü}
do_unicode_token_test2 1.10 {xÄx xÖx xÜx} {0 xax xÄx 1 xox xÖx 2 xux xÜx}
do_unicode_token_test2 1.9 {Ä Ö Ü} {0 a Ä 1 o Ö 2 u Ü}
do_unicode_token_test2 1.10 {xÄx xÖx xÜx} {0 xax xÄx 1 xox xÖx 2 xux xÜx}
# Check that diacritics are removed if remove_diacritics=1 is specified.
# And that they do not break tokens.
do_unicode_token_test2 1.10 "xx\u0301xx" "0 xxxx xx\u301xx"
do_unicode_token_test2 1.11 "xx\u0301xx" "0 xxxx xx\u301xx"
# Title-case mappings work
do_unicode_token_test 1.12 "\u01c5" "0 \u01c6 \u01c5"
#-------------------------------------------------------------------------
#
@@ -383,5 +386,3 @@ foreach T $tokenizers {
finish_test
+84
View File
@@ -0,0 +1,84 @@
# 2012 December 19
#
# 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. Specifically,
# it tests that ticket [a7b7803e8d1e8699cd8a460a38133b98892d2e17] has
# been fixed.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/lock_common.tcl
source $testdir/malloc_common.tcl
do_test tkt-a7b7803e.1 {
db eval {
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(0,'first'),(99,'fuzzy');
SELECT (t1.a==0) AS x, b
FROM t1
WHERE a=0 OR x;
}
} {1 first}
do_test tkt-a7b7803e.2 {
db eval {
SELECT a, (t1.b='fuzzy') AS x
FROM t1
WHERE x
}
} {99 1}
do_test tkt-a7b7803e.3 {
db eval {
SELECT (a=99) AS x, (t1.b='fuzzy') AS y, *
FROM t1
WHERE x AND y
}
} {1 1 99 fuzzy}
do_test tkt-a7b7803e.4 {
db eval {
SELECT (a=99) AS x, (t1.b='first') AS y, *
FROM t1
WHERE x OR y
ORDER BY a
}
} {0 1 0 first 1 0 99 fuzzy}
do_test tkt-a7b7803e.5 {
db eval {
SELECT (M.a=99) AS x, M.b, (N.b='first') AS y, N.b
FROM t1 M, t1 N
WHERE x OR y
ORDER BY M.a, N.a
}
} {0 first 1 first 1 fuzzy 1 first 1 fuzzy 0 fuzzy}
do_test tkt-a7b7803e.6 {
db eval {
SELECT (M.a=99) AS x, M.b, (N.b='first') AS y, N.b
FROM t1 M, t1 N
WHERE x AND y
ORDER BY M.a, N.a
}
} {1 fuzzy 1 first}
do_test tkt-a7b7803e.7 {
db eval {
SELECT (M.a=99) AS x, M.b, (N.b='first') AS y, N.b
FROM t1 M JOIN t1 N ON x AND y
ORDER BY M.a, N.a
}
} {1 fuzzy 1 first}
do_test tkt-a7b7803e.8 {
db eval {
SELECT (M.a=99) AS x, M.b, (N.b='first') AS y, N.b
FROM t1 M JOIN t1 N ON x
ORDER BY M.a, N.a
}
} {1 fuzzy 1 first 1 fuzzy 0 fuzzy}
finish_test