Bug #10408 if dot is used in column name then the text before dot is truncated from name.
Submitted: 6 May 2005 10:34 Modified: 12 Jul 2005 16:44
Reporter: Disha Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.11, 5.0.4 Beta OS:Windows (Windows 2003)
Assigned to: Assigned Account CPU Architecture:Any

[6 May 2005 10:34] Disha
Description:
if we use a dot in column name then the text par before the dot is truncated.

How to repeat:
1. Start the MySQL client and connect to the database with valid user and password.
2. Set the delimiter to // and use the test database
3. Create a table with column name containing a dot as follows:

   create table tb1(column.name char(100))//

4. Now execute the following command to view the table creation command:

   show create table tb1//

Expected Results: 
1. The column name containing a dot should be accepted.

Actual Results: 
1. No error is displayed when creating the table but the part before the dot is truncated from the column name.
2. In the above case the show create table command output is as follows:

   mysql> create table tb1(column.name char(100))//
   Query OK, 0 rows affected (0.06 sec)
   
   mysql> show create table tb1//
   +-------+---------------------------------------
   | Table | Create Table
   +-------+---------------------------------------
   | tb1   | CREATE TABLE `tb1` (
     `name` char(100) default NULL
   ) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
   +-------+---------------------------------------
   1 row in set (0.00 sec)
   
   mysql>

Please the note the column name in the above output.

Additional information:
If we include two or more dots in column name then error syntax error is displayed as follows:

   mysql> create table tb2(column.name.new char(100))//
   ERROR 1064 (42000): You have an error in your SQL syntax; check the 
   manual that corresponds to your MySQL server version for the right 
   syntax to use near '.new char(100))' at line 1
   mysql>
[6 May 2005 11:40] Hartmut Holzgraefe
Verified on 4.1. Putting the column name in backticks works as expected though
[6 May 2005 12:39] Trudy Pelzer
This is not a bug; the period is the delimiter character
used to separate parts of a qualified name and can
therefore not be used within a non-delimited identifier.

Per the Reference Manual:
http://dev.mysql.com/doc/mysql/en/legal-names.html
If an identifier is a reserved word or contains special characters, you must quote it whenever you refer to it. ... Special characters are those outside the set of alphanumeric characters from the current character set, '_', and '$'.
[12 Jul 2005 11:45] Disha
If the dot should not be used in the above condition, then appropriate error should be displayed instead or ignoring part of the name specified.
OR
If the truncation is acceptable, it should atleast show a warning.
[12 Jul 2005 16:44] Trudy Pelzer
Duplicate; already corrected.