[teiid-commits] teiid SVN: r3796 - branches/7.6.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 11:31:34 EST 2012
Author: shawkins
Date: 2012-01-17 11:31:33 -0500 (Tue, 17 Jan 2012)
New Revision: 3796
Modified:
branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java
Log:
TEIID-1871 adding byte[] type check
Modified: branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java
===================================================================
--- branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java 2012-01-17 02:12:12 UTC (rev 3795)
+++ branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java 2012-01-17 16:31:33 UTC (rev 3796)
@@ -85,7 +85,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;
@@ -95,10 +95,10 @@
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