Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4312

JDBC PlugIN - MySQL Causes errors in Drill INFORMATION_SCHEMA

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.16.0
    • Labels:
      None

      Description

      When connecting MySQL with the JDBC PlugIn queries to INFORMATION_SCHEMA fails. Specifically for COLUMNS and on mysql.performance_schema.

      {query}
      SELECT DISTINCT TABLE_SCHEMA as NAME_SPACE, TABLE_NAME as TAB_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA <>'INFORMATION_SCHEMA' and TABLE_SCHEMA <> 'sys'; {/query}
      {result}
      Error: SYSTEM ERROR: MySQLSyntaxErrorException: Unknown table engine 'PERFORMANCE_SCHEMA'

      Fragment 0:0 {/result}
      {query}

      0: jdbc:drill:> select * from INFORMATION_SCHEMA.`COLUMNS` where TABLE_SCHEMA = 'mysql.performance_schema';

      {/query} {result}

      Error: SYSTEM ERROR: MySQLSyntaxErrorException: Unknown table engine 'PERFORMANCE_SCHEMA'

      Fragment 0:0

      {/result} {drillbit.log}

      [Error Id: 45d23eb8-0bcf-41e2-84e2-4626e7fb0d33 on drilldemo:31010]
      at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:534) ~[drill-common-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:321) [drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:184) [drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:290) [drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) [drill-common-1.4.0.jar:1.4.0]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
      Caused by: java.lang.RuntimeException: Exception while reading definition of table 'cond_instances'
      at org.apache.calcite.adapter.jdbc.JdbcTable.getRowType(JdbcTable.java:103) ~[calcite-core-1.4.0-drill-1.4.0-mapr-r1.jar:1.4.0-drill-1.4.0-mapr-r1]
      at org.apache.drill.exec.store.ischema.RecordGenerator.scanSchema(RecordGenerator.java:140) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.store.ischema.RecordGenerator.scanSchema(RecordGenerator.java:120) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.store.ischema.RecordGenerator.scanSchema(RecordGenerator.java:120) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.store.ischema.RecordGenerator.scanSchema(RecordGenerator.java:108) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.store.ischema.SelectedTable.getRecordReader(SelectedTable.java:57) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.store.ischema.InfoSchemaBatchCreator.getBatch(InfoSchemaBatchCreator.java:36) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.store.ischema.InfoSchemaBatchCreator.getBatch(InfoSchemaBatchCreator.java:30) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:147) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:170) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:127) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:170) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.physical.impl.ImplCreator.getRootExec(ImplCreator.java:101) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.physical.impl.ImplCreator.getExec(ImplCreator.java:79) ~[drill-java-exec-1.4.0.jar:1.4.0]
      at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:230) [drill-java-exec-1.4.0.jar:1.4.0]
      ... 4 common frames omitted
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table engine 'PERFORMANCE_SCHEMA'
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_51]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_51]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_51]
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_51]
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.Util.getInstance(Util.java:387) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1370) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2415) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2313) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.IterateBlock.doForAll(IterateBlock.java:50) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at com.mysql.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:2311) ~[mysql-connector-java-5.1.38-bin.jar:5.1.38]
      at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:218) ~[commons-dbcp-1.4.jar:1.4]
      at org.apache.calcite.adapter.jdbc.JdbcSchema.getRelDataType(JdbcSchema.java:253) ~[calcite-core-1.4.0-drill-1.4.0-mapr-r1.jar:1.4.0-drill-1.4.0-mapr-r1]
      at org.apache.calcite.adapter.jdbc.JdbcSchema.getRelDataType(JdbcSchema.java:245) ~[calcite-core-1.4.0-drill-1.4.0-mapr-r1.jar:1.4.0-drill-1.4.0-mapr-r1]
      at org.apache.calcite.adapter.jdbc.JdbcTable.getRowType(JdbcTable.java:97) ~[calcite-core-1.4.0-drill-1.4.0-mapr-r1.jar:1.4.0-drill-1.4.0-mapr-r1]
      ... 18 common frames omitted
      2016-01-27 03:32:11,254 [CONTROL-rpc-event-queue] WARN o.a.drill.exec.work.foreman.Foreman - Dropping request to move to COMPLETED state as query is already at FAILED state (which is terminal).
      2016-01-27 03:32:11,255 [CONTROL-rpc-event-queue] WARN o.a.d.e.w.b.ControlMessageHandler - Dropping request to cancel fragment. 29584453-e69f-ed0a-7401-7a278aa54475:0:0 does not exist.

      {/log}

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aengelbrecht Andries Engelbrecht
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: