The from and to fields in the message table are primarily used for sorting when taking all message headers from the cache. The "real" content is delivered by the serialized content. Therefore I decided to not use more than 128 chars for these headers because just for sorting it should be enough. In MySQL, the content is automatically chopped if it's longer than the specified field length and I assumes that every database acts this way. If it's causing errors, the PHP script should chop those strings before inserting.
Other thoughts?
Thomas
Lic. Martin Marques wrote:
On Tue, 20 Dec 2005, Lic. Martin Marques wrote:
What does the messages table exactly store? I'm looking at it's contents and it looks like it puts there good part of the mail headers, plus some other information.
Adding somethings.
I have a bunch of error messages related to DB errors when trying to make an INSERT to the messages table (that's why I was asking about it). Basically, the "to" field is to small (varchar(128)) to handly the data that the program has to put there. Thinking better, I'm not sure if where is a "n" such that we will never have problems with that insert.
I happens very offen with mails that come with lots of recipients.
Should we doble the space to varchar(256), triple it, or put an unlimited field type like TEXT?
-- 17:40:01 up 2:22, 3 users, load average: 0.00, 0.00, 0.00
Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador