| 31819 | */ |
| 31820 | |
| 31821 | static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, |
| 31822 | bool distinct,const char *message) |
| 31823 | { |
| 31824 | THD *thd=join->thd; |
| 31825 | DBUG_ENTER("select_describe"); |
| 31826 | |
| 31827 | if (join->select_lex->pushdown_select) |
| 31828 | { |
| 31829 | /* |
| 31830 | The whole statement was pushed down to a Smart Storage Engine. Do not |
| 31831 | attempt to produce a query plan locally. |
| 31832 | */ |
| 31833 | DBUG_VOID_RETURN; |
| 31834 | } |
| 31835 | |
| 31836 | /* Update the QPF with latest values of using_temporary, using_filesort */ |
| 31837 | for (SELECT_LEX_UNIT *unit= join->select_lex->first_inner_unit(); |
| 31838 | unit; |
| 31839 | unit= unit->next_unit()) |
| 31840 | { |
| 31841 | /* |
| 31842 | This fix_fields() call is to handle an edge case like this: |
| 31843 | |
| 31844 | SELECT ... UNION SELECT ... ORDER BY (SELECT ...) |
| 31845 | |
| 31846 | for such queries, we'll get here before having called |
| 31847 | subquery_expr->fix_fields(), which will cause failure to |
| 31848 | */ |
| 31849 | if (unit->item && !unit->item->fixed()) |
| 31850 | { |
| 31851 | Item *ref= unit->item; |
| 31852 | if (unit->item->fix_fields(thd, &ref)) |
| 31853 | DBUG_VOID_RETURN; |
| 31854 | DBUG_ASSERT(ref == unit->item); |
| 31855 | } |
| 31856 | |
| 31857 | if (unit->explainable()) |
| 31858 | { |
| 31859 | if (mysql_explain_union(thd, unit, unit->result)) |
| 31860 | DBUG_VOID_RETURN; |
| 31861 | } |
| 31862 | } |
| 31863 | DBUG_VOID_RETURN; |
| 31864 | } |
| 31865 | |
| 31866 | |
| 31867 | bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result) |
no test coverage detected