mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Allow GROUP BY on aggregate queries only. Ticket #1039. (CVS 2176)
FossilOrigin-Name: 8ef2c644ebce851d7a3e0db3b2266fc2519485cd
This commit is contained in:
@ -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 @@ do_test select7-2.1 {
|
||||
|
||||
} ;# 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
|
||||
|
Reference in New Issue
Block a user