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

[email protected] Sun, 20 Mar 2011 10:25:55 -0700 (PDT)
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: byterock
Date: Sun Mar 20 10:25:55 2011
New Revision: 14763

Modified:
   dbd-oracle/trunk/dbdimp.h
   dbd-oracle/trunk/t/26exe_array.t

Log:
64 bit fixes for t/26exe_array.t

Modified: dbd-oracle/trunk/dbdimp.h
==============================================================================
--- dbd-oracle/trunk/dbdimp.h	(original)
+++ dbd-oracle/trunk/dbdimp.h	Sun Mar 20 10:25:55 2011
@@ -316,7 +316,6 @@
 void ora_free_fbh_contents _((imp_fbh_t *fbh));
 void ora_free_templob _((SV *sth, imp_sth_t *imp_sth, OCILobLocator *lobloc));
 int ora_dbtype_is_long _((int dbtype));
-int oratype_rebind_ok _((int dbtype));
 fb_ary_t *fb_ary_alloc _((ub4 bufl, int size));
 fb_ary_t *fb_ary_cb_alloc _((ub4 piece_size,ub4 max_len, int size));
 

Modified: dbd-oracle/trunk/t/26exe_array.t
==============================================================================
--- dbd-oracle/trunk/t/26exe_array.t	(original)
+++ dbd-oracle/trunk/t/26exe_array.t	Sun Mar 20 10:25:55 2011
@@ -43,6 +43,11 @@
 if (!$dbh) {
     plan skip_all => "Unable to connect to Oracle";
 }
+else {
+    plan tests=>406;
+}
+
+
 #$dbh->{PrintError} = 1;
 my $has_test_nowarnings = 1;
 eval "require Test::NoWarnings";
@@ -55,13 +60,12 @@
     }
     Test::NoWarnings::had_no_warnings()
           if ($has_test_nowarnings);
-    done_testing();
 }
 
 sub error_handler
 {
     @captured_error = @_;
-    note("***** error handler called *****");
+    diag("***** error handler called *****");
     0;                          # pass errors on
 }
 
@@ -100,7 +104,7 @@
         $dbh->do(qq/drop table $table/);
         $dbh->do(qq/drop table $table2/);
     };
-    note("Table dropped");
+    diag("Table dropped");
 }
 
 # clear the named table of rows
@@ -127,7 +131,7 @@
 {
     my ($tsts, $expected) = @_;
 
-    note(Data::Dumper->Dump([$tsts], [qw(ArrayTupleStatus)]));
+    diag(Data::Dumper->Dump([$tsts], [qw(ArrayTupleStatus)]));
     my $row = 0;
     foreach my $s (@$tsts) {
         if (ref($expected->[$row])) {
@@ -152,7 +156,7 @@
     my ($dbh, $sth, $ref) = @_;
 
     die "need hashref arg" if (!$ref || (ref($ref) ne 'HASH'));
-    note("insert " . join(", ", map {"$_ = ". DBI::neat($ref->{$_})} keys %$ref ));
+    diag("insert " . join(", ", map {"$_ = ". DBI::neat($ref->{$_})} keys %$ref ));
     # DBD::Oracle supports MAS don't compensate for it not
     if ($ref->{requires_mas} && $dbh->{Driver}->{Name} eq 'Oracle') {
         delete $ref->{requires_mas};
@@ -209,7 +213,7 @@
             }
             return 'mas';
         }
-        ok(!$@, 'no error in execute_array eval') or note($@);
+        ok(!$@, 'no error in execute_array eval') or diag($@);
     }
     $dbh->commit if $ref->{commit};
 
@@ -253,11 +257,11 @@
 {
     my ($dbh, $ref) = @_;
 
-    note('simple tests ' . join(", ", map {"$_ = $ref->{$_}"} keys %$ref ));
+    diag('simple tests ' . join(", ", map {"$_ = $ref->{$_}"} keys %$ref ));
 
-    note("  all param arrays the same size");
+    diag("  all param arrays the same size");
     foreach my $commit (1,0) {
-        note("    Autocommit: $commit");
+        diag("    Autocommit: $commit");
         clear_table($dbh, $table);
         $dbh->begin_work if !$commit;
 
@@ -270,7 +274,7 @@
         check_data($dbh, \@p1, \@p2);
     }
 
-    note "  Not all param arrays the same size";
+    diag ("  Not all param arrays the same size");
     clear_table($dbh, $table);
     my $sth = $dbh->prepare(qq/insert into $table values(?,?)/);
 
@@ -281,7 +285,7 @@
                         tuple => [1, 1, 1, 1, 1], %$ref});
     check_data($dbh, \@p1, ['one', undef, undef, undef, undef]);
 
-    note "  Not all param arrays the same size with bind on execute_array";
+    diag ("  Not all param arrays the same size with bind on execute_array");
     clear_table($dbh, $table);
     $sth = $dbh->prepare(qq/insert into $table values(?,?)/);
 
@@ -291,7 +295,7 @@
                         params => [\@p1, [qw(one)]]});
     check_data($dbh, \@p1, ['one', undef, undef, undef, undef]);
 
-    note "  no parameters";
+    diag ("  no parameters");
     clear_table($dbh, $table);
     $sth = $dbh->prepare(qq/insert into $table values(?,?)/);
 
@@ -321,9 +325,9 @@
 
     die "need hashref arg" if (!$ref || (ref($ref) ne 'HASH'));
 
-    note('error tests ' . join(", ", map {"$_ = $ref->{$_}"} keys %$ref ));
+    diag('error tests ' . join(", ", map {"$_ = $ref->{$_}"} keys %$ref ));
     {
-        note("Last row in error");
+        diag("Last row in error");
 
         clear_table($dbh, $table);
         my $sth = $dbh->prepare(qq/insert into $table values(?,?)/);
@@ -338,7 +342,7 @@
     }
 
     {
-        note("2nd last row in error");
+        diag("2nd last row in error");
         clear_table($dbh, $table);
         my $sth = $dbh->prepare(qq/insert into $table values(?,?)/);
         my @pe1 = @p1;
@@ -353,9 +357,9 @@
 
 sub fetch_sub
 {
-    note("fetch_sub $fetch_row");
+    diag("fetch_sub $fetch_row");
     if ($fetch_row == @p1) {
-        note('returning undef');
+        diag('returning undef');
         $fetch_row = 0;
         return;
     }
@@ -368,7 +372,7 @@
 {
     my ($dbh, $ref) = @_;
 
-    note("row_size via execute_for_fetch");
+    diag("row_size via execute_for_fetch");
 
     $fetch_row = 0;
     clear_table($dbh, $table);
@@ -383,7 +387,7 @@
     # it is not easy (if at all possible) to know if an ODBC driver can
     # handle MAS or not. If it errors the driver probably does not have MAS
     # so the error is ignored and a diagnostic is output.
-    note("row_size via select");
+    diag("row_size via select");
     clear_table($dbh, $table);
     $sth = $dbh->prepare(qq/insert into $table values(?,?)/);
     my $sth2 = $dbh->prepare(qq/select * from $table2/);
@@ -404,7 +408,7 @@
 {
     my ($dbh, $ref) = @_;
 
-    note("update test");
+    diag("update test");
 
     $fetch_row = 0;
     clear_table($dbh, $table);