mirror of
https://github.com/MariaDB/server.git
synced 2026-04-29 11:45:32 +02: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:
parent
52340eee1a
commit
08293a35e6
3 changed files with 45 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue