1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

WL#2486 - natural and using join according to SQL:2003

- Corrected problem with N-way nested natural joins in PS mode.
- Code cleanup
- More asserts to check consistency of name resolution contexts
- Fixed potential memory leak of name resolution contexts


mysql-test/r/join.result:
  - Corrected problem with N-way nested natural joins in PS mode.
mysql-test/t/join.test:
  - Corrected problem with N-way nested natural joins in PS mode.
sql/item.h:
  - Fixed potential memory leak.
sql/sql_base.cc:
  - the local context of Item_fields that participate in TABLE_LIST::on_cond for
    natural joins is correctly set to the tables where the corresponding fields
    originate from.
  - removed unused variables
  - correct allocation of contexts
sql/sql_parse.cc:
  - correct allocation of contexts for JOIN ON conditions.
sql/table.cc:
  - added asserts to check the consistency of name resolution contexts
sql/table.h:
  - added asserts to check the consistency of name resolution contexts
This commit is contained in:
unknown
2005-08-19 15:22:30 +03:00
parent bbf391cb54
commit 1cb72d7eb9
7 changed files with 50 additions and 26 deletions

View File

@@ -6415,8 +6415,7 @@ Name_resolution_context *
make_join_on_context(THD *thd, TABLE_LIST *left_op, TABLE_LIST *right_op)
{
Name_resolution_context *on_context;
if (!(on_context= (Name_resolution_context*)
thd->calloc(sizeof(Name_resolution_context))))
if (!(on_context= new Name_resolution_context))
return NULL;
on_context->init();
on_context->first_name_resolution_table=