Tag: cws_dev300_dba31a User: fs Date: 2008-07-30 12:03:32+0000 Modified: dba/connectivity/source/parse/sqlbison.y dba/connectivity/source/parse/sqliterator.cxx dba/connectivity/source/parse/sqlnode.cxx
Log: RESYNC: (1.65-1.66); FILE MERGED File Changes: Directory: /dba/connectivity/source/parse/ ========================================== File [changed]: sqlbison.y Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/parse/sqlbison.y?r1=1.63.32.3&r2=1.63.32.4 Delta lines: +1 -0 ------------------- --- sqlbison.y 2008-06-24 12:09:10+0000 1.63.32.3 +++ sqlbison.y 2008-07-30 12:03:21+0000 1.63.32.4 @@ -987,6 +987,7 @@ $$->append($2); $$->append($3); } + | joined_table | '{' SQL_TOKEN_OJ joined_table '}' { $$ = SQL_NEW_RULE; Directory: /dba/connectivity/source/parse/ ========================================== File [changed]: sqliterator.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/parse/sqliterator.cxx?r1=1.58.8.1&r2=1.58.8.2 Delta lines: +18 -10 --------------------- --- sqliterator.cxx 2008-07-04 11:43:04+0000 1.58.8.1 +++ sqliterator.cxx 2008-07-30 12:03:24+0000 1.58.8.2 @@ -493,13 +493,16 @@ //----------------------------------------------------------------------------- const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables, const OSQLParseNode *pTableRef,::rtl::OUString& rTableRange ) { - OSL_PRECOND( SQL_ISRULE( pTableRef, table_ref ) - || SQL_ISRULE( pTableRef, qualified_join ) || SQL_ISRULE( pTableRef, cross_union ) - || SQL_ISRULE( pTableRef, subquery ), + OSL_PRECOND( SQL_ISRULE( pTableRef, table_ref ) || SQL_ISRULE( pTableRef, joined_table ) + || SQL_ISRULE( pTableRef, qualified_join ) || SQL_ISRULE( pTableRef, cross_union ), "OSQLParseTreeIterator::getTableNode: only to be called for table_ref nodes!" ); const OSQLParseNode* pTableNameNode = NULL; + if ( SQL_ISRULE( pTableRef, joined_table ) ) + { + getQualified_join( _rTables, pTableRef->getChild(1), rTableRange ); + } if ( SQL_ISRULE( pTableRef, qualified_join ) || SQL_ISRULE( pTableRef, cross_union ) ) { getQualified_join( _rTables, pTableRef, rTableRange ); @@ -507,12 +510,14 @@ else { rTableRange = OSQLParseNode::getTableRange(pTableRef); - if ( pTableRef->count() == 4 || pTableRef->count() == 5 ) // '{' SQL_TOKEN_OJ joined_table '}' || '(' joined_table ')' range_variable op_column_commalist + if ( ( pTableRef->count() == 4 ) // '{' SQL_TOKEN_OJ joined_table '}' + || ( pTableRef->count() == 5 ) // '(' joined_table ')' range_variable op_column_commalist + ) { getQualified_join( _rTables, pTableRef->getChild(6 - pTableRef->count()), rTableRange ); } - else if ( pTableRef->count() == 3 ) - { // subquery as range_variable + else if ( pTableRef->count() == 3 ) // subquery range_variable op_column_commalist + { const OSQLParseNode* pSubQuery = pTableRef->getChild(0); OSL_ENSURE( pSubQuery->count() == 3, "sub queries should have 3 children!" ); const OSQLParseNode* pQueryExpression = pSubQuery->getChild(1); @@ -525,9 +530,8 @@ OSL_ENSURE( false, "OSQLParseTreeIterator::getTableNode: subquery which is no select_statement: not yet implemented!" ); } } - else if ( pTableRef->count() == 2 ) + else if ( pTableRef->count() == 2 ) // table_node table_primary_as_range_column { - // table_node pTableNameNode = pTableRef->getChild(0); } else @@ -583,6 +587,10 @@ { getQualified_join( _rTables, pTableListElement, aTableRange ); } + else if ( SQL_ISRULE( pTableListElement, joined_table ) ) + { + getQualified_join( _rTables, pTableListElement->getChild(1), aTableRange ); + } // if (! aIteratorStatus.IsSuccessful()) break; } Directory: /dba/connectivity/source/parse/ ========================================== File [changed]: sqlnode.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/parse/sqlnode.cxx?r1=1.55.8.1&r2=1.55.8.2 Delta lines: +3 -2 ------------------- --- sqlnode.cxx 2008-07-02 13:20:08+0000 1.55.8.1 +++ sqlnode.cxx 2008-07-30 12:03:27+0000 1.55.8.2 @@ -1372,6 +1372,7 @@ { OSQLParseNode::all_or_any_predicate, "all_or_any_predicate" }, { OSQLParseNode::named_columns_join, "named_columns_join" }, { OSQLParseNode::join_condition, "join_condition" }, + { OSQLParseNode::joined_table, "joined_table" }, { OSQLParseNode::boolean_factor, "boolean_factor" }, { OSQLParseNode::sql_not, "sql_not" }, { OSQLParseNode::boolean_test, "boolean_test" }, --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
