mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
(BUG#2120 sfter merge) mysql-test/r/derived.result: correct results of derived tble EXPLAIN test of "Using Index" with derived tables mysql-test/t/derived.test: test of "Using Index" with derived tables sql/mysql_priv.h: way to force derived table save JOIN after execution sql/sql_derived.cc: way to force derived table save JOIN after execution sql/sql_lex.h: way to force derived table save JOIN after execution sql/sql_select.cc: make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
This commit is contained in:
@@ -62,6 +62,15 @@ mysql_handle_derived(LEX *lex)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (lex->describe)
|
||||
{
|
||||
/*
|
||||
Force join->join_tmp creation, because we will use this JOIN
|
||||
twice for EXPLAIN and we have to have unchanged join for EXPLAINing
|
||||
*/
|
||||
sl->uncacheable|= UNCACHEABLE_EXPLAIN;
|
||||
sl->master_unit()->uncacheable|= UNCACHEABLE_EXPLAIN;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user