The implementations of interface XTablesSupplier.getTables() in LibreOffice currently return a XNameAccess that uses: schemaName + "." + tableName as "name" to access the tables. However, this scheme can make collisions between schemaName == "foo" tableName == "bar.qux" and schemaName == "foo.bar" tableName == "qux" because in both cases, the name resolves to "foo.bar.qux". The XNameAccess should rather use properly quoted and escaped names, that is: '"' + escapeDoubleQuotes(schemaName) + '"."' + escapeDoubleQuotes(tableName) + '"' double quotes should be escaped by repeating them. At the same time, all callers to this interface have to be changed, too. The whole name construction business should be done by a utility function, most probably ::dbtools::composeTableNameForSelect (which needs to be changed to handle double quotes in names...). Implementations of XTablesSupplier: 1) MySQL driver: I haven't found where the name is constructed; possibly in db-agnostic dbaccess/ or connectivity/source/sdbcx or connectivity/source/commontools code. 2) PostgreSQL driver: pq_xtables.cxx function Tables::refresh code snippet: buf.append( schema ).appendAscii( "." ).append( name ); map[ buf.makeStringAndClear() ] = currentTableIndex; callers that need to be also modified: pq_resultsetmetadata.cxx function ResultSetMetaData::checkTable
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Adding self to CC if not already on
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.