Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disallow @ in table names #1160

Closed
sanikolaev opened this issue Jun 8, 2023 · 2 comments
Closed

disallow @ in table names #1160

sanikolaev opened this issue Jun 8, 2023 · 2 comments

Comments

@sanikolaev
Copy link
Collaborator

sanikolaev commented Jun 8, 2023

Currently it's possible to create a table with a name starting with @

mysql> create table @f(f text);  
Query OK, 0 rows affected (0.01 sec)  

Let's disallow this, reserving the at sign for other purposes.

By the way, using @ anywhere but at the beginning of the table name already results in an error:

mysql> create table a@bc(a int);  
--------------  
create table a@bc(a int)  
--------------  
  
ERROR 1064 (42000): P03: syntax error, unexpected '(', expecting '=' near '(a int)'  
@githubmanticore
Copy link
Contributor

➤ Sergey Nikolaev commented:

@smth can also break the integration with mysqldump:

➜  ~ mysqldump -P9306 -h0 Manticore > /tmp/dump.sql 
mysqldump: Couldn't execute 'show fields from `@a`': P01: syntax error, unexpected identifier, expecting VARIABLES near 'fields from `@a`' (1064) 

@sanikolaev
Copy link
Collaborator Author

Done in abf192a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants