Allow GROUP BY on aggregate queries only.  Ticket #1039. (CVS 2176)

FossilOrigin-Name: 8ef2c644ebce851d7a3e0db3b2266fc2519485cd
diff --git a/test/select7.test b/test/select7.test
index e3b8bcc..dba0c54 100644
--- a/test/select7.test
+++ b/test/select7.test
@@ -10,7 +10,7 @@
 # focus of this file is testing compute SELECT statements and nested
 # views.
 #
-# $Id: select7.test,v 1.3 2004/11/22 13:35:42 danielk1977 Exp $
+# $Id: select7.test,v 1.4 2005/01/03 02:26:55 drh Exp $
 
 
 set testdir [file dirname $argv0]
@@ -52,5 +52,11 @@
 
 } ;# ifcapable compound
 
-
+# Do not allow GROUP BY without an aggregate. Ticket #1039.
+#
+do_test select7-3.1 {
+  catchsql {
+    SELECT * FROM (SELECT * FROM sqlite_master) GROUP BY name
+  }
+} {1 {GROUP BY may only be used on aggregate queries}}
 finish_test