MySQL DATETIME and TIMESTAMP precision

Description

The SQL scripts for MySQL database which create Activiti tables use the DATETIME and TIMESTAMP datatypes without providing a precision.
For example:

create table ACT_RE_DEPLOYMENT (
ID_ varchar(64),
NAME_ varchar(255),
CATEGORY_ varchar(255),
DEPLOY_TIME_ timestamp,
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;

So, dates and times are stored using a granularity of one second.
This can be a problem for queries which order data by time, because the result of ordering activities by time can be different from the actual execution order of activities.
It would be very useful having a granularity of one millisecond, using a fractional seconds precision for TIMESTAMP and DATETIME equal to 3.
The scripts which use the new fsp value are attached to this issue.

Assignee

Joram Barrez

Reporter

Claudio Tasso

Labels

None

Components

Fix versions

Priority

Major
Configure