Description:
Thanks to the devlopers and contributors for a very useful product. I hope this contributes a little?
I believe MySQL is rejecting a legal table name.
Note that
http://dev.mysql.com/doc/refman/5.0/en/legal-names.html
suggests:
"It is recommended that you do not use names of the form Me or MeN, where M and N are integers. For example, avoid using 1e or 2e2 as identifiers, because an expression such as 1e+3 is ambiguous. Depending on context, it might be interpreted as the expression 1e + 3 or as the number 1e+3."
However it seams that even when it is not ambiguous MySQL rejects an otherwise legal identifier (at least for a table name).
How to repeat:
CREATE TABLE `test`.`6706e2_suff` (
`col1` int);
INSERT INTO `test`.`6706e2_suff` VALUES (1);
INSERT INTO `test`.`6706e2_suff` VALUES (2);
INSERT INTO `test`.`6706e2_suff` VALUES (3);
CREATE TABLE `test`.`pre_6706e2_suff` (
`col1` int);
INSERT INTO `test`.`pre_6706e2_suff` VALUES (1);
INSERT INTO `test`.`pre_6706e2_suff` VALUES (2);
INSERT INTO `test`.`pre_6706e2_suff` VALUES (3);
CREATE TABLE `test`.`000021_suff` (
`col1` int);
INSERT INTO `test`.`000021_suff` VALUES (1);
INSERT INTO `test`.`000021_suff` VALUES (2);
INSERT INTO `test`.`000021_suff` VALUES (3);
USE `test`;
SELECT * FROM 000021_suff;
SELECT * FROM 6706e2_suff;
SELECT * FROM pre_6706e2_suff;
DESCRIBE `000021_suff`;
DESCRIBE `6706e2_suff`;
DESCRIBE 000021_suff;
DESCRIBE 6706e2_suff;
DESCRIBE pre_6706e2_suff;
Suggested fix:
One has to quote any identifier "of the form Me or MeN, where M and N are integers" where the leading trailing part of an identifier could be interpreted as an "ambiguous number/expression"?
This is close to requiring that identifiers always be quoted using `` - regardless of whether it may or maynot be ambiguous. Since it caused me no end of trouble it might be worth emphasising this in the naming documentation.
Hope this helps.