• ALTER TABLE ... DISCARD TABLESPACE  and ALTER TABLE ...IMPORT TABLESPACE  are not supported for tables that belong to a general tablespace. 

•The server uses tablespace-level metadata locking for DDL that references general tablespaces. By comparison, the server uses table-level metadata locking for DDL that references file-per-table tablespaces. 

•A generated or existing tablespace cannot be changed to a general tablespace. 

•There is no conflict between general tablespace names and file-per-table tablespace names. The “/” character, which is present in file-per-table tablespace names, is not permitted in general tablespace names. 

• mysqldump  and mysqlpump  do not dump InnoDB CREATE TABLESPACE  statements. 

## InnoDB Examples 

This example demonstrates creating a general tablespace and adding three uncompressed tables of different row formats. 

mysql> CREATE TABLESPACE ‘ts1‘ ADD DATAFILE ’ts1.ibd’ ENGINE=INNODB; mysql> CREATE TABLE t1 (c1 INT PRIMARY KEY) TABLESPACE ts1 ROW_FORMAT=REDUNDANT; mysql> CREATE TABLE t2 (c1 INT PRIMARY KEY) TABLESPACE ts1 ROW_FORMAT=COMPACT; mysql> CREATE TABLE t3 (c1 INT PRIMARY KEY) TABLESPACE ts1 ROW_FORMAT=DYNAMIC; 

This example demonstrates creating a general tablespace and adding a compressed table. The example assumes a default innodb_page_size  value of 16K. The FILE_BLOCK_SIZE  of 8192 requires that the compressed table have a KEY_BLOCK_SIZE  of 8. 

mysql> CREATE TABLESPACE ‘ts2‘ ADD DATAFILE ’ts2.ibd’ FILE_BLOCK_SIZE = 8192 Engine=InnoDB; mysql> CREATE TABLE t4 (c1 INT PRIMARY KEY) TABLESPACE ts2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; 

This example demonstrates creating a general tablespace without specifying the ADD DATAFILE  clause, which is optional as of MySQL 8.0.14. 

## NDB Example 

mysql> CREATE TABLESPACE ‘ts3‘ ENGINE=INNODB; 

This example demonstrates creating an undo tablespace. 

mysql> CREATE UNDO TABLESPACE undo_003  ADD DATAFILE ’ undo_003 .ibu’; 

Suppose that you wish to create an NDB Cluster Disk Data tablespace named myts  using a datafile named mydata-1.dat . An NDB  tablespace always requires the use of a log file group consisting of one or more undo log files. For this example, we first create a log file group named mylg  that contains one undo long file named myundo-1.dat , using the CREATE LOGFILE GROUP  statement shown here: 

mysql> CREATE LOGFILE GROUP myg1 -> ADD UNDOFILE ’myundo-1.dat’ -> ENGINE=NDB; Query OK, 0 rows affected (3.29 sec) 

Now you can create the tablespace previously described using the following statement: 

mysql> CREATE TABLESPACE myts 

