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

Crawling MySQL with the latest MySQL JDBC driver fails

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • ManifoldCF 1.0
    • JDBC connector
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: