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

InnoDB: Corrupt binlog found upon using a low value of innodb-binlog-state-interval

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      If binlog_in_engine.gtid_state test is run with --innodb-binlog-state-interval=32K (or 64K), it causes errors in the server log:

      knielsen_binlog_in_engine_12.3 37628fcfb13411fda2dc07431f6e42fabf481841

      2026-01-18 22:31:55 0 [ERROR] InnoDB: Corrupt binlog found on page 6 in binlog number 9: Binlog record starts with continuation chunk
      2026-01-18 22:31:55 0 [ERROR] InnoDB: Corrupt binlog found on page 4 in binlog number 9: Binlog record starts with continuation chunk
      2026-01-18 22:31:55 0 [ERROR] InnoDB: Corrupt binlog found on page 2 in binlog number 9: Binlog record starts with continuation chunk
      

      Below is the extract from the test which has the same effect. It is an extreme corner case, but at least it is not artificially generated (that is, the log file wasn't tempered with). Maybe it would be better to produce errors upon executing queries rather than end up with a corrupt log, or just bump the minimal value of the variable above any dangerous range.
      If however the error is bogus, better not to write it.

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
      --source include/have_innodb_binlog.inc
       
      CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (0, 0);
       
      --let $NUM= 8000
      --let $i = 1
      --disable_query_log
      while ($i <= $NUM) {
        eval SET SESSION server_id= 4294967295 - $i;
        eval SET SESSION gtid_domain_id= 4294967295 - $i;
        eval INSERT INTO t1 VALUES ($i, 1);
        inc $i;
      }
       
      --let $rpl_server_number= 1
      --source include/rpl_restart_server.inc
       
      # Cleanup.
      DROP TABLE t1;
      

      Attachments

        Issue Links

          Activity

            People

              knielsen Kristian Nielsen
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.