Hi,
i'm working on MySql implementation of DBinferface, I have found  a problem in 
the current implementation of getTableSchema. I don't know if the DESCRIBE is 
part of the SQL standard o not, but in MySql after the execution of the query 
the result is a "virtual table" populated with the data taken from the database 
metadata.
The problem is that; the ResultSet contain the column name of the original 
table, but the findColum method on the "virtual table" with the original table 
name triggers one SQLException because there is no column with this name. We 
need to use the label.

I have thought 2 solution

1) Modify the signature of org.apache.manifoldcf.core.database.findColumn from 
findColumn(ResultSet rs, String name) to findColumn(ResultSet rs, String 
columnName, String labelKey). The implementation is equals to the oldest one, 
but when you fail to retrieve the columnIndex you can try with the label, it it 
fails to return -1.

2) Make an override on org.apache.manifoldcf.core.database.getData in MySql 
implementation just doing copy and paste of the current code and change the 
findColumn implementation with the implementation described above.

What do you think?

Emanuele

Reply via email to