summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcmr2012-06-01 05:44:02 (EDT)
committer mwu2012-06-01 05:44:02 (EDT)
commit7a912bf26614ebcc35decc3d9e0a7854c6f58731 (patch)
tree0dea315d471bf94a8160b939a09da684036671d1
parent54dda45094fc28a878e07bb840ada64e4f528b9d (diff)
downloadorg.eclipse.birt-7a912bf26614ebcc35decc3d9e0a7854c6f58731.zip
org.eclipse.birt-7a912bf26614ebcc35decc3d9e0a7854c6f58731.tar.gz
org.eclipse.birt-7a912bf26614ebcc35decc3d9e0a7854c6f58731.tar.bz2
TED – Issue 36056 BRD: MYSQL driver initial metadata collection fails
with query parameter
-rw-r--r--data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ParameterMetaData.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ParameterMetaData.java b/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ParameterMetaData.java
index 6e59a52..f7e974a 100644
--- a/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ParameterMetaData.java
+++ b/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ParameterMetaData.java
@@ -190,6 +190,8 @@ public class ParameterMetaData implements IParameterMetaData
}
catch ( SQLException e )
{
+ if ( "S1C00".equals( e.getSQLState( ) ) )
+ return "VARCHAR";
throw new JDBCException( ResourceConstants.PARAMETER_TYPE_NAME_CANNOT_GET,
e );
}
@@ -220,6 +222,8 @@ public class ParameterMetaData implements IParameterMetaData
}
catch ( SQLException e )
{
+ if ( "S1C00".equals( e.getSQLState( ) ) )
+ return 0;
throw new JDBCException( ResourceConstants.PARAMETER_PRECISION_CANNOT_GET,
e );
}
@@ -250,6 +254,8 @@ public class ParameterMetaData implements IParameterMetaData
}
catch ( SQLException e )
{
+ if ( "S1C00".equals( e.getSQLState( ) ) )
+ return 0;
throw new JDBCException( ResourceConstants.PARAMETER_SCALE_CANNOT_GET,
e );
}
@@ -273,9 +279,9 @@ public class ParameterMetaData implements IParameterMetaData
"isNullable",
"ParameterMetaData.isNullable( )" );
assertNotNull( paraMetadata );
+ int result = IParameterMetaData.parameterNullableUnknown;
try
{
- int result = IParameterMetaData.parameterNullableUnknown;
if ( paraMetadata.isNullable( param ) == java.sql.ParameterMetaData.parameterNullable )
result = IParameterMetaData.parameterNullable;
else if ( paraMetadata.isNullable( param ) == java.sql.ParameterMetaData.parameterNoNulls )
@@ -284,6 +290,8 @@ public class ParameterMetaData implements IParameterMetaData
}
catch ( SQLException e )
{
+ if ( "S1C00".equals( e.getSQLState( ) ) )
+ return result;
throw new JDBCException( ResourceConstants.PARAMETER_NULLABILITY_CANNOT_DETERMINE,
e );
}