[tpop3d-discuss] primary keys too short
Marcin Sochacki
wanted at gnu.univ.gda.pl
Sun, 5 Aug 2001 17:32:46 +0200
In db/init-db.sql for vmail-sql-0.4 I've found, the following SQL code:
# local POP boxes (virtual)
create table popbox (
domain_name varchar(255) not null, # domain this refers to
local_part varchar(255) not null, # username for this POP box
password_hash varchar(255), # hash of this user's password
mbox_name varchar(255), # appended to domain.path
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.
What are those keys used for, anyway? In previous versions they were
unavailable and everything seemed to work ok.
Marcin