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

    XMLWordPrintable

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

            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.