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: 13865
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: champoux [...] pythian.com
Requestors: stefano [...] santoro.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.16
Fixed in: (no value)



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.415 (Entity 5.415)
Subject: DBI::db::column_info returns wrong column_size
X-RT-Original-Encoding: iso-8859-1
Content-Length: 381
Download (untitled) / with headers
text/plain 381b
Hi, I have run into this interesting SQL tidbit when I traced a $dbh->column_info call from my script. in the decode section that determines the column_size of a column of type NUMBER, if a NUMBER's data_precision is null then column_size gets a harcoded default of 38 In case of NUMBER would it not be better to use DATA_LENGTH which has the correct COLUMN_SIZE? Ciao Stefano
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-18809-1304379058-1005.13865-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 151
Download (untitled) / with headers
text/plain 151b
The code responsible is in DBD/Oracle.pm at line 603 an following. I need to consult w/ Gwen and Jared to know if changing the value there makes sense.
MIME-Version: 1.0
Subject: DBI::db::column_info returns wrong column_size (also for VARCHAR)
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-20562-1315810642-1803.13865-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 422
Download (untitled) / with headers
text/plain 422b
Le Lun 25 Jui 2005 18:31:52, guest a écrit : Show quoted text
> in the decode section that determines the column_size of a column of > type NUMBER, if a NUMBER's data_precision is null then column_size > gets a harcoded default of 38
Column size is also wrong on VARCHAR2 data types. According to the DBI spec, it should return the maximum length _in characters_, so DBD::Oracle should return tc.CHAR_LENGTH instead of tc.DATA_LENGTH
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2597-1318445874-1812.13865-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 329
Download (untitled) / with headers
text/plain 329b
For the length of INTEGER, the value of 38 seems to be correct, according to what I was able to find around (including http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1145132537055) For the VARCHAR2 size, though, I think you're are right. I have a patch ready, it'll be merged in the trunk in a few minutes.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-2597-1318445874-1812.13865-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-2597-1318445874-1812.13865-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2603-1318526822-499.13865-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 557
Download (untitled) / with headers
text/plain 557b
On Wed Oct 12 14:57:54 2011, PYTHIAN wrote: Show quoted text
> For the length of INTEGER, the value of 38 seems to be correct, > according to what I was able to find around (including >
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1145132537055) Show quoted text
> > For the VARCHAR2 size, though, I think you're are right. I have a > patch > ready, it'll be merged in the trunk in a few minutes.
Committed into master: https://github.com/yanick/DBD-Oracle/commit/e27fa49e42f52d635448207ee51689bd1fc513c6 Should come out with 1.33_00 (dev release of next week).


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.