diff options
author | unknown <dlenev@mockturtle.local> | 2006-10-02 21:41:35 +0400 |
---|---|---|
committer | unknown <dlenev@mockturtle.local> | 2006-10-02 21:41:35 +0400 |
commit | 21070e43efd79c17b582a8e26b628f0b71c4f7cf (patch) | |
tree | cf17d37ada335296e1d5abe8c644cb21500e994c /sql/opt_range.cc | |
parent | 57eef6e40cb5483a226d7ca145034192fdace339 (diff) | |
parent | 6a698c3b3aec6c88cc4083a2b24ee64f6dc8f794 (diff) | |
download | mariadb-git-21070e43efd79c17b582a8e26b628f0b71c4f7cf.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into mockturtle.local:/home/dlenev/src/mysql-5.1-rt-merge
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 05f0341dbe7..1059818373b 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -4913,9 +4913,17 @@ static SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param, Item_func *cond_func, { Item_func_in *func=(Item_func_in*) cond_func; + /* + Array for IN() is constructed when all values have the same result + type. Tree won't be built for values with different result types, + so we check it here to avoid unnecessary work. + */ + if (!func->array) + break; + if (inv) { - if (func->array && func->cmp_type != ROW_RESULT) + if (func->array->result_type() != ROW_RESULT) { /* We get here for conditions in form "t.key NOT IN (c1, c2, ...)", |