[tpop3d-discuss] primary keys too short

Chris Lightfoot chris at ex-parrot.com
Sun, 5 Aug 2001 16:39:02 +0100


On Sun, Aug 05, 2001 at 05:32:46PM +0200, Marcin Sochacki wrote:
> In db/init-db.sql for vmail-sql-0.4 I've found, the following SQL code:
> 
> # local POP boxes (virtual)
> create table popbox (
    [...]
>         primary key (domain_name(8), local_part(8))
> ) ;
> 
> 
> The primary key constructed from the first 8 chars is really too small!
> I've many accounts in one domain with local parts like:
>   example.john
>   example.mary
> etc.
> 
> MySQL wouldn't allow me to put the key, because the items are duplicate.
> I suggest giving at least 32 chars for local_part by default.

This is sensible -- I'll put this change in to the
source.

> What are those keys used for, anyway? In previous versions they were
> unavailable and everything seemed to work ok.

As Chris has said, performance is the main reason.

-- 
Chris Lightfoot -- www.ex-parrot.com/~chris/
 ``Some of you may have had occasion to run into mathematicians,
   and to wonder, therefore, how they got that way.'' (Tom Lehrer)