diff options
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 8088737c0de..f79ff7967db 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -148,6 +148,10 @@ int mysql_union(THD *thd, LEX *lex,select_result *result) { ha_rows records_at_start; lex->select=sl; +#if MYSQL_VERSION_ID < 40100 + if (describe && sl->linkage == NOT_A_SELECT) + break; // Skip extra item in case of 'explain' +#endif /* Don't use offset for the last union if there is no braces */ if (sl != lex_sl) { |