Its fixed. You can check out the code from the repository at http://code.google.com/p/libzdb/source/checkout . re2c (http://re2c.org/ or apt-get re2c) is needed to build from scratch. Call bootstrap first, then configure.
To save memory, the MySQL driver is designed not to slurp down large data sets, but read as needed. Each column is preallocated with a 256 byte buffer. This is more than enough for numbers and usually enough for strings, as real life strings often tend to be shorter. Buffers are reallocated if needed, it was this reallocation that had a bug which should now be fixed.
We have mainly been working on developing an application using the SQLite driver and haven't tested all drivers of libzdb _extensively_ in a real application. Its unfortunate, but at the same time its great that you are able to test all parts and we'll try our best to respond as soon as we can. I hope you haven't lost all confidence in the library. The code should be well designed and easy to read and if you want too, you are most welcome to provide patches if more trouble should arise, though I hope we have ironed out most now.
We'll release a new version as soon as the postgresql problem you also reported has been fixed. I don't use postgres myself and I believe Martin is on vacation, so if you want to give it a stab I'll be happy to accept a patch :-)
Jan-Henrik
On 17. mars. 2008, at 16.32, Paul J Stevens wrote:
Jan-Henrik,
I'm running into some problems with the mysql backend. I can't seem to retrieve long-ish strings.
The attached code will reliably segfault on my systems.
This code does *not* fail on Postgresql.
Am I doing something wrong?
thanks,