mirror of
https://github.com/MariaDB/server.git
synced 2025-10-12 12:25:37 +03:00
MDEV-5107:Left Join Yields All Nulls Instead of Appropriate Matches
MDEV-5034:Wrong result on LEFT JOIN with a SELECT SQ or a merge view, UNION in IN subquery Make reset null_row same as it was set in evaluate_null_complemented_join_record(). The problem was that view firlds detect null_row by not-yet-reset table.
This commit is contained in:
@@ -16132,7 +16132,15 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
|
||||
{
|
||||
DBUG_ENTER("sub_select");
|
||||
|
||||
join_tab->table->null_row=0;
|
||||
if (join_tab->last_inner)
|
||||
{
|
||||
JOIN_TAB *last_inner_tab= join_tab->last_inner;
|
||||
for (JOIN_TAB *jt= join_tab; jt <= last_inner_tab; jt++)
|
||||
jt->table->null_row= 0;
|
||||
}
|
||||
else
|
||||
join_tab->table->null_row=0;
|
||||
|
||||
if (end_of_records)
|
||||
{
|
||||
enum_nested_loop_state nls=
|
||||
|
Reference in New Issue
Block a user