diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-01-28 21:43:55 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2021-01-28 21:43:55 +0300 |
commit | 998560e253d0bc1f251ca106f67b31f6684157df (patch) | |
tree | b78fec8d911ea72d6fa60267c6cee95335b97c06 /sql/sql_class.h | |
parent | 6d1f1b61b59310027698a92ccf533a3093f1ce04 (diff) | |
download | mariadb-git-10.5-mdev9750.tar.gz |
MDEV-9750: Quick memory exhaustion with 'extended_keys=on' ...10.5-mdev9750
(Variant #4, full patch)
Do not produce SEL_ARG graphs that would yield huge numbers of ranges.
Introduce a concept of SEL_ARG graph's "weight". If we are about to
produce a graph whose "weight" exceeds the limit, remove the parts
of SEL_ARG graph that represent the biggest key parts. Do so until
the graph's is within the limit.
Includes
- debug code to verify SEL_ARG graph weight
- A user-visible @@optimizer_max_sel_arg_weight to control the optimization
- Logging the optimization into the optimizer trace.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 79dcd47bbc2..eaa97c2778d 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -815,6 +815,7 @@ typedef struct system_variables uint column_compression_threshold; uint column_compression_zlib_level; uint in_subquery_conversion_threshold; + ulong optimizer_max_sel_arg_weight; ulonglong max_rowid_filter_size; vers_asof_timestamp_t vers_asof_timestamp; |