All fixed and working!
I guess you (and/or others) need to tell me whether the changes to type_info
are correct, but given my reasoning is correct together with the stepwise
resolution of this problem I think they must be.
To summarize the work:
1. My original patch allowed the insert code for a Null<sql_blob> column to
compile, but causes the "Failed to find MySQL C API type ID for" error when
you try to actually insert a non-null blob value. So, load_jpeg with a jpeg
2. My second patch (to type_info) resolves this problem, but the binary data
is always only 4 bytes long. So, load_jpeg works, but puts the wrong data in
3. This patch resolves this final problem.
The original patch was flawed in stadapter.cpp. It needed to convert
the "String" object to a "string" object when constructing the Null<String>
version of SQLTypeAdapter.
I've found the right way to do this is to convert it using "stream2string".
The attached patch must be applied to the current SVN - ie. it must be applied
after my first patch.
Please test and let me know how it goes!
This was many hours of debugging and research, so I hope this is the end.
But, let me know if it isn't.
Russell Robinson (russellr@stripped)
Attachment: [text/x-diff] typeinfoblob-works.patch