From: Arthur Axel "fREW" Schmidt Date: Mon, 18 May 2009 20:56:43 +0000 (+0000) Subject: Test to show top limit grouping problem X-Git-Tag: v0.08103~5^2~1^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f7efa2d85595b1bd608b0e4549e22e4a9ec5dd64;p=dbsrgits%2FDBIx-Class.git Test to show top limit grouping problem --- diff --git a/t/42toplimit.t b/t/42toplimit.t index aefbc0c..6f05660 100644 --- a/t/42toplimit.t +++ b/t/42toplimit.t @@ -43,3 +43,10 @@ sub test_order { ], expected_sql_order => ['foo ASC, bar DESC, baz ASC, frew ASC', 'foo DESC, bar ASC, baz DESC, frew DESC'] }); + + is_same_sql( + $sa->select( 'foo', [qw{ bar baz}], undef, { + group_by => 'bar', + order_by => 'bar', + }, 1, 3), + "SELECT * FROM ( SELECT TOP 1 * FROM ( SELECT TOP 4 bar,baz FROM foo ORDER BY bar ASC GROUP BY bar ) AS foo ORDER BY bar DESC ) AS bar ORDER BY bar ASC");