Permalink
Browse files

Work around undiagnosed bug that's draining a relation's bind_values

  • Loading branch information...
1 parent 26e8cb8 commit 06cc38a2b0d4778746e8a2a2e2b6aa07e1c1c075 @jeremy jeremy committed with carlosantoniodasilva May 31, 2012
View
1 activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -4,6 +4,7 @@ module DatabaseStatements
# Converts an arel AST to SQL
def to_sql(arel, binds = [])
if arel.respond_to?(:ast)
+ binds = binds.dup
visitor.accept(arel.ast) do
quote(*binds.shift.reverse)
end

2 comments on commit 06cc38a

@graemeworthy

Thank you, this patch fixes a strange problem that has been occurring since: 88a296d.

@carlosantoniodasilva
Ruby on Rails member

@graemeworthy thanks, we noticed 3 tests failing with mysql2 after merging that other commit, please check #7983 for more background.

Do you think you can share what was the "strange problem" you were having? It may help us figuring what is this "undiagnosed bug".

Please sign in to comment.