Commit graph

20 commits

Author SHA1 Message Date
unknown
fbc16a85c2 BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
Two problems here:

 Problem 1:

 While constructing the join columns list the optimizer does as follows:
  1. Sets the join_using_fields/natural_join members of the right JOIN 
   operand.
  2. Makes a "table reference" (TABLE_LIST) to parent the two tables.
  3. Assigns the join_using_fields/is_natural_join of the wrapper table
   using join_using_fields/natural_join of the rightmost table
  4. Sets join_using_fields to NULL for the right JOIN operand.
  5. Passes the parent table up to the same procedure on the upper 
   level.

 Step 1 overrides the the join_using_fields that are set for a nested 
 join wrapping table in step 4.
 Fixed by making a designated variable SELECT_LEX::prev_join_using to 
 pass the data from step 1 to step 4 without destroying the wrapping 
 table data.

 Problem 2:

 The optimizer checks for ambiguous columns while transforming 
 NATURAL JOIN/JOIN USING to JOIN ON. While doing that there was no
 distinction between columns that are used in the generated join
 condition (where ambiguity can be checked) and the other columns
 (where ambiguity can be checked only when resolving references
 coming from outside the JOIN construct itself).
 Fixed by allowing the non-USING columns to be present in multiple 
 copies in both sides of the join and moving the ambiguity check 
 to the place where unqualified references to the join columns are
 resolved (find_field_in_natural_join()).


mysql-test/r/join_nested.result:
  BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
   - test case
mysql-test/t/join_nested.test:
  BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
   - test case
sql/mysql_priv.h:
  BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
   - use SELECT_LEX to store the ref to JOIN USING list needed by the 
     parser
sql/sql_base.cc:
  BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
   - proper check for duplicate cols
   - more detailed debug output
sql/sql_lex.h:
  BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
   - use SELECT_LEX to store the ref to JOIN USING list needed by the 
     parser
sql/sql_parse.cc:
  BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
   - proper check for duplicate cols in JOIN USING
sql/sql_yacc.yy:
  BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
   - use SELECT_LEX to store the ref to JOIN USING list needed by the 
     parser
sql/table.cc:
  BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join
   - return null if no table ref (as in nested join columns).
2007-01-31 16:04:38 +02:00
unknown
42010cde4a Fixed bug #24345.
This bug appeared after the patch for bug 21390 that had added some code
to handle outer joins with no matches after substitution of a const
table in an efficient way. That code as it is cannot be applied to the case
of nested outer join operations. Being applied to the queries with
nested outer joins the code can cause crashes or wrong result sets.
The fix blocks row substitution for const inner tables of an outer join
if the inner operand is not a single table.  


mysql-test/r/join_nested.result:
  Added a test case for bug #24345.
mysql-test/t/join_nested.test:
  Added a test case for bug #24345.
2007-01-03 12:16:03 -08:00
unknown
9a02fede24 Fixed bug #18279: crash in the cases when on conditions are moved
out of a nested join to the on conditions for the nest.
The bug happened due to:
1. The function simplify_joins could change on expressions for nested joins.
   Yet modified on expressions were not saved in prep_on_expr.
2. On expressions were not restored for nested joins in 
   reinit_stmt_before_use.


mysql-test/r/join_nested.result:
  Added a test case for bug #18279.
mysql-test/t/join_nested.test:
  Added a test case for bug #18279.
sql/sql_prepare.cc:
  Fixed bug #18279.
  On expressions were not restored for nested joins in 
  reinit_stmt_before_use.
sql/sql_select.cc:
  Fixed bug #18279.
  The function simplify_joins could change on expressions for nested joins.
  Yet modified on expressions were not saved in prep_on_expr.
2006-03-29 16:45:29 -08:00
unknown
6bfbba34c7 Fixed bug #16260.
The problem has manifested itself in the cases when we have a nested outer join
for which it can be inferred that one of the inner tables is a single row table.


mysql-test/r/join_nested.result:
  Added a test case for bug #16260.
mysql-test/t/join_nested.test:
  Added a test case for bug #16260.
sql/sql_select.cc:
  Fixed bug #16260.
  The problem has manifested itself in the cases when we have a nested outer join
  for which it can be inferred that one of the inner tables is a single row table.
  A table is never considered as a const table if it is used in a nested join 
  that serves as an inner operand of an outer join.
2006-01-27 21:20:28 -08:00
unknown
2956a79b93 BUG#16393: Let the 'ref' optimizer use ON condition of nested join to construct
'ref' accesses to all tables that are direct children of the nested join and are 
not inner wrt their siblings.


mysql-test/r/join_nested.result:
  Testcase for BUG#16393
mysql-test/t/join_nested.test:
  Testcase for BUG#16393
2006-01-13 23:55:30 +03:00
unknown
dc8a5d54bd Remove t3 in join_nested.test
mysql-test/r/join_nested.result:
  Remove t3 too.
mysql-test/t/join_nested.test:
  Remove t3 too.
2005-11-24 19:51:52 +01:00
unknown
d2ac9b5b67 table t7 was not dropped at the end
mysql-test/r/join_nested.result:
  drop t7
mysql-test/t/join_nested.test:
  drop t7
2005-11-24 16:11:59 +02:00
unknown
2b7f5a45e9 BUG#13126: When choosing join order for join with nested joins, don't produce join
orders that cannot be handled by the executioner.


mysql-test/r/bigint.result:
  Added mssing "drop table if exists"
mysql-test/r/join_nested.result:
  Testcase for BUG#13126
mysql-test/t/bigint.test:
  Added mssing "drop table if exists"
mysql-test/t/join_nested.test:
  Testcase for BUG#13126
sql/mysql_priv.h:
  BUG#13126: Added nested_join_map type.
sql/sql_prepare.cc:
  BUG#13126: Don't set NESTED_JOIN::counter to 0 here as it is reset in other place now.
sql/sql_select.cc:
  BUG#13126: When choosing join order for join with nested joins, don't produce join orders
  that the executioner cannot handle. The work is done by check_interleaving_with_nj() and 
  restore_prev_nj_state() functions that are used from the join optimizer to avoid building
  invalid join orders.
sql/sql_select.h:
  BUG#13126: Added JOIN_TAB::embedding_map and JOIN::cur_embedding_map.
sql/table.h:
  BUG#13126: In NESTED_JOIN: added nj_map, added comment about where counter is used.
2005-10-25 19:28:27 +04:00
unknown
7acbea3f3f fix for bug #13545: Server crash caused by select query.
sql/sql_base.cc:
  fix for bug #13545: Server crash caused by select query.
  - compare table qualifier only with tables which are not nested joins.
  - perform recursion accordingly.
  - DBUG_ASSERT(table_list->table); added before the find_field_in_table() call.
2005-09-29 19:34:21 +05:00
unknown
fe24add743 WL#2486 - natural and using join according to SQL:2003
* Provide backwards compatibility extension to name resolution of
  coalesced columns. The patch allows such columns to be qualified
  with a table (and db) name, as it is in 4.1.
  Based on a patch from Monty.

* Adjusted tests accordingly to test both backwards compatible name
  resolution of qualified columns, and ANSI-style resolution of
  non-qualified columns.
  For this, each affected test has two versions - one with qualified
  columns, and one without. 


mysql-test/include/ps_query.inc:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/bdb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/innodb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join_nested.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join_outer.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/null_key.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/order_by.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_2myisam.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_3innodb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_4heap.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_5merge.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_6bdb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_7ndb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/select.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/subselect.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/type_ranges.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/bdb.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/innodb.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join_nested.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join_outer.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/null_key.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/order_by.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/select.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/subselect.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/type_ranges.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
sql/sql_base.cc:
  * Applied Monty's patch for backwards compatible name resolution
    of qualified columns. The idea is:
    - When a column is qualified, search for the column in all
      tables/views underlying each natural join. In this case
      natural joins are *not* considered leaves.
    - If a column is not qualified, then consider natural joins
      as leaves, thus directly search the result columns of
      natural joins.
  * Simplified 'find_field_in_tables()' - unified two similar
    loops into one.
sql/table.cc:
  - Removed method & members not needed after Monty's patch.
sql/table.h:
  - Removed method & members not needed after Monty's patch.
tests/mysql_client_test.c:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
2005-08-23 18:08:04 +03:00
unknown
2b53b711d8 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486-merge


mysql-test/r/errors.result:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/fulltext_order_by.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/join_nested.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/errors.test:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
mysql-test/t/fulltext_order_by.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/join_nested.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/sql_insert.cc:
  merge WL#2486
sql/sql_show.cc:
  merge WL#2486
2005-08-12 19:27:54 +03:00
unknown
7517d7e112 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


mysql-test/include/ps_query.inc:
  Adjusted according to standard NATURAL/USING join semantics.,
mysql-test/r/bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/derived.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/errors.result:
  The column as a whole cannot be resolved, so different error message.
mysql-test/r/fulltext.result:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/r/fulltext_order_by.result:
  More detailed error message.
mysql-test/r/innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/r/insert_select.result:
  More detailed error message.
mysql-test/r/join.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/r/join_crash.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_nested.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_outer.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/multi_update.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/null_key.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/order_by.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_2myisam.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_3innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_4heap.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_5merge.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_6bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_7ndb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/select.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one failing test case which is commented with
  WL#2486 in the test file.
mysql-test/r/subselect.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/type_ranges.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/union.result:
  More detailed error message.
mysql-test/t/bdb.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/errors.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/fulltext.test:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/t/fulltext_order_by.test:
  More detailed error message.
mysql-test/t/innodb.test:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/t/insert_select.test:
  More detailed error message.
mysql-test/t/join.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/join_crash.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_nested.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_outer.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/null_key.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/order_by.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/select.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/subselect.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/type_ranges.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/union.test:
  More detailed error message.
sql/item.cc:
  - extra parameter to find_field_in_tables
  - find_field_in_real_table renamed to find_field_in_table
  - fixed comments/typos
sql/item.h:
  - added [first | last]_name_resolution_table to class
    Name_resolution_context
  - commented old code
  - standardized formatting
sql/mysql_priv.h:
  - refactored the find_field_in_XXX procedures,
  - added a new procedure for natural join table references,
  - renamed the find_field_in_XXX procedures to clearer names
sql/sp.cc:
  - pass the top-most list of the FROM clause to setup_tables
  - extra parameter to find_field_in_tables
sql/sql_acl.cc:
  - renamed find_field_in_table => find_field_in_table_ref
  - extra parameter to find_field_in_table_ref
  - commented old code
sql/sql_base.cc:
  This file contains the core of the implementation of the processing
  of NATURAL/USING joins (WL#2486).
  - added many comments to old code
  - refactored the group of find_field_in_XXX procedures, and added a
    new procedure for natural joins. There is one find_field_in_XXX procedure
    per each type of table reference (stored table, merge view, or natural
    join); one meta-procedure that selects the correct one depeneding on the
    table reference; and one procedure that goes over a list of table
    referenes.
  - NATURAL/USING joins are processed through the procedures:
      mark_common_columns, store_natural_using_join_columns,
      store_top_level_join_columns, setup_natural_join_row_types.
    The entry point to processing NATURAL/USING joins is the
    procedure 'setup_natural_join_row_types'.
  - Replaced the specialized Field_iterator_XXX iterators with one
    generic iterator over the fields of a table reference.
  - Simplified 'insert_fields' and 'setup_conds' due to encapsulation of
    the processing of natural joins in a separate set of procedures.
sql/sql_class.h:
  - Commented old code.
sql/sql_delete.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_help.cc:
  - pass the end name resolution table to find_field_in_tables
  - adjust the list of tables for name resolution
sql/sql_insert.cc:
  - Changed the code that saves and restores the current context to
    support the list of tables for name resolution -
    context->first_name_resolution_table, and
    table_list->next_name_resolution_table.
    Needed to support an ugly trick to resolve inserted columns only in
    the first table.
  - Added Name_resolution_context::[first | last]_name_resolution_table.
  - Commented old code
sql/sql_lex.cc:
  - set select_lex.parent_lex correctly
  - set correct state of the current name resolution context
sql/sql_lex.h:
  - Added a stack of name resolution contexts to support local
    contexts for JOIN ... ON conditions.
  - Commented old code.
sql/sql_load.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_olap.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_parse.cc:
  - correctly set SELECT_LEX::parent_lex
  - set the first table of the current name resoltion context
  - added support for NATURAL/USING joins
  - commented old code
sql/sql_select.cc:
  - Pass the FROM clause to setup_tables.
  - Pass the end table to find_field_in_tables
  - Improved comments
sql/sql_show.cc:
  - Set SELECT_LEX::parent_lex.
sql/sql_update.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_yacc.yy:
  - Added support for a stack of name resolution contexts needed to
    implement name resolution for JOIN ... ON. A context is pushed
    for each new JOIN ... ON, and popped afterwards.
  - Added support for NATURAL/USING joins.
sql/table.cc:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
sql/table.h:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
tests/mysql_client_test.c:
  Adjusted according to standard NATURAL JOIN syntax.
2005-08-12 17:57:19 +03:00
unknown
4811f7bd1e mysql_priv.h:
Fixed bug #12154: a query returned: Column <name> cannot be null.
  The problem was due to a bug in the function setup_table_map:
  the flag maybe_null was set up incorrectly for inner tables of
  nested outer joins.
join_nested.result, join_nested.test:
  Added a test case for bug #12154.


mysql-test/t/join_nested.test:
  Added a test case for bug #12154.
mysql-test/r/join_nested.result:
  Added a test case for bug #12154.
sql/mysql_priv.h:
  Fixed bug #12154: a query returned: Column <name> cannot be null.
  The problem was due to a bug in the function setup_table_map:
  the flag maybe_null was set up incorrectly for inner tables of
  nested outer joins.
2005-08-05 16:43:35 -07:00
unknown
ad57284c69 join_nested.result, join_nested.test:
Added a teast case for bug #11284.
sql_select.cc:
  Fixed bug #11284.
  Optimization with empty inner table currently cannot be
  used in the case of nested outer join.


sql/sql_select.cc:
  Fixed bug #11284.
  Optimization with empty inner table currently cannot be
  used in the case of nested outer join.
mysql-test/t/join_nested.test:
  Added a teast case for bug #11284.
2005-06-15 05:56:19 -07:00
unknown
f0ac45bcf7 join_nested.test, join_nested.result:
Added a case for bug #4976 when one of the inner tables is empty.
select.result, join.result:
  Reversed the previous change of the erronious fix for bug #4976.
sql_select.cc:
  The previous fix for bug 4976 was reversed as it
  erroniously converted an outer join into an innner join
  when on_expression does not refer to outer tables.
  This is not valid if inner tables return an empty set.
  Setting dependency on outer tables was added for the above cases.
  To fix the crash in the test case of bug #4976  
  a guard was added that blocks running the crashing code for
  nested outer joins.


sql/sql_select.cc:
  The previous fix for bug 4976 was reversed as it
  erroniously converted an outer join into an innner join
  when on_expression does not refer to outer tables.
  This is not valid if inner tables return an empty set.
  Setting dependency on outer tables was added.
  The crash of the test case for bug #4976 was fixed
  adding a guard that blocks running the code for
  nested outer joins.
mysql-test/r/join.result:
  Reversed the previous change of the erronious fix for bug #4976.
mysql-test/r/select.result:
  Reversed the previous change of the erronious fix for bug #4976.
mysql-test/r/join_nested.result:
  Added a case for bug #4976 when one of the inner tables is empty.
mysql-test/t/join_nested.test:
  Added a case for bug #4976 when one of the inner tables is empty.
2004-08-12 23:41:06 -07:00
unknown
a2a9481891 join.result, select.result:
Fixed bug #4976.
join_nested.result, join_nested.test:
  Added a test case for bug #4976.
sql_select.cc:
  Applied conversion from an outer join to an inner join 
  when the on expression does not depend on the outer table.
  It fixed bug #4976.


sql/sql_select.cc:
  Applied conversion from an outer join to an inner join 
  when the on expression does not depend on the outer table.
  It fixed bug #4976.
mysql-test/t/join_nested.test:
  Added a case test for bug #4976.
mysql-test/r/join_nested.result:
  Added a case test for bug #4976.
mysql-test/r/select.result:
  Fixed bug #4976.
mysql-test/r/join.result:
  Fixed bug #4976.
2004-08-10 17:32:15 -07:00
unknown
3478d656d0 join_nested.result, join_nested.test:
Added a test case for bug #4922.
sql_select.cc:
  Blocked an optimization performed by join_read_const_table when
  applied to an inner table of a nested outer join.
  It was done to fix bug #4922.
sql_yacc.yy:
  Fixed a typo bug in the rule for join_table.


sql/sql_yacc.yy:
  Fixed a typo bug in the rule for join_table.
sql/sql_select.cc:
  Blocked an optimization performed by join_read_const_table when
  applied to an inner table of a nested outer join.
  It was done to fix bug #4922.
mysql-test/t/join_nested.test:
  Added a test case for bug #4922.
mysql-test/r/join_nested.result:
  Added a test case for bug #4922.
2004-08-06 10:22:20 -07:00
unknown
688baf8390 right join print fixed
mysql-test/r/join_nested.result:
  right join test
mysql-test/t/join_nested.test:
  right join test
2004-07-03 01:08:46 +03:00
unknown
148eecbd40 fixed join_nested test independence of environment
spaces at line end in fresh definitions removed
fixed printing of nested joins (BUG#4352)


mysql-test/r/join_nested.result:
  fixed join_nested test independence of environment
  print of nested join test added
mysql-test/t/join_nested.test:
  fixed join_nested test independence of environment
  print of nested join test added
sql/sql_lex.h:
  space at line end in fresh definition removed
sql/sql_select.cc:
  fixed printing of nested joins
sql/table.h:
  spaces at line end in fresh definitions removed
  method for table printing
2004-07-01 23:46:43 +03:00
unknown
cd23d6e37a join_nested.test, join_nested.result:
new file
Many files:
  Nested joins added.


sql/item_cmpfunc.h:
  Nested joins added.
sql/item_func.h:
  Nested joins added.
sql/sql_base.cc:
  Nested joins added.
sql/sql_lex.cc:
  Nested joins added.
sql/sql_lex.h:
  Nested joins added.
sql/sql_parse.cc:
  Nested joins added.
sql/sql_select.cc:
  Nested joins added.
sql/sql_select.h:
  Nested joins added.
sql/sql_yacc.yy:
  Nested joins added.
sql/table.h:
  Nested joins added.
mysql-test/r/join_outer.result:
  Nested joins added.
mysql-test/r/select.result:
  Nested joins added.
2004-06-10 22:27:21 -07:00