Bug #86309 No error or warning when creating tables in a reserved tablespace
Submitted: 13 May 2017 11:27 Modified: 2 Jan 2018 19:20
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Data Dictionary Severity:S3 (Non-critical)
Version:8.0.1-dmr-labs OS:Any
Assigned to: CPU Architecture:Any
Tags: data dictionary, dd, Tablespace

[13 May 2017 11:27] Daniël van Eeden
Description:
This works:

mysql> create table foo (id int) tablespace mysql;
Query OK, 0 rows affected (0.03 sec)

Note that `mysql` is a reserved tablespace. It is probably a bad idea to create user tables in that tablespace.

Other commands behave like this:

mysql> drop tablespace mysql;
ERROR 3119 (42000): InnoDB: `mysql` is a reserved tablespace name.

How to repeat:
Create table(s) in a reserved tablespace

Suggested fix:
At least give a warning.
If giving an error: might be nice to have a special syntax for system tablespaces:

create table foo (id int) tablespace system/mysql;

create table foo (id int) system tablespace mysql;

create table foo (id int) tablespace mysql force;

create table foo (id int) tablespace mysql tablespace_type=system;
[13 May 2017 23:33] Miguel Solorzano
Thank you for the bug report. Verified as described.
[2 Jan 2018 19:20] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 8.0.5 release, and here's the changelog entry:

 Creating a table in a reserved tablespace did not return an error.