convert distinct to groupby when not supported

This commit is contained in:
mdipierro
2012-09-16 15:51:51 -05:00
parent 99e491ca0f
commit c942881f36
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-09-16 15:38:27) stable
Version 2.0.9 (2012-09-16 15:51:47) stable
+2
View File
@@ -1457,6 +1457,8 @@ class BaseAdapter(ConnectionPool):
having = args_get('having', False)
limitby = args_get('limitby', False)
for_update = args_get('for_update', False)
if not distinct in (True,False) and not groupby:
distinct, groupby = False, distinct
if self.can_select_for_update is False and for_update is True:
raise SyntaxError, 'invalid select attribute: for_update'
if distinct is True: