MySQL DATETIME fractional seconds
MySQL 5.6.4 TIME and DATETIME types support fractions of seconds that can be used to store DATETIME HOUR TO FRACTION(N) or DATETIME YEAR TO FRACTION(N).
DATETIME
types as follows: DATETIME HOUR TO SECOND
was converted to MySQLTIME
.- Other
DATETIME
types were converted to MySQLDATETIME
.
Starting with Genero 3.00, when creating a table in a BDL program with the CREATE
TABLE
statement, if the MySQL server version is greater or equal to 5.6.4, the types are
converted differently, as follows:
DATETIME HOUR TO MINUTE
is converted to MySQLTIME
(seconds set to 00).DATETIME HOUR TO SECOND
is converted to MySQLTIME
.DATETIME HOUR TO FRACTION(n)
is converted to MySQLTIME(n)
.DATETIME YEAR TO MINUTE
is converted to MySQLDATETIME
(seconds set to 00).DATETIME YEAR TO SECOND
is converted to MySQLDATETIME
.DATETIME YEAR TO FRACTION(n)
is converted to MySQLDATETIME(n)
.
This change has no impact your application when using DATETIME HOUR TO SECOND
or
DATETIME YEAR TO SECOND
.
However, it is now possible to store DATETIME HOUR TO FRACTION(n)
and
DATETIME YEAR TO FRACTION(n)
data. The DATETIME YEAR TO
FRACTION(n)
is typically used to implement data modification timestamps to track user
changes.
More changes on DATETIME
type mapping take place in Genero BDL version 3.20.