I believe that it does not print SQL statements that were prepared a
long time ago, and are now being executed. It only says "executing",
but does not say what.
It is basically a glorified way of calling $dbh->trace( 3 ).
I could possibly make some complicated analysis tool matching
addresses of statement handles with previous output from prepare, but
that would be a pain with obvious problems (several processes could
have identical addresses occupied by different objects)
Example:
#!/usr/bin/perl
use Algebra::SqlAccess;
dbh->trace( 3 );
my $sth = dbh->prepare( "select count(*) from sessions" );
for( my $i = 0; $i < 3; $i++ ) {
$sth->execute;
$sth->finish;
}
manifold::~/tmp==>perl dbitest.pl
DBI::db=HASH(0x9ad30bc) trace level set to 0x0/3 (DBI @ 0x0/0) in
DBI 1.50-ithread (pid 29911)
-> prepare for DBD::mysql::db (DBI::db=HASH(0x9a8a150)~0x9ad30bc
'select count(*) from sessions') thr#9855008
dbih_setup_handle(DBI::st=HASH(0x9ad3284)=>DBI::st=HASH(0x9ad3404), DBD::mysql::st, 9ad3290, Null!)
dbih_make_com(DBI::db=HASH(0x9ad30bc), 9ada688, DBD::mysql::st,
248, 0) thr#9855008
dbd_st_prepare calling count_params (counting params emulation)
<- prepare= DBI::st=HASH(0x9ad3284) at dbitest.pl line 7
-> execute for DBD::mysql::st (DBI::st=HASH(0x9ad3284)~0x9ad3404)
thr#9855008
-> dbd_st_execute for 09ad344c
---> parse_params with statement select count(*) from sessions num
params 0
mysql_st_internal_execute
<- dbd_st_execute returning imp_sth->row_num 1
<- execute= 1 at dbitest.pl line 10
-> finish for DBD::mysql::st (DBI::st=HASH(0x9ad3284)~0x9ad3404)
thr#9855008
<- finish= 1 at dbitest.pl line 11
-> execute for DBD::mysql::st (DBI::st=HASH(0x9ad3284)~0x9ad3404)
thr#9855008
-> dbd_st_execute for 09ad344c
---> parse_params with statement select count(*) from sessions num
params 0
mysql_st_internal_execute
<- dbd_st_execute returning imp_sth->row_num 1
<- execute= 1 at dbitest.pl line 10
-> finish for DBD::mysql::st (DBI::st=HASH(0x9ad3284)~0x9ad3404)
thr#9855008
<- finish= 1 at dbitest.pl line 11
-> execute for DBD::mysql::st (DBI::st=HASH(0x9ad3284)~0x9ad3404)
thr#9855008
-> dbd_st_execute for 09ad344c
---> parse_params with statement select count(*) from sessions num
params 0
mysql_st_internal_execute
<- dbd_st_execute returning imp_sth->row_num 1
<- execute= 1 at dbitest.pl line 10
-> finish for DBD::mysql::st (DBI::st=HASH(0x9ad3284)~0x9ad3404)
thr#9855008
<- finish= 1 at dbitest.pl line 11
-> DESTROY for DBD::mysql::st (DBI::st=HASH(0x9ad3404)~INNER)
thr#9855008
<- DESTROY= undef
! -> DESTROY for DBD::mysql::db (DBI::db=HASH(0x9ad30bc)~INNER)
thr#9855008
&imp_dbh->mysql: 9ada6dc
! <- DESTROY= undef during global destruction
i