[svn:dbd-oracle] r15461 - in dbd-oracle/trunk: . t

[email protected] Tue, 30 Oct 2012 06:12:46 -0700 (PDT)
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: mjevans
Date: Tue Oct 30 06:12:45 2012
New Revision: 15461

Modified:
   dbd-oracle/trunk/Changes
   dbd-oracle/trunk/t/26exe_array.t
   dbd-oracle/trunk/t/32xmltype.t

Log:
rt 80487 - skip xmltype test when oracle < 9
fix newly introduced issue in 26exe_array.t - forget to update INC to pickup new pm


Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Tue Oct 30 06:12:45 2012
@@ -13,6 +13,9 @@
     resulted in an undefined warning. Thanks to Steffen Goeldner for
     RT and patches.
 
+  - Fix RT80487. Skip XMLType tests if Oracle less than V9. Thanks to
+    Steffen Goeldner.
+
   [MISCELLANEOUS]
 
   - The original 26exe_array test was replaced some time ago with a

Modified: dbd-oracle/trunk/t/26exe_array.t
==============================================================================
--- dbd-oracle/trunk/t/26exe_array.t	(original)
+++ dbd-oracle/trunk/t/26exe_array.t	Tue Oct 30 06:12:45 2012
@@ -9,6 +9,8 @@
 use Data::Dumper;
 require 'nchar_test_lib.pl';
 
+use lib './t';
+
 $| = 1;
 
 my $has_test_nowarnings = 1;

Modified: dbd-oracle/trunk/t/32xmltype.t
==============================================================================
--- dbd-oracle/trunk/t/32xmltype.t	(original)
+++ dbd-oracle/trunk/t/32xmltype.t	Tue Oct 30 06:12:45 2012
@@ -13,7 +13,7 @@
 ## By John Scoles, The Pythian Group
 ## ----------------------------------------------------------------------------
 ##  Just a few checks to see if one can insert small and large xml files
-##  Nothing fancy. 
+##  Nothing fancy.
 ## ----------------------------------------------------------------------------
 
 # create a database handle
@@ -21,11 +21,13 @@
 my $dbuser = $ENV{ORACLE_USERID} || 'scott/tiger';
 my $dbh;
 
-eval {$dbh = DBI->connect($dsn, $dbuser, '', { RaiseError=>1, 
+eval {$dbh = DBI->connect($dsn, $dbuser, '', { RaiseError=>1,
                                                AutoCommit=>1,
                                                PrintError => 0 })};
 
 if ($dbh) {
+    plan skip_all => "XMLTYPE new in Oracle 9"
+        if $dbh->func('ora_server_version')->[0] < 9;
     plan tests => 3;
 } else {
     plan skip_all => "Unable to connect to Oracle"
@@ -65,7 +67,7 @@
 $stmt = "INSERT INTO ".$table." VALUES (1,?)";
 
 $sth =$dbh-> prepare($stmt);
-  
+
 $sth-> bind_param(1, $small_xml, { ora_type => ORA_XMLTYPE });
 
 ok ($sth->execute(), '... execute for small XML return true');