Subject: | Active statement handle warning with new DBD::mysql |
The latest DBD::mysql gives a warning about a statement handle still being active when using
Class::DBI:;mysql. This patch fixes it. (The line numbers might be slightly off)
[ask@g5 ~/src/winces]$ svn diff lib/Class/DBI/mysql.pm
Index: lib/Class/DBI/mysql.pm
=========================================================
==========
--- lib/Class/DBI/mysql.pm (revision 1505)
+++ lib/Class/DBI/mysql.pm (working copy)
@@ -67,6 +67,7 @@
push @cols, $col;
push @pri, $col if $hash->{key} eq "PRI";
}
+ $sth->finish;
$class->_croak("$table has no primary key") unless @pri;
$class->columns(Primary => @pri);
$class->columns(All => @cols);