Memcached Functions for MySQL version 1.0 released!

Written for Memcached Functions for MySQL by CaptTofu on 2009-07-31

I'm pleased to announce the release of the Memcached Functions for MySQL, version 1.0.

This release contains several changes, per the ChangeLog:

1.0 Thursday, July 30, 2009 12:00:00 EST 2009
* Fixed issue of setting NULLs with user-defined variables (Thanks to
Jean-Jacques Moortgat at aol dot com !)
* Fixed issue of obtaining a NULL value FROM memcached
* All set functions now return 0 (failure) or 1 (success)
* Other cleanups
* More tests

Importantly, there was an issue that I blogged about several days ago where in the UDF API, if you pass a user-defined variable that is set to NULL to memc_set(), the length of the argument is 8192 even though the value of the argument itself is NULL, which caused much unhappiness in MySQL (crash). That is fixed by setting the length to 0 if the argument itself is NULL. Also fixed is obtaining the NULL value correctly from memc_get(). If the value is NULL (meaning libmemcached sees a value stored but the length is 0), the "is_null" boolean pointer in the value function must be set to true.

This bug is a great find and possible due to the work of Jean-Jacques Moortgat from AOL. I added a test containing this bug and can happily report that there is no longer a crash.

Read all announcements