Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-4111

Alter rocksdb table into innodb general tablespace silently works

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Feature Request
    • Resolution: Done
    • Affects Version/s: 5.7.19-17
    • Fix Version/s: 5.7.20-18
    • Component/s: MyRocks
    • Labels:
      None

      Description

      CREATE TABLESPACE for RocksDB is disabled, but I can alter the rocksdb table into innodb general tablespace. It is shown in show create table for that table, but as I can drop the tablespace even if this table "is part of it" it's clear that it's just ignored as in general you cannot drop tablespace if it contains tables.

      mysql> create table t1(a int primary key) engine=innodb;
      Query OK, 0 rows affected (0.05 sec)
      
      mysql> CREATE TABLESPACE `ts1` ADD DATAFILE 'ts1.ibd' Engine=innodb;
      Query OK, 0 rows affected (0.02 sec)
      
      mysql> alter table t1 tablespace=ts1;
      Query OK, 0 rows affected (0.07 sec)
      Records: 0  Duplicates: 0  Warnings: 0
      
      mysql> create table t2(a int primary key) engine=rocksdb;
      Query OK, 0 rows affected (0.02 sec)
      
      mysql> alter table t2 tablespace=ts1;
      Query OK, 9 rows affected (0.06 sec)
      Records: 9  Duplicates: 0  Warnings: 0
      
      mysql> show create table t2;
      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                         |
      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      | t2    | CREATE TABLE `t2` (
        `a` int(11) NOT NULL,
        PRIMARY KEY (`a`)
      ) /*!50100 TABLESPACE `ts1` */ ENGINE=ROCKSDB DEFAULT CHARSET=latin1 |
      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)
      
      mysql> drop table t1;
      Query OK, 0 rows affected (0.02 sec)
      
      mysql> drop tablespace ts1;
      Query OK, 0 rows affected (0.02 sec)
      
      mysql> show create table t2;
      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                         |
      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      | t2    | CREATE TABLE `t2` (
        `a` int(11) NOT NULL,
        PRIMARY KEY (`a`)
      ) /*!50100 TABLESPACE `ts1` */ ENGINE=ROCKSDB DEFAULT CHARSET=latin1 |
      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)
      

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  tomislav.plavcic@percona.com Tomislav Plavcic
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: