summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-07-19 08:29:22 +0000
committerOcke Janssen <oj@openoffice.org>2001-07-19 08:29:22 +0000
commit486f4cdabdc218b630554e6d9ea5dd71a2cf3d3e (patch)
treef944d673b0a1c9776cff6378541d028d2d0d9a36 /connectivity
parentd15d274d631c9ab827a464ff9ccf63b6a4036b25 (diff)
#86186# check parsetree for joins
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/parse/sqliterator.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index d7c5eb8e0e3e..cb2b19dd3e0f 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sqliterator.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: oj $ $Date: 2001-05-25 13:09:27 $
+ * last change: $Author: oj $ $Date: 2001-07-19 09:28:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -295,18 +295,15 @@ OSQLParseNode * OSQLParseTreeIterator::getQualified_join(OSQLParseNode *pTableRe
OSQLParseNode *pNode = getTableRef(pTableRef->getChild(0),aTableRange);
if(isTableNode(pNode))
traverseOneTableName(pNode,aTableRange);
- else
- OSL_ENSURE(0,"To tableNode found!");
+
sal_uInt32 nPos = 4;
if(SQL_ISRULE(pTableRef,cross_union) || pTableRef->getChild(1)->getTokenID() != SQL_TOKEN_NATURAL)
nPos = 3;
-
pNode = getTableRef(pTableRef->getChild(nPos),aTableRange);
if(isTableNode(pNode))
traverseOneTableName(pNode,aTableRange);
- else
- OSL_ENSURE(0,"To tableNode found!");
+
return pNode;
}
//-----------------------------------------------------------------------------
@@ -331,6 +328,11 @@ OSQLParseNode * OSQLParseTreeIterator::getTableRef(OSQLParseNode *pTableRef,::rt
aTableRange = pTableRef->getChild(2)->getTokenValue(); // Tabellenrange an Pos 2
}
}
+ else if(SQL_ISRULE(pTableName,table_ref))
+ {
+ pTableName = pTableRef->getChild(0);
+ aTableRange = ::rtl::OUString();
+ }
else if(SQL_ISRULE(pTableName,qualified_join) || SQL_ISRULE(pTableName,cross_union))
{
getQualified_join(pTableRef,aTableRange);