Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBD-Oracle CPAN distribution.

Report information
The Basics
Id: 80566
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: sgoeldner [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.56



Subject: column_info: CHAR_LENGTH new in Oracle 9
Download (untitled) / with headers
text/plain 144b
Test t/70meta.t fails because ALL_TAB_COLUMNS.CHAR_LENGTH is new in Oracle 9. For older versions, I'll use DATA_LENGTH instead. Patch attached.
Subject: Oracle.pm.diff
Download Oracle.pm.diff
text/x-diff 1.3k
Index: lib/DBD/Oracle.pm =================================================================== --- lib/DBD/Oracle.pm (revision 15465) +++ lib/DBD/Oracle.pm (working copy) @@ -606,8 +606,9 @@ my $dbh = shift; my $attr = ( ref $_[0] eq 'HASH') ? $_[0] : { 'TABLE_SCHEM' => $_[1],'TABLE_NAME' => $_[2],'COLUMN_NAME' => $_[3] }; + my $ora_server_version = ora_server_version($dbh); my($typecase,$typecaseend) = ('',''); - if (ora_server_version($dbh)->[0] >= 8) { + if ($ora_server_version->[0] >= 8) { $typecase = <<'SQL'; CASE WHEN tc.DATA_TYPE LIKE 'TIMESTAMP% WITH% TIME ZONE' THEN 95 WHEN tc.DATA_TYPE LIKE 'TIMESTAMP%' THEN 93 @@ -617,6 +618,7 @@ SQL $typecaseend = 'END'; } + my $char_length = $ora_server_version->[0] < 9 ? 'DATA_LENGTH':'CHAR_LENGTH'; my $SQL = <<"SQL"; SELECT * FROM @@ -661,10 +663,10 @@ ) , 'FLOAT' , tc.DATA_PRECISION , 'DATE' , 19 - , 'VARCHAR2' , tc.CHAR_LENGTH - , 'CHAR' , tc.CHAR_LENGTH - , 'NVARCHAR2', tc.CHAR_LENGTH - , 'NCHAR' , tc.CHAR_LENGTH + , 'VARCHAR2' , tc.$char_length + , 'CHAR' , tc.$char_length + , 'NVARCHAR2', tc.$char_length + , 'NCHAR' , tc.$char_length , tc.DATA_LENGTH ) COLUMN_SIZE , decode( tc.DATA_TYPE
Download (untitled) / with headers
text/plain 401b
On Fri Nov 02 06:50:09 2012, SGOELDNER wrote: Show quoted text
> Test t/70meta.t fails because ALL_TAB_COLUMNS.CHAR_LENGTH is new > in Oracle 9. > For older versions, I'll use DATA_LENGTH instead. > Patch attached.
Thanks. Applied to subversion trunk and tested against Oracle 11 instant client. I don't have instant client 10 or Oracle 8 but as you have it must be ok there. Martin -- Martin J. Evans Wetherby, UK


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.