1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fix for BUG#6276.

mysql-test/r/select.result:
  Test for BUG#6276.
mysql-test/t/select.test:
  Test for BUG#6276.
sql/sql_base.cc:
  Add a true ON condition for outer joins without common columns.
This commit is contained in:
unknown
2005-08-23 20:03:32 +03:00
parent 142f65834b
commit b4e830c3e3
3 changed files with 56 additions and 0 deletions

View File

@ -3851,6 +3851,11 @@ store_top_level_join_columns(THD *thd, TABLE_LIST *table_ref,
*/
table_ref_1->natural_join= table_ref_2->natural_join= NULL;
/* Add a TRUE condition to outer joins that have no common columns. */
if (table_ref_2->outer_join &&
!table_ref_1->on_expr && !table_ref_2->on_expr)
table_ref_2->on_expr= new Item_int((longlong) 1,1); /* Always true. */
/* Change this table reference to become a leaf for name resolution. */
if (left_neighbor)
{