Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4.7
-
None
-
Master
Version: 11.4.7-MariaDB - managed by https://aws.amazon.com/rds
Instance type: db.m7g.large
Default parameters group
---
Read replica
Version: 11.4.7-MariaDB - managed by https://aws.amazon.com/rds
Instance type: db.t4g.medium
Default parameters group
Description
Today around 01:31 I found that one read replica stop to replicate.
I found that for some weird reason the replica was unable to replicate one insert operation with the following error:
Read Replica Replication Error - SQLError: 1264, reason: Error &aposOut of range value for column 'age' at row 1' on query.
|
It seems that replica attempts to insert a record into a table that uses virtual column.
Example of table DDL:
CREATE TABLE `test_table` ( |
`id` uuid NOT NULL, |
`birth_date` date DEFAULT NULL, |
`age` tinyint(3) unsigned GENERATED ALWAYS AS (timestampdiff(YEAR,`birth_date`,coalesce(`register_at`,current_timestamp()))) VIRTUAL, |
PRIMARY KEY (`id`) |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci |
In the master the value used for the birthday was 1688-04-01 and the age was 255 because was out of range, however the read-replica was unable to replicate the master and raised
I understand that column age is out of range for this case but it should fails first on the master server.
My workaround was to re-create the replica from scratch.
Note: Master and Read-replica uses exactly the same version 11.4.7