1
0
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:
unknown
2004-02-01 20:07:44 +02:00
parent 00b2168b8c
commit 1f739ca45e
6 changed files with 47 additions and 16 deletions

View File

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