diff options
author | Igor Babaev <igor@askmonty.org> | 2012-02-16 16:06:49 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-02-16 16:06:49 -0800 |
commit | c563ea0717f3de43b7331dd4368e9f9cf4559be0 (patch) | |
tree | 1257772583e79dfab6c7fc717eb9d2c353442e2d /sql/opt_range.cc | |
parent | 0c265a5eb8962fba6f0be90946ec8af11b44af45 (diff) | |
download | mariadb-git-c563ea0717f3de43b7331dd4368e9f9cf4559be0.tar.gz |
Fixed LP bug #933117.
The bug was fixed with the code back-ported from the patch for LP bug 800184
pushed into mariadb-5.3.
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index bc434e2edc1..185f3eecd3c 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -498,6 +498,11 @@ public: pos->increment_use_count(count); } } + void incr_refs() + { + increment_use_count(1); + use_count++; + } void free_tree() { for (SEL_ARG *pos=first(); pos ; pos=pos->next) @@ -6475,8 +6480,8 @@ key_and(RANGE_OPT_PARAM *param, SEL_ARG *key1, SEL_ARG *key2, uint clone_flag) continue; SEL_ARG *next=key_and(param, e1->next_key_part, e2->next_key_part, clone_flag); - e1->increment_use_count(1); - e2->increment_use_count(1); + e1->incr_refs(); + e2->incr_refs(); if (!next || next->type != SEL_ARG::IMPOSSIBLE) { SEL_ARG *new_arg= e1->clone_and(e2); |