On Tue, Jul 13, 2004 at 09:43:53AM +0100, Brian Candler wrote:
> Incidentaly, Mysql is the one which caused the least problems, except for
> one: it forcibly strips trailing spaces from data written to a column. So to
> fix this, I add a '|' to the end of the data whenever it ends with space or
> '|'. This requires additional logic elsewhere in my application to strip it
> off again.
Oh, only slightly annoying, but the Mysql DBI doesn't let you do
db = DBI.connect('dbi:mysql:foo','user','pass', {'AutoCommit'=>false})
You get:
DBI::NotSupportedError:
from /usr/local/lib/ruby/site_ruby/1.8/DBD/Mysql/Mysql.rb:311:in `[]='
(because it has not yet established the Mysql version number)
So you have to do:
db = DBI.connect('dbi:mysql:foo','user','pass')
db['AutoCommit'] = false
whereas :pg: and :sqlite: both let you use the first syntax.
Regards,
Brian.
|