[ruby-oci8-commit] [484] trunk/ruby-oci8: update documents.

nobody at rubyforge.org nobody at rubyforge.org
Sun Dec 11 07:34:21 EST 2011


Revision: 484
Author:   kubo
Date:     2011-12-11 07:34:21 -0500 (Sun, 11 Dec 2011)

Log Message:
-----------
update documents.

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/NEWS
    trunk/ruby-oci8/README
    trunk/ruby-oci8/ext/oci8/connection_pool.c
    trunk/ruby-oci8/test/README

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2011-12-10 07:07:13 UTC (rev 483)
+++ trunk/ruby-oci8/ChangeLog	2011-12-11 12:34:21 UTC (rev 484)
@@ -1,3 +1,8 @@
+2011-12-11  KUBO Takehiro  <kubo at jiubao.org>
+	* NEWS: add changes between 2.0.6 and 2.1.0.
+	* README, test/README: rewritten.
+	* ext/oci8/connection_pool.c: add a note.
+
 2011-12-10  KUBO Takehiro  <kubo at jiubao.org>
 	* test/test_bind_string.rb: suppress "No tests were specified" when
 	    the client character set is not UTF-8.

Modified: trunk/ruby-oci8/NEWS
===================================================================
--- trunk/ruby-oci8/NEWS	2011-12-10 07:07:13 UTC (rev 483)
+++ trunk/ruby-oci8/NEWS	2011-12-11 12:34:21 UTC (rev 484)
@@ -1,3 +1,114 @@
+2.1.0:
+
+*** Ruby-oci8 2.1.0 doesn't support Oracle 8 (8.0) and Oracle 8i (8.1) anymore. ***
+
+* New Features
+
+  - OCI connection pooling
+
+    See: http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci09adv.htm#sthref1479
+    and http://docs.oracle.com/cd/E11882_01/java.112/e16548/ociconpl.htm#JJDBC28789
+
+    Example:
+
+      # Create a connection pool.
+      # username and password are required to establish an implicit primary session.
+      cpool = OCI8::ConnectionPool.new(1, 5, 2, username, password, database)
+
+      # Get a session from the pool.
+      # Pass the connection pool to the third argument.
+      conn1 = OCI8.new(username, password, cpool)
+
+      # Get another session.
+      conn2 = OCI8.new(username, password, cpool)
+
+  - Daylight saving time aware if TZ is set.
+
+    You should set the environment variable TZ if your applications run
+    in a time zone with daylight saving time transitions.
+    Otherwise, Oracle session time zone is set with current constant
+    offset from GMT.
+    (reported by Yasuo Honda)
+
+  - connect as sysasm (Oracle 11g only)
+
+      OCI8.new('username/password as sysasm')
+    or
+      OCI8.new('username', 'password', nil, :SYSASM)
+
+  - Oracle number is converted to ruby float exactly same as ruby does.
+
+    From ruby 1.9.2, a float value converted from Oracle number 15.7 by
+    the Oracle function OCINumberToReal() makes a string representation
+    15.700000000000001 by Float#to_s. (See: http://redmine.ruby-lang.org/issues/4656)
+    To avoid this issue, any Oracle number is converted to a float as
+    ruby's String#to_f does.
+
+    The behavior is customizable by OCI8.properties[:float_conversion_type].
+
+      OCI8.properties[:float_conversion_type] = :oracle # => Use OCINumberToReal()
+      OCI8.properties[:float_conversion_type] = :ruby # => Use String#to_f
+
+    The default value is :ruby.
+
+  - OCI_SUCCESS_WITH_INFO handling is changed.
+
+    Ruby-oci8 2.0 treats OCI_SUCCESS_WITH_INFO in OCI layer as an error
+    and raise an exception OCISuccessWithInfo such as "ORA-24347: Warning of
+    a NULL column in an aggregate function" and "ORA-28002: the password will
+    expire within xx days."
+
+    From 2.1.0, it is treated as a warning and the exception is set
+    to OCI8#last_error.
+
+  - OCI8#last_error
+
+    The last error or warning associated with the session is set to
+    OCI8#last_error. The usecase is to detect OCI_SUCCESS_WITH_INFO.
+    It is reset by OCI8#exec and OCI8#parse.
+
+  - Experimental support of character length semantics
+
+    This is enabled when :char is set to OCI8.properties[:length_semantics].
+
+  - OCI8.client_charset_name and OCI8#database_charset_name is added.
+
+    They return Oracle charset name such as WE8ISO8859P15.
+
+* Specification changes
+
+  - The parent class OCINoData was changed from OCIException to OCIError.
+
+* Fixed Issues
+
+  - Fix a bug that an array is always bound as null.
+    This bug was introduced in ruby-oci8 2.0.5.
+    (reported by Leoš Bitto)
+
+  - Avoid a gcc internal compiler error when using ruby1.9.2-p290 on
+    ubuntu 11.10 (64bit). (reported by Bob Saveland.)
+
+  - Fix compilation problems on Solaris.
+    (Reported by Sanjiv Patel.)
+
+  - Fix compilation problems on Linux.
+    (Reported by Edgars Beigarts.)
+
+  - Connections are released by GC without explicit logoff.
+
+  - Set ruby encoding CP950 for oracle characterset ZHT16MSWIN950 and
+    CP951 for ZHT16HKSCS and ZHT16HKSCS31 when the ruby is 1.9.3.
+
+  - Clear an executuing thread information in a connection when a SQL
+    executions is canceled by Thread#kill or Timeout::timeout.
+    (reported by Aaron Qian)
+
+  - Fix some test cases for object type and TZ issues.
+    (reported by Yasuo Honda)
+
+  - Use Gem::Command.build_args to get arguments after '--'.
+    (reported by jbirdjavi)
+
 2.0.6:
 
 * Fixed issues

Modified: trunk/ruby-oci8/README
===================================================================
--- trunk/ruby-oci8/README	2011-12-10 07:07:13 UTC (rev 483)
+++ trunk/ruby-oci8/README	2011-12-11 12:34:21 UTC (rev 484)
@@ -1,76 +1,5 @@
-= How to make
+Ruby-oci8 is a ruby interface for Oracle using OCI8 API. 
+The latest version (2.1.x) works with Oracle9i or later.
+Use ruby-oci8 2.0.6 or earlier for Oracle 8.
 
-* <tt>ruby</tt> and <tt>make</tt> (or nmake on MSVC) commands in the environment variable <tt>PATH</tt>?
-* <tt>ruby</tt> is 1.8.0 or later? (Use ruby-oci8 0.1.x for ruby 1.6.x.)
-
-== For OCI installed by Oracle Universal Installer
-make sure the environment variable ORACLE_HOME (or registry on Windows)
-is set correctly. run the the following commands.
-
-  make (or nmake on MSVC)
-
-== For OCI installed by Oracle Instant Installer
-
-linux:
-  ruby setup.rb config -- --with-instant-client
-  make
-
-others:
-  ruby setup.rb config -- --with-instant-client=/path/to/instantclient10_1
-  make (or nmake on MSVC)
-
-= On compilation failure
-
-Please report the following information to kubo at jiubao.org.
-
-* last 100 lines of 'ext/oci8/mkmf.log'.
-* the results of the following commands:
-    ruby -r rbconfig -e "p Config::CONFIG['host']"
-    ruby -r rbconfig -e "p Config::CONFIG['CC']"
-    ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']"
-    ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']"
-    ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']"
-    ruby -r rbconfig -e "p Config::CONFIG['LIBS']"
-    ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']"
-* if you use gcc:
-    gcc --print-prog-name=ld
-    gcc --print-prog-name=as
-* on platforms which can use both 32bit/64bit binaries:
-    file $ORACLE_HOME/bin/oracle
-    file `which ruby`
-    echo $LD_LIBRARY_PATH
-
-= How to run unit test
-
-before runing unit test, 
-1. connect to Oracle as system:
-
-    $ sqlplus system/<password_of_system>
-
-2. create user ruby:
-
-    SQL> CREATE USER ruby IDENTIFIED BY oci8;
-
-   or
-
-    SQL> CREATE USER ruby IDENTIFIED BY oci8
-       2 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
-
-3. grant the privilege to connect and execute.
-
-    SQL> GRANT connect, resource, create view TO ruby;
-
-4. connect to Oracle as sys
-
-    $ sqlplus 'sys/<password_of_sys> as sysdba'
-
-5. grant the privilege for the unittest of blocking-mode.
-
-    SQL> GRANT EXECUTE ON dbms_lock TO ruby;
-
-6. change test/config.rb as you like
-
-Then you can run:
-  $ make check
-or
-  $ nmake check   (If your compiler is MS Visual C++.)
+See: http://ruby-oci8.rubyforge.org

Modified: trunk/ruby-oci8/ext/oci8/connection_pool.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/connection_pool.c	2011-12-10 07:07:13 UTC (rev 483)
+++ trunk/ruby-oci8/ext/oci8/connection_pool.c	2011-12-11 12:34:21 UTC (rev 484)
@@ -62,6 +62,8 @@
  * <i>conn_max</i> specifies the maximum number of connections that
  * can be opened to the database. Once this value is reached, no more
  * connections are opened. Valid values are 1 and higher.
+ * Note that this limits the number of concurent SQL executions, not
+ * the number of concurrent sessions.
  *
  * <i>conn_incr</i> allows the application to set the next increment
  * for connections to be opened to the database if the current number

Modified: trunk/ruby-oci8/test/README
===================================================================
--- trunk/ruby-oci8/test/README	2011-12-10 07:07:13 UTC (rev 483)
+++ trunk/ruby-oci8/test/README	2011-12-11 12:34:21 UTC (rev 484)
@@ -1,4 +1,42 @@
-This directory includes test cases using RubyUnit.
+Before runing unit test:
 
-If RubyUnit is installed in your site, it is used to run test cases.
-If not installed, support files in this package are used.
+1. connect to Oracle as system:
+
+    $ sqlplus system/<password_of_system>
+
+2. create user ruby:
+
+    SQL> CREATE USER ruby IDENTIFIED BY oci8;
+
+   or
+
+    SQL> CREATE USER ruby IDENTIFIED BY oci8
+       2 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
+
+3. grant the privilege to connect and execute.
+
+    SQL> GRANT connect, resource, create view TO ruby;
+
+4. connect to Oracle as sys
+
+    $ sqlplus 'sys/<password_of_sys> as sysdba'
+
+5. grant privileges
+
+    SQL> GRANT EXECUTE ON dbms_lock TO ruby;
+    SQL> GRANT CREATE VIEW TO ruby;
+
+6. connect as ruby user.
+
+    $ sqlplus ruby/oci8
+
+7. Create object types
+
+    SQL> @test/setup_test_object.sql
+
+8. change $dbname if the database 
+
+Then you can run:
+  $ make check
+or
+  $ nmake check   (If your compiler is MS Visual C++.)




More information about the ruby-oci8-commit mailing list