[Mailman-Developers] Mysql MemberAdaptor 1.61 and Mailman 2.1.6

Mark Sapiro msapiro at value.net
Thu Oct 27 18:25:22 CEST 2005


Adrian Wells wrote:
>
>It appears as though the MySQL VARCHAR type can preserve newlines
><http://dev.mysql.com/doc/refman/4.1/en/char.html>.  However trailing
>space is removed in this data type.  If trailing space must be preserved,
>one could use the MySQL TEXT type
><http://dev.mysql.com/doc/refman/4.1/en/blob.html>.


There is no trailing white space in the string representation of a
_BounceInfo instance. See the __repr__ method in the _BounceInfo class
in Bouncer.py for details of what it is.

There is an issue however in that the representation can exceed 255
characters if there is a cookie and/or a longish member address.

The first reference above seems unclear on this. It says

Values in VARCHAR columns are variable-length strings. The length can
be specified as 1 to 255 before MySQL 4.0.2 and 0 to 255 as of MySQL
4.0.2.

but the next paragraph says

In contrast to CHAR, VARCHAR values are stored using only as many
characters as are needed, plus one byte to record the length (two
bytes for columns that are declared with a length longer than 255). 

I don't know if means you can actually have VARCHAR data longer than
255 or not.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Developers mailing list