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

Replica halts with MariaDB error code 1036: HA_ERR_TABLE_READONLY

    XMLWordPrintable

Details

    Description

      For the testcase, any storage engine can be used for the enforce_storage_engine and first ENGINE=
      Tested: Aria, MyISAM, InnoDB - all result in the same outcome

      # Use a standard m/s setup
      SET sql_mode='',enforce_storage_engine=Aria; 
      CREATE TEMPORARY TABLE t1 (c INT) ENGINE=Aria;
      CREATE TABLE t2 (c INT) ENGINE=mrg_myisam;
      INSERT INTO t2 VALUES (1);
      

      Will halt the slave with:

      11.4.0 faf48c262fd3f350b91482865b1bc1d8a037502b (Debug, Slave)

      2024-03-02 11:36:46 6 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table test.t2; Table 't2' is read only, Error_code: 1036; handler error HA_ERR_TABLE_READONLY; the event's master log binlog.000001, end_log_pos 0, Gtid 0-1-5, Internal MariaDB error code: 1036
      2024-03-02 11:36:46 6 [Warning] Slave: Table 't2' is read only Error_code: 1036
      2024-03-02 11:36:46 6 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'binlog.000001' position 1118; GTID position '0-1-4'
      2024-03-02 11:36:46 6 [Note] Slave SQL thread exiting, replication stopped in log 'binlog.000001' at position 1118; GTID position '0-1-4', master: 127.0.0.1:10803
      

      If enforce_storage_engine is removed, we see (on the master):

      11.4.0 faf48c262fd3f350b91482865b1bc1d8a037502b (Debug, Master)

      11.4.0-dbg>INSERT INTO t2 VALUES (1);
      ERROR 1036 (HY000): Table 't2' is read only
      

      Present in all versions, in both opt+dbg builds. RBR, MBR and SBR are all affected.

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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