[teiid-commits] teiid SVN: r3798 - branches/7.4.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue Jan 17 15:55:06 EST 2012


Author: loleary
Date: 2012-01-17 15:55:06 -0500 (Tue, 17 Jan 2012)
New Revision: 3798

Modified:
   branches/7.4.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java
Log:
TEIID-1871 adding byte[] type check

Modified: branches/7.4.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java
===================================================================
--- branches/7.4.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java	2012-01-17 19:31:40 UTC (rev 3797)
+++ branches/7.4.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java	2012-01-17 20:55:06 UTC (rev 3798)
@@ -75,7 +75,7 @@
     public Object retrieveValue(ResultSet results, int columnIndex,
     		Class<?> expectedType) throws SQLException {
     	Object result = super.retrieveValue(results, columnIndex, expectedType);
-    	if (expectedType == TypeFacility.RUNTIME_TYPES.STRING && result instanceof Blob) {
+    	if (expectedType == TypeFacility.RUNTIME_TYPES.STRING && (result instanceof Blob || result instanceof byte[])) {
     		return results.getString(columnIndex);
     	}
     	return result;
@@ -85,7 +85,7 @@
     public Object retrieveValue(CallableStatement results, int parameterIndex,
     		Class<?> expectedType) throws SQLException {
     	Object result = super.retrieveValue(results, parameterIndex, expectedType);
-    	if (expectedType == TypeFacility.RUNTIME_TYPES.STRING && result instanceof Blob) {
+    	if (expectedType == TypeFacility.RUNTIME_TYPES.STRING && (result instanceof Blob || result instanceof byte[])) {
     		return results.getString(parameterIndex);
     	}
     	return result;



More information about the teiid-commits mailing list