mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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
This commit is contained in:
@@ -11801,8 +11801,8 @@ static void test_bug6046()
|
||||
|
||||
stmt= mysql_stmt_init(mysql);
|
||||
|
||||
stmt_text= "SELECT t1.a FROM t1 NATURAL JOIN t1 as X1 "
|
||||
"WHERE t1.b > ? ORDER BY t1.a";
|
||||
stmt_text= "SELECT a FROM t1 NATURAL JOIN t1 as X1 "
|
||||
"WHERE b > ? ORDER BY a";
|
||||
|
||||
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
|
||||
check_execute(stmt, rc);
|
||||
|
||||
Reference in New Issue
Block a user