On Oct 27, 2008, at 10:53 PM, Russell Robinson wrote:
> I guess you (and/or others) need to tell me whether the changes to
> are correct, but given my reasoning is correct together with the
> resolution of this problem I think they must be.
I still worry that it might overreach, but dtest doesn't complain,
> The original patch was flawed in stadapter.cpp.
> I've found the right way to do this is to convert it using
This is a rather heavy-handed fix. It makes an extra copy of the
The real problem is that you were constructing the SQLBuffer with a
pointer-to-char, which calls the ctor taking std::string. If you
construct a std::string from char*, it only copies up to the first
null character; bad ju-ju with BLOBs. There must have been a null
character at the fifth byte in your test data.
You can fix the bug without the extra buffer copy by using SQLBuffer's
other ctor, which takes char* and a length value. svn diff -
r2386:2387 to see the fix.
I applied your type_info.cpp patch as-is. No problems there, other
than my vague worries.
Thanks for doing the legwork on this!