summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-09-06 12:50:25 +0100
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-09-06 13:46:50 +0100
commit748bf45544a31b7bd6217d046009e272d11aa310 (patch)
tree15e3d272ececd7e1294940eadc840fd54ed4b6f4 /connectivity
parent2e31c305a374f14d927ea700657a85aa705f21d9 (diff)
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
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index ddb9ea45984c..0f86ad54fbd5 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -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.