Allow table names with special characters when MySql allows them
nicktobey opened this issue · comments
Nick Tobey commented
We appear to be too strict with table names.
According to the MySql documentation (https://dev.mysql.com/doc/refman/8.0/en/identifiers.html):
Permitted characters in unquoted identifiers:
ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore) Extended: U+0080 .. U+FFFF
Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP), except U+0000:
ASCII: U+0001 .. U+007F Extended: U+0080 .. U+FFFF
However, when I attempt to create a table with ? (U+003F) in its name, I get an error even though the identifier is quoted:
error on line 1 for query CREATE TABLE `table?` (pk int): Invalid table name table?. Table names must match the regular expression ^[a-zA-Z]{1}$|^[a-zA-Z_]+[-_0-9a-zA-Z]*[0-9a-zA-Z]+$