On Mon, 15 Jul 2002, Lo�c wrote:
Hi Robin!
eg CREATE foo (bar.bad double)
Produces a table:
CREATE TABLE foo (
bad double default NULL
) TYPE=MyISAM;
The 'bar' part is totally ogne.
Yep but the dot is a valid MySQL character for columns
names!
Only if escaped with ``, does NOT conform to the standard pattern of
accepted names. By (ab)using the `` mechanism, you can have some wild
names, eg: SELECT tea from `I'm a little teapot,`.`short and stout`;
BTW I would prefer an error be displayed rather than
a
silent change in this area. But it's just my opinion.
I would say that this
should be detected as an error as well. Ideally as
close to input as possible. So forms where a column/table name is entered
should detected it. I think the should also enforce the MySQL name
restrictions:
([a-zA-Z0-9_]*)[a-zA-Z_]([a-zA-Z0-9_]*)
Or even the more strict ANSI name restrictions, due to a few problems with
the MySQL name restrictions:
[a-zA-Z_]([a-zA-Z0-9_]*)
--
Robin Hugh Johnson
E-Mail : robbat2(a)orbis-terrarum.net
Home Page :
http://www.orbis-terrarum.net/?l=people.robbat2
ICQ# : 30269588 or 41961639