diff options
author | unknown <serg@serg.mylan> | 2003-09-01 14:18:27 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-09-01 14:18:27 +0200 |
commit | 86da2cda60b4b8999b98aff1043a7eb1f5ba7ee7 (patch) | |
tree | dfbbcda134b5afeebefb4ff2247a1a638b4b3971 /sql | |
parent | b6d2a6ee0925f4f4e153ca3e0156c9716760f9a1 (diff) | |
download | mariadb-git-86da2cda60b4b8999b98aff1043a7eb1f5ba7ee7.tar.gz |
workaround for IN's special treatment of first argument. Not for 4.1
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_select.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d48e809966c..153b083b3ef 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1556,7 +1556,13 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level, if (cond_func->key_item()->type() == Item::FIELD_ITEM) add_key_field(key_fields,*and_level, ((Item_field*) (cond_func->key_item()))->field, 0, +#ifndef TO_BE_REMOVED_IN_4_1 + /* special treatment for IN. Not necessary in 4.1 */ + cond_func->arguments() + (cond_func->functype() != Item_func::IN_FUNC), + cond_func->argument_count() - (cond_func->functype() != Item_func::IN_FUNC), +#else cond_func->arguments()+1, cond_func->argument_count()-1, +#endif usable_tables); break; case Item_func::OPTIMIZE_OP: |