From: Tauren Mills
Date: March 20 1999 2:53am
Subject: RE: Length of Database name field inconsistent
List-Archive: http://lists.mysql.com/mysql/675
Message-Id: <002701be727c$d2699ac0$1ad7a2d1@yowza.easystreet.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
> According to the manual, a database name can be up to 64 characters
> long (ch. 7):
>
> >@item
> >A database, table, index or column name can be up to 64
> characters long. An
> >alias name can be up to 256 characters long.
>
> ??? The Db field is not 32 characters long in any grant table. How
> do you get that figure? The field is 64 characters long in both the
> db and host tables:
Hmmm. Maybe I posted a little hastily (before looking it up in the manual).
Sorry. I got that figure by doing a dump of the mysql database:
mysqldump mysql > mysql.db
Here is part of the file:
CREATE TABLE db (
Host char(60) DEFAULT '' NOT NULL,
Db char(32) DEFAULT '' NOT NULL,
User char(16) DEFAULT '' NOT NULL,
...
PRIMARY KEY (Host,Db,User),
KEY User (User)
);
> The Db field is 60 characters long in the columns_priv and
> tables_priv tables as a compromise due to the maximum size of
> an index row being 256 bytes.
Thanks. That makes sense now.
Tauren