[ruby-oci8-commit] [344] trunk/ruby-oci8: * NEWS: add changes between 2.0.1 and 2.0.2.

nobody at rubyforge.org nobody at rubyforge.org
Sun May 17 08:44:55 EDT 2009


Revision: 344
Author:   kubo
Date:     2009-05-17 08:44:55 -0400 (Sun, 17 May 2009)

Log Message:
-----------
* NEWS: add changes between 2.0.1 and 2.0.2.
* VERSION: change version to 2.0.2.
* dist-files: append newly added files.
* ext/oci8/oci8.c: fix OCI8#ping not to raise an exception
    when OCIPing() failed. It should returns true or false.
* ext/oci8/oci8lib.c: Memory allocated by xmalloc() should be
    freed by xfree().

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/Makefile
    trunk/ruby-oci8/NEWS
    trunk/ruby-oci8/VERSION
    trunk/ruby-oci8/dist-files
    trunk/ruby-oci8/ext/oci8/oci8.c
    trunk/ruby-oci8/ext/oci8/oci8lib.c

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2009-05-17 10:08:39 UTC (rev 343)
+++ trunk/ruby-oci8/ChangeLog	2009-05-17 12:44:55 UTC (rev 344)
@@ -1,4 +1,13 @@
 2009-05-17  KUBO Takehiro  <kubo at jiubao.org>
+	* NEWS: add changes between 2.0.1 and 2.0.2.
+	* VERSION: change version to 2.0.2.
+	* dist-files: append newly added files.
+	* ext/oci8/oci8.c: fix OCI8#ping not to raise an exception
+	    when OCIPing() failed. It should returns true or false.
+	* ext/oci8/oci8lib.c: Memory allocated by xmalloc() should be
+	    freed by xfree().
+
+2009-05-17  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/error.c, ext/oci8/extconf.rb, ext/oci8/oci8.h:
 	    fix the native library name in error messages from oci8lib.so
 	    to oci8lib_18.so or oci8lib_191.so.

Modified: trunk/ruby-oci8/Makefile
===================================================================
--- trunk/ruby-oci8/Makefile	2009-05-17 10:08:39 UTC (rev 343)
+++ trunk/ruby-oci8/Makefile	2009-05-17 12:44:55 UTC (rev 344)
@@ -50,38 +50,40 @@
 #
 # for Windows
 #
-GEMPKG = ruby-oci8-unstable-2.0.1-x86-mswin32-60.gem
+RUBY_18 = c:\ruby
+RUBY_191 = c:\ruby-1.9.1
+GEMPKG = ruby-oci8-2.0.2-x86-mswin32-60.gem
 
 ext\oci8\oci8lib_18.so:
-	c:\ruby\bin\ruby -r fileutils -e "FileUtils.rm_rf('ruby18')"
+	$(RUBY_18)\bin\ruby -r fileutils -e "FileUtils.rm_rf('ruby18')"
 	md ruby18
 	cd ruby18
-	c:\ruby\bin\ruby ..\setup.rb config -- --with-runtime-check
-	c:\ruby\bin\ruby ..\setup.rb setup
-	rem c:\ruby\bin\ruby ..\setup.rb test
+	$(RUBY_18)\bin\ruby ..\setup.rb config -- --with-runtime-check
+	$(RUBY_18)\bin\ruby ..\setup.rb setup
+	rem $(RUBY_18)\bin\ruby ..\setup.rb test
 	cd ..
 	copy ruby18\ext\oci8\oci8lib_18.so ext\oci8\oci8lib_18.so
 
 ext\oci8\oci8lib_191.so:
-	c:\ruby\bin\ruby -r fileutils -e "FileUtils.rm_rf('ruby191')"
+	$(RUBY_191)\bin\ruby -r fileutils -e "FileUtils.rm_rf('ruby191')"
 	md ruby191
 	cd ruby191
-	c:\ruby-1.9.1\bin\ruby ..\setup.rb config -- --with-runtime-check
-	c:\ruby-1.9.1\bin\ruby ..\setup.rb setup
-	rem c:\ruby-1.9.1\bin\ruby ..\setup.rb test
+	$(RUBY_191)\bin\ruby ..\setup.rb config -- --with-runtime-check
+	$(RUBY_191)\bin\ruby ..\setup.rb setup
+	rem $(RUBY_191)\bin\ruby ..\setup.rb test
 	cd ..
 	copy ruby191\ext\oci8\oci8lib_191.so ext\oci8\oci8lib_191.so
 	copy ruby191\lib\oci8.rb lib\oci8.rb
 
 $(GEMPKG): ext\oci8\oci8lib_18.so ext\oci8\oci8lib_191.so ruby-oci8.gemspec
-	c:\ruby-1.9.1\bin\gem build ruby-oci8.gemspec -- current
+	$(RUBY_191)\bin\gem build ruby-oci8.gemspec -- current
 
 test-win32-ruby18: $(GEMPKG)
-	c:\ruby\bin\gem install $(GEMPKG) --no-rdoc --no-ri
-	c:\ruby\bin\ruby -rubygems test\test_all.rb
+	$(RUBY_18)\bin\gem install $(GEMPKG) --no-rdoc --no-ri --local
+	$(RUBY_18)\bin\ruby -rubygems test\test_all.rb
 
 test-win32-ruby191: $(GEMPKG)
-	c:\ruby-1.9.1\bin\gem install $(GEMPKG) --no-rdoc --no-ri
-	c:\ruby-1.9.1\bin\ruby test\test_all.rb
+	$(RUBY_191)\bin\gem install $(GEMPKG) --no-rdoc --no-ri --local
+	$(RUBY_191)\bin\ruby test\test_all.rb
 
 test-win32: test-win32-ruby18 test-win32-ruby191

Modified: trunk/ruby-oci8/NEWS
===================================================================
--- trunk/ruby-oci8/NEWS	2009-05-17 10:08:39 UTC (rev 343)
+++ trunk/ruby-oci8/NEWS	2009-05-17 12:44:55 UTC (rev 344)
@@ -1,3 +1,39 @@
+2.0.2:
+
+* add new methods
+  - OCI8#select_one(sql, *bindvars)  -> first_row
+
+  - OCI8#ping   -> true or false
+
+    Verifies that the Oracle connection is alive.
+    OCI8#ping also can be used to flush all the pending OCI
+    client-side calls to the server if any exist.
+
+  - OCI8#client_identifier = client_id
+
+    Look at the following link to know what is the client identifier.
+      http://it.toolbox.com/blogs/database-solutions/oracle-session-tracing-part-i-16356
+
+    Note that the specified identifier doesn't change the v$session
+    immediately. It is done by the next network round trip
+    such as OCI8#exec or OCI8#ping.
+
+* fix problems when compiling with Oracle 9.2 and 8.0.
+  (reported by Axel Reinhold)
+
+* [dbi] fix to pass a newly added sanity check in dbi 0.4.1.
+  (reported by Dirk Herzhauser)
+
+* fix an error when executing "select NULL from dual".
+  http://rubyforge.org/forum/forum.php?thread_id=32468&forum_id=1078
+  (contributed by Raimonds Simanovskis)
+
+* [ruby 1.9] fix OCI8::BLOB to read/write binary. Prior to 2.0.1,
+  it was treated as text tagged with NLS_LANG encoding.
+
+* [ruby 1.9] fix to bind string data by the length got from String#bytesize
+  converted to OCI8.encoding, not by String#size.
+
 2.0.1:
 
 * release a binary gem for Windows, which contains libraries for both

Modified: trunk/ruby-oci8/VERSION
===================================================================
--- trunk/ruby-oci8/VERSION	2009-05-17 10:08:39 UTC (rev 343)
+++ trunk/ruby-oci8/VERSION	2009-05-17 12:44:55 UTC (rev 344)
@@ -1 +1 @@
-2.0.1
+2.0.2

Modified: trunk/ruby-oci8/dist-files
===================================================================
--- trunk/ruby-oci8/dist-files	2009-05-17 10:08:39 UTC (rev 343)
+++ trunk/ruby-oci8/dist-files	2009-05-17 12:44:55 UTC (rev 344)
@@ -43,6 +43,7 @@
 lib/oci8.rb.in
 lib/dbd/OCI8.rb
 lib/oci8/.document
+lib/oci8/bindtype.rb
 lib/oci8/compat.rb
 lib/oci8/datetime.rb
 lib/oci8/encoding-init.rb
@@ -61,6 +62,7 @@
 test/test_break.rb
 test/test_clob.rb
 test/test_connstr.rb
+test/test_encoding.rb
 test/test_datetime.rb
 test/test_dbi.rb
 test/test_dbi_clob.rb

Modified: trunk/ruby-oci8/ext/oci8/oci8.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/oci8.c	2009-05-17 10:08:39 UTC (rev 343)
+++ trunk/ruby-oci8/ext/oci8/oci8.c	2009-05-17 12:44:55 UTC (rev 344)
@@ -578,14 +578,16 @@
 static VALUE oci8_ping(VALUE self)
 {
     oci8_svcctx_t *svcctx = oci8_get_svcctx(self);
+    sword rv;
+
     if (have_OCIPing_nb) {
         /* Oracle 10.2 or upper */
-        oci_lc(OCIPing_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, OCI_DEFAULT));
+        rv = OCIPing_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, OCI_DEFAULT);
     } else {
         /* Oracle 10.1 or lower */
-        oci8_exec_sql(svcctx, "BEGIN NULL; END;", 0U, NULL, 0U, NULL, 1);
+        rv = oci8_exec_sql(svcctx, "BEGIN NULL; END;", 0U, NULL, 0U, NULL, 0);
     }
-    return self;
+    return rv == OCI_SUCCESS ? Qtrue : FALSE;
 }
 
 /*

Modified: trunk/ruby-oci8/ext/oci8/oci8lib.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/oci8lib.c	2009-05-17 10:08:39 UTC (rev 343)
+++ trunk/ruby-oci8/ext/oci8/oci8lib.c	2009-05-17 12:44:55 UTC (rev 344)
@@ -66,7 +66,7 @@
 static void oci8_handle_cleanup(oci8_base_t *base)
 {
     oci8_base_free(base);
-    free(base);
+    xfree(base);
 }
 
 static VALUE oci8_s_allocate(VALUE klass)




More information about the ruby-oci8-commit mailing list