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

MariaDB 10.2.10 does not write create temporary table into binary log in mixed mode

    XMLWordPrintable

Details

    Description

      MariaDB 10.2.10 does not write create temporary tables into the binary log when using mixed mode.

      How to repeat:
      On a master, execute:

      mysql>show master logs;
      ....
      | mysql-bin.004699 |  73567816 |
      +------------------+-----------+
      mysql> create temporary table temp1(id int ,c1 int);
      Query OK, 0 rows affected (0.21 sec)
       
      mysql> create index idx_1 on temp1(c1);
      Query OK, 0 rows affected (0.27 sec)
      Records: 0  Duplicates: 0  Warnings: 0
       
      mysql> show binlog events in 'mysql-bin.004699' from 73567816;
      +------------------+----------+------------+-----------+-------------+----------------------------------------------+
      | Log_name         | Pos      | Event_type | Server_id | End_log_pos | Info                                         |
      +------------------+----------+------------+-----------+-------------+----------------------------------------------+
      | mysql-bin.004699 | 73567816 | Gtid       |        10 |    73567854 | GTID 0-10-59799559                           |
      | mysql-bin.004699 | 73567854 | Query      |        10 |    73567949 | use `test`; create index idx_1 on temp1(c1) |
      +------------------+----------+------------+-----------+-------------+----------------------------------------------+
      

      but what is wired is it does write in the following create index statement into the binary log, which causes our replication break.

      mysql>show slave status\G
      *************************** 1. row ***************************
                     Slave_IO_State: Waiting for master to send event
                        Master_Host: somehost
                        Master_User: user
                        Master_Port: 3306
                      Connect_Retry: 60
                    Master_Log_File: mysql-bin.004699
                Read_Master_Log_Pos: 73567949
                     Relay_Log_File: mysql-relay.000027
                      Relay_Log_Pos: 73568111
              Relay_Master_Log_File: mysql-bin.004699
                   Slave_IO_Running: Yes
                  Slave_SQL_Running: No
                    Replicate_Do_DB:
                Replicate_Ignore_DB:
                 Replicate_Do_Table:
             Replicate_Ignore_Table:
            Replicate_Wild_Do_Table:
        Replicate_Wild_Ignore_Table:
                         Last_Errno: 1146
                         Last_Error: Error 'Table 'marin.temp1' doesn't exist' on query. Default database: 'test'. Query: 'create index idx_1 on temp1(c1)'
      

      I tried this in MariaDB 10.2.40 and community version 5.7.30, both do not have this error happen.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Luke Luke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.