1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge branch '10.6' into 10.11

This commit is contained in:
Oleksandr Byelkin
2024-07-20 08:16:24 +02:00
362 changed files with 7658 additions and 3804 deletions

View File

@@ -84,6 +84,7 @@ class Explain_node : public Sql_alloc
public:
Explain_node(MEM_ROOT *root) :
cache_tracker(NULL),
subq_materialization(NULL),
connection_type(EXPLAIN_NODE_OTHER),
children(root)
{}
@@ -113,6 +114,12 @@ public:
*/
Expression_cache_tracker* cache_tracker;
/**
If not NULL, this node is a SELECT (or UNION) in a materialized
IN-subquery.
*/
Explain_subq_materialization* subq_materialization;
/*
How this node is connected to its parent.
(NOTE: EXPLAIN_NODE_NON_MERGED_SJ is set very late currently)
@@ -141,6 +148,8 @@ public:
void print_explain_json_for_children(Explain_query *query,
Json_writer *writer, bool is_analyze);
bool print_explain_json_cache(Json_writer *writer, bool is_analyze);
bool print_explain_json_subq_materialization(Json_writer *writer,
bool is_analyze);
virtual ~Explain_node() = default;
};
@@ -1061,4 +1070,26 @@ public:
};
/*
EXPLAIN data structure for subquery materialization.
All decisions are made at execution time so here we just store the tracker
that has all the info.
*/
class Explain_subq_materialization : public Sql_alloc
{
public:
Explain_subq_materialization(MEM_ROOT *mem_root)
: tracker(mem_root)
{}
Subq_materialization_tracker *get_tracker() { return &tracker; }
void print_explain_json(Json_writer *writer, bool is_analyze);
private:
Subq_materialization_tracker tracker;
};
#endif //SQL_EXPLAIN_INCLUDED