Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5765

Replication 5.6=>10.0 causes garbage data on slave if master has binlog_row_image=minimal

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0.8
    • Fix Version/s: 10.1
    • Component/s: Replication
    • Labels:
    • Sprint:
      10.1.6-1, 10.1.6-2

      Description

      By default, binlog_row_image=FULL; but it's reasonable to expect that people will set it to something else.
      A non-default value, e.g. binlog_row_image=MINIMAL, causes wrong data on slave 10.0 replicating from master 5.6:

      Master:

      MySQL [db]> create table t1 (i int, c varchar(8));
      Query OK, 0 rows affected (1.04 sec)
      
      MySQL [db]> insert into t1 values (1,'a'),(2,'b');
      Query OK, 2 rows affected (0.08 sec)
      Records: 2  Duplicates: 0  Warnings: 0
      
      MySQL [db]> update t1 set c = 'foo' where i=1;
      Query OK, 1 row affected (0.16 sec)
      Rows matched: 1  Changed: 1  Warnings: 0
      
      MySQL [db]> set binlog_row_image = minimal;
      Query OK, 0 rows affected (0.00 sec)
      
      MySQL [db]> update t1 set c = 'bar' where i=1;
      Query OK, 1 row affected (0.08 sec)
      Rows matched: 1  Changed: 1  Warnings: 0
      
      MySQL [db]> select * from t1;
      +------+------+
      | i    | c    |
      +------+------+
      |    1 | bar  |
      |    2 | b    |
      +------+------+
      2 rows in set (0.00 sec)
      

      Slave:

      MariaDB [db]> select * from t1;
      +------------+------+
      | i          | c    |
      +------------+------+
      | 1869571587 | NULL |
      |          2 | b    |
      +------------+------+
      2 rows in set (0.01 sec)
      

      Silently replicating garbage is very wrong.
      Worst case scenario, the slave may abort replication with an error message saying the format is not supported.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  cvicentiu Vicentiu Ciorbaru
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Agile