Hi,

When using DBD::mysql, I can step into the prepare and execute methods of
DBD, but I can't step into do (execution is the next code line after the do
statement). 'do' is defined in DBI.pm this way:

    sub do {
        my($dbh, $statement, $attr, @params) = @_;
        my $sth = $dbh->prepare($statement, $attr) or return undef;
        $sth->execute(@params) or return undef;
        my $rows = $sth->rows;
        ($rows == 0) ? "0E0" : $rows;
    }


Based on this, if I were to put a breakpoint on execute, I should be able
to see 'do' statements via execute, but I don't. For example:

$dbh->do('insert into foo (a, b) values (1,2)')

should cause the execute method to be called, but that does not seem to be
the case. Is 'do' in DBI/DBD calling some magic method?
-- 
Jeff Macdonald
Ayer, MA

Reply via email to