distal-attribute
distal-attribute
distal-attribute
distal-attribute

MySQL feature request: one table with two timestamp columns

User, date Message
Written by baursak
2 months ago
Category: General
9 posts since Sat, 05 Jul 14
Hi. If it isn't terribly difficult to implement - it will be a killing feature. - For the time being only http://dev.mysql.com/doc/workbench/en/ allows to do so.

I am talking about possibility to use MySQL 5.5 with two timestamp columns, which are both automatically initialized (one to 'current_timestamp' , the other to 'current_timestamp on update current_timestamp').

Detailed links are here:
http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html
http://stackoverflow.com/questions/4851672/one-mysql-table-with-multiple-timestamp-columns
http://jasonbos.co/two-timestamp-columns-in-mysql/
Written by jfalchMoney, Euro
2 months ago
406 posts since Sat, 17 Oct 09
This is a server feature and most probably cannot be influenced from heidisql. Ie it is possible to define two such timestamp fields in heidisql IF your server version does support it (ie you use mysql v5.5 or higher); if not, it will be rejected with SQL error 1293 by the server.
Consequently, there is nothing to implement in heidisql.
Written by baursak
2 months ago
9 posts since Sat, 05 Jul 14

jfalch wrote: This is a server feature and most probably cannot be influenced from heidisql. Ie it is possible to define two such timestamp fields in heidisql IF your server version does support it (ie you use mysql v5.5 or higher); if not, it will be rejected with SQL error 1293 by the server.
Consequently, there is nothing to implement in heidisql.


It is not true: I have Wamp Server 2.3 installed (Apache-2.2.23, Mysql-5.5.28, php5.4.9) and use alternately HSQL and Workbench. - Workbench copes with 2 timestamp columns, but HSQL - doesn't. - same MySQL server, same DB
Written by jfalchMoney, Euro
2 months ago
406 posts since Sat, 17 Oct 09
ok; what exactly happens when you use heidisql in your setting and try to define a table containing 2 timestamp fields as you describe ?
Written by baursak
2 months ago
9 posts since Sat, 05 Jul 14

jfalch wrote: ok; what exactly happens when you use heidisql in your setting and try to define a table containing 2 timestamp fields as you describe ?


I am really, really sorry. - Excuse me for my stupidness... - It's working in HSQL as in Workbench. - I have now two TIMESTAMP fields - 'updated' and 'added' - and don't need to look for hostings with MySQL 5.6. - https://yadi.sk/d/iq2scTXiWCe4r
Written by jfalchMoney, Euro
2 months ago
406 posts since Sat, 17 Oct 09
ok, good.
PS: it´s usually called heidisql not HSQL, because HSQL is another, completely different system.
Written by baursak
2 months ago
9 posts since Sat, 05 Jul 14

jfalch wrote: ok, good.
PS: it´s usually called heidisql not HSQL, because HSQL is another, completely different system.


OK, noted.
 

Please login to leave a reply, or register at first.