From 784165e03b8d297916edd23060a0f6b5c79b7ba1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 5 Jul 2006 02:54:19 +0000 Subject: Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4552 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/connection_adapters/oracle_adapter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb b/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb index e4c9c411b3..cef3c9f6c9 100644 --- a/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb @@ -635,11 +635,11 @@ begin # Adds auto-recovery functionality. # # See: http://www.jiubao.org/ruby-oci8/api.en.html#label-11 - def exec(sql, *bindvars) + def exec(sql, *bindvars, &block) should_retry = self.class.auto_retry? && autocommit? begin - @connection.exec(sql, *bindvars) + @connection.exec(sql, *bindvars, &block) rescue OCIException => e raise unless LOST_CONNECTION_ERROR_CODES.include?(e.code) @active = false -- cgit v1.2.3