1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

mdev-4173: Wrong result (extra row) with semijoin=on, joins in outer query, LEFT JOIN in the subquery

Apply the patch from Patryk Pomykalski:
- create_internal_tmp_table_from_heap() will now return information whether
  the last row that we tried to write was a duplicate row.
(mysql-5.6 also has this change)
This commit is contained in:
Sergey Petrunya
2013-07-16 09:22:17 +04:00
parent 716a49a19e
commit 9651a6f574
10 changed files with 150 additions and 17 deletions

View File

@@ -83,13 +83,16 @@ int select_union::send_data(List<Item> &values)
*/
return -1;
}
bool is_duplicate;
/* create_internal_tmp_table_from_heap will generate error if needed */
if (table->file->is_fatal_error(write_err, HA_CHECK_DUP) &&
create_internal_tmp_table_from_heap(thd, table,
tmp_table_param.start_recinfo,
&tmp_table_param.recinfo,
write_err, 1))
write_err, 1, &is_duplicate))
return 1;
if (is_duplicate)
return -1;
}
return 0;
}