Bug #2487 Data bases names containing symbol "-"
Submitted: 23 Jan 2004 2:51 Modified: 23 Jan 2004 7:30
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.16 and older OS:Any (Any)
Assigned to: CPU Architecture:Any

[23 Jan 2004 2:51] [ name withheld ]
Description:
You can easily create a DB that contains symbol "-".
E.g. myprefix-mydb.
But once I try to insert data into mydbprefix-mydb.mytalbe mysql would return error: 
You have an error in your SQL syntax near '-mydb.mytable values(1,2)' at line 1
This should be fixed.
This is the error returned by MYSQL itself, not by clients.

How to repeat:
I used MySQL-front for creating the database containing symbol "-"

Suggested fix:
Allow in dbname syntax symbol "-".
[23 Jan 2004 7:30] Alexander Keremidarski
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

When names contain special chartacters they must be enclosed with backticks `db-name`, `table-name`, `column-name`

This is well documented in manual.