Bug #91402 Can't set innodb_ft_aux_table when table_name includes "must quoted characters"
Submitted: 25 Jun 2018 8:56 Modified: 25 Jun 2018 9:55
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: FULLTEXT search Severity:S3 (Non-critical)
Version:8.0.11, 5.7.22, 5.6.40 OS:Any
Assigned to: CPU Architecture:Any

[25 Jun 2018 8:56] Tsubasa Tanaka
Description:
When table_name includes "must quoted characters" - Except of ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore) -,

https://dev.mysql.com/doc/refman/8.0/en/identifiers.html

SET GLOBAL innodb_ft_aux_table = "table_name" fails because "must quoted characters" are converted at table creation time but SET GLOBAL statement doesn't convert table_name.

How to repeat:
mysql> CREATE TABLE `t-1` (val varchar(32), FULLTEXT KEY(val));
Query OK, 0 rows affected (0.05 sec)

mysql> SET GLOBAL innodb_ft_aux_table = 'd1/t-1';
ERROR 1231 (42000): Variable 'innodb_ft_aux_table' can't be set to the value of 'd1/t-1'

mysql> SELECT table_id, name FROM information_schema.innodb_tables WHERE name LIKE 'd1/%';
+----------+--------------------------------------------------+
| table_id | name                                             |
+----------+--------------------------------------------------+
|     1222 | d1/t@002d1                                       | <-- "-" is converted to "@002d"
|     1223 | d1/fts_00000000000004c6_being_deleted            |
|     1224 | d1/fts_00000000000004c6_being_deleted_cache      |
|     1225 | d1/fts_00000000000004c6_config                   |
|     1226 | d1/fts_00000000000004c6_deleted                  |
|     1227 | d1/fts_00000000000004c6_deleted_cache            |
|     1228 | d1/fts_00000000000004c6_00000000000001da_index_1 |
|     1229 | d1/fts_00000000000004c6_00000000000001da_index_2 |
|     1230 | d1/fts_00000000000004c6_00000000000001da_index_3 |
|     1231 | d1/fts_00000000000004c6_00000000000001da_index_4 |
|     1232 | d1/fts_00000000000004c6_00000000000001da_index_5 |
|     1233 | d1/fts_00000000000004c6_00000000000001da_index_6 |
+----------+--------------------------------------------------+
12 rows in set (0.00 sec)

mysql> SET GLOBAL innodb_ft_aux_table = 'd1/t@002d1';
Query OK, 0 rows affected (0.00 sec)

Suggested fix:
Convert "must quoted characters" as same as table creation time (sql/strfunc.cc:strconvert)

At least, this limitation should be documented.
[25 Jun 2018 9:55] MySQL Verification Team
Hello Tanaka-San,

Thank you for the report and feedback!

Regards,
Umesh