Hi, I've been struggling with an issue regarding JOOQ, Drizzle JDBC and 
MySQL.

Drizzle JDBC is a BSD licensed JDBC driver: 
http://www.drizzle.org/content/download

While attempting to call context.meta().getTables() I've been getting 
exceptions like this:
java.lang.ArrayIndexOutOfBoundsException: -1
    at org.jooq.impl.AbstractRecord.getValue0(AbstractRecord.java:271)
    at org.jooq.impl.AbstractRecord.getValue0(AbstractRecord.java:275)
    at org.jooq.impl.AbstractRecord.getValue(AbstractRecord.java:169)
    at org.jooq.impl.Utils.setValue(Utils.java:1121)
    at org.jooq.impl.ResultImpl.intoGroups(ResultImpl.java:915)
    at org.jooq.impl.MetaImpl$MetaSchema.getColumns(MetaImpl.java:262)
    at org.jooq.impl.MetaImpl$MetaSchema.getTables(MetaImpl.java:238)
    at org.jooq.impl.MetaImpl.getTables(MetaImpl.java:151)

After some digging around in the source, and perusing some searches I 
believe it has to do with the way Drizzle lower cases all column names when 
it returns results. From what I've read the lower casing of column names is 
intended in Drizzle ( ref: 
https://lists.launchpad.net/drizzle-discuss/msg06133.html ).

As for JOOQ. These two lines are hard coded in MetaImpl.java

Field<String> tableSchem = fieldByName(String.class, "TABLE_SCHEM");
Field<String> tableName = fieldByName(String.class, "TABLE_NAME");

and Fields.field(Field<T>) and most Field.equals() implementations do 
comparisons based on the 'name' of the column, but does so using a case 
sensitive string equals(). I am unsure if this is a specific design choice 
or not.

As a temporary solution switching to the MariaDB JDBC connector ( 
https://downloads.mariadb.org/client-java/+releases/ ) is a viable 
workaround however I'd prefer to keep using Drizzle if possible.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to