Bug #88783 Incorrect table name error for given empty path with DATA DIRECTORY option
Submitted: 6 Dec 2017 11:39 Modified: 6 Dec 2017 12:04
Reporter: Shahriyar Rzayev Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.7.20, 5.6.38 OS:CentOS (7)
Assigned to: CPU Architecture:Any

[6 Dec 2017 11:39] Shahriyar Rzayev
Description:
Hi,
Here is the simple case:

With empty string:

5.7.20>CREATE TABLE t1 (c1 INT PRIMARY KEY) DATA DIRECTORY = '';
ERROR 1103 (42000): Incorrect table name ''

With relative path:

5.7.20>CREATE TABLE t1 (c1 INT PRIMARY KEY) DATA DIRECTORY = '../';
ERROR 1103 (42000): Incorrect table name '../'

5.7.20>CREATE TABLE t1 (c1 INT PRIMARY KEY) DATA DIRECTORY = './';
ERROR 1103 (42000): Incorrect table name './'

In contrast the General Tablespace works properly here:

5.7.20>create tablespace fff add datafile '' engine=innodb;
ERROR 3121 (HY000): Incorrect File Name ''.

With relative path:

5.7.20>create tablespace fff add datafile './fff.ibd' engine=innodb;
Query OK, 0 rows affected (0.20 sec)

How to repeat:
See description

Suggested fix:
* Make DATA DIRECTORY option to work with relative path properly.
* Change error message from:
"Incorrect table name ''" -> "Incorrect PATH specified ''" or to something more specific.
Because simply we are not specifying any file==table name for DATA DIRECTORY, but only path.
[6 Dec 2017 12:04] MySQL Verification Team
Hello Shahriyar,

Thank you for the report and test case.

Thanks,
Umesh