manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shigeki Kobayashi <shigeki.kobayas...@g.softbank.co.jp>
Subject Crawling MySQL with latest MySQL connector fails
Date Mon, 20 Aug 2012 08:21:24 GMT
Hi guys.


I am not sure if everyone has already noticed this, but this is to share an
experimental fact of using MySQL connectors to crawl MySQL data.

Using "AS" in Select queries in SeedQuery and DataQuery causes error
depending on versions of MySQL connectors.

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 connecors 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
 mysql-connector-java-5.1.21.jar -> No Good

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

Regards,

Shigeki

Mime
View raw message