Hi everybody!

        I have found following 'bug' in type TIMESTAMP:


Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1279 to server version: 3.23.48-Max-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

        Create a table with 2 TIMESTAMP fields:

CREATE TABLE `prueba` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `fecha1` timestamp(14) NOT NULL,
  `fecha2` timestamp(14) NOT NULL,
  PRIMARY KEY  (`id`)
);

        Insert some data:

mysql> INSERT INTO prueba VALUES (NULL,20020313100138,20020313100340);
mysql> INSERT INTO prueba VALUES (NULL,20020313094114,20020312094031);
....

mysql> select * from prueba;
+----+----------------+----------------+
| id | fecha1         | fecha2         |
+----+----------------+----------------+
|  1 | 20020313100138 | 20020313100340 |
....
+----+----------------+----------------+


        And then:

mysql> UPDATE prueba SET fecha1= '20020313101000' WHERE id=1;
mysql> select * from prueba;
+----+----------------+----------------+
| id | fecha1         | fecha2         |
+----+----------------+----------------+
|  1 | 20020313101000 | 20020313100340 |
....
+----+----------------+----------------+

        It's OK.

        But if:

mysql> UPDATE prueba SET fecha2= '20020313101000' WHERE id=1;
mysql> select * from prueba;
+----+----------------+----------------+
| id | fecha1         | fecha2         |
+----+----------------+----------------+
|  1 | 20020313101501 | 20020313101000 |
....
+----+----------------+----------------+

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2002-03-13 10:15:23 |
+---------------------+

        Field 'fecha1' has changed to 'now()'. 
        Is this a bug?

        Thanks,

                José Ceferino Ortega


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to