From: Arthur Axel "fREW" Schmidt Date: Mon, 18 May 2009 19:43:48 +0000 (+0000) Subject: Test to show problem X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=840736b037623f76a6b6086019b5cd197d394651;p=dbsrgits%2FDBIx-Class-Historic.git Test to show 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");