summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-09-13 07:36:50 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-09-13 12:08:05 +0200
commitbe3e037b38be4c6bd821bc5261dcd85f18196214 (patch)
treebb18387454f4e68a9fb1e76ddf5d98089c20f3f2 /connectivity
parent974d73d219e344350522f8c3da8c38cda6ddbd4d (diff)
setting a table name on an expression/function call makes no sense
Change-Id: Id30805f09bc359c6f66d87f050427c0e586ec93d
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/parse/sqliterator.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 3bb5efb2b979..ecd9f747cf53 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -1008,17 +1008,11 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
// check if the column is also a parameter
traverseSearchCondition(pColumnRef); // num_value_exp
- // Do all involved columns of the function belong to one table?
- if (m_pImpl->m_pTables->size() == 1)
- {
- aTableRange = m_pImpl->m_pTables->begin()->first;
- }
- else
- {
- getColumnTableRange(pColumnRef,aTableRange);
- }
if ( pColumnRef->isRule() )
{
+ // LEM FIXME: the if condition is not quite right
+ // many expressions are rules, e.g. "5+3"
+ // or even: "colName + 1"
bFkt = sal_True;
nType = getFunctionReturnType(pColumnRef);
}
@@ -1807,6 +1801,8 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
pColumn->setRealName(rColumnName);
+ SAL_WARN("connectivity.parse", "Trying to construct a column with Function==true and a TableName; this makes no sense.");
+ assert(false);
pColumn->setTableName(aFind->first);
Reference< XPropertySet> xCol = pColumn;