(Based on original patch by Sanja Byelkin)
Make the code that produces JSON output handle LooseScan quick select.
The output we produce is compatible with MySQL 5.6.
Switch EXPLAIN JSON from using subselect_engine::get_identifier()
to the number from Item_subselect::unit.
Remove subselect_union_engine::get_identifier() because it was added
only for EXPLAIN JSON code.
- Switch Explain data structure from "flat" representation of
SJ-Materialization into nested one.
- Update functions that print tabular output to operate on the
nested structure.
- Add function to generate JSON output.
- Basic support for JOIN buffering
- The output is not polished but catches the main point:
tab->select_cond and tab->cache_select->cond are printed separately.
- Hash join support is poor still.
- Also fixed identation in JOIN_TAB::save_explain_data
Writing JSON:
- Fix a bug in Single_line_formatting_helper
- Add Json_writer_nesting_guard - safety class
EXPLAIN JSON support
- Add basic subquery support
- Add tests for UNION/UNION ALL.
- Drop all tables in explain_json.test
- Tabular form should print ref='' when type='fulltext' (another peculiarity
of the traditional EXPLAIN format)
- String_list::append_str should allocate memory for \0, too
- Some temporary code for EXPLAIN JSON and join buffering.