diff options
author | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-01-05 10:27:09 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-01-05 10:27:09 +0100 |
commit | 3e727eeb92ec7d0b03933c9f66d96e72d91f3f24 (patch) | |
tree | 00f2e4f0193913f6a4c798e16b7a09bbd6d3e910 /connectivity/source/parse | |
parent | b926321f4b3e4386e0d1ed4a2795477bd0f2e727 (diff) |
dba34c: #i110584# fix for FN escape function and check if table name is empty
Diffstat (limited to 'connectivity/source/parse')
-rw-r--r-- | connectivity/source/parse/PColumn.cxx | 16 | ||||
-rw-r--r-- | connectivity/source/parse/sqlbison.y | 9 |
2 files changed, 16 insertions, 9 deletions
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx index 10f4b5b4bdcf..8f3014908b10 100644 --- a/connectivity/source/parse/PColumn.cxx +++ b/connectivity/source/parse/PColumn.cxx @@ -155,13 +155,15 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe _rxResMetaData->isCurrency( _nColumnPos ), _rxDBMetaData->supportsMixedCaseQuotedIdentifiers() ); - pColumn->setTableName( ::dbtools::composeTableName( _rxDBMetaData, - _rxResMetaData->getCatalogName( _nColumnPos ), - _rxResMetaData->getSchemaName( _nColumnPos ), - _rxResMetaData->getTableName( _nColumnPos ), - sal_False, - eComplete - ) ); + const ::rtl::OUString sTableName = _rxResMetaData->getTableName( _nColumnPos ); + if ( sTableName.getLength() ) + pColumn->setTableName( ::dbtools::composeTableName( _rxDBMetaData, + _rxResMetaData->getCatalogName( _nColumnPos ), + _rxResMetaData->getSchemaName( _nColumnPos ), + sTableName, + sal_False, + eComplete + ) ); pColumn->setIsSearchable( _rxResMetaData->isSearchable( _nColumnPos ) ); pColumn->setRealName(_rxResMetaData->getColumnName( _nColumnPos )); pColumn->setLabel(sLabel); diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index bfea82a25c7c..ad271e855e20 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -2447,11 +2447,16 @@ odbc_fct_spec: $$->append($1); $$->append($2); } + | SQL_TOKEN_FN set_fct_spec + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } ; odbc_fct_type: - SQL_TOKEN_FN - | SQL_TOKEN_D + SQL_TOKEN_D | SQL_TOKEN_T | SQL_TOKEN_TS ; |