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

Spider GTT: table creation succeeds, INSERT fails with ER_ILLEGAL_HA_CREATE_OPTION

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Q4/2025 Server Development

    Description

      --source plugin/spider/spider/include/init_spider.inc
      SET spider_same_server_link= on;
      eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1", DATABASE "test", USER "root", PORT $MASTER_MYPORT);
      CREATE TABLE t (c INT);
      --error ER_ILLEGAL_HA_CREATE_OPTION  # Correct failure
      CREATE TEMPORARY TABLE tt (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql", SRV "srv", TABLE "t"';
      CREATE GLOBAL TEMPORARY TABLE gtt (c INT) ENGINE=Spider ON COMMIT PRESERVE ROWS COMMENT='WRAPPER "mysql", SRV "srv", TABLE "t"';
      INSERT INTO gtt VALUES (1);
      

      Leads to:

      MDEV-35915-8 CS 12.2.0 c7ea08421d34fa7d45e27919a869ade968bd88c4 (Optimized, Clang 21.1.3-20250923) Build 20/10/2025

      mysqltest: At line 8: query 'INSERT INTO gtt VALUES (1)' failed: ER_ILLEGAL_HA_CREATE_OPTION (1478): Table storage engine 'SPIDER' does not support the create option 'TEMPORARY'
      

      Note how the CREATE TEMPORARY TABLE tt failed with ER_ILLEGAL_HA_CREATE_OPTION - i.e. temporary Spider tables are not supported. However, CREATE GLOBAL TEMPORARY TABLE gtt succeeds, only to subsequently fail on INSERTs with ER_ILLEGAL_HA_CREATE_OPTION.

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              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.