Hello, 

I am having problems with columns timestamp, what it happens is the following:

I created the following table using timestamp and inserted data in this table:

create table con(cod integer not null primary key auto_increment, cod_access integer, 
hr_con timestamp(14), hr_descon timestamp(14), status char);
insert into con values(null,1,'20040107120000','20040107120030','D');

when executing select in the table, the data are correct

select * from con;
+------------------------+-----------------------+-------------------------+--------------------------+----------+
 | cod                   | cod_access      | hr_con               | hr_descon          
 | status |
+-------------------------+----------------------+-------------------------+--------------------------+----------+
 |                       1 |                     1 | 20040107120000 | 20040107120030  
| D       |
+-------------------------+----------------------+--------------------------+--------------------------+---------+
1 row in set (0.01 sec)

then I make one update in the column hr_descon

update con set hr_descon='20040107120100';

there it is the problem, when bringing up to date the column hr_descon for the value 
informed in update, the column hr_con is brought up to date automatically for current 
date/time

select * from con;
select * from con;
+------------------------+-----------------------+-------------------------+--------------------------+----------+
 | cod                   | cod_access      | hr_con               | hr_descon          
 | status |
+-------------------------+----------------------+-------------------------+--------------------------+----------+
 |                       1 |                     1 | 20040107101056 | 20040107120100 | 
D        |
+-------------------------+----------------------+--------------------------+--------------------------+---------+
1 row in set (0.01 sec)

I am using Operational System Solaris 9 on Sparc Platform and I tested in versions 
3.23.47, 3.23.58 and 4.0.14 of mysql. If somebody to know what happens please helps I.

Thanks!!!

Reply via email to