List:General Discussion« Previous MessageNext Message »
From:Tauren Mills Date:March 20 1999 2:53am
Subject:RE: Length of Database name field inconsistent
View as plain text  
> 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


Thread
Length of Database name field inconsistentTauren Mills20 Mar
  • Re: Length of Database name field inconsistentPaul DuBois20 Mar
    • RE: Length of Database name field inconsistentTauren Mills20 Mar
      • RE: Length of Database name field inconsistentPaul DuBois20 Mar
        • RE: Length of Database name field inconsistentTauren Mills20 Mar
RE: Length of Database name field inconsistentTauren Mills26 Mar
  • RE: Length of Database name field inconsistentMichael Widenius28 Mar
Re: Length of Database name field inconsistentEd Carp28 Mar