-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/21/07 08:42, Michael Fuhr wrote:
> On Wed, Feb 21, 2007 at 08:54:30AM -0500, Jan de Visser wrote:
>> It gets better: The problem is not just feb 35, it's also that it doesn't 
>> warn 
>> you that it didn't like the input format:
> 
> Actually it did, sort of.
> 
>> mysql> insert into test values ('35-Feb-2007');
>> Query OK, 1 row affected, 1 warning (0.07 sec)
>                             ^^^^^^^^^
> mysql> show warnings;
> +---------+------+-----------------------------------------+
> | Level   | Code | Message                                 |
> +---------+------+-----------------------------------------+
> | Warning | 1265 | Data truncated for column 'td' at row 1 | 
> +---------+------+-----------------------------------------+
> 1 row in set (0.00 sec)
> 
> Not as good as "ERROR: hey bonehead, there ain't no such date" but

But it *inserts the "data"*!!!!!

> at least it's something :-)

Sure, at the interactive command line.

What kind of error code does this return to applications?  Can a PHP
or C programmer catch this warning, or does MySQL return a success code?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF3KFES9HxQb37XmcRAlyNAKCiEIAbywwa3jL0q1jlnx+9AfZVIwCg4dOu
cdgyFYs1ECl9Jh7JJ7XLZ9Y=
=ioTM
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to