1
0
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:
unknown
2013-10-11 15:57:19 +03:00
parent 81623bdc35
commit 3cc3bcfcc5
3 changed files with 92 additions and 1 deletions

View File

@@ -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=