List:Commits« Previous MessageNext Message »
From:mmatthews Date:September 7 2007 4:11pm
Subject:Connector/J commit: r6576 - branches/branch_5_1/connector-j/src/com/mysql/jdbc
View as plain text  
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/jdbcmmatthews7 Sep