Permalink
Browse files

r1616@asus: jeremy | 2005-07-03 08:07:13 -0700

 remove duplicate conditional


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 9a10b31 commit 94cd3fd135337d1b228404d9d167bd0031ddefe8 @jeremy jeremy committed Jul 3, 2005
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -120,10 +120,10 @@ def execute(sql, name = nil, retries = 2)
rescue ActiveRecord::StatementInvalid => exception
if LOST_CONNECTION_ERROR_MESSAGES.any? { |msg| exception.message.split(":").first =~ /^#{msg}/ }
@connection.real_connect(*@connection_options)
- @logger.info("Retrying invalid statement with reopened connection") if @logger
unless @logger
@connection.query(sql)
else
+ @logger.info "Retrying invalid statement with reopened connection"
log(sql, name) { @connection.query(sql) }
end
else

0 comments on commit 94cd3fd

Please sign in to comment.