On Thu, Feb 15, 2007 at 05:10:20PM +0000, Tim Bunce wrote:
> The DBD::mysql do() method doesn't set $dbh->{Statement} attribute.
> 
> This means:
> a) using DBI::Profile doesn't give correct profile results for calls to do()
> b) using ShowErrorStatement may report the wrong statement in the error 
> message.
> 
> I've attached a patch, including a test.
> 
> Tim.
> 
> p.s. Until DBD::mysql gets patched here's a workaround for profiling:
> 
>     if ($ENV{DBI_PROFILE}) {
>         # workaround bug in DBD::mysql where its own do() method doesn't set 
> $dbh->{Statement}
>         # if we're profiling the fallback to the DBI's own do metgod
>         require DBD::mysql;
>         no strict 'refs';
>         delete ${"DBD::mysql::db::"}{do};
>     }

Umm, it's curious where typos can lead...

    metgod: a phrase used in celebration of a goal in a footy game in the 
schoolyard

    http://www.odps.org/glossword/index.php?a=term&d=4&q=metgod

Tim.

p.s. Thanks to Jonathan Leffler for pointing out one of the two typos on that 
line ;-)

Reply via email to