2

Experiencing a strange issue.

MariaDB 5.5.44 on both the master and the slave

From the master, if I create a table, it appears on the slave, as well as data written to the master is replicated to the slave, however when I run the following on the master:

DELETE LOW_PRIORITY FROM MOBILE_LOG.USSD_LOG WHERE REQUEST_TIMESTAMP < 1527576588000

It does not replicate to the slave, and MOBILE_LOG.USSD_LOG on the slave still shows older data.

For the master server the binlog variables are:

MariaDB [MOBILE_LOG]> show variables like 'bin%';
+-----------------------------------------+-----------+
| Variable_name                           | Value     |
+-----------------------------------------+-----------+
| binlog_annotate_row_events              | OFF       |
| binlog_cache_size                       | 32768     |
| binlog_checksum                         | NONE      |
| binlog_direct_non_transactional_updates | OFF       |
| binlog_format                           | STATEMENT |
| binlog_optimize_thread_scheduling       | ON        |
| binlog_stmt_cache_size                  | 32768     |
+-----------------------------------------+-----------+

Could anyone advise how I replicate the DELETE statement?

  • Seeing as this is statement-based replication, just checking: Are the REQUEST_TIMESTAMPs the same in the master database and corresponding slave database rows? Also, does the query replicate correctly if you first specify the database to use and then execute the query without mentioning the database? I.e. USE MOBILE_LOG; DELETE LOW_PRIORITY FROM USSD_LOG WHERE REQUEST_TIMESTAMP < 1527576588000; Also, are there any clues in the slave or master error logs? – dbdemon Jun 2 '18 at 22:24
  • SHOW CREATE TABLE – Rick James Jun 5 '18 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.