I just discovered that @lists.mysql.com accepts no attachments... Please disregard the comments below regarding the code being attached, and instead please find it at this URL:
http://www.10east.com/~hightowe/mysqld_udf_zlib.cc -- Lester Hightower <[EMAIL PROTECTED]> ---------- Forwarded message ---------- Date: Tue, 5 Mar 2002 10:47:40 -0500 (EST) From: Lester Hightower <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Help with UDFs, compress_gz(string,<level>) uncompress_gz(string) On December 18, 2001 I emailed [EMAIL PROTECTED] regarding a pair of user defined functions, compress_gz() and uncompress_gz() that I wrote. That email indicated that, after a few days of testing and cleaning up the code, that I would contribute it. During said testing I discovered that the code is not thread-safe. The code works perfectly as long as it is only used by one thread; it reliably fails, and takes the mysqld with it, if used by >1 threads concurrently. I must first admit that I do very little C programming now-a-days, and even far less multi-threaded programming. That being the case, I am afraid that I am ill-equipped to debug this code, at least not in a timely enough fashion to allow me to ever actually get it done... My suspicion is that my problem might be in zlib. The zlib docs say that it is thread-safe, so maybe I am compiling it incorrectly. I asked a friend, who felt absolutely positive that he had a thread-safe zlib, to try this code. His results differed from mine -- the mysqld did not crash, but he produced dramatic table corruption. This code is just not that complex, and it surprises me that it has been such a pain. I really need this functionality and hope that maybe someone else on this list, with more experience in this area, either could use this functionality also (and can spend some time finding the problem), or can just look at the code for a minute and, by experience, just see the problem. ...and please email a patch to me! :) The code is attached as an Unix ASCII text file, mysqld_udf_zlib.cc. Thanks in advance to anyone who might be able to help. Sincerely, -- Lester Hightower <[EMAIL PROTECTED]> --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php