~maria-captains/maria/5.5-explain-analyze

« back to all changes in this revision

Viewing changes to sql/sql_lex.h

  • Committer: Sergey Petrunya
  • Date: 2012-09-03 15:11:24 UTC
  • Revision ID: psergey@askmonty.org-20120903151124-s1y9vrz3k4ezy642
MDEV-406: EXPLAIN ANALYZE 
- First code, it is possible to get the data for joins/unions
- Numbers for join buffering are likely to be incorrect
- Same for subqueries (what should 'loops' show?)

Show diffs side-by-side

added added

removed removed

Lines of Context:
720
720
  List<Item> *get_unit_column_types();
721
721
  int print_explain(select_result_sink *output, uint8 explain_flags,
722
722
                    bool *printed_anything);
 
723
  int print_saved_explain(THD *thd, select_result_sink *output);
723
724
};
724
725
 
725
726
typedef class st_select_lex_unit SELECT_LEX_UNIT;
781
782
  */
782
783
  List<Item_in_subselect> sj_subselects;
783
784
  
 
785
  List<String> *saved_explain_plan;
784
786
  /*
785
787
    Needed to correctly generate 'PRIMARY' or 'SIMPLE' for select_type column
786
788
    of EXPLAIN
1037
1039
 
1038
1040
  bool is_merged_child_of(st_select_lex *ancestor);
1039
1041
  int print_explain(select_result_sink *output, uint8 explain_flags, 
 
1042
                    bool explain_analyze,
1040
1043
                    bool *printed_anything);
 
1044
  int print_saved_explain(THD *thd, select_result_sink *output);
1041
1045
  /*
1042
1046
    For MODE_ONLY_FULL_GROUP_BY we need to maintain two flags:
1043
1047
     - Non-aggregated fields are used in this select.
2342
2346
  LEX *m_lex;
2343
2347
};
2344
2348
 
 
2349
class select_result_basic_explain_buffer;
2345
2350
/* The state of the lex parsing. This is saved in the THD struct */
2346
2351
 
2347
2352
struct LEX: public Query_tables_list
2492
2497
  */
2493
2498
  uint table_count;
2494
2499
  uint8 describe;
 
2500
  bool  describe_analyze;
 
2501
  select_result_basic_explain_buffer *explain_analyze_buf;
 
2502
 
 
2503
  List<Item> describe_column_list;
2495
2504
  /*
2496
2505
    A flag that indicates what kinds of derived tables are present in the
2497
2506
    query (0 if no derived tables, otherwise a combination of flags