It appears that when the unique argument to
getIndexInfo is set to "true", that index of column
containing non-unique values is also returned. I need
to be able to determine programmatically, which
columns only allow unique values.
The exact method used is:
public ResultSet getIndexInfo(String catalog,
String schema,
String table,
boolean unique,
boolean approximate)
throws SQLException
The Sun JDBC API documentation says:
unique - when true, return only indices for unique
values; when false, return indices regardless of
whether unique or not
Is returning an index for a column with non-unique
values when unique is set to "true" the correct
behaviour or a bug?
Using version 4.0.18-nt of MySQL.
-George