Replica stopped replicating over 1525 error

Viewed 20

Our AWS MySQL RDS replica database stopped replicating over this error. What is the best solution to approach it? If it keeps happening I doubt we can have a replica. We also can't just allow any date format to come in. Should we fix the problem or ignore the error.

The data type of last_used is datetime(6).

2022-09-15T17:11:10.044407Z 15395 [ERROR] [MY-010584] [Repl] Slave SQL for channel '': Worker 1 failed executing transaction 'ANONYMOUS' at master log mysql-bin-changelog.041268, end_log_pos 17028740; Error 'Incorrect DATETIME value: '2022-09-15 13:11:10.-99999'' on query. Default database: 'company_name'. Query: 'UPDATE numbers SET current_url = www',last_used = '2022-09-15 13:11:10.000001' WHERE tracking IN (8886424548) AND profile = 111111 AND (last_used < '2022-09-15 13:11:10.-99999' OR last_used IS NULL)', Error_code: MY-001525

We have now tried using 101 ms or 99 ms and it returns the correct value. So we have changed it to use 101 ms. It would be nice to know how we can keep this from happening in all cases. Thanks!

1 Answers

AWS' team came back with an answer on this error:

As per the error, you are using wrong DATETIME format '2022-09-15 13:11:10.-99999' for the UPDATE query on the table 'company'. The DATETIME format which you are using is having negative precision for ms. in order to fix this error kindly change the ms value to positive. fractional seconds can never be negative.

Related