Modified:
branches/branch_5_1/connector-j/src/com/mysql/jdbc/ResultSetImpl.java
Log:
Deal with stored procedures using user variables, and thus calling byteArrayToBoolean() when we're really dealing with an ASCII string but can't tell (so look for '1' and '0' first).
Modified: branches/branch_5_1/connector-j/src/com/mysql/jdbc/ResultSetImpl.java
===================================================================
--- branches/branch_5_1/connector-j/src/com/mysql/jdbc/ResultSetImpl.java 2007-09-07 14:12:54 UTC (rev 6575)
+++ branches/branch_5_1/connector-j/src/com/mysql/jdbc/ResultSetImpl.java 2007-09-07 16:11:05 UTC (rev 6576)
@@ -1645,6 +1645,12 @@
byte boolVal = ((byte[]) value)[0];
+ if (boolVal == (byte)'1') {
+ return true;
+ } else if (boolVal == (byte)'0') {
+ return false;
+ }
+
return (boolVal == -1 || boolVal > 0);
}
| Thread |
|---|
| • Connector/J commit: r6576 - branches/branch_5_1/connector-j/src/com/mysql/jdbc | mmatthews | 7 Sep |