-C Reduce\sthe\samount\sof\smemory\staken\sup\sby\sWAL\smmaped\sregions\sunder\sWindows.
-D 2010-09-03T04:29:31
+C Add\sa\sfew\smore\ssubquery\stests\sto\se_expr.test.
+D 2010-09-03T10:58:47
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in c599a15d268b1db2aeadea19df2adc3bf2eb6bee
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F test/descidx3.test fe720e8b37d59f4cef808b0bf4e1b391c2e56b6f
F test/diskfull.test 0cede7ef9d8f415d9d3944005c76be7589bb5ebb
F test/distinctagg.test 1a6ef9c87a58669438fc771450d7a72577417376
-F test/e_expr.test 1aef3ba4a140487cf5b452f04e261f26e99f9fe5
+F test/e_expr.test 164e87c1d7b40ceb47c57c3bffa384c81d009aa7
F test/e_fkey.test 6721a741c6499b3ab7e5385923233343c8f1ad05
F test/e_fts3.test 75bb0aee26384ef586165e21018a17f7cd843469
F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P f483be441323e1cb91516964cd6ab0edecad4366
-R fea23b14c42fedda7d16ff1cb4b9cee7
-U shaneh
-Z 0fd3f5ddcf6cc38ff6e323baec639592
+P f213e133f6e69b0edd73d96142014bdcab9dfe41
+R 4840eab4671662ef903de303cfd3b278
+U dan
+Z e60132511cfbf6157149a68a152e2582
# EVIDENCE-OF: R-46899-53765 A SELECT used as a scalar quantity must
# return a result set with a single column.
#
+# The following block tests that errors are returned in a bunch of cases
+# where a subquery returns more than one column.
+#
set M {only a single result allowed for a SELECT that is part of an expression}
foreach {tn sql} {
1 { SELECT (SELECT * FROM t2 UNION SELECT a+1, b+1 FROM t2) }
do_catchsql_test e_expr-35.2.$tn $sql [list 1 $M]
}
+# EVIDENCE-OF: R-35764-28041 The result of the expression is the value
+# of the only column in the first row returned by the SELECT statement.
+#
+# EVIDENCE-OF: R-41898-06686 If the SELECT yields more than one result
+# row, all rows after the first are ignored.
+#
+do_execsql_test e_expr-36.3.1 {
+ CREATE TABLE t4(x, y);
+ INSERT INTO t4 VALUES(1, 'one');
+ INSERT INTO t4 VALUES(2, 'two');
+ INSERT INTO t4 VALUES(3, 'three');
+} {}
+
+foreach {tn expr restype resval} {
+ 2 { ( SELECT x FROM t4 ORDER BY x ) } integer 1
+ 3 { ( SELECT x FROM t4 ORDER BY y ) } integer 1
+ 4 { ( SELECT x FROM t4 ORDER BY x DESC ) } integer 3
+ 5 { ( SELECT x FROM t4 ORDER BY y DESC ) } integer 2
+ 6 { ( SELECT y FROM t4 ORDER BY y DESC ) } text two
+
+ 7 { ( SELECT sum(x) FROM t4 ) } integer 6
+ 8 { ( SELECT group_concat(y,'') FROM t4 ) } text onetwothree
+ 9 { ( SELECT max(x) FROM t4 WHERE y LIKE '___') } integer 2
+
+} {
+ do_expr_test e_expr-36.3.$tn $expr $restype $resval
+}
+
+# EVIDENCE-OF: R-25492-41572 If the SELECT yields no rows, then the
+# value of the expression is NULL.
+#
+foreach {tn expr} {
+ 1 { ( SELECT x FROM t4 WHERE x>3 ORDER BY x ) }
+ 2 { ( SELECT x FROM t4 WHERE y<'one' ORDER BY y ) }
+} {
+ do_expr_test e_expr-36.4.$tn $expr null {}
+}
+
+
finish_test