Kaydet (Commit) 748bf455 authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

Actually use table name in getIndexInfo. (firebird-sdbc)

Otherwise dbaccess's indexcollection gets confused and can segfault
when indexes not belonging to the desired table are returned.

Change-Id: I4dfe62bf1053c65cac907bf490749ee2cc24e6ca
üst 2e31c305
......@@ -1575,7 +1575,8 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo(
"FROM RDB$INDICES indices "
"JOIN RDB$INDEX_SEGMENTS index_segments "
"on (indices.RDB$INDEX_NAME = index_segments.RDB$INDEX_NAME) "
"WHERE (indices.RDB$SYSTEM_FLAG = 0) ");
"WHERE indices.RDB$RELATION_NAME = '" + sTable + "' "
"AND (indices.RDB$SYSTEM_FLAG = 0) ");
// Not sure whether we should exclude system indices, but otoh. we never
// actually deal with system tables (system indices only apply to system
// tables) within the GUI.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment