MySQL Database Configuration
This section documents the supported MySQL configuration.
Database Schema
The engine’s MySQL database schema does not support milliseconds precision for the column types TIMESTAMP
and DATETIME
:
I.e., a to be stored value is rounded to the next or previous second, e.g., 2021-01-01 15:00:46.731
is rounded to 2021-01-01 15:00:47
.
Heads Up!
The missing millisecond’s precision for date/time values impacts the process engine’s behavior. Please read how to configure the MySQL JDBC Driver to ensure that date/time values are handled correctly.
JDBC Driver Configuration
Here you can find the MySQL JDBC Driver’s configuration prerequisites to ensure a frictionless behavior of the process engine.
Disable sending milliseconds for date/time values
Heads Up!
This configuration flag is mandatory to avoid unexpected behavior when operating the process engine with MySQL.
When sending a date/time value as part of any SQL statement to the database, the MySQL JDBC Driver >= 5.1.23 sends milliseconds. This behavior is problematic since the engine’s MySQL database schema does not support milliseconds precision for date/time values.
To ensure correct behavior of the process engine when sending date/time values, make sure to update your MySQL JDBC Driver to a version >= 5.1.37.
You can avoid sending milliseconds to the MySQL Server in these versions by setting sendFractionalSeconds=false
in your JDBC connection URL.
Please find below examples of unwanted behavior that occurs, in case the flag sendFractionalSeconds=false
is not provided:
- When a user performs a task query with
due date == 2021-01-01 15:00:46.731
, the query returns results equal to2021-01-01 15:00:46.731
. However, since the engine’s database schema does not store milliseconds, no result is returned. - When a user sets a due date to a task, the value is rounded to the next or previous second,
e.g.,
2021-01-01 15:00:46.731
is rounded to2021-01-01 15:00:47
. Please also see the official MySQL documentation.