Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Odd issue with DBI/DBD::Sybase
Date: Feb 12 2008 7:18PM
Wechsler, Steven wrote:
> Hi Michael,
> I'm attaching the output. I sent it privately because it's too big for
> the list. I appreciate your taking a look at it.
> We're using FreeTDS.
I see you're also using a pretty old version of DBD::Sybase.
However I think you're seeing a FreeTDS bug. If we look in the trace
around the prepare() calls with placeholders we see:
-> prepare for DBD::Sybase::db (DBI::db=HASH(0x87256b4)~0x872a388
select a.* from nick_user_profile..up_UserAttribute a,
where a.UserID = b.UserID and b.idnum10387 >= ? and b.idnum10387 < ?')
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x872a388), id=)
ase::st, 876dfa0, Null!)
dbih_make_com(DBI::db=HASH(0x872a388), 872b730, DBD::Sybase::st,
396, 0) thr
dbd_preparse parameter :p1 ()
dbd_preparse parameter :p2 ()
dbd_preparse scanned 2 distinct placeholders
syb_st_prepare: ct_dynamic(CS_PREPARE) for DBD3
syb_st_prepare: ct_dynamic(CS_DESCRIBE_INPUT) for DBD3
syb_st_prepare: ct_results(CS_DESCRIBE_INPUT) for DBD3 - restype 4051
syb_st_prepare: ct_res_info(CS_DESCRIBE_INPUT) statement has 0
syb_st_prepare: ct_results(CS_DESCRIBE_INPUT) for DBD3 - restype 4046
<- prepare= DBI::st=HASH(0x87a174c) at rewrite_table.pl line 317
Notice how ct_res_info(CS_DESCRIBE_INPUT) thinks that there are no
parameters when there should be 2 parameters found.
And that means that the DBD::Sybase internal data structures don't get
populated as they should. I'm actually surprised that it even works at all!
Michael Peppler - Peppler Consulting SaRL
email@example.com - http://www.peppler.org
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html