[Phpmyadmin-devel] Re(2): table name with "." / pma demo
Robin Johnson
robbat2 at fermi.orbis-terrarum.net
Mon Jul 15 09:35:02 CEST 2002
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 at orbis-terrarum.net
Home Page : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ# : 30269588 or 41961639
More information about the Developers
mailing list