[Dbix-class] Re: Tests for MySQL's illustrious 0000-00-00
Matt S Trout
dbix-class at trout.me.uk
Mon Jul 28 20:29:29 BST 2008
On Fri, Jul 18, 2008 at 09:06:55PM +0200, Aristotle Pagaltzis wrote:
> Exactly. 0000-00-00 is not an error nor should it lead to any. It
> should be treated just like a NULL.
It should -always- lead to an error.
We're just allowing that error to be surpressed in cases of old MySQL
setups where the config bit to make it error correctly can't be flipped
for hysterical raisins.
> This is the right thing to do in terms of database agnosticism
> also: if you treat 0000-00-00 like NULL, the API will exhibit
> consistent semantics regardless of whether you’re using MySQL
> or a real database. In contrast, the applicability of a swallow-
> errors-for-this-column option depends on whether you’re running
> on MySQL or not. It’s a visible unbreak-me switch that needs to
> flipped when moving between database engines.
No it isn't.
It will only ever be flipped on mysql setups so broken they can't be moved
to another database engine anyway.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the DBIx-Class
mailing list