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

Owner: bohica [...]
Requestors: bohica [...]

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

Subject: TYPEs and attributes on bind_col are not sticky
Download (untitled) / with headers
text/plain 914b
#!/usr/bin/env perl use warnings; use strict; use Data::Dumper; use DBI qw(neat :sql_types); use DBD::Oracle qw(:ora_types); my $h = DBI->connect('dbi:Oracle:host=aaa.bbb.local;sid=xxx', 'xxx','xxx', {RaiseError => 1}); my $s = $h->prepare(q/select 1,2 from dual/); $s->execute; $s->bind_col (1, undef, {TYPE => SQL_INTEGER, DiscardString => 1}); my $list = $s->fetchall_arrayref({}); print Dumper ($list); produces: $VAR1 = [ { '1' => '1', <--------- NOTE it is a string '2' => '2' } ]; but take the slice out of fetchall_arrayref and it produces: $VAR1 = [ { '1' => 1, <----- note a number '2' => '2' } ]; It is down to DBI calling bind_col again on the columns for the slice and DBD::Oracle not making the type and attributes sticky. Martin -- Martin J. Evans Wetherby, UK
Moved to github as issue 86

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

Please report any issues with to