From e42506f9ea58511246f638e81002947ee3c36b18 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 20 Oct 2010 17:16:18 -0700 Subject: adding default limits when there is an offset for sqlite and mysql [#5316 state:resolved] --- lib/arel/visitors/mysql.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/arel/visitors/mysql.rb') diff --git a/lib/arel/visitors/mysql.rb b/lib/arel/visitors/mysql.rb index 0c94ee1b27..594fd5504a 100644 --- a/lib/arel/visitors/mysql.rb +++ b/lib/arel/visitors/mysql.rb @@ -2,6 +2,13 @@ module Arel module Visitors class MySQL < Arel::Visitors::ToSql private + ### + # :'( + # http://dev.mysql.com/doc/refman/5.0/en/select.html#id3482214 + def visit_Arel_Nodes_SelectStatement o + o.limit = 18446744073709551615 if o.offset && !o.limit + super + end def visit_Arel_Nodes_UpdateStatement o [ -- cgit v1.2.3