[Mailman-Developers] Mysql MemberAdaptor 1.61 and Mailman 2.1.6

Adrian Wells adrian at whatifnet.com
Thu Oct 27 17:49:40 CEST 2005


"John W. Baxter" <jwblist at olympus.net> on Thursday, October 27, 2005 at
1:22 AM +0000 wrote:
>On 10/26/05 6:06 PM, "Mark Sapiro" <msapiro at value.net> wrote:
>
>> Actually, it is not really doing the right thing because it is not
>> supposed to be aware of what's in the _BounceInfo class. The info that
>> is passed to it is a string representation of the _BounceInfo
>> instance, and it should really just be saving and retrieving that.
>> IMO, there should be just one column in the MySQL table for this
>> string representation. The only possible snag I see is that the string
>> contains new-lines, and I don't know MySQL so I don't know if
>> new-lines are allowed in a string field/column.
>
>Based on these tests dashed off using one of Exim's debugging capabilities
>$ exim -be
>> ${quote_mysql: A\x0atest}
> A\ntest
>> ${quote_mysql: A\x0dtest}
> A\rtest
>the newlines are OK but have to be quoted (as do CR characters, and
>others).
>
>This, of course, assumes that Exim's quote_mysql operator is doing the
>right
>thing.
>
>The best thing would be to check the MySQL documentation (which I'm too
>lazy
>to do this evening).


Thank you John for the examples and suggestion to reference the MySQL
documentation.

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>.

-Adrian



More information about the Mailman-Developers mailing list