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

right join print fixed

This commit is contained in:
bell@sanja.is.com.ua
2004-07-03 01:08:46 +03:00
parent ce19102645
commit 1b54d08a1c
3 changed files with 25 additions and 7 deletions

View File

@ -11201,17 +11201,14 @@ static void print_join(THD *thd, String *str, List<TABLE_LIST> *tables)
*t= ti++;
DBUG_ASSERT(tables->elements >= 1);
TABLE_LIST *prev= *table;
prev->print(thd, str);
(*table)->print(thd, str);
TABLE_LIST **end= table + tables->elements;
for(TABLE_LIST **tbl= table + 1; tbl < end; tbl++)
{
TABLE_LIST *curr= *tbl;
if (prev->outer_join & JOIN_TYPE_RIGHT)
str->append(" right join ", 12);
else if (curr->outer_join & JOIN_TYPE_LEFT)
str->append(" left join ", 11);
if (curr->outer_join)
str->append(" left join ", 11); // MySQL converg right to left joins
else if (curr->straight)
str->append(" straight_join ", 15);
else
@ -11223,7 +11220,6 @@ static void print_join(THD *thd, String *str, List<TABLE_LIST> *tables)
curr->on_expr->print(str);
str->append(')');
}
prev= curr;
}
}