diff options
Diffstat (limited to 'activerecord/lib/arel/visitors/mysql.rb')
-rw-r--r-- | activerecord/lib/arel/visitors/mysql.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/activerecord/lib/arel/visitors/mysql.rb b/activerecord/lib/arel/visitors/mysql.rb index 081452caeb..9d9294fecc 100644 --- a/activerecord/lib/arel/visitors/mysql.rb +++ b/activerecord/lib/arel/visitors/mysql.rb @@ -69,13 +69,7 @@ module Arel # :nodoc: all # query. However, this does not allow for LIMIT, OFFSET and ORDER. To support # these, we must use a subquery. def prepare_update_statement(o) - if has_join_sources?(o) - if has_limit_or_offset_or_orders?(o) - super - else - o - end - elsif o.offset + if o.offset || has_join_sources?(o) && has_limit_or_offset_or_orders?(o) super else o @@ -83,7 +77,7 @@ module Arel # :nodoc: all end def prepare_delete_statement(o) - if has_join_sources?(o) || o.offset + if o.offset || has_join_sources?(o) super else o |