Hi there,
I'm using MaxSQL 3.23.39 and have set up an innodb table but when I run an
update statement the timestamp field does not update automatically. Is
anyone else experiencing this, or is it an expected behaviour of innodb
tables? I couldn't find anything in the manual saying that this was
different for innodb tables. Below is an example of what I did and the
results.
running on Red Hat linux 6.1.
cheers,
noel
mysql> create table tbl_test(name varchar(10), lastedit timestamp)
type=innodb;
Query OK, 0 rows affected (0.04 sec)
mysql> describe tbl_test;
+----------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------------+------+-----+---------+-------+
| name | varchar(10) | YES | | NULL | |
| lastedit | timestamp(14) | YES | | NULL | |
+----------+---------------+------+-----+---------+-------+
2 rows in set (0.01 sec)
mysql> insert into tbl_test(name) values('bob');
Query OK, 1 row affected (0.00 sec)
mysql> insert into tbl_test(name) values('ted');
Query OK, 1 row affected (0.00 sec)
mysql> select * from tbl_test;
+------+----------------+
| name | lastedit |
+------+----------------+
| bob | 20010613171610 |
| ted | 20010613171618 |
+------+----------------+
2 rows in set (0.00 sec)
mysql> update tbl_test set name='fred' where name='ted';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.03 sec)
mysql> select * from tbl_test;
+------+----------------+
| name | lastedit |
+------+----------------+
| bob | 20010613171610 |
| fred | 20010613171618 |
+------+----------------+
2 rows in set (0.00 sec)
---------------------------------------------------------------------
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