[Debian-pan-maintainers] [debian] Introducing default-mysql-* metapackages
Vincent Hardion
vincent.hardion at maxiv.lu.se
Sat Sep 3 21:23:25 BST 2016
Apparently yes since there still only one default timestamp
http://stackoverflow.com/questions/267658/having-both-a-created-and-last-updated-timestamp-columns-in-mysql-4-0 <http://stackoverflow.com/questions/267658/having-both-a-created-and-last-updated-timestamp-columns-in-mysql-4-0>
In Mariadb doc: https://mariadb.com/kb/en/mariadb/timestamp/ <https://mariadb.com/kb/en/mariadb/timestamp/>
In MariaDB 5.5 <https://mariadb.com/kb/en/what-is-mariadb-55/> and before there could only be one TIMESTAMP column per table that had CURRENT_TIMESTAMP defined as its default value. This limit has no longer applied since MariaDB 10.0 <https://mariadb.com/kb/en/what-is-mariadb-100/>.
In mysql 5.6: The order of the clauses does not matter
http://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html <http://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html>
To specify automatic properties, use the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses in column definitions. The order of the clauses does not matter. If both are present in a column definition, either can occur first. Any of the synonyms forCURRENT_TIMESTAMP <http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_current-timestamp> have the same meaning as CURRENT_TIMESTAMP <http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_current-timestamp>. These are CURRENT_TIMESTAMP() <http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_current-timestamp>, NOW() <http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_now>, LOCALTIME <http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_localtime>, LOCALTIME() <http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_localtime>,LOCALTIMESTAMP <http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_localtimestamp>, and LOCALTIMESTAMP() <http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_localtimestamp>.
The best is to try but I don’t have mysql < 5,7
/Vincent
> On 03 Sep 2016, at 22:10, PICCA Frederic-Emmanuel <frederic-emmanuel.picca at synchrotron-soleil.fr> wrote:
>
> Hello vincent,
>
> is it compatible also with mysql < 5,7 ?
>
> Cheers
>
> Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-pan-maintainers/attachments/20160903/31dd9d18/attachment.htm>
More information about the Debian-pan-maintainers
mailing list