]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Strengthen the tests for aggregate functions in GROUP BY clauses.
authordrh <drh@noemail.net>
Sat, 8 Dec 2007 18:01:30 +0000 (18:01 +0000)
committerdrh <drh@noemail.net>
Sat, 8 Dec 2007 18:01:30 +0000 (18:01 +0000)
Changes to test cases only.  No changes to code. (CVS 4601)

FossilOrigin-Name: 4be8e6765bf8bc48747b2542f2ed77066fb9dcb9

manifest
manifest.uuid
test/misc4.test

index c9b2a8e76e347c7e1810ed6cb5d886568c484295..afc3495cf809b0d6ae5d5f5c9773da50ff0b1d1d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sbug\sin\sthe\sdebugging\sprintf\slogic.\s(CVS\s4600)
-D 2007-12-08T17:55:36
+C Strengthen\sthe\stests\sfor\saggregate\sfunctions\sin\sGROUP\sBY\sclauses.\nChanges\sto\stest\scases\sonly.\s\sNo\schanges\sto\scode.\s(CVS\s4601)
+D 2007-12-08T18:01:31
 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
 F Makefile.in 30789bf70614bad659351660d76b8e533f3340e9
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -383,7 +383,7 @@ F test/minmax2.test 8294b6728819608861ba0e06ac1d9a87c4d815b5
 F test/misc1.test 1b89c02c4a33b49dee4cd1d20d161aaaba719075
 F test/misc2.test 1ee89298de9c16b61454658b24999c403e86afe4
 F test/misc3.test 7bd937e2c62bcc6be71939faf068d506467b1e03
-F test/misc4.test 21e8a275cadcf2ba2a9ac2c33ae024ecc5eaff3a
+F test/misc4.test 91e8ed25c092c2bb4e0bb01864631e2930f8d7de
 F test/misc5.test 33b95f12f18b7b9558c79545503f05728fbf2c22
 F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
 F test/misc7.test 3fbd0a9e3dd03331d9d76acd47bc179e1a97e15e
@@ -597,7 +597,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P feef1b15d645d638b4a05742f214b0445fa7e176
-R b339a7ea6c28f4b6ee6a4c188d3c15c4
+P 1d6a9f5fafb862fb31c8589fa118a5672bad6abd
+R 378bf8f52e8d83775a501365b0bea297
 U drh
-Z c74d5cd18bfa04a5ccaf7b0db6ea5a33
+Z 0788daae7a5c65291d88fcc1de49b7ff
index 1784670d13417bec5c0b94fed0cc7dc946f576f5..4d2c50d95517538017088f500dd65816cdbaea6e 100644 (file)
@@ -1 +1 @@
-1d6a9f5fafb862fb31c8589fa118a5672bad6abd
\ No newline at end of file
+4be8e6765bf8bc48747b2542f2ed77066fb9dcb9
\ No newline at end of file
index 743d36507b3e6bcaf85b7d183d989caf3807de80..026dd032e3b633337229065f9529a49bc82c1902 100644 (file)
@@ -13,7 +13,7 @@
 # This file implements tests for miscellanous features that were
 # left out of other test files.
 #
-# $Id: misc4.test,v 1.22 2007/08/13 15:28:35 danielk1977 Exp $
+# $Id: misc4.test,v 1.23 2007/12/08 18:01:31 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -98,7 +98,6 @@ do_test misc4-2.4 {
 
 # Ticket #966
 #
-ifcapable compound {
 do_test misc4-3.1 {
   execsql { 
     CREATE TABLE Table1(ID integer primary key, Value TEXT);
@@ -106,18 +105,33 @@ do_test misc4-3.1 {
     CREATE TABLE Table2(ID integer NOT NULL, Value TEXT);
     INSERT INTO Table2 VALUES(1, 'z');
     INSERT INTO Table2 VALUES (1, 'a');
-    SELECT ID, Value FROM Table1
-       UNION SELECT ID, max(Value) FROM Table2 GROUP BY 1
-    ORDER BY 1, 2;
   }
-} {1 x 1 z}
-do_test misc4-3.2 {
   catchsql { 
-    SELECT ID, Value FROM Table1
-       UNION SELECT ID, max(Value) FROM Table2 GROUP BY 1, 2
-    ORDER BY 1, 2;
+    SELECT ID, max(Value) FROM Table2 GROUP BY 1, 2 ORDER BY 1, 2;
   }
 } {1 {aggregate functions are not allowed in the GROUP BY clause}}
+ifcapable compound {
+  do_test misc4-3.2 {
+    execsql {
+      SELECT ID, Value FROM Table1
+         UNION SELECT ID, max(Value) FROM Table2 GROUP BY 1
+      ORDER BY 1, 2;
+    }
+  } {1 x 1 z}
+  do_test misc4-3.3 {
+    catchsql { 
+      SELECT ID, Value FROM Table1
+         UNION SELECT ID, max(Value) FROM Table2 GROUP BY 1, 2
+      ORDER BY 1, 2;
+    }
+  } {1 {aggregate functions are not allowed in the GROUP BY clause}}
+  do_test misc4-3.4 {
+    catchsql { 
+      SELECT ID, max(Value) FROM Table2 GROUP BY 1, 2
+         UNION SELECT ID, Value FROM Table1
+      ORDER BY 1, 2;
+    }
+  } {1 {aggregate functions are not allowed in the GROUP BY clause}}
 } ;# ifcapable compound
 
 # Ticket #1047.  Make sure column types are preserved in subqueries.