On Fri, Jun 19, 2009 at 02:37:20PM -0400, Patrick Galbraith wrote:
> Hi all!
>
> I'm pleased to announce a release of DBD::mysql 4.012!

Don't forget to email announcements to [email protected]
(it has at least twice the number of subscribers as dbi-users)

>    * bind_type_guessing - this is a database handle attribute you can set 
> (see perldoc DBD::mysql) by setting $dbh->{bind_type_guessing} = 1. 
> Normally, DBD::mysql, if you are not using server-side prepared statements 
> ($dbh->{mysql_server_prepare} = 1 ), then the driver emulates prepared 
> statements. The driver emulated prepared statements place quotes around 
> everything. This works well for most purposes, but there are some 
> applications which work better if numeric values are not quoted. The driver 
> attribute bind_type_guessing causes the driver to do a check of the value 
> being bound and does its best to "guess" if the value is numeric (which it 
> does pretty much perfectly).

Pretty much? I'm not very comfortable with this. I'd have preferred if
the issues had been discussed on dbi-dev before getting this far.

The docs don't describe the behaviour clearly and refer to a bug report
that also doesn't define the behaviour clearly.

Can someone give me a detailed explanation of what the attribute does
and why it was needed? (Extra bonus for including examples using strings
that contain what look like floating point numbers with trailing zeros.)

Tim.

Reply via email to