[ruby-oci8-commit] [518] trunk/ruby-oci8: disable statement caching by default.

nobody at rubyforge.org nobody at rubyforge.org
Sat Apr 28 07:01:23 UTC 2012


Revision: 518
Author:   kubo
Date:     2012-04-28 07:01:23 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
disable statement caching by default.
This is workaround about a SIGSEGV issue.
See: https://github.com/rsim/oracle-enhanced/issues/162

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/lib/oci8/oci8.rb
    trunk/ruby-oci8/lib/oci8/properties.rb

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2012-04-28 06:54:14 UTC (rev 517)
+++ trunk/ruby-oci8/ChangeLog	2012-04-28 07:01:23 UTC (rev 518)
@@ -1,4 +1,9 @@
 2012-04-28  KUBO Takehiro  <kubo at jiubao.org>
+	* lib/oci8/oci8.rb, lib/oci8/properties.rb: disable statement caching by default.
+	    This is workaround about a SIGSEGV issue.
+	    See: https://github.com/rsim/oracle-enhanced/issues/162
+
+2012-04-28  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/oci8lib.c: delete code which overwrites signal handlers
 	    registered by ruby. This was committed by mistake.
 	    See: http://rubyforge.org/forum/forum.php?thread_id=50690&forum_id=1078

Modified: trunk/ruby-oci8/lib/oci8/oci8.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/oci8.rb	2012-04-28 06:54:14 UTC (rev 517)
+++ trunk/ruby-oci8/lib/oci8/oci8.rb	2012-04-28 07:01:23 UTC (rev 518)
@@ -119,6 +119,7 @@
     end
 
     stmt_cache_size = OCI8.properties[:statement_cache_size]
+    stmt_cache_size = nil if stmt_cache_size == 0
 
     if mode.nil? and cred.nil?
       # logon by the OCI function OCILogon2().

Modified: trunk/ruby-oci8/lib/oci8/properties.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/properties.rb	2012-04-28 06:54:14 UTC (rev 517)
+++ trunk/ruby-oci8/lib/oci8/properties.rb	2012-04-28 07:01:23 UTC (rev 518)
@@ -1,6 +1,6 @@
 # properties.rb -- implements OCI8.properties
 #
-# Copyright (C) 2010-2011 KUBO Takehiro <kubo at jiubao.org>
+# Copyright (C) 2010-2012 KUBO Takehiro <kubo at jiubao.org>
 
 #
 class OCI8
@@ -9,7 +9,7 @@
     :length_semantics => :byte,
     :bind_string_as_nchar => false,
     :float_conversion_type => :ruby,
-    :statement_cache_size => 20,
+    :statement_cache_size => 0,
   }
 
   if OCI8.oracle_client_version < OCI8::ORAVER_9_2
@@ -89,7 +89,8 @@
   # [:statement_cache_size]
   #     (new in 2.1.1)
   #     
-  #     The statement cache size per each session. The default value is 20 statements.
+  #     The statement cache size per each session. The default size is 0, which
+  #     means no statement cache, since 2.1.2. It was 20 in 2.1.1.
   #     This feature is available on Oracle 9iR2 or later.
   #     See: http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci09adv.htm#i471377
   #



More information about the ruby-oci8-commit mailing list