summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <ram@gw.mysql.r18.ru>2004-08-26 17:43:08 +0500
committerunknown <ram@gw.mysql.r18.ru>2004-08-26 17:43:08 +0500
commit11612dd3b428b24b5a47a257ae5f01b03e688e59 (patch)
treec5ad5f34987dec0ad20ba2d753b9ed5bf3b1c956 /sql
parent0eab587e936338615fdfdc0eb6a7c3fed518acde (diff)
downloadmariadb-git-11612dd3b428b24b5a47a257ae5f01b03e688e59.tar.gz
Should check for GEOM_FLAG later because keyX may be partly initialized (min_flag is not set).
Diffstat (limited to 'sql')
-rw-r--r--sql/opt_range.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 02947e58a9e..f11ed31950a 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -1401,12 +1401,6 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag)
return key2;
if (!key2)
return key1;
- if ((key1->min_flag | key2->min_flag) & GEOM_FLAG)
- {
- key1->free_tree();
- key2->free_tree();
- return 0; // Can't optimize this
- }
if (key1->part != key2->part)
{
if (key1->part > key2->part)
@@ -1462,6 +1456,13 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag)
return key1;
}
+ if ((key1->min_flag | key2->min_flag) & GEOM_FLAG)
+ {
+ key1->free_tree();
+ key2->free_tree();
+ return 0; // Can't optimize this
+ }
+
key1->use_count--;
key2->use_count--;
SEL_ARG *e1=key1->first(), *e2=key2->first(), *new_tree=0;