At 11:50 -0500 3/24/03, Rudy Lippan wrote:
On Mon, 24 Mar 2003, Paul DuBois wrote:
 > >For table names (which can't contain '.' etc) the server will
>generate an error if and when appropriate.

The exact rules for MySQL identifiers are:

 Database and table names cannot contain '\', '/', or '.' characters.
 Column and index names can.

What are the rules for escaping the quoting character?


create table `this"that` (foo int);  -- confuses the mysql client.
create table asdf (`foo'bnar` int); -- confuses mysql client.
create table `asdf``asdf` (foo int); -- throws an error

The third one now works in 4.1 and creates a table named asdf`asdf. The first two still fail. I'll ask the devs about it.

And
mysql> create table asdf (`foo\`bnar` int);
ERROR:
Unknown command '\`'.
ERROR 1064: 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
'bnar` int)

This still fails in 4.1, too. I'll ask about it.


There have been several improvements made to the mysql parser in 4.1,
but you've identified some cases that still cause failure.

Reply via email to