summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 2e2ad6786fc..46794f45f3c 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -152,7 +152,7 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
if it is preparation PS only then we do not need real data and we
can skip execution (and parameters is not defined, too)
*/
- if (!thd->current_statement)
+ if (!thd->only_prepare())
{
if (is_union)
{