Hi,
On Nov 21, 2003, at 12:10 AM, Wheeler, Alex wrote:
I have made patches to address 2 issues with the currentcvs version of
dbmail:
1) in db.c,db_list_mailboxes_by_regex, if there are mailboxes, but
none match the pattern, no check is made and areallococcurs asking for
0 bytes memory, resulting in a NULL pointer returned. The patch
corrects this behavior by returning a 0 if the number of matching
mailboxes is 0.
Good one. I've applied your patch and added more of those checks in
shared_mailbox.c and in db_findmailbox_by_regex()
2) InMySQL, there is a great performance penalty when
callingmysql_data_seek. The normalMySQLbehavior would be to
callmysql_fetch_rowrepeatedly for each subsequent row. The patch
changes the calls tomysql_data_seekto usemysql_fetch_row, or the last
row fetched whenever possible, and otherwise use the seek. I'm
handling mailboxes with 1000's of rows, and this make a huge
difference.
Ok. Didn't know that. Applied your patch
Thanks for your small (easy to check and apply) and very clear patches!
cheers, have a nice weekend,
Ilja
--
IC&S
Stadhouderslaan 57
3583 JD Utrecht
telnr. 030-6355730
faxnr. 030-6355731
PGP-key:
http://www.ic-s.nl/keys/ilja.txt