The current CVS tree's setObject() doesn't set m_bindTypes correctly in some
cases, which breaks server-side prepares in these cases.
For example, when preparing:
setObject(n, new Boolean(true), Types.BIT) uses "text" not "boolean"
setObject(n, new Boolean(true), Types.INTEGER) uses "boolean" not "integer"
setObject(n, new Integer(true), Types.BIT) uses "text" not "boolean"
setNull(n, Types.BIT) uses "text" not "boolean"
This then ends up with the server complaining about incompatible types when
preparing the statement.
The attached patch adds testcases for (some of) these cases and fixes
AbstractJdbc1Statement so they pass. I've also modified the Types.BIT case
when given a Number from "value == 1" to "value != 0" which is more
conventional for "number as truth value", and made the strings used as
boolean values in setObject() consistent with those in setBoolean() ('t' /
'f').
IIRC there was some reason for using 't'/'f' for boolean constants in the
driver rather than the currently-recommended TRUE/FALSE, but I can't
remember what .. if there's no reason, it should probably use TRUE/FALSE.
-O