[MDEV-8894] Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave Created: 2015-10-05 Updated: 2020-05-05 Resolved: 2018-12-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.21, 10.1, 10.2 |
| Fix Version/s: | 10.4.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Rick Pizzi | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Compatibility | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Inserting a fractional second into MySQL 5.6 and MariaDB yields different results, and as a consequence, replicating from a MySQL 5.6 master into a MariaDB 10 slave creates an inconsistent slave. On Oracle/Percona MySQL 5.6 the value is rounded:
On MariaDB 10 it is not:
Inconsistent MariaDB slave test:
This issue affects both datetime and timestamp column types. MariaDB should have same behaviour regarding fractional seconds as Oracle and Percona, or interoperability is compromised. For example, a pt-table-checksum always fails due to these rounding differences when comparing a MariaDB slave against a non MariaDB master. Until this bug is fixed we will be unable to use multi source replication, which was the primary reason for us to use MariaDB. |
| Comments |
| Comment by Alexander Barkov [ 2018-01-19 ] | ||||||
|
Btw, Oracle Database also rounds (not truncates) temporal data:
So does PostgreSQL. | ||||||
| Comment by Alexander Barkov [ 2018-06-18 ] | ||||||
|
This will need a new SQL mode flag, which cannot be done in a GA version. Changing the target version to 10.4. | ||||||
| Comment by Alexander Barkov [ 2018-11-28 ] | ||||||
|
Elkin, can you please review a patch? https://github.com/mariadb/server/commit/c3a614513f6eb9f4c9c290e7c0d0e2def85da838.diff Thanks! |