summaryrefslogtreecommitdiff
path: root/include/my_base.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2020-04-29 01:13:52 +0300
committerSergei Petrunia <psergey@askmonty.org>2020-04-29 16:31:16 +0300
commit7bc67357368263a233e4d8553cc0a2a1ad331276 (patch)
tree6a40c1c4c6db679ba8b743b04731c78e296b44fc /include/my_base.h
parent5ba2aa1ddc074dc89db7f265ddb61ce96f714fc8 (diff)
downloadmariadb-git-7bc67357368263a233e4d8553cc0a2a1ad331276.tar.gz
MDEV-22401: Optimizer trace: multi-component range is not printed correctly
KEY_MULTI_RANGE::range_flag does not have correct flag bits for per-endpoint flags (NEAR_MIN, NEAR_MAX, NO_MIN_RANGE, NO_MAX_RANGE). It only has bits for flags that describe both endpoints. So - Document this. - Switch optimizer trace to using {start|end}_key.flag values, instead. This fixes the bug. - Switch records_in_column_ranges() to doing that too. (This used to work, because KEY_MULTI_RANGE::range_flag had correct flag value for the last key component, and EITS only uses one-component pseudo-indexes)
Diffstat (limited to 'include/my_base.h')
-rw-r--r--include/my_base.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/my_base.h b/include/my_base.h
index 68b3aaa6a13..44af7b45075 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -632,7 +632,13 @@ typedef struct st_key_multi_range
key_range start_key;
key_range end_key;
range_id_t ptr; /* Free to use by caller (ptr to row etc) */
- uint range_flag; /* key range flags see above */
+ /*
+ A set of range flags that describe both endpoints: UNIQUE_RANGE,
+ NULL_RANGE, EQ_RANGE, GEOM_FLAG.
+ (Flags that describe one endpoint, NO_{MIN|MAX}_RANGE, NEAR_{MIN|MAX} will
+ not be set here)
+ */
+ uint range_flag;
} KEY_MULTI_RANGE;