Mercurial > p > roundup > code
changeset 2720:15d945dff53d
add sanity check for sort and group on same property [SF#1033477]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 07 Oct 2004 06:09:41 +0000 |
| parents | 921780161fb9 |
| children | 1cd01cf106e1 |
| files | CHANGES.txt roundup/backends/back_mysql.py roundup/backends/rdbms_common.py |
| diffstat | 3 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Thu Oct 07 06:04:26 2004 +0000 +++ b/CHANGES.txt Thu Oct 07 06:09:41 2004 +0000 @@ -41,6 +41,7 @@ - mailgw can override the MAIL_DEFAULT_CLASS - handle Py2.3+ datetime objects as Date specs (sf bug 971300) - use row locking in MySQL newid() (sf bug 1034211) +- add sanity check for sort and group on same property (sf bug 1033477) 2004-07-21 0.7.6
--- a/roundup/backends/back_mysql.py Thu Oct 07 06:04:26 2004 +0000 +++ b/roundup/backends/back_mysql.py Thu Oct 07 06:09:41 2004 +0000 @@ -651,6 +651,10 @@ where.append('_%s.id in (%s)'%(cn, s)) args = args + v + # sanity check: sorting *and* grouping on the same property? + if group[1] == sort[1]: + sort = (None, None) + # "grouping" is just the first-order sorting in the SQL fetch orderby = [] ordercols = []
--- a/roundup/backends/rdbms_common.py Thu Oct 07 06:04:26 2004 +0000 +++ b/roundup/backends/rdbms_common.py Thu Oct 07 06:09:41 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.131 2004-09-26 14:38:54 a1s Exp $ +# $Id: rdbms_common.py,v 1.132 2004-10-07 06:08:42 richard Exp $ ''' Relational database (SQL) backend common code. Basics: @@ -2154,6 +2154,10 @@ where.append('_%s.id in (%s)'%(cn, s)) args = args + v + # sanity check: sorting *and* grouping on the same property? + if group[1] == sort[1]: + sort = (None, None) + # "grouping" is just the first-order sorting in the SQL fetch orderby = [] ordercols = []
