Skip to content
Snippets Groups Projects
Commit 0af166f6 authored by zonia3000's avatar zonia3000
Browse files

Bugfix: NPE in VotType & MySQL metadata issue in JDBCConnection

parent b648da34
No related branches found
No related tags found
No related merge requests found
......@@ -3271,7 +3271,8 @@ public class JDBCConnection implements DBConnection {
int cnt = 0;
String columnPattern = columnCaseSensitive ? columnName : null;
while(rsT.next()){
String rsSchema = nullifyIfNeeded(rsT.getString(2));
int rsTSchemaIndex = dbms.equalsIgnoreCase(DBMS_MYSQL) ? 1 : 2;
String rsSchema = nullifyIfNeeded(rsT.getString(rsTSchemaIndex));
String rsTable = rsT.getString(3);
// test the schema name:
if (!supportsSchema || schemaName == null || equals(rsSchema, schemaName, schemaCaseSensitive)){
......
......@@ -160,13 +160,13 @@ public final class VotType {
case CHAR:
this.datatype = VotDatatype.CHAR;
this.arraysize = Integer.toString(tapType.length > 0 ? tapType.length : null);
this.arraysize = tapType.length > 0 ? Integer.toString(tapType.length) : null;
this.xtype = null;
break;
case BINARY:
this.datatype = VotDatatype.UNSIGNEDBYTE;
this.arraysize = Integer.toString(tapType.length > 0 ? tapType.length : null);
this.arraysize = tapType.length > 0 ? Integer.toString(tapType.length) : null;
this.xtype = null;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment