Uploaded image for project: 'ManifoldCF'
  1. ManifoldCF
  2. CONNECTORS-511

Crawling MySQL with the latest MySQL JDBC driver fails

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: ManifoldCF 1.0
    • Component/s: JDBC connector
    • Labels:
      None

      Description

      Using "AS" in Select queries in SeedQuery and DataQuery causes error depending on MySQL-JDBC drivers' versions.

      Env:

      • ManifoldCF0.5
      • Solr3.6
      • MySQL5.5

      Example:

      SeedQuery´╝ÜSELECT idfield AS $(IDCOLUMN) FROM documenttable

      Error Message:
      Bad seed query; doesn't return $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. "$(IDCOLUMN)".

      Cause of Error:
      MySQL JDBC drivers of over version 5.1 seem to have a bug that causes error when you use "AS" in Select to put an alias for a column.

      Versions of MySQL Connector:
      mysql-connector-java-5.0.8.jar -> OK
      mysql-connector-java-5.1.18.jar -> No Good (Error)
      mysql-connector-java-5.1.21.jar -> No Good (Error)

      Exception:
      Using function (e.g. SELECT sysdate() AS ..) or fixed strings (e.g. SELECT "fixed string" AS ..) followed by "AS" does not cause error.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              shige Shigeki Kobayashi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: