diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-12-14 01:47:01 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-01-26 18:43:05 +0100 |
commit | 791146b9d23e24b628a013d11ca1ff0e52504578 (patch) | |
tree | e02918f035f68bc0d8ce41fe1c158a046726f93d /sql/item_geofunc.cc | |
parent | a4cac0e07ad7f0909be3f66676e800e20c6b9fa8 (diff) | |
download | mariadb-git-791146b9d23e24b628a013d11ca1ff0e52504578.tar.gz |
MDEV-26996 Support descending indexes in the range optimizer
Make the Range Optimizer support descending index key parts.
We follow the approach taken in MySQL-8.
See HowRangeOptimizerHandlesDescKeyparts for the description.
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 49b85e2213b..a2a99bcdf8f 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -1083,7 +1083,8 @@ Item_func_spatial_rel::get_mm_leaf(RANGE_OPT_PARAM *param, DBUG_RETURN(0); // out of memory field->get_key_image(str, key_part->length, key_part->image_type); SEL_ARG *tree; - if (!(tree= new (param->mem_root) SEL_ARG(field, str, str))) + + if (!(tree= new (param->mem_root) SEL_ARG(field, true, str, str))) DBUG_RETURN(0); // out of memory switch (type) { |