[Mono-dev] A bug in the latest SVN System.Data (concurrency exception)?

Marek Habersack grendel at caudium.net
Thu Oct 19 03:01:59 EDT 2006

On Wed, 18 Oct 2006 23:35:18 +0200, Kornél Pál <kornelpal at gmail.com>

> >> It could solve the problem. Note that 0000-00-00 00:00:00 is an
> >yep, and Mono represents it as a null value when it reads such form
> >from the database (both ByteFX and the MySqlConnector)
> >
> >> invalid date so MySql may store 0001-01-01 00:00:00 using a
> >> different value that is non-zero. If there is no other solution
> >> 0001-01-01 00:00:00 and 0000-00-00 00:00:00 should be treated
> >> equally by the connector.
> >That's my guess, too. The short term solution is to set the
> >timestamp/date fields to a default value of 1000-01-01 00:00:00,
> >which is the minimum date value mysql accepts.
> If you mean DBNull on "null" then I think there is no bug because you
yep, I meant DBNull

> should be able to set fields to DBNull that will result in the
> expected zero value.
Yeah, technically there is no bug, but it's intuitive to use
DateTime(0) in that place and I suppose many people would do just that.
The exception resulting from that is quite misleading too - I was
looking for quite some time for reasons of that in a totally different
places before I noticed the datetime issue. Right now I agree with you
that the behavior is not a bug, but my first reaction was that it's some
kind of it on Mono part.

Btw, the 1000-01-01 00:00:00 date
is minimum only for date and datetime fields in MySql, timestamp
accepts a minimum of 1971-01-01 00:00:00

best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20061019/93d71b05/attachment.bin 

More information about the Mono-devel-list mailing list