No more hang, but I do get this with a slightly more complex version of the code:
Enter h or `h h' for help, or `man perldebug' for more help.
main::(./blah2.pl:5): my $dbh = DBI->connect("DBI:mysql:test", "xxxx", "xxxx");
DB<1> n
main::(./blah2.pl:7): $dbh->do("drop table if exists t1");
DB<1> n
main::(./blah2.pl:8): $dbh->begin_work or die $dbh->errstr;
DB<1> n
main::(./blah2.pl:10): $dbh->do("create table t1 (a int) engine=innodb");
DB<1> n
main::(./blah2.pl:11): $dbh->do("insert into t1 values (123456789)");
DB<1> n
main::(./blah2.pl:13): $dbh->commit or die $dbh->errstr;
DB<1> s
panic: attempt to copy freed scalar 13077d0 to d71890 at /usr/share/perl/5.14/perl5db.pl line 3737.
at /usr/share/perl/5.14/perl5db.pl line 3737
DBI::CODE(0x1060768)(/usr/lib/perl5/DBI.pm:514):
514: return unless defined &DBI::trace_msg; # return unless bootstrap'd ok
DB<1>
On Tue Jul 14 12:05:44 2009, MATTLAW wrote:
Show quoted text> A simple test case, just begin and commit a transaction:
>
> use DBI;
> my $dbh = DBI->connect('dbi:mysql:...', ...);
> $dbh->begin_work or die $dbh->errstr;
> $dbh->commit or die $dbh->errstr;
>
> this works fine when run normally, but in the perl debugger it hangs
> indefinitely on the commit call, and won't even respond to Ctrl-C. This
> doesn't happen with DBD::Pg, so it would seem to be a problem in
> DBD::mysql, rather than DBI itself.
>
> I've replicated this on version 4.005 under linux, with a threading
> perl-5.8.8 and on version 4.011 under freebsd with a non-threading
> perl-5.8.8. I'll send the perl -V output for either system on request.
I should see what other drivers give for this as well.