Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
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.