# File lib/active_record/connection_adapters/mysql_adapter.rb, line 284 def exec_query(sql, name = 'SQL', binds = []) # If the configuration sets prepared_statements:false, binds will # always be empty, since the bind variables will have been already # substituted and removed from binds by BindVisitor, so this will # effectively disable prepared statement usage completely. if binds.empty? result_set, affected_rows = exec_without_stmt(sql, name) else result_set, affected_rows = exec_stmt(sql, name, binds) end yield affected_rows if block_given? result_set end