I'm having a problem using placeholders for a binary column. If I do a
query like 'select * from X where id=?' and then execute with the binary
value for the placeholder, it returns no rows. But I know there are rows
there that match because if I make a statement with the id set explicitly to
the binary value I want, it does return rows.
I suspect there is a problem with the quoting of binary fields when used as
placeholders, but maybe I'm doing something wrong.
Any ideas? I'm using DBI 1.18, DBD::Sybase 0.91 and Perl 5.6.0. I have
included my test code and a trace(9) output below.
Mitch
=================================================================
#!/usr/local/bin/perl5 -w
use strict;
use DBI 1.18 qw(:sql_types);
DBI->trace(9);
my $dbh = DBI->connect(
'dbi:Sybase:server=MY_SERVER;database=scratch',
'MY_USERNAME',
'MY_PWD',
{ RaiseError => 1, syb_use_bin_0x => 1}
);
my $sql = <<"SQL";
create table #mhelle(
id binary(8) primary key,
number smallint default 0,
)
SQL
$dbh->do($sql);
my $deal = '0x000001ac00005256';
$dbh->do("insert #mhelle(id, number) values($deal, 1)");
my $psql = 'select * from #mhelle where id=?';
my $esql = "select * from #mhelle where id=$deal";
my $sth = $dbh->prepare($psql);
$sth->bind_param(1, $deal, {TYPE => SQL_BINARY}) or die;
$sth->execute() or die;
DBI::dump_results($sth);
my $sth2 = $dbh->prepare($psql);
$sth2->execute($deal) or die;
DBI::dump_results($sth2);
my $sth3 = $dbh->prepare($esql);
$sth3->execute();
DBI::dump_results($sth3);
my $d2;
($d2 = $deal) =~ s/^0x//;
my $sth4 = $dbh->prepare($psql);
$sth4->bind_param(1, $d2, {TYPE => SQL_BINARY}) or die;
$sth4->execute() or die;
DBI::dump_results($sth4);
END {
$dbh->do("drop table #mhelle");
}
=======================================================================
DBI 1.18-nothread dispatch trace level set to 9
-> DBI->connect(dbi:Sybase:server=X;database=scratch, X, ****,
HASH(0x15f160))
-> DBI->install_driver(Sybase) for perl=5.006 pid=26585 ruid=911 euid=9
11
syb_init() -> DBD::Sybase 0.91 initialized
OpenClient version: Sybase Client-Library/11.1.1/P-EBF9065/sun_svr4/SPA
RC Solaris 2.5.1/1/OPT/Tue Jun 13 20:10:42 2000
install_driver: DBD::Sybase version 0.91 loaded from /usr/local/lib/
perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm
New DBI::dr (for DBD::Sybase::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x1e4654)=>DBI::dr=HASH(0x21b7b0), DBD::
Sybase::dr, 0, Null!)
dbih_make_com(Null!, DBD::Sybase::dr, 84)
dbih_setup_attrib(DBI::dr=HASH(0x21b7b0), Err, Null!) SCALAR(0x1c0d28)
(already defined)
dbih_setup_attrib(DBI::dr=HASH(0x21b7b0), State, Null!) SCALAR(0x1c0ce0
) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x21b7b0), Errstr, Null!) SCALAR(0x1c0d0
4) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x21b7b0), Handlers, Null!) ARRAY(0x21b7
2c) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x21b7b0), Debug, Null!) 0 (already defi
ned)
<- install_driver= DBI::dr=HASH(0x1e4654)
>> connect DISPATCH (DBI::dr=HASH(0x1e4654) rc1/3 @5 g0 a213230) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 416.
-> connect for DBD::Sybase::dr (DBI::dr=HASH(0x1e4654)~0x21b7b0 'server
=X;database=scratch' 'X' **** HASH(0x16a2f8))
New DBI::db (for DBD::Sybase::db, parent=DBI::dr=HASH(0x21b7b0), id=)
dbih_setup_handle(DBI::db=HASH(0x21b768)=>DBI::db=HASH(0x21b708), DBD::
Sybase::db, 1e2394, Null!)
dbih_make_com(DBI::dr=HASH(0x21b7b0), DBD::Sybase::db, 1720)
dbih_setup_attrib(DBI::db=HASH(0x21b708), Err, DBI::dr=HASH(0x21b7b0))
SCALAR(0x1c0d28) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x21b708), State, DBI::dr=HASH(0x21b7b0)
) SCALAR(0x1c0ce0) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x21b708), Errstr, DBI::dr=HASH(0x21b7b0
)) SCALAR(0x1c0d04) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x21b708), Handlers, DBI::dr=HASH(0x21b7
b0)) ARRAY(0x21b72c) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x21b708), Debug, DBI::dr=HASH(0x21b7b0)
) 0 (already defined)
syb_db_use() -> ct_command(use scratch)
syb_db_login() -> checking for chained transactions
syb_db_login() -> chained transactions are supported
<- connect= DBI::db=HASH(0x21b768) at /usr/local/lib/perl5/site_perl/5.
6.0/sun4-solaris/DBI.pm line 416.
>> STORE DISPATCH (DBI::db=HASH(0x21b708) rc2/1 @3 g0 a20ee38) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 441.
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x21b708)~INNER 'RaiseError'
1)
STORE DBI::db=HASH(0x21b708) 'RaiseError' => 1
<- STORE= 1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm
line 441.
>> STORE DISPATCH (DBI::db=HASH(0x21b708) rc2/1 @3 g0 a20ee38) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 441.
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x21b708)~INNER 'PrintError'
1)
STORE DBI::db=HASH(0x21b708) 'PrintError' => 1
<- STORE= 1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm
line 441.
>> STORE DISPATCH (DBI::db=HASH(0x21b708) rc2/1 @3 g0 a20ee38) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 441.
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x21b708)~INNER 'AutoCommit'
1)
<- STORE= 1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm
line 441.
>> STORE DISPATCH (DBI::db=HASH(0x21b708) rc2/1 @3 g0 a20ee38) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 445.
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x21b708)~INNER 'syb_use_bin
_0x' 0)
<- STORE= 1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm
line 445.
<- connect= DBI::db=HASH(0x21b768)
>> do DISPATCH (DBI::db=HASH(0x21b768) rc2/1 @2 g0 a20ef70) at
./test.pl line 20.
-> do for DBD::Sybase::db (DBI::db=HASH(0x21b768)~0x21b708 'create tabl
e #mhelle(
id binary(8) primary key,
number smallint default 0,
)
')
>> prepare DISPATCH (DBI::db=HASH(0x21b708) rc1/2 @3 g0 a20ea00) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 120.
2 -> prepare for DBD::Sybase::db (DBI::db=HASH(0x21b708)~INNER 'create ta
ble #mhelle(
id binary(8) primary key,
number smallint default 0,
)
' undef)
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x21b708), id=)
dbih_setup_handle(DBI::st=HASH(0x21b780)=>DBI::st=HASH(0x1c3a38), DBD::
Sybase::st, 21b798, Null!)
dbih_make_com(DBI::db=HASH(0x21b708), DBD::Sybase::st, 232)
dbih_setup_attrib(DBI::st=HASH(0x1c3a38), Err, DBI::db=HASH(0x21b708))
SCALAR(0x1c0d28) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x1c3a38), State, DBI::db=HASH(0x21b708)
) SCALAR(0x1c0ce0) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x1c3a38), Errstr, DBI::db=HASH(0x21b708
)) SCALAR(0x1c0d04) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x1c3a38), Handlers, DBI::db=HASH(0x21b7
08)) ARRAY(0x21b72c) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x1c3a38), Debug, DBI::db=HASH(0x21b708)
) 0 (already defined)
2 <- prepare= DBI::st=HASH(0x21b780) at /usr/local/lib/perl5/site_perl/5.
6.0/sun4-solaris/DBD/Sybase.pm line 120.
>> execute DISPATCH (DBI::st=HASH(0x21b780) rc1/1 @1 g0 a2136e0) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 121.
-> execute for DBD::Sybase::st (DBI::st=HASH(0x21b780)~0x1c3a38)
syb_st_execute() -> ct_command() OK
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4047) == 1
st_next_result() -> ct_results(4046) == 1
ct_execute() final retcode = -205
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_execute() -> got CS_CMD_DONE: resetting ACTIVE, moreResults, dyn
_execed
<- execute= -1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD
/Sybase.pm line 121.
>> err DISPATCH (DBI::st=HASH(0x21b780) rc1/1 @1 g0 a216200) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 122.
-> err in DBD::_::common for DBD::Sybase::st (DBI::st=HASH(0x21b780)~0x
1c3a38)
<- err= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/
Sybase.pm line 122.
>> rows DISPATCH (DBI::st=HASH(0x21b780) rc1/1 @1 g0 a213518) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 123.
-> rows for DBD::Sybase::st (DBI::st=HASH(0x21b780)~0x1c3a38)
<- rows= -1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sy
base.pm line 123.
>> FETCH DISPATCH (DBI::st=HASH(0x1c3a38) rc2/1 @2 g0 a2160b0) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 124.
-> FETCH for DBD::Sybase::st (DBI::st=HASH(0x1c3a38)~INNER 'syb_more_re
sults')
.. FETCH DBI::st=HASH(0x1c3a38) 'syb_more_results' = undef
<- FETCH= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DB
D/Sybase.pm line 124.
<- do= -1 at ./test.pl line 20.
>> DESTROY DISPATCH (DBI::st=HASH(0x21b780) rc1/1 @1 g0 a0) at ./te
st.pl line 21.
<> DESTROY ignored for outer handle DBI::st=HASH(0x21b780) (inner DBI::
st=HASH(0x1c3a38))
>> DESTROY DISPATCH (DBI::st=HASH(0x1c3a38) rc1/1 @1 g0 a0) at ./te
st.pl line 21.
-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x1c3a38)~INNER)
syb_st_destroy: called on 17cd18...
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef at ./test.pl line 21.
dbih_clearcom (h 0x21b780, com 0x17cd18):
FLAGS 0x191: COMSET Warn RaiseError PrintError
TYPE 3
PARENT DBI::db=HASH(0x21b708)
KIDS 0 (0 active)
IMP_DATA undef in 'DBD::Sybase::st'
LongReadLen 32768
NUM_OF_FIELDS 0
NUM_OF_PARAMS 0
dbih_clearcom 0x21b780 (com 0x17cd18, type 3) done.
>> do DISPATCH (DBI::db=HASH(0x21b768) rc2/1 @2 g0 a20ef70) at
./test.pl line 22.
-> do for DBD::Sybase::db (DBI::db=HASH(0x21b768)~0x21b708 'insert #mhe
lle(id, number) values(0x000001ac00005256, 1)')
>> prepare DISPATCH (DBI::db=HASH(0x21b708) rc1/2 @3 g0 a20ea00) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 120.
2 -> prepare for DBD::Sybase::db (DBI::db=HASH(0x21b708)~INNER 'insert #m
helle(id, number) values(0x000001ac00005256, 1)' undef)
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x21b708), id=)
dbih_setup_handle(DBI::st=HASH(0x226534)=>DBI::st=HASH(0x17760c), DBD::
Sybase::st, 226558, Null!)
dbih_make_com(DBI::db=HASH(0x21b708), DBD::Sybase::st, 232)
dbih_setup_attrib(DBI::st=HASH(0x17760c), Err, DBI::db=HASH(0x21b708))
SCALAR(0x1c0d28) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x17760c), State, DBI::db=HASH(0x21b708)
) SCALAR(0x1c0ce0) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x17760c), Errstr, DBI::db=HASH(0x21b708
)) SCALAR(0x1c0d04) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x17760c), Handlers, DBI::db=HASH(0x21b7
08)) ARRAY(0x21b72c) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x17760c), Debug, DBI::db=HASH(0x21b708)
) 0 (already defined)
2 <- prepare= DBI::st=HASH(0x226534) at /usr/local/lib/perl5/site_perl/5.
6.0/sun4-solaris/DBD/Sybase.pm line 120.
>> execute DISPATCH (DBI::st=HASH(0x226534) rc1/1 @1 g0 a2136e0) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 121.
-> execute for DBD::Sybase::st (DBI::st=HASH(0x226534)~0x17760c)
syb_st_execute() -> ct_command() OK
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4047) == 1
st_next_result() -> ct_results(4046) == 1
ct_execute() final retcode = -205
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_execute() -> got CS_CMD_DONE: resetting ACTIVE, moreResults, dyn
_execed
<- execute= 1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/
Sybase.pm line 121.
>> err DISPATCH (DBI::st=HASH(0x226534) rc1/1 @1 g0 a216200) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 122.
-> err for DBD::Sybase::st (DBI::st=HASH(0x226534)~0x17760c)
<- err= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/
Sybase.pm line 122.
>> rows DISPATCH (DBI::st=HASH(0x226534) rc1/1 @1 g0 a213518) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 123.
-> rows for DBD::Sybase::st (DBI::st=HASH(0x226534)~0x17760c)
<- rows= 1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Syb
ase.pm line 123.
>> FETCH DISPATCH (DBI::st=HASH(0x17760c) rc2/1 @2 g0 a2160b0) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 124.
-> FETCH for DBD::Sybase::st (DBI::st=HASH(0x17760c)~INNER 'syb_more_re
sults')
.. FETCH DBI::st=HASH(0x17760c) 'syb_more_results' = undef
<- FETCH= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DB
D/Sybase.pm line 124.
<- do= 1 at ./test.pl line 22.
>> DESTROY DISPATCH (DBI::st=HASH(0x226534) rc1/1 @1 g0 a0) at ./te
st.pl line 24.
<> DESTROY ignored for outer handle DBI::st=HASH(0x226534) (inner DBI::
st=HASH(0x17760c))
>> DESTROY DISPATCH (DBI::st=HASH(0x17760c) rc1/1 @1 g0 a0) at ./te
st.pl line 24.
-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x17760c)~INNER)
syb_st_destroy: called on 17cd18...
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef at ./test.pl line 24.
dbih_clearcom (h 0x226534, com 0x17cd18):
FLAGS 0x191: COMSET Warn RaiseError PrintError
TYPE 3
PARENT DBI::db=HASH(0x21b708)
KIDS 0 (0 active)
IMP_DATA undef in 'DBD::Sybase::st'
LongReadLen 32768
NUM_OF_FIELDS 0
NUM_OF_PARAMS 0
dbih_clearcom 0x226534 (com 0x17cd18, type 3) done.
>> prepare DISPATCH (DBI::db=HASH(0x21b768) rc2/1 @2 g0 a20ea00) at
./test.pl line 27.
-> prepare for DBD::Sybase::db (DBI::db=HASH(0x21b768)~0x21b708 'select
* from #mhelle where id=?')
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x21b708), id=)
dbih_setup_handle(DBI::st=HASH(0x177540)=>DBI::st=HASH(0x21b6e4), DBD::
Sybase::st, 177654, Null!)
dbih_make_com(DBI::db=HASH(0x21b708), DBD::Sybase::st, 232)
dbih_setup_attrib(DBI::st=HASH(0x21b6e4), Err, DBI::db=HASH(0x21b708))
SCALAR(0x1c0d28) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x21b6e4), State, DBI::db=HASH(0x21b708)
) SCALAR(0x1c0ce0) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x21b6e4), Errstr, DBI::db=HASH(0x21b708
)) SCALAR(0x1c0d04) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x21b6e4), Handlers, DBI::db=HASH(0x21b7
08)) ARRAY(0x21b72c) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x21b6e4), Debug, DBI::db=HASH(0x21b708)
) 0 (already defined)
dbd_preparse scanned 1 distinct placeholders
syb_st_prepare: ct_dynamic(CS_PREPARE) for DBD1
<- prepare= DBI::st=HASH(0x177540) at ./test.pl line 27.
>> bind_param DISPATCH (DBI::st=HASH(0x177540) rc1/1 @4 g0 a2134e8) at
./test.pl line 28.
-> bind_param for DBD::Sybase::st (DBI::st=HASH(0x177540)~0x21b6e4 1 '0
x000001ac00005256' HASH(0x15f160))
bind :p1 <== '0x000001ac00005256' (attribs: HASH(0x15f160))
bind :p1 <== '0x000001ac00005256' (size 18/19/0, ptype 4, otype 0)
bind :p1 <== '0x000001ac00005256' (size 18, ok 1)
<- bind_param= 1 at ./test.pl line 28.
>> execute DISPATCH (DBI::st=HASH(0x177540) rc1/1 @1 g0 a2136e0) at
./test.pl line 29.
-> execute for DBD::Sybase::st (DBI::st=HASH(0x177540)~0x21b6e4)
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4040) == 1
ct_res_info() returns 2 columns
ct_describe(0): type = 1, maxlen = 8
describe() -> col 0, type 1, realtype 1
ct_describe(1): type = 7, maxlen = 2
describe() -> col 1, type 8, realtype 7
describe() retcode = 1
st_next_result() -> lasterr = 0, lastsev = 0
<- execute= -1 at ./test.pl line 29.
>> fetch DISPATCH (DBI::st=HASH(0x177540) rc1/2 @1 g0 a0) at /usr
/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 626.
-> fetch for DBD::Sybase::st (DBI::st=HASH(0x177540)~0x21b6e4)
dbih_setup_fbav for 2 fields => 0x15f070
st_next_result() -> ct_results(4046) == 1
st_next_result() -> ct_results(4047) == 1
st_next_result() -> ct_results(4046) == 1
ct_execute() final retcode = -205
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_fetch() -> st_next_results() == 4046
syb_st_fetch() -> resetting ACTIVE, moreResults, dyn_execed
<- fetch= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DB
I.pm line 626.
-> $DBI::err (*) FETCH from lasth=DBI::st=HASH(0x21b6e4)
<- err= undef
>> prepare DISPATCH (DBI::db=HASH(0x21b768) rc2/2 @2 g0 a20ea00) at
./test.pl line 32.
-> prepare for DBD::Sybase::db (DBI::db=HASH(0x21b768)~0x21b708 'select
* from #mhelle where id=?')
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x21b708), id=)
dbih_setup_handle(DBI::st=HASH(0x177528)=>DBI::st=HASH(0x226528), DBD::
Sybase::st, 177678, Null!)
dbih_make_com(DBI::db=HASH(0x21b708), DBD::Sybase::st, 232)
dbih_setup_attrib(DBI::st=HASH(0x226528), Err, DBI::db=HASH(0x21b708))
SCALAR(0x1c0d28) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x226528), State, DBI::db=HASH(0x21b708)
) SCALAR(0x1c0ce0) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x226528), Errstr, DBI::db=HASH(0x21b708
)) SCALAR(0x1c0d04) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x226528), Handlers, DBI::db=HASH(0x21b7
08)) ARRAY(0x21b72c) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x226528), Debug, DBI::db=HASH(0x21b708)
) 0 (already defined)
dbd_preparse scanned 1 distinct placeholders
syb_st_prepare: ct_dynamic(CS_PREPARE) for DBD2
<- prepare= DBI::st=HASH(0x177528) at ./test.pl line 32.
>> execute DISPATCH (DBI::st=HASH(0x177528) rc1/1 @2 g0 a2136e0) at
./test.pl line 33.
-> execute for DBD::Sybase::st (DBI::st=HASH(0x177528)~0x226528 '0x0000
01ac00005256')
bind :p1 <== '0x000001ac00005256' (attribs: )
bind :p1 <== '0x000001ac00005256' (size 18/19/0, ptype 4, otype 0)
bind :p1 <== '0x000001ac00005256' (size 18, ok 1)
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4040) == 1
ct_res_info() returns 2 columns
ct_describe(0): type = 1, maxlen = 8
describe() -> col 0, type 1, realtype 1
ct_describe(1): type = 7, maxlen = 2
describe() -> col 1, type 8, realtype 7
describe() retcode = 1
st_next_result() -> lasterr = 0, lastsev = 0
<- execute= -1 at ./test.pl line 33.
>> fetch DISPATCH (DBI::st=HASH(0x177528) rc1/2 @1 g0 a0) at /usr
/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 626.
-> fetch for DBD::Sybase::st (DBI::st=HASH(0x177528)~0x226528)
dbih_setup_fbav for 2 fields => 0x21b780
st_next_result() -> ct_results(4046) == 1
st_next_result() -> ct_results(4047) == 1
st_next_result() -> ct_results(4046) == 1
ct_execute() final retcode = -205
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_fetch() -> st_next_results() == 4046
syb_st_fetch() -> resetting ACTIVE, moreResults, dyn_execed
<- fetch= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DB
I.pm line 626.
-> $DBI::err (*) FETCH from lasth=DBI::st=HASH(0x226528)
<- err= undef
>> prepare DISPATCH (DBI::db=HASH(0x21b768) rc2/3 @2 g0 a20ea00) at
./test.pl line 36.
-> prepare for DBD::Sybase::db (DBI::db=HASH(0x21b768)~0x21b708 'select
* from #mhelle where id=0x000001ac00005256')
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x21b708), id=)
dbih_setup_handle(DBI::st=HASH(0x177498)=>DBI::st=HASH(0x177570), DBD::
Sybase::st, 1774a4, Null!)
dbih_make_com(DBI::db=HASH(0x21b708), DBD::Sybase::st, 232)
dbih_setup_attrib(DBI::st=HASH(0x177570), Err, DBI::db=HASH(0x21b708))
SCALAR(0x1c0d28) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x177570), State, DBI::db=HASH(0x21b708)
) SCALAR(0x1c0ce0) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x177570), Errstr, DBI::db=HASH(0x21b708
)) SCALAR(0x1c0d04) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x177570), Handlers, DBI::db=HASH(0x21b7
08)) ARRAY(0x21b72c) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x177570), Debug, DBI::db=HASH(0x21b708)
) 0 (already defined)
<- prepare= DBI::st=HASH(0x177498) at ./test.pl line 36.
>> execute DISPATCH (DBI::st=HASH(0x177498) rc1/1 @1 g0 a2136e0) at
./test.pl line 37.
-> execute for DBD::Sybase::st (DBI::st=HASH(0x177498)~0x177570)
syb_st_execute() -> ct_command() OK
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4040) == 1
ct_res_info() returns 2 columns
ct_describe(0): type = 1, maxlen = 8
describe() -> col 0, type 1, realtype 1
ct_describe(1): type = 7, maxlen = 2
describe() -> col 1, type 8, realtype 7
describe() retcode = 1
st_next_result() -> lasterr = 0, lastsev = 0
<- execute= -1 at ./test.pl line 37.
>> fetch DISPATCH (DBI::st=HASH(0x177498) rc1/2 @1 g0 a0) at /usr
/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 626.
-> fetch for DBD::Sybase::st (DBI::st=HASH(0x177498)~0x177570)
dbih_setup_fbav for 2 fields => 0x177564
<- fetch= [ '000001ac00005256' 1 ] at /usr/local/lib/perl5/site_perl/5.
6.0/sun4-solaris/DBI.pm line 626.
>> fetch DISPATCH (DBI::st=HASH(0x177498) rc1/2 @1 g0 a0) at /usr
/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 626.
-> fetch for DBD::Sybase::st (DBI::st=HASH(0x177498)~0x177570)
st_next_result() -> ct_results(4046) == 1
ct_execute() final retcode = -205
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_fetch() -> st_next_results() == 4046
syb_st_fetch() -> resetting ACTIVE, moreResults, dyn_execed
<- fetch= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DB
I.pm line 626.
-> $DBI::err (*) FETCH from lasth=DBI::st=HASH(0x177570)
<- err= undef
>> DESTROY DISPATCH (DBI::st=HASH(0x177540) rc1/1 @1 g0 a0).
<> DESTROY ignored for outer handle DBI::st=HASH(0x177540) (inner DBI::
st=HASH(0x21b6e4))
>> DESTROY DISPATCH (DBI::st=HASH(0x21b6e4) rc1/1 @1 g0 a0).
-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x21b6e4)~INNER)
syb_st_destroy: called on 17cd18...
syb_st_destroy: ct_dynamic(CS_DEALLOC) for DBD1
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef.
dbih_clearcom (h 0x177540, com 0x17cd18):
FLAGS 0x191: COMSET Warn RaiseError PrintError
TYPE 3
PARENT DBI::db=HASH(0x21b708)
KIDS 0 (0 active)
IMP_DATA undef in 'DBD::Sybase::st'
LongReadLen 32768
NUM_OF_FIELDS 2
NUM_OF_PARAMS 1
dbih_clearcom 0x177540 (com 0x17cd18, type 3) done.
>> DESTROY DISPATCH (DBI::st=HASH(0x177528) rc1/1 @1 g0 a0).
<> DESTROY ignored for outer handle DBI::st=HASH(0x177528) (inner DBI::
st=HASH(0x226528))
>> DESTROY DISPATCH (DBI::st=HASH(0x226528) rc1/1 @1 g0 a0).
-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x226528)~INNER)
syb_st_destroy: called on 17cf08...
syb_st_destroy: ct_dynamic(CS_DEALLOC) for DBD2
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef.
dbih_clearcom (h 0x177528, com 0x17cf08):
FLAGS 0x191: COMSET Warn RaiseError PrintError
TYPE 3
PARENT DBI::db=HASH(0x21b708)
KIDS 0 (0 active)
IMP_DATA undef in 'DBD::Sybase::st'
LongReadLen 32768
NUM_OF_FIELDS 2
NUM_OF_PARAMS 1
dbih_clearcom 0x177528 (com 0x17cf08, type 3) done.
>> DESTROY DISPATCH (DBI::st=HASH(0x177498) rc1/1 @1 g0 a0).
<> DESTROY ignored for outer handle DBI::st=HASH(0x177498) (inner DBI::
st=HASH(0x177570))
>> DESTROY DISPATCH (DBI::st=HASH(0x177570) rc1/1 @1 g0 a0).
-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x177570)~INNER)
syb_st_destroy: called on 21e138...
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef.
dbih_clearcom (h 0x177498, com 0x21e138):
FLAGS 0x191: COMSET Warn RaiseError PrintError
TYPE 3
PARENT DBI::db=HASH(0x21b708)
KIDS 0 (0 active)
IMP_DATA undef in 'DBD::Sybase::st'
LongReadLen 32768
NUM_OF_FIELDS 2
NUM_OF_PARAMS 0
dbih_clearcom 0x177498 (com 0x21e138, type 3) done.
>> do DISPATCH (DBI::db=HASH(0x21b768) rc1/1 @2 g0 a20ef70) at
./test.pl line 41.
-> do for DBD::Sybase::db (DBI::db=HASH(0x21b768)~0x21b708 'drop table
#mhelle')
>> prepare DISPATCH (DBI::db=HASH(0x21b708) rc1/2 @3 g0 a20ea00) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 120.
2 -> prepare for DBD::Sybase::db (DBI::db=HASH(0x21b708)~INNER 'drop tabl
e #mhelle' undef)
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x21b708), id=)
dbih_setup_handle(DBI::st=HASH(0x1775dc)=>DBI::st=HASH(0x21a45c), DBD::
Sybase::st, 1775e8, Null!)
dbih_make_com(DBI::db=HASH(0x21b708), DBD::Sybase::st, 232)
dbih_setup_attrib(DBI::st=HASH(0x21a45c), Err, DBI::db=HASH(0x21b708))
SCALAR(0x1c0d28) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x21a45c), State, DBI::db=HASH(0x21b708)
) SCALAR(0x1c0ce0) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x21a45c), Errstr, DBI::db=HASH(0x21b708
)) SCALAR(0x1c0d04) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x21a45c), Handlers, DBI::db=HASH(0x21b7
08)) ARRAY(0x21b72c) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x21a45c), Debug, DBI::db=HASH(0x21b708)
) 0 (already defined)
2 <- prepare= DBI::st=HASH(0x1775dc) at /usr/local/lib/perl5/site_perl/5.
6.0/sun4-solaris/DBD/Sybase.pm line 120.
>> execute DISPATCH (DBI::st=HASH(0x1775dc) rc1/1 @1 g0 a2136e0) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 121.
-> execute for DBD::Sybase::st (DBI::st=HASH(0x1775dc)~0x21a45c)
syb_st_execute() -> ct_command() OK
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4047) == 1
st_next_result() -> ct_results(4046) == 1
ct_execute() final retcode = -205
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_execute() -> got CS_CMD_DONE: resetting ACTIVE, moreResults, dyn
_execed
<- execute= -1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD
/Sybase.pm line 121.
>> err DISPATCH (DBI::st=HASH(0x1775dc) rc1/1 @1 g0 a216200) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 122.
-> err for DBD::Sybase::st (DBI::st=HASH(0x1775dc)~0x21a45c)
<- err= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/
Sybase.pm line 122.
>> rows DISPATCH (DBI::st=HASH(0x1775dc) rc1/1 @1 g0 a213518) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 123.
-> rows for DBD::Sybase::st (DBI::st=HASH(0x1775dc)~0x21a45c)
<- rows= -1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sy
base.pm line 123.
>> FETCH DISPATCH (DBI::st=HASH(0x21a45c) rc2/1 @2 g0 a2160b0) at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Sybase.pm line 124.
-> FETCH for DBD::Sybase::st (DBI::st=HASH(0x21a45c)~INNER 'syb_more_re
sults')
.. FETCH DBI::st=HASH(0x21a45c) 'syb_more_results' = undef
<- FETCH= undef at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DB
D/Sybase.pm line 124.
<- do= -1 at ./test.pl line 41.
>> DESTROY DISPATCH (DBI::st=HASH(0x1775dc) rc1/1 @1 g0 a0).
<> DESTROY ignored for outer handle DBI::st=HASH(0x1775dc) (inner DBI::
st=HASH(0x21a45c))
>> DESTROY DISPATCH (DBI::st=HASH(0x21a45c) rc1/1 @1 g0 a0).
-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x21a45c)~INNER)
syb_st_destroy: called on 21e138...
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef.
dbih_clearcom (h 0x1775dc, com 0x21e138):
FLAGS 0x191: COMSET Warn RaiseError PrintError
TYPE 3
PARENT DBI::db=HASH(0x21b708)
KIDS 0 (0 active)
IMP_DATA undef in 'DBD::Sybase::st'
LongReadLen 32768
NUM_OF_FIELDS 0
NUM_OF_PARAMS 0
dbih_clearcom 0x1775dc (com 0x21e138, type 3) done.
-- DBI::END
>> disconnect_all DISPATCH (DBI::dr=HASH(0x1e4654) rc1/4 @1 g0 a2130f8)
at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBI.pm line 458.
-> disconnect_all for DBD::Sybase::dr (DBI::dr=HASH(0x1e4654)~0x21b7b0)
<- disconnect_all= 1 at /usr/local/lib/perl5/site_perl/5.6.0/sun4-solar
is/DBI.pm line 458.
>> DESTROY DISPATCH (DBI::db=HASH(0x21b708) rc1/1 @1 g0 a0) during
global destruction.
-> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x21b708)~INNER)
syb_db_disconnect() -> ct_close()
<- DESTROY= undef during global destruction.
dbih_clearcom (h 0x21b768, com 0x21d008):
FLAGS 0x391: COMSET Warn RaiseError PrintError AutoCommit
TYPE 2
PARENT DBI::dr=HASH(0x21b7b0)
KIDS 0 (0 active)
IMP_DATA undef in 'DBD::Sybase::db'
LongReadLen 32768
>> DESTROY DISPATCH (DBI::dr=HASH(0x21b7b0) rc1/1 @1 g0 a0) during
global destruction.
-> DESTROY in DBD::_::common for DBD::Sybase::dr (DBI::dr=HASH(0x21b7b0
)~INNER)
<- DESTROY= undef during global destruction.
dbih_clearcom (h 0x1e4654, com 0x1f2440):
FLAGS 0x215: COMSET Active Warn AutoCommit
TYPE 1
PARENT undef
KIDS 1 (1 active)
IMP_DATA undef in 'DBD::Sybase::dr'
dbih_clearcom 0x1e4654 (com 0x1f2440, type 1) done.
dbih_clearcom 0x21b768 (com 0x21d008, type 2) done.
>> DESTROY DISPATCH (DBI::db=HASH(0x21b768) rc1/1 @1 g0 a0) during
global destruction.
<> DESTROY for DBI::db=HASH(0x21b768) ignored (inner handle gone)
>> DESTROY DISPATCH (DBI::dr=HASH(0x1e4654) rc1/1 @1 g0 a0) during
global destruction.
<> DESTROY for DBI::dr=HASH(0x1e4654) ignored (inner handle gone)