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

Engine for temporary tables which are implicitly created as RocksDB is substituted silently

Details

    Description

      From RocksDB tests I can see that temporary tables are currently not supported. It produces a meaningful error message when the engine is provided explicitly:

      MariaDB [test]> create temporary table t1 (i int) engine=RocksDB;
      ERROR 1478 (HY000): Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
      

      But when the engine is implied, either via default_storage_engine, or via CREATE .. LIKE, it is silently substituted by MyISAM – not only does the statement succeed, but it doesn't even produce a warning:

      MariaDB [test]> create table t1 (i int) engine=RocksDB;
      Query OK, 0 rows affected (0.11 sec)
       
      MariaDB [test]> create temporary table t2 like t1;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> show create table t2;
      +-------+-------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                    |
      +-------+-------------------------------------------------------------------------------------------------+
      | t2    | CREATE TEMPORARY TABLE `t2` (
        `i` int(11) DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
      +-------+-------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)
      

      (on some reason, it's MyISAM, despite default_storage_engine and default_tmp_storage_engine being InnoDB).

      or,

      MariaDB [test]> set default_storage_engine=RocksDB, default_tmp_storage_engine=RocksDB;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> create temporary table t2 (i int);
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> show create table t2;
      +-------+-------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                    |
      +-------+-------------------------------------------------------------------------------------------------+
      | t2    | CREATE TEMPORARY TABLE `t2` (
        `i` int(11) DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
      +-------+-------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)
      

      I saw the scenario with LIKE in RocksDB tests too, but I'm not sure whether it's actually intended or was just recorded because "temporary tables don't work anyway". It doesn't look right.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Anel Husakovic made transition -
            Open In Progress
            685d 13h 46m 1
            Anel Husakovic made transition -
            In Progress In Review
            10s 1
            Anel Husakovic made transition -
            Stalled In Progress
            384d 19h 30m 1
            Anel Husakovic made transition -
            In Progress Stalled
            35m 13s 1
            Anel Husakovic made transition -
            Stalled In Review
            8d 3h 24m 2
            Vicențiu Ciorbaru made transition -
            In Review Stalled
            426d 9h 51m 3
            Anel Husakovic made transition -
            Stalled Closed
            3d 18h 2m 1

            People

              anel Anel Husakovic
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              8 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.