Bug #2961 create_table syntax 'db_name.tbl_name' not working
Submitted: 25 Feb 2004 12:02 Modified: 22 Mar 2004 8:03
Reporter: Jason Pamental Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S4 (Feature request)
Version:4.0.15, 4.0.12 OS:MacOS (Mac OS X, Windows)
Assigned to: Paul DuBois CPU Architecture:Any

[25 Feb 2004 12:02] Jason Pamental
According to the 'create_table' syntax page, in MySQL 3.22 and later, you can specify a different 
database in the 'create_table' syntax by using the format 'db_name.tbl_name'. I've tried this in 4.0.15 on 
Mac OS X and 4.0.12 on Windows and get an error in either case saying that it is an incorrect table 
name. The builds come from separate places; Windows from this site and the Mac install from Server 
Logistics, so I don't think it would be related to how it was compiled. 

How to repeat:
run a query to create a table. Try to specify a database; i.e. CREATE TABLE `db_name.tbl_name` (  
`uid` int(11) NOT NULL auto_increment,  `name` varchar(50) default NULL,  PRIMARY KEY (`uid`) ) 

This produced an error and the command failed to execute on either platform.
[25 Feb 2004 12:11] Dean Ellis
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:

The syntax is `databasename`.`tablename`, rather than `databasename.tablename`.
[25 Feb 2004 12:15] Jason Pamental
Dean - Thanks for the prompt response. I'd suggest then a fix in the documentation then - it worked 
exactly as you said first try. I really appreciate it.


[25 Feb 2004 13:06] Lenz Grimmer
Paul, could you please check, if there is room for improvement in the manual about this? Thanks in advance.
[22 Mar 2004 8:03] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant

Additional info:

I added a note to point out the need to quote parts
of qualified identifiers separately.