[CONJ-812] getBestRowIdentifier returns incorrect value as SCOPE Created: 2020-08-04 Updated: 2021-01-29 Resolved: 2020-08-25 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | metadata |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Lawrin Novitsky | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
According to documentation SCOPE field of the resultset may contain DatabaseMetaData.bestRowTemporary, |
| Comments |
| Comment by Lawrin Novitsky [ 2020-08-09 ] |
|
I'd make it Also, one small thing not really related to this. In the getIndexInfo method in the SQL query there is 3 TYPE, which would be better to write as |
| Comment by Lawrin Novitsky [ 2020-08-09 ] |
|
One more thing, if index is unique, them field may be NULL. and then we cannot say, that it "uniquely identifies a row". Thus, adding AND IS_NULLABLE='NO' to WHERE clause looks reasonable. However, if index is composite, that would be not enough - such index columns should be completely omitted. |
| Comment by Lawrin Novitsky [ 2020-08-10 ] |
|
Not to start new ticket for each little thing - |
| Comment by Diego Dupin [ 2020-08-25 ] |
|
So to resume :
getIndexInfo
getMaxProcedureNameLength()
|
| Comment by Diego Dupin [ 2020-08-25 ] |
|
corrected with https://github.com/mariadb-corporation/mariadb-connector-j/commit/f3055c7c7b3e4afb04718e0026240d7ae6295d47 and https://github.com/mariadb-corporation/mariadb-connector-j/commit/09541596d6dfad61973ec6cf38ddc14f1dbea43d |