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

pseudo_slave_mode=1 must not let pseudo_thread_id = 0 assignment

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      MDEV-35046 fixes still allow that bug when manual pseudo_thread_id=0 assignment is done within a transaction that creates temporary table. Here is a modified script of that bug

       
      SET pseudo_slave_mode=1;
      CREATE TABLE t1 (c INT) ENGINE=InnoDB;
      CREATE TABLE t2 (c INT) ENGINE=MEMORY;
      XA START 'a';
      INSERT INTO t1 VALUES (0);
      set @@session.pseudo_thread_id=0;
      CREATE TEMPORARY TABLE t1t (c INT) ENGINE=InnoDB;
      INSERT INTO t1t VALUES (0);
      XA END 'a';
      XA PREPARE 'a';
       
      OPTIMIZE TABLE t1t;
      LOCK TABLE t2 READ;
      --error segfault
      XA COMMIT 'a';
      
      

      The reason of the crash is that MDEV-35046 was underfixed with allowing
      harmful zero assignment. The zero value had to be disallowed in the manual setting
      which is safe thing to do as such value can not be computed automatically and recorded into binlog.

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Elkin Andrei Elkin
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.