Home > Archive > Oracle PERL DBD > November 2005 > [svn:dbd-oracle] r2273 - in dbd-oracle/trunk: . t









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [svn:dbd-oracle] r2273 - in dbd-oracle/trunk: . t
timbo@cvs.perl.org

2005-11-25, 9:24 am

Author: timbo
Date: Fri Nov 25 05:58:15 2005
New Revision: 2273

Modified:
dbd-oracle/trunk/Changes
dbd-oracle/trunk/dbdimp.c
dbd-oracle/trunk/oci8.c
dbd-oracle/trunk/t/20select.t
Log:
Fixed $sth->{PRECISION} for utf-8, with thanks Eric Lenio.


Modified: dbd-oracle/trunk/Changes
====================
====================
====================
==================
--- dbd-oracle/trunk/Changes (original)
+++ dbd-oracle/trunk/Changes Fri Nov 25 05:58:15 2005
@@ -3,6 +3,7 @@
Fixed csform setting for Oracle 8.0.
Fixed csform setting for some UTF8 cases.
Fixed INTERVAL DAY TO SECOND thanks to Honza Pazdziora.
+ Fixed $sth->{PRECISION} for utf-8, with thanks Eric Lenio.

Added support for nested cursors in select lists thanks to Charles Jardine.
Added "Trailing Spaces" section to docs thanks to Michael A Chase.

Modified: dbd-oracle/trunk/dbdimp.c
====================
====================
====================
==================
--- dbd-oracle/trunk/dbdimp.c (original)
+++ dbd-oracle/trunk/dbdimp.c Fri Nov 25 05:58:15 2005
@@ -421,7 +421,7 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_db
charsetid, ncharsetid, status );
if (status != OCI_SUCCESS) {
oci_error(dbh, NULL, status,
- "OCIEnvNlsCreate (check ORACLE_HOME and NLS settings etc.)");
+ "OCIEnvNlsCreate (check ORACLE_HOME and NLS settings, permissions etc.)");
return 0;
}


Modified: dbd-oracle/trunk/oci8.c
====================
====================
====================
==================
--- dbd-oracle/trunk/oci8.c (original)
+++ dbd-oracle/trunk/oci8.c Fri Nov 25 05:58:15 2005
@@ -1223,9 +1223,9 @@ dbd_describe(SV *h, imp_sth_t *imp_sth)
/* FALLTHRU */
case 96: /* CHAR */
fbh->disize = fbh->dbsize;
+ fbh->prec = fbh->disize;
if (CS_IS_UTF8(fbh->csid))
fbh->disize = fbh->dbsize * 4;
- fbh->prec = fbh->disize;
break;
case 23: /* RAW */
fbh->disize = fbh->dbsize * 2;

Modified: dbd-oracle/trunk/t/20select.t
====================
====================
====================
==================
--- dbd-oracle/trunk/t/20select.t (original)
+++ dbd-oracle/trunk/t/20select.t Fri Nov 25 05:58:15 2005
@@ -54,7 +54,7 @@ my @test_sets = (
my $sz = 8;

my $tests = 2;
-my $tests_per_set = 12;
+my $tests_per_set = 14;
$tests += @test_sets * $tests_per_set;
print "1..$tests\n";

@@ -107,6 +107,13 @@ sub run_select_tests {
ok(0, $tmp->[2][1] =~ m/$data2/,
cdif($tmp->[2][1], $data2, "Len ".length($tmp->[2][1])) );

+ # 10/25/2005 lenio: adding tests around $sth->{PRECISION}:
+ # 1st column, an integer, should have PRECISION of 38
+ ok(0, $sth->{PRECISION}->[0] == 38);
+ # 2nd column, character type, should have PRECISION of 10
+ ok(0, $sth->{PRECISION}->[1] == 10);
+ # 3rd column, date type, should have PRECISION of 75
+ ok(0, $sth->{PRECISION}->[2] == 75);

} # end of run_select_tests

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com