diff options
-rw-r--r-- | connectivity/source/commontools/TPrivilegesResultSet.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx b/connectivity/source/commontools/TPrivilegesResultSet.cxx index a9e21fb27ec3..075673210364 100644 --- a/connectivity/source/commontools/TPrivilegesResultSet.cxx +++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx @@ -49,15 +49,11 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& osl_incrementInterlockedCount( &m_refCount ); { ::rtl::OUString sUserWorkingFor; - static Sequence< ::rtl::OUString > sTableTypes; - if ( sTableTypes.getLength() == 0 ) - { - // we want all catalogues, all schemas, all tables - sTableTypes.realloc(3); - sTableTypes[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")); - sTableTypes[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")); - sTableTypes[2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")); // just to be sure to include anything else .... - } + Sequence< ::rtl::OUString > sTableTypes(3); + // we want all catalogues, all schemas, all tables + sTableTypes[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")); + sTableTypes[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE")); + sTableTypes[2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")); // just to be sure to include anything else .... try { m_xTables = _rxMeta->getTables(catalog,schemaPattern,tableNamePattern,sTableTypes); |