diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2015-09-20 21:31:02 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2015-09-21 17:08:27 +0300 |
commit | 9b9e36ed4926edd896aa274e15286f64cfec4313 (patch) | |
tree | 7a8c58b652dad49c7fcb5907ddaa7a479fcce5dd /sql/opt_range.h | |
parent | 139ce6cb18301145ec1a5466c4d33825aec0020a (diff) | |
download | mariadb-git-9b9e36ed4926edd896aa274e15286f64cfec4313.tar.gz |
MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to)
The crash was caused by range optimizer using RANGE_OPT_PARAM::min_key
(and max_key) to store keys. Buffer size was a good upper bound for
range analysis and partition pruning, but not for EITS selectivity
calculations.
Fixed by making these buffers variable-size. The sizes are calculated
from [pseudo]indexes used for range analysis.
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r-- | sql/opt_range.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h index d47fe765184..0c495639db6 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -643,8 +643,8 @@ public: Used to store 'current key tuples', in both range analysis and partitioning (list) analysis */ - uchar min_key[MAX_KEY_LENGTH+MAX_FIELD_WIDTH], - max_key[MAX_KEY_LENGTH+MAX_FIELD_WIDTH]; + uchar *min_key; + uchar *max_key; /* Number of SEL_ARG objects allocated by SEL_ARG::clone_tree operations */ uint alloced_sel_args; |