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

pseudo_slave_mode nor pseudo_thread_id can be enabled after creating a GTT, starting a trx and querying the GTT

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      CREATE TABLE t (c INT);
      BEGIN;
      SELECT * FROM t;
      SET pseudo_slave_mode=1;
      

      As well as

      CREATE TEMPORARY TABLE t (c INT);
      BEGIN;
      SELECT * FROM t;
      SET pseudo_slave_mode=1;
      

      Work fine:

      MDEV-35915-v10 CS 12.2.0 2ef81706c8c4782b2f8a45a05ac90377403de2e1 (Debug, Clang 21.1.3-20250923) Build 31/12/2025

      12.2.0-dbg>SET pseudo_slave_mode=1;
      Query OK, 0 rows affected (0.000 sec)
      

      However, when using a GTT instead of a TT or base table:

      CREATE GLOBAL TEMPORARY TABLE t (c INT);
      BEGIN;
      SELECT * FROM t;
      SET pseudo_slave_mode=1;
      

      We see an error:

      MDEV-35915-v10 CS 12.2.0 2ef81706c8c4782b2f8a45a05ac90377403de2e1 (Debug, Clang 21.1.3-20250923) Build 31/12/2025

      12.2.0-dbg>CREATE GLOBAL TEMPORARY TABLE t (c INT);
      Query OK, 0 rows affected (0.008 sec)
       
      12.2.0-dbg>BEGIN;
      Query OK, 0 rows affected (0.000 sec)
       
      12.2.0-dbg>SELECT * FROM t;
      Empty set (0.001 sec)
       
      12.2.0-dbg>SET pseudo_slave_mode=1;
      ERROR 1231 (42000): Variable 'pseudo_slave_mode' can't be set to the value of '1'
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.