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

People
Owner: Nobody in particular
Requestors: tomas.zemres [...] gmail.com
Cc:
AdminCc:

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



Subject: Bind output parameter CHAR(1), but it returns multiple characters
Binding output one-character parameter (type=ORA_CHAR size=1) does not work correctly. $sth->bind_param_inout(':out', \my $result, 1, {ora_type => ORA_CHAR}); See attached test file. It returns wrong output on DBD::Oracle=1.70 -- see output: perl=5.018002 DBI=1.631 DBD::Oracle=1.70 $VAR1 = '1 '; But it works currectly on version 1.68 -- see output: perl=5.018002 DBI=1.631 DBD::Oracle=1.68 $VAR1 = '1';
Subject: dbd-oracle-error.pl
#!/usr/bin/env perl use strict; use warnings; use DBI; use DBD::Oracle qw(:ora_types); use Data::Dumper; print "perl=$] DBI=$DBI::VERSION DBD::Oracle=$DBD::Oracle::VERSION\n"; my $dbh = DBI->connect( "dbi:Oracle:$ENV{ORA_DBNAME}", $ENV{ORA_USER}, $ENV{ORA_PASSWORD}, {RaiseError => 1} ); my $sth = $dbh->prepare(qq{ BEGIN :out := '1'; END; }); $sth->bind_param_inout(':out', \my $result, 1, {ora_type => ORA_CHAR}); $sth->execute(); print Dumper($result); $dbh->disconnect;
On Thu Mar 27 04:42:16 2014, tnt wrote: Show quoted text
> Binding output one-character parameter (type=ORA_CHAR size=1) does not > work correctly. > > $sth->bind_param_inout(':out', \my $result, 1, {ora_type => > ORA_CHAR}); > > See attached test file. > > It returns wrong output on DBD::Oracle=1.70 -- see output: > > perl=5.018002 DBI=1.631 DBD::Oracle=1.70 > $VAR1 = '1 '; > > But it works currectly on version 1.68 -- see output: > > perl=5.018002 DBI=1.631 DBD::Oracle=1.68 > $VAR1 = '1';
See https://github.com/pythian/DBD-Oracle/issues/15 Martin -- Martin J. Evans Wetherby, UK
On Thu Mar 27 04:42:16 2014, tnt wrote: Show quoted text
> Binding output one-character parameter (type=ORA_CHAR size=1) does not > work correctly. > > $sth->bind_param_inout(':out', \my $result, 1, {ora_type => > ORA_CHAR}); > > See attached test file. > > It returns wrong output on DBD::Oracle=1.70 -- see output: > > perl=5.018002 DBI=1.631 DBD::Oracle=1.70 > $VAR1 = '1 '; > > But it works currectly on version 1.68 -- see output: > > perl=5.018002 DBI=1.631 DBD::Oracle=1.68 > $VAR1 = '1';
Did you try the fix posted at https://github.com/pythian/DBD-Oracle/issues/15 Martin -- Martin J. Evans Wetherby, UK
See issue 15 on github where is a proposed fix that was never verified. We're moving to github for issues, this one has been stale for years now and there is a possible fix on it. Martin -- Martin J. Evans Wetherby, UK