Re: DBD::mysql::st fetchrow_array failed: fetch() without execute()
[email protected] (Fayland Lam)
| Newsgroups | perl.dbi.users |
|---|---|
| Message-ID | <[email protected]> |
so what does it mean?
http://pastebin.com/iTPCMusG
1.
<- dbd_st_execute 1 rows
2.
-> dbd_st_fetch for 2acbf5c22de0, chopblanks 0
3.
fetch() without execute() error 19 recorded: fetch() without execute()
it means it executed OK? $sth->rows will return 1 but we just can't do
fetch on it? how is it possible?
and the thing is that it works fine at the beginning under mod_perl
(Catalyst code) after restart Apache but suddenly full of errors, and
all are fetchrow_array, selectrow_array (not DBIx::Class)
any thoughts?
Thanks
On 2011/1/13 16:40, Fayland Lam wrote:
> Hi,
>
> here is the background:
> 1. we have everything fine on Perl v5.8.5 CentOS release 4.3 (Final)
> 2. the code is from a big Catalyst framework run under mod_perl 2.0.2
> (we have DBIx::Class code but all errors are from plain DBI usage now)
>
> we upgraded our OS to CentOS release 5.3 (Final) and we have some
> encoding issue with our Catalyst application.
> then we upgraded the Perl to 5.10.1 and re-build the mod_perl 2.0.4
> but in the new server, we keeping getting
>
> DBD::mysql::st fetchrow_array failed: fetch() without execute()
>
> or
>
> DBD::mysql::db selectrow_array failed: fetch() without execute()
>
> we have several MySQL servers and all the errors happens with
> 5.1.39-community-log MySQL Community Server (GPL)
> fine with Server version: 5.0.77-log Source distribution
>
> I posted the DBI->trace(6) info in pastebin:
> Correct: http://pastebin.com/XjFfmJYJ
> FAIL: http://pastebin.com/iTPCMusG
>
> 1 <- prepare= DBI::st=HASH(0x2acbe173f728) at Report.pm line 963 via
> at Report.pm line 763
> -> dbd_st_execute for 2acbf5c22de0
> <- dbd_st_execute 1 rows
> -> dbd_st_fetch for 2acbf5c22de0, chopblanks 0
> fetch() without execute() error 19 recorded: fetch() without execute()
> !! ERROR: 19 'fetch() without execute()' (err#0)
>
> other notes I tried:
>
> 1. if I change fetchrow_array on SQL "SELECT 1" to $sth->rows > 1,
> nothing will be wrong.
> 2. if I change selectrow_array to prepare + execute + fetchrow_array,
> fails (SQL is SELECT COUNT(*) so I can't really do $sth->rows I think)
> 3. the issue is not happening at the beginning when we restart the
> Apache. but after few minutes, it happens. keeping having this issues.
> never gone.
>
> my OS is 64bit and Perl 5.10 is built with
> -des -A ccflags=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Duseshrplib
> -Dusethreads -Duseithreads -Duselargefiles -Dinstallusrbinperl
> so the DBI is ithreads one. (Note old one is ithreads too)
> DBD::mysql is not from yum install but I did it manually (with yum
> install mysql-devel then cpanm it)
>
> Do anyone here have the same issue before? and share me some thoughts?
> if you need any more info or anything you want me to try, just let me
> know.
>
> Thanks
>
--
Fayland Lam // http://www.fayland.org/