On Thu, Oct 21, 2004 at 06:57:20PM +0200, Honza Pazdziora wrote:
> On Thu, Oct 21, 2004 at 06:46:15PM +0200, H.Merijn Brand wrote:
> > On Thu 21 Oct 2004 18:20, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > Please try this patch over the original.

> > Describe failed during DBI::st=HASH(0x402091a8)->FETCH(NUM_OF_FIELDS): 6553: 
> > ORA-06553: PLS-561: character set mismatch on value for parameter 'ARG2'
> 
> The same on 5.8.3 on 9.2 Linux client against 8.0.5 Solaris server:

Okay. I've had enough of trying to finesse this one. Here's a patch
that disables that block of tests if the client or the server is <9.0.

Let me know how it goes. Thanks.

Tim.

p.s. I've also removed the bind_col that was triggering the failure.
I'd be curious what happens if you comment out the first skip() call.


Index: t/25plsql.t
===================================================================
--- t/25plsql.t (revision 509)
+++ t/25plsql.t (working copy)
@@ -302,6 +302,9 @@
 
     print "test nvarchar2 arg passing to functions\n";
     # http://www.nntp.perl.org/group/perl.dbi.users/24217
+    my $ora_server_version = $dbh->func("ora_server_version");
+    skip "Client/server version < 9.0"
+       if DBD::Oracle::ORA_OCI() < 9.0 || $ora_server_version < 9.8;
     my $func_name = "dbd_oracle_nvctest".($ENV{DBD_ORACLE_SEQ}||'');
     $dbh->do(qq{
        CREATE OR REPLACE FUNCTION $func_name(arg nvarchar2, arg2 nvarchar2)
@@ -313,23 +316,22 @@
             return 1;
          end if;
        END;
-    }) or skip("Can't create a function ($DBI::errstr)", 16);
+    }) or skip("Can't create a function ($DBI::errstr)", 15);
     my $sth = $dbh->prepare(qq{SELECT $func_name(?, ?) FROM DUAL}, {
        # Oracle 8 describe fails with ORA-06553: PLS-561: charset mismatch
        ora_check_sql => 0,
     });
-    ok(0, $sth, "Can't prepare select from function ($DBI::errstr)");
-    skip("Can't select from function ($DBI::errstr)", 15) unless $sth;
-    ok(0, $sth->bind_columns(\my $returnVal));
+    ok(0, $sth, sprintf("Can't prepare select from function (%s)",$DBI::errstr||''));
+    skip("Can't select from function ($DBI::errstr)", 14) unless $sth;
     for (1..2) {
        ok(0, $sth->bind_param(1, "foo", { ora_csform => SQLCS_NCHAR }));
        ok(0, $sth->bind_param(2, "bar", { ora_csform => SQLCS_NCHAR }));
        ok(0, $sth->execute());
-       ok(0, $sth->fetch);
+       ok(0, my($returnVal) = $sth->fetchrow_array);
        ok(0, $returnVal eq "1");
     }
     ok(0, $sth->execute("baz",undef));
-    ok(0, $sth->fetch);
+    ok(0, my($returnVal) = $sth->fetchrow_array);
     ok(0, $returnVal eq "-1");
     ok(0, $dbh->do(qq{drop function $func_name}));
 }
@@ -348,7 +350,7 @@
 ok(0, !$dbh->ping);
 
 exit 0;
-BEGIN { $tests = 83 }
+BEGIN { $tests = 82 }
 # end.
 
 __END__

Reply via email to