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

MySQL feature request: one table with two timestamp columns

baursak posted 5 months ago in General
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/
jfalch posted 5 months ago
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.
baursak posted 5 months ago

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
jfalch posted 5 months ago
ok; what exactly happens when you use heidisql in your setting and try to define a table containing 2 timestamp fields as you describe ?
baursak posted 5 months ago

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

jfalch posted 5 months ago
ok, good.
PS: it´s usually called heidisql not HSQL, because HSQL is another, completely different system.
baursak posted 5 months ago

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.