Toby Thain <toby@xxxxxxxxxxxxx> was heard to say:
> libdbi error: The requested variable type does not match what libdbi
> thinks it should be
> string=ERROR
> binary=bbb
>
Waitaminute, this rings a bell. I believe I went through this before. I recall
that MySQL erroneously reports TEXT columns as FIELD_TYPE_BLOB instead of
FIELD_TYPE_STRING. You can verify this by patching the MySQL driver code to
display the numeric value of the MySQL field type and compare it against the
list in mysql_com.h. I'll see whether I have this debug code around somewhere
to make sure I'm not dreaming it up.
> I'm not saying this is the correct design for libdbi, but a coercion
> would be retrieving narrow numeric as wide numeric, numeric as
> string, string as numeric, or binary as string, or ... you get the
> idea. :-) They are often applied during processing SQL at the
> database end, for instance.
>
> The reason I mention this, is it would make portable schemas much
> simpler. The inconsistencies between just MySQL and PgSQL make this
> very difficult when combined with libdbi's strict typing, but some
> workarounds exist...
I see. Thanks for the explanation. I don't think this would clash with the
design of libdbi. It could be implemented as an additional layer in libdbi that
translates the values to whatever type you request, with another set of
retrieval functions. Doable, but associated with some grunt work.
regards,
Markus
--
Markus Hoenicka
markus.hoenicka@xxxxxxx
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
|