-C Better\sresolution\sof\sORDER\sBY\sterms\sin\scompound\squeries.\s\sCandidate\nsolution\sfor\sticket\s#2822.\s\sNeeds\smore\stesting\sand\sdocumentation\nbefore\sgoing\sfinal.\s(CVS\s4602)
-D 2007-12-08T21:10:20
+C Fix\scompilation/testing\swith\sOMIT_SUBQUERY\sdefined.\sTicket\s#2828.\s(CVS\s4603)
+D 2007-12-10T05:03:47
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in 30789bf70614bad659351660d76b8e533f3340e9
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/date.c 49c5a6d2de6c12000905b4d36868b07d3011bbf6
F src/delete.c 034b87768c4135a22038a86a205f9d2d5f68a143
F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
-F src/expr.c 8c32309dedd13b8ab220348eb90dc221ee0a5174
+F src/expr.c 7c8e3295ddeb835ed081b8573caaf8c3fd7c9f9c
F src/func.c a8548fbc55373505c077cfb57baa43c1e48b71d2
F src/hash.c 45a7005aac044b6c86bd7e49c44bc15d30006d6c
F src/hash.h 031cd9f915aff27e12262cb9eb570ac1b8326b53
F test/icu.test e6bfae7f625c88fd14df6f540fe835bdfc1e4329
F test/in.test 369cb2aa1eab02296b4ec470732fe8c131260b1d
F test/in2.test b1f447f4f0f67e9f83ff931e7e2e30873f9ea055
-F test/in3.test ec1b3a9f478835954a0ecab1facd9198c62459bf
+F test/in3.test e335959db24d71d6cfdff9553c90ce2b56fb978c
F test/incrblob.test 602dbfa956904d6e58c45635b58850ad0f02d927
F test/incrblob_err.test 5273097dc7c97f9b7008423a6ffd5c80d21923cb
-F test/incrvacuum.test 985bc94a7ff544db09aec3a0c93c779280da9415
+F test/incrvacuum.test 45ac35d947031526d35fbe70a44f131dedc730b1
F test/incrvacuum2.test a958e378c193c4012cb3787804d863487f1dfad1
F test/incrvacuum_ioerr.test cb331403b8dea3c5bae6163861ff25037b0df56a
F test/index.test e65df12bed94b2903ee89987115e1578687e9266
F test/insert2.test 5a20e1ace5fa0800b58d28284212290189b49aed
F test/insert3.test 9a4ef3526fd3cca8b05278020ec3100448b4c677
F test/insert4.test 6919ddacd79c2cfeb9785b0f84217f9cb14853b5
-F test/insert5.test e8d5ba31283db5b0315ada9774dd99b6e9fe2122
+F test/insert5.test e41e417a4f055c25d6c2b9847c775bf357df2390
F test/interrupt.test 81555fb0f8179bb2d0dc7151fd75428223f93cf2
F test/intpkey.test 537669fd535f62632ca64828e435b9e54e8d677f
F test/io.test 80a7a7f1a2792e037d447b03e8c22ee1f6eaf339
F test/safety.test 4a06934e45d03b8b50ebcd8d174eb0367d2fd851
F test/schema.test a8b000723375fd42c68d310091bdbd744fde647c
F test/schema2.test 35e1c9696443d6694c8980c411497c2b5190d32e
-F test/select1.test d091e1c8ad23c9bd6d7d55d2dd16b08e68e16f63
+F test/select1.test 79784038f0e7df66bb420e149c6fb91e61e11fb7
F test/select2.test f3c2678c3a9f3cf08ec4988a3845bda64be6d9e3
F test/select3.test 47439f28862489626b483b0c718cfb0562e6f6d5
F test/select4.test 4192e6c712194d53b4b77f094eb9d880b8d5ac0e
F test/tkt2391.test ab7a11be7402da8b51a5be603425367aa0684567
F test/tkt2409.test 20318bf6acd9b834b4420548f277b8e3a7420cd1
F test/tkt2450.test 77ed94863f2049c1420288ddfea2d41e5e0971d6
-F test/tkt2640.test c513e7992a602a87ef3a2cc9ca1cba4146924e9b
+F test/tkt2640.test 6e81ebd7d986ff1e9ed570c4c92ca0aa2b3a5848
F test/tkt2643.test 3f3ebb743da00d4fed4fcf6daed92a0e18e57813
-F test/tkt2686.test 8815c3eeae7c8363bd7c2889349ec39e8bc8000d
+F test/tkt2686.test 3022db0eee8ecf501f516557c77ef1c4039399cd
F test/tkt2767.test 6b02308d553d194f329a469bf5c157fe724738d4
F test/tkt2817.test 709a2201a5590bf56cb97f6fb168a62282203fd1
F test/tkt2820.test 017fdee33aaef7abc092beab6088816f1942304b
F test/vacuum2.test bbd8412d74e8da5657ac4b43d05097bd6d9d749e
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
F test/view.test 7e15fa1ba3267ddaa9ae96b6daf519f23f95b43e
-F test/vtab1.test 3573ad5045c44e8e2d2b6451122bcf2ee2a4f688
+F test/vtab1.test 9e0d27cf0a9ed38a268334a18c5098047c3b2200
F test/vtab2.test 94bb3bf691ac10e34cf7dad46b1cf94b861d513c
F test/vtab3.test f38d6d7d19f08bffdadce4d5b8cba078f8118587
F test/vtab4.test a9d7104d41a787754a734740d7aa61c807a69f87
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
F test/vtab_shared.test d631d1f820c38c18939d53aab1fc35db5f0a8094
F test/where.test 5ff4a1bda6352b73354faf1a97706bbfa0d47dfe
-F test/where2.test 9bbf1cc675730954047d663e4c0dc5d4c9669ca4
+F test/where2.test 7012c0ad022a54430dd22c98288d3f4d6599dbcf
F test/where3.test 0a30fe9808b0fa01c46d0fcf4fac0bf6cf75bb30
-F test/where4.test 1b1cd72d5f205ce34d5a31f3c4918f833e5e6a63
+F test/where4.test e9b9e2f2f98f00379e6031db6a6fca29bae782a2
F test/where5.test fdf66f96d29a064b63eb543e28da4dfdccd81ad2
F test/zeroblob.test 7d1854ea79d048e023e5f2e38106a7e99a17435c
F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 4be8e6765bf8bc48747b2542f2ed77066fb9dcb9
-R adfe92f0c9624e9b76a7c1a73370b4bd
-U drh
-Z af9ac541bec9448e79940f97cacc1ce8
+P 62a78d212c53a9cb1759d03134653a75f3a086b6
+R 68268cf2b01556c7a9e0f2599b467528
+U danielk1977
+Z 01b288bc59bf6c1f76e93bf4213ad9d1
-62a78d212c53a9cb1759d03134653a75f3a086b6
\ No newline at end of file
+0b34a18651764e650faba983be8593992ab2f4a9
\ No newline at end of file
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
-** $Id: expr.c,v 1.317 2007/11/29 17:05:18 danielk1977 Exp $
+** $Id: expr.c,v 1.318 2007/12/10 05:03:47 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
** to be unique - either because it is an INTEGER PRIMARY KEY or it
** is unique by virtue of a constraint or implicit index.
*/
+#ifndef SQLITE_OMIT_SUBQUERY
int sqlite3FindInIndex(Parse *pParse, Expr *pX, int mustBeUnique){
Select *p;
int eType = 0;
}
return eType;
}
+#endif
/*
** Generate code for scalar subqueries used as an expression
#
# <value> IN (SELECT <column> FROM <table>)
#
-# $Id: in3.test,v 1.1 2007/11/29 17:05:18 danielk1977 Exp $
+# $Id: in3.test,v 1.2 2007/12/10 05:03:48 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+ifcapable !subquery {
+ finish_test
+ return
+}
+
# Return the number of OpenEphemeral instructions used in the
# implementation of the sql statement passed as a an argument.
#
# Note: There are also some tests for incremental vacuum and IO
# errors in incrvacuum_ioerr.test.
#
-# $Id: incrvacuum.test,v 1.14 2007/09/01 10:01:13 danielk1977 Exp $
+# $Id: incrvacuum.test,v 1.15 2007/12/10 05:03:48 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
}
]
+# If this build omit's subqueries, step 2 in the above list will not
+# work. Replace it with "" in this case.
+#
+ifcapable !subquery { lset TestScriptList 2 "" }
+
# Compare the contents of databases $A and $B.
#
proc compare_dbs {A B tname} {
# The tests in this file ensure that a temporary table is used
# when required by an "INSERT INTO ... SELECT ..." statement.
#
-# $Id: insert5.test,v 1.1 2007/11/23 15:02:19 drh Exp $
+# $Id: insert5.test,v 1.2 2007/12/10 05:03:48 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+ifcapable !subquery {
+ finish_test
+ return
+}
+
# Return true if the compilation of the sql passed as an argument
# includes the opcode OpenEphemeral. An "INSERT INTO ... SELECT"
# statement includes such an opcode if a temp-table is used
# This file implements regression tests for SQLite library. The
# focus of this file is testing the SELECT statement.
#
-# $Id: select1.test,v 1.55 2007/12/08 21:10:20 drh Exp $
+# $Id: select1.test,v 1.56 2007/12/10 05:03:48 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
} {1 {ORDER BY term number 1 does not match any result column}}
# Ticket #2296
+ifcapable subquery {
do_test select1-6.20 {
execsql {
CREATE TABLE t6(a TEXT, b TEXT);
ORDER BY a;
}
} {b d}
+}
} ;#ifcapable compound
#
# This file is to test that ticket #2640 has been fixed.
#
-# $Id: tkt2640.test,v 1.1 2007/09/12 15:41:01 drh Exp $
+# $Id: tkt2640.test,v 1.2 2007/12/10 05:03:48 danielk1977 Exp $
#
# The problem in ticket #2640 was that the query optimizer was
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+ifcapable !subquery {
+ finish_test
+ return
+}
+
do_test tkt2640-1.1 {
execsql {
CREATE TABLE persons(person_id, name);
#
# This file is to test that ticket #2686 has been fixed.
#
-# $Id: tkt2686.test,v 1.1 2007/10/04 18:52:15 drh Exp $
+# $Id: tkt2686.test,v 1.2 2007/12/10 05:03:48 danielk1977 Exp $
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+ifcapable !subquery {
+ finish_test
+ return
+}
+
db eval {
PRAGMA page_size=1024;
PRAGMA max_page_count=50;
# This file implements regression tests for SQLite library. The
# focus of this file is creating and dropping virtual tables.
#
-# $Id: vtab1.test,v 1.48 2007/11/05 05:12:53 danielk1977 Exp $
+# $Id: vtab1.test,v 1.49 2007/12/10 05:03:48 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set echo_module
} [list xBestIndex {SELECT rowid, * FROM 'treal'} \
xFilter {SELECT rowid, * FROM 'treal'}]
+ifcapable subquery {
+# The echo module uses a subquery internally to implement the MATCH operator.
do_test vtab1-3.14 {
set echo_module ""
execsql {
xFilter \
{SELECT rowid, * FROM 'treal' WHERE b LIKE (SELECT '%'||?||'%')} \
string ]
+}; #ifcapable subquery
#----------------------------------------------------------------------
# Test case vtab1-3 test table scans and the echo module's
# focus of this file is testing the use of indices in WHERE clauses
# based on recent changes to the optimizer.
#
-# $Id: where2.test,v 1.12 2007/09/12 17:01:45 danielk1977 Exp $
+# $Id: where2.test,v 1.13 2007/12/10 05:03:48 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
SELECT * FROM t2249b CROSS JOIN t2249a WHERE a='hello' OR b=a;
}
} {123 0123 nosort t2249b {} t2249a {}}
-ifcapable explain {
+ifcapable explain&&subquery {
+ # These tests are not run if subquery support is not included in the
+ # build. This is because these tests test the "a = 1 OR a = 2" to
+ # "a IN (1, 2)" optimisation transformation, which is not enabled if
+ # subqueries and the IN operator is not available.
+ #
do_test where2-6.12 {
# In this case, the +b disables the affinity conflict and allows
# the OR optimization to be used again. The result is now an empty
SELECT * FROM t2249b CROSS JOIN t2249a WHERE a='hello' OR +b=a;
}
} {nosort t2249b {} {} sqlite_autoindex_t2249a_1}
-}
-ifcapable explain {
do_test where2-6.12.3 {
# In this case, the +b disables the affinity conflict and allows
# the OR optimization to be used again. The result is now an empty
SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE x.a=y.a
}
} {0123 0123 nosort x {} {} sqlite_autoindex_t2249a_1}
-ifcapable explain {
+ifcapable explain&&subquery {
+ # These tests are not run if subquery support is not included in the
+ # build. This is because these tests test the "a = 1 OR a = 2" to
+ # "a IN (1, 2)" optimisation transformation, which is not enabled if
+ # subqueries and the IN operator is not available.
+ #
do_test where2-6.21 {
queryplan {
SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE x.a=y.a OR y.a='hello'
SELECT count(*) FROM t10;
}
} 1000
- do_test where2-9.2 {
- count {
- SELECT * FROM t10 WHERE a=1 AND (b=2 OR b=3)
- }
- } {1 2 2 1 3 3 7}
+ ifcapable subquery {
+ do_test where2-9.2 {
+ count {
+ SELECT * FROM t10 WHERE a=1 AND (b=2 OR b=3)
+ }
+ } {1 2 2 1 3 3 7}
+ }
}
finish_test
# that IS NULL phrases are correctly optimized. But you can never
# have too many tests, so some other tests are thrown in as well.
#
-# $Id: where4.test,v 1.5 2007/09/12 17:01:45 danielk1977 Exp $
+# $Id: where4.test,v 1.6 2007/12/10 05:03:48 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# Ticket #2273. Problems with IN operators and NULLs.
#
+ifcapable subquery {
do_test where4-5.1 {
execsql {
CREATE TABLE t4(x,y,z,PRIMARY KEY(x,y));
}
} {{}}
+}; #ifcapable subquery
+
finish_test