Issuing rollback() for database handle being DESTROY'd
I recently noticed some strange error messages in my error_log. This is from animelyrics.com, which uses Apache::ASP and MySQL. Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at (eval 9) line 22. The above line keeps repeating over and over in the error log. There are two things that confuse me... (1) I never use rollback() anywhere in my code... so I'm wondering if something else could cause a rollback. (2) The "(eval 9) line 22" message doesn't tell me what file the error is in. The modperl guide suggested adding the following lines to my perl startup file so that the messages would show the correct file: use Carp (); local $SIG{__WARN__} = \Carp::cluck; ...but they don't seem to have any effect after I added them and did an "apachectl restart". -Philip Mak ([EMAIL PROTECTED])
Re: Issuing rollback() for database handle being DESTROY'd
Philip Mak wrote: I recently noticed some strange error messages in my error_log. This is from animelyrics.com, which uses Apache::ASP and MySQL. Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at (eval 9) line 22. This implies that you have a database handle that is destroyed in the scope of running your program. Then it would seem that you are not using Apache::DBI? I don't think I get this error when I start using Apache::DBI. Remember to load Apache::DBI before DBI. ]# perl -MDBI -e 'DBI-connect(qw(dbi:mysql:host=...), qw(root))'; Issuing rollback() for database handle being DESTROY'd without explicit disconnect(). Apache::DBI keeps a connection cached so that it won't close until your apache child exits. It probably then issues a disconnect itself. (1) I never use rollback() anywhere in my code... so I'm wondering if something else could cause a rollback. Note with above, its probably just DBI that does it. (2) The "(eval 9) line 22" message doesn't tell me what file the error is in. The modperl guide suggested adding the following lines to my perl startup file so that the messages would show the correct file: use Carp (); local $SIG{__WARN__} = \Carp::cluck; ...but they don't seem to have any effect after I added them and did an "apachectl restart". Does: use Carp (); $SIG{__WARN__} = \Carp::cluck; that work better after a stop/start? -- Josh
Re: Issuing rollback() for database handle being DESTROY'd
I recently noticed some strange error messages in my error_log. This is from animelyrics.com, which uses Apache::ASP and MySQL. Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at (eval 9) line 22. The above line keeps repeating over and over in the error log. There are two things that confuse me... (1) I never use rollback() anywhere in my code... so I'm wondering if something else could cause a rollback. I get the same problem if I don't explicitly disconnect from the database. You can ignore this problem if you're just making SELECT queries. Also if the MySQL version you're using doesn't use transactions then it autocommits data by default. DBI is also autocommit by default. If you're annoyed by the error. put a 'dbh-disconnect' at the end of your scripts. (2) The "(eval 9) line 22" message doesn't tell me what file the error is in. The modperl guide suggested adding the following lines to my perl startup file so that the messages would show the correct file: use Carp (); local $SIG{__WARN__} = \Carp::cluck; ...but they don't seem to have any effect after I added them and did an "apachectl restart". -Philip Mak ([EMAIL PROTECTED]) . Mak ([EMAIL PROTECTED]) . -- Mike