[Dbix-class] Re: RFC: Patch for InflateColumn::Datetime to handle invalid date values

John Napiorkowski jjn1056 at yahoo.com
Thu Jun 21 19:04:18 GMT 2007


--- Richard Jolly <richardjolly at mac.com> wrote:

> On 15 Jun 2007, at 13:56, Jason Kohles wrote:
> 
> > On Jun 15, 2007, at 7:31 AM, Matt S Trout wrote:
> >
> >> On Thu, Jun 14, 2007 at 09:14:48PM -0500, Brandon
> Black wrote:
> >>> On 6/14/07, A. Pagaltzis <pagaltzis at gmx.de>
> wrote:
> >>>> * Matt S Trout <dbix-class at trout.me.uk>
> [2007-06-14 19:50]:
> >>>>> if mysql considers that equivalent to null
> >>>>
> >>>> It does *and* does not:
> >>>
> >>> That doesn't surprise me at all.  It's not like
> you're using an 
> >>> actual
> >>> relational database :p
> >>>
> >>> Maybe this will finally drive it home for
> everyone: MySQL is to
> >>> database server software what PHP is to
> programming languages.
> 
> We've just been bitten by this kind of issue. In our
> case it's an empty 
> string silently converted to 0 in an integer column.
> Which reminded me 
> of perl :).
> 
> You can use strict mode in mysql, which hopefully
> clears most of this 
> up. We'll be trying soon. From the docs:
> 
> "Make MySQL behave like a“traditional" SQL database
> system. A simple 
> description of this mode is “give an error instead
> of a warning” when 
> inserting an incorrect value into a column"
> 
>   
>
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
> 
> Richard
> 

Thanks, I'll try that.  I will still attempt a patch
for the mysql format module to try and handle this,
since I am sure lot's of people waste time on it.

--john


> 
> _______________________________________________
> List:
>
http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN:
>
http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive:
>
http://www.mail-archive.com/dbix-class@lists.rawmode.org/
> 



       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  



More information about the Dbix-class mailing list