[ruby-oci8-commit] [383] trunk/ruby-oci8: * NEWS: add changes between 2.0.3 and 2.0.4.

nobody at rubyforge.org nobody at rubyforge.org
Sun Feb 28 06:55:41 EST 2010


Revision: 383
Author:   kubo
Date:     2010-02-28 06:55:41 -0500 (Sun, 28 Feb 2010)

Log Message:
-----------
* NEWS: add changes between 2.0.3 and 2.0.4.
* VERSION: change the version to 2.0.3.
* ext/oci8/stmt.c: fix segmentation fault when OCI8::Cursor#fetch
    is called prior to OCI8::Cursor#exec.
* ext/oci8/oci8.c: minor fix in rdoc comment.

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/NEWS
    trunk/ruby-oci8/VERSION
    trunk/ruby-oci8/ext/oci8/oci8.c
    trunk/ruby-oci8/ext/oci8/stmt.c

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2010-02-27 14:18:56 UTC (rev 382)
+++ trunk/ruby-oci8/ChangeLog	2010-02-28 11:55:41 UTC (rev 383)
@@ -1,3 +1,10 @@
+2010-02-28  KUBO Takehiro  <kubo at jiubao.org>
+	* NEWS: add changes between 2.0.3 and 2.0.4.
+	* VERSION: change the version to 2.0.3.
+	* ext/oci8/stmt.c: fix segmentation fault when OCI8::Cursor#fetch
+	    is called prior to OCI8::Cursor#exec.
+	* ext/oci8/oci8.c: minor fix in rdoc comment.
+
 2010-02-27  KUBO Takehiro  <kubo at jiubao.org>
 	* lib/oci8/datetime.rb: fix a problem that fractional seconds are lost
 	    when Time value is bound to TIMESTAMP.
@@ -40,7 +47,7 @@
 	    OraNumber to string and vice varse.
 
 2010-02-02  KUBO Takehiro  <kubo at jiubao.org>
-	* ext/oci8/ocinumber.c: fix to support NNUMBERS with scale larger
+	* ext/oci8/ocinumber.c: fix to support NUMBERS with scale larger
 	    than 38 by using scientific number notation to convert OraNumber
 	    to BigDecimal. OraNumber#to_i is also fixed.
 	    (reported by Raimonds Simanovskis)

Modified: trunk/ruby-oci8/NEWS
===================================================================
--- trunk/ruby-oci8/NEWS	2010-02-27 14:18:56 UTC (rev 382)
+++ trunk/ruby-oci8/NEWS	2010-02-28 11:55:41 UTC (rev 383)
@@ -1,3 +1,58 @@
+2.0.4:
+
+* New Features
+
+  - OCI8.error_message(message_no) -> string
+
+    Gets the Oracle error message specified by message id.
+    Its language depends on NLS_LANGUAGE.
+
+    Note: This method is unavailable if the Oracle client
+          version is 8.0.
+
+      # When NLS_LANG is AMERICAN_AMERICA.AL32UTF8
+      OCI8.error_message(1)
+      # => "ORA-00001: unique constraint (%s.%s) violated"
+
+      # When NLS_LANG is FRENCH_FRANCE.AL32UTF8
+      OCI8.error_message(1)
+      # => "ORA-00001: violation de contrainte unique (%s.%s)"
+
+  - OraNumber#dump -> string
+
+    Returns OraNumber's internal representation whose format
+    is same with the return value of Oracle SQL function DUMP().
+  
+      OraNumber.new(100).dump #=> "Typ=2 Len=2: 194,2"
+      OraNumber.new(123).dump #=> "Typ=2 Len=3: 194,2,24"
+      OraNumber.new(0.1).dump #=> "Typ=2 Len=2: 192,11"
+
+* Fixed issues
+
+  - Fractional second part is lost when ruby's Time instance is bound
+    to Oracle datatype TIMESTAMP.
+    (reported by Raimonds Simanovskis)
+
+  - OraNumber#to_i and OraNumber#to_s fail when its scale is larger
+    than 38.
+    (reported by Raimonds Simanovskis)
+
+  - Memory leak about 30 bytes per one place holder for object type.
+ 
+  - Segmentation fault when a collection of string is bound.
+    (reported by Raimonds Simanovskis)
+
+  - Segmentation fault when GC starts while initializing a bind
+    object for object type.
+    (reported by Remi Gagnon)
+
+  - Segmentation fault when OCI8::Cursor#fetch is called prior to
+    OCI8::Cursor#exec.
+
+  - Detailed error message is not reported when PL/SQL NO_DATA_FOUND
+    exception is raised.
+    (reported by Raimonds Simanovskis)
+
 2.0.3:
 
 * Incompatible Changes

Modified: trunk/ruby-oci8/VERSION
===================================================================
--- trunk/ruby-oci8/VERSION	2010-02-27 14:18:56 UTC (rev 382)
+++ trunk/ruby-oci8/VERSION	2010-02-28 11:55:41 UTC (rev 383)
@@ -1 +1 @@
-2.0.3
+2.0.4

Modified: trunk/ruby-oci8/ext/oci8/oci8.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/oci8.c	2010-02-27 14:18:56 UTC (rev 382)
+++ trunk/ruby-oci8/ext/oci8/oci8.c	2010-02-28 11:55:41 UTC (rev 383)
@@ -74,10 +74,10 @@
  * Note: This method is unavailable if the Oracle client version is 8.0.
  *
  * example:
- *   # When NLS_LANG is american_america.AL32UTF8
+ *   # When NLS_LANG is AMERICAN_AMERICA.AL32UTF8
  *   OCI8.error_message(1) # => "ORA-00001: unique constraint (%s.%s) violated"
  *   
- *   # When NLS_LANG is french_japan.AL32UTF8
+ *   # When NLS_LANG is FRENCH_FRANCE.AL32UTF8
  *   OCI8.error_message(1) # => "ORA-00001: violation de contrainte unique (%s.%s)"
  *
  */

Modified: trunk/ruby-oci8/ext/oci8/stmt.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/stmt.c	2010-02-27 14:18:56 UTC (rev 382)
+++ trunk/ruby-oci8/ext/oci8/stmt.c	2010-02-28 11:55:41 UTC (rev 383)
@@ -342,16 +342,18 @@
     oci8_bind_t *obind;
     const oci8_bind_class_t *bind_class;
 
-    obind = (oci8_bind_t *)stmt->base.children;
-    do {
-        if (obind->base.type == OCI_HTYPE_DEFINE) {
-            bind_class = (const oci8_bind_class_t *)obind->base.klass;
-            if (bind_class->pre_fetch_hook != NULL) {
-                bind_class->pre_fetch_hook(obind, stmt->svc);
+    if (stmt->base.children != NULL) {
+        obind = (oci8_bind_t *)stmt->base.children;
+        do {
+            if (obind->base.type == OCI_HTYPE_DEFINE) {
+                bind_class = (const oci8_bind_class_t *)obind->base.klass;
+                if (bind_class->pre_fetch_hook != NULL) {
+                    bind_class->pre_fetch_hook(obind, stmt->svc);
+                }
             }
-        }
-        obind = (oci8_bind_t *)obind->base.next;
-    } while (obind != (oci8_bind_t*)stmt->base.children);
+            obind = (oci8_bind_t *)obind->base.next;
+        } while (obind != (oci8_bind_t*)stmt->base.children);
+    }
     rv = OCIStmtFetch_nb(svcctx, stmt->base.hp.stmt, oci8_errhp, 1, OCI_FETCH_NEXT, OCI_DEFAULT);
 #ifdef USE_DYNAMIC_FETCH
     while (rv == OCI_NEED_DATA) {




More information about the ruby-oci8-commit mailing list