On 24/03/11 15:26, Alexander Foken wrote:
Hello List,

could someone with a working DBD::Oracle 1.28 please verify that the tests 2 
and 4 in the attached test script fail?

All test pass with DBD::Oracle 1.23, tests 2 and 4 fail with DBD::Oracle 1.27.

Background information: I use Perl to provide access to an ancient legacy system, that 
system sends strings to a Perl server, the server invokes DBI methods and passes those 
strings as parameters. The call to $sth->bind_col() worked fine with DBD::Oracle 1.23, it 
crashes with "Invalid column number" on DBD::Oracle 1.27. I think DBD::Oracle 
broke somewhere between 1.23 and 1.27.

In dbdim.c of DBD::Oracle 1.27, dbd_st_bind_col() tests SvIOK(col), but makes 
no attempts to convert col to a number first. Older versions seem to use a 
default implementation of bind_col provided by DBI in DBI.xs. In that file, 
dbih_sth_bind_col() fetches the column number by calling SvIV(col).

Thanks,
Alexander

1..4
# DBD::Oracle version 1.28
ok 1 - bind_col(1,\$dummy) runs
not ok 2 - bind_col("1",\$dummy) runs
#   Failed test 'bind_col("1",\$dummy) runs'
#   at /home/martin/bind_col_str.pl line 32.
ok 3 - bind_col($n=1,\$dummy) runs
not ok 4 - bind_col($n="1",\$dummy) runs
#   Failed test 'bind_col($n="1",\$dummy) runs'
#   at /home/martin/bind_col_str.pl line 55.
# Looks like you failed 2 tests of 4.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

Reply via email to