summaryrefslogtreecommitdiff
path: root/sql/sql_olap.cc
diff options
context:
space:
mode:
authortimour@mysql.com <>2005-08-12 17:57:19 +0300
committertimour@mysql.com <>2005-08-12 17:57:19 +0300
commita247282aa6270e809f4ad3f5205dc79ca7be8ec0 (patch)
tree98cc5c366d6eaba9f415323933356e53cf8d3a92 /sql/sql_olap.cc
parent2889025accafd9f7a5c7b2788b9e34f31dc257e4 (diff)
downloadmariadb-git-a247282aa6270e809f4ad3f5205dc79ca7be8ec0.tar.gz
Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003". * Some of the main problems fixed by the patch: - in "select *" queries the * expanded correctly according to ANSI for arbitrary natural/using joins - natural/using joins are correctly transformed into JOIN ... ON for any number/nesting of the joins. - column references are correctly resolved against natural joins of any nesting and combined with arbitrary other joins. * This patch also contains a fix for name resolution of items inside the ON condition of JOIN ... ON - in this case items must be resolved only against the JOIN operands. To support such 'local' name resolution, the patch introduces a stack of name resolution contexts used at parse time. NOTICE: - This patch is not complete in the sense that - there are 2 test cases that still do not pass - one in join.test, one in select.test. Both are marked with a comment "TODO: WL#2486". - it does not include a new test specific for the task
Diffstat (limited to 'sql/sql_olap.cc')
-rw-r--r--sql/sql_olap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_olap.cc b/sql/sql_olap.cc
index 71e8fe4149f..b457ff5a6d6 100644
--- a/sql/sql_olap.cc
+++ b/sql/sql_olap.cc
@@ -153,7 +153,7 @@ int handle_olaps(LEX *lex, SELECT_LEX *select_lex)
List<Item> all_fields(select_lex->item_list);
- if (setup_tables(lex->thd, &select_lex->context,
+ if (setup_tables(lex->thd, &select_lex->context, &select_lex->top_join_list,
(TABLE_LIST *)select_lex->table_list.first
&select_lex->where, &select_lex->leaf_tables, FALSE) ||
setup_fields(lex->thd, 0, select_lex->item_list, 1, &all_fields,1) ||