Hi Barry,
> Well removing 'explicit' warnings for every user having problems with
> 3rd party modules would have mysql without any warnings nowadays ;)
>
> i think that your mono should get more stable.
I completely take this on board. This is a bug outside MySQL.
Warnings are very useful. When we test code and get a warning, this
almost always results in us re-coding. Eg:
... WHERE '2006-06-06' > '2006-06-06 12:00:00'
This will give a valid warning, this is bad SQL, time for a re-code!
BUT my warning is a special case:
- It's not bad SQL.
- Because of the C# DateTime object, this happens often.
Therefore a candidate for dropping. Which will also avoid bugs in badly
written MySQL clients :)
But, I've probably said enough on the point :)
Ben
PS, another solution to our specific problem would be if the DATETIME
could be made time-zone aware. Maybe something like:
CREATE TABLE a ( t DATETIME WITH TIME_ZONE )
But this is a much bigger question!
Barry wrote:
Ben Clewett schrieb:
Hi Barry,
This is what I get:
mysql> CREATE TABLE a ( t TIMESTAMP );
Query OK, 0 rows affected (0.25 sec)
mysql> SELECT * FROM a WHERE t > '0001-01-01 00:00:00';
Empty set, 1 warning (0.00 sec)
mysql> SHOW WARNINGS;
+---------+------+-------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------------------------------------+
| Warning | 1292 | Incorrect datetime value: '0001-01-01 00:00:00' for
column 't' at row 1 |
+---------+------+-------------------------------------------------------------------------+
1 row in set (0.00 sec)
You can see MySQL complaining about the time format.
Although I am using .NET, I am not using any windows code. This is
MySQL on UNIX and .NET under Mono/Linux.
As I said, this warning is annoying. It falls on a bug in the .NET
MySQL library and causes it to crash nastily.
Personally it annoys me because this warning is a bit of a misnomer.
I am not assigning this value, only comparing to it...
(I know that TIMESTAMP has a far smaller date range than DATETIME.
But all our data has to be time-zone independent. Therefore TIMESTAMP
is the only field appropriate for our use.)
But this is not a 'religious' thing. We can easily code around it.
Until we hit a place we have forgotten this and crash Mono...
So, I am only asking nicely to any kind MySQL developer on this list,
please remove this warning :)
Well removing 'explicit' warinings for every user having problems with
3rd party modules would have mysql without any warnings nowadays ;)
i think that your mono should get more stable.
i'm also using an older version of mysql this might be the readon why i
don't get the arning. probably downgrade or well a path around might
work also.
I don't think any developer will remove that warning for that. ;)
--
Ben Clewett
+44(0)1923 460000
Project Manager
Road Tech Computer Systems Ltd
http://www.roadrunner.uk.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]