mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-5369: Wrong result (0 instead of NULL) on 2nd execution of PS with LEFT JOIN, TEMPTABLE view
Set of JOIN_TYPE_OUTER made only once to avoid interference with optimization joins which made only once per query.
This commit is contained in:
@@ -627,7 +627,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
|
||||
if ((res= sl->handle_derived(lex, DT_PREPARE)))
|
||||
goto exit;
|
||||
|
||||
if (derived->outer_join)
|
||||
if (derived->outer_join && sl->first_cond_optimization)
|
||||
{
|
||||
/* Mark that table is part of OUTER JOIN and fields may be NULL */
|
||||
for (TABLE_LIST *cursor= (TABLE_LIST*) sl->table_list.first;
|
||||
|
||||
Reference in New Issue
Block a user