Using DBI 1.53 as of this morning (also happened with 1.48).
selectrow_hashref() was reporting "fetch() without execute()" when
$dbh->{PrintError} is true. Since selectrow_hashref() is an opaque
function call, I'd expect it to report the actual error from the database.
I suspected a database corruption problem, as this db server got hit
with an unexpected reboot. But I wanted to be sure. So I set
$dbh->{TraceLevel} = 2, and got the following output, indicating the
error message I suspected
Is this an issue already known and slated for fix in an upcoming version?
Thanks,
Randy
-> selectrow_hashref for DBD::mysql::db
(DBI::db=HASH(0x8d37b24)~0x8d28294 'select * from [...fnord...]'')
1 -> prepare for DBD::mysql::db (DBI::db=HASH(0x8d28294)~INNER 'select
* from [...fnord...]'' undef)
Setting mysql_use_result to 0
1 <- prepare= DBI::st=HASH(0x8de92f4) at DBI.pm line 1534
-> execute for DBD::mysql::st (DBI::st=HASH(0x8de92f4)~0x8dd5018)
-> dbd_st_execute for 08e0ccc0
Incorrect key file for table '[fnord]'; try to repair it error 1034
recorded: Incorrect key file for table '[fnord]'; try to repair it
<- dbd_st_execute -1 rows
!! ERROR: 1034 'Incorrect key file for table '[fnord]'; try to
repair it' (err#0)
<- execute= -1 at DBI.pm line 1569
-> fetchrow_hashref for DBD::mysql::st
(DBI::st=HASH(0x8dc2e28)~0x8dea21c)
1 -> FETCH for DBD::mysql::st (DBI::st=HASH(0x8dea21c)~INNER 'NAME')
-> dbd_st_FETCH_attrib for 08e00f54, key NAME
statement contains no result error 4 recorded: statement contains no result
ERROR: 4 'statement contains no result' (err#0)
1 <- FETCH= undef at DBI.pm line 1571
1 -> fetch for DBD::mysql::st (DBI::st=HASH(0x8dea21c)~INNER)
-> dbd_st_fetch for 08e00f54, chopblanks 0
fetch() without execute() error 19 recorded: fetch() without execute()
!! ERROR: 19 'fetch() without execute()' (err#0)
1 <- fetch= undef row-1 at DBI.pm line 1571
!! ERROR: 19 'fetch() without execute()' (err#0)
<- fetchrow_hashref= undef row-1 at DBI.pm line 1571
!! ERROR: 19 'fetch() without execute()' (err#0)
<- selectrow_hashref= undef at Record.pm line 250
DBD::mysql::db selectrow_hashref failed: fetch() without execute() at
[...fnord...]
-> DESTROY for DBD::mysql::st (DBI::st=HASH(0x8dea21c)~INNER)
ERROR: 19 'fetch() without execute()' (err#0)
<- DESTROY= undef at Record.pm line 251
-> STORE for DBD::mysql::db (DBI::db=HASH(0x8d2b52c)~INNER
'TraceLevel' 0)
ERROR: 19 'fetch() without execute()' (err#0)
<- STORE= 1 at Record.pm line 251