summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-04-08 00:19:43 +0300
committerunknown <bell@sanja.is.com.ua>2004-04-08 00:19:43 +0300
commitd5135aff3ad8af11279927185cecda65a6291dd1 (patch)
tree8623a46473c8c2cb769c792a41b7a28bae698da7 /sql/item_cmpfunc.cc
parent94002eb59512e78df76922ae5c2204359fc306e4 (diff)
parentc9d856c8b78812dd402b89c62bcea23cc7dbe2a1 (diff)
downloadmariadb-git-d5135aff3ad8af11279927185cecda65a6291dd1.tar.gz
merge
sql/item_cmpfunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/set_var.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index ae6658c8e35..8da517a8d99 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -477,9 +477,11 @@ bool Item_in_optimizer::fix_left(THD *thd,
struct st_table_list *tables,
Item **ref)
{
- if (args[0]->fix_fields(thd, tables, ref) ||
- (!cache && !(cache= Item_cache::get_cache(args[0]->result_type()))))
+ if ((!args[0]->fixed && args[0]->fix_fields(thd, tables, args)))
return 1;
+ if (!cache && !(cache= Item_cache::get_cache(args[0]->result_type())))
+ return 1;
+
cache->setup(args[0]);
cache->store(args[0]);
if (cache->cols() == 1)
@@ -512,12 +514,12 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables,
Item ** ref)
{
DBUG_ASSERT(fixed == 0);
- if (!args[0]->fixed && fix_left(thd, tables, ref))
+ if (fix_left(thd, tables, ref))
return 1;
if (args[0]->maybe_null)
maybe_null=1;
- if (!args[1]->fixed && args[1]->fix_fields(thd, tables, args))
+ if (!args[1]->fixed && args[1]->fix_fields(thd, tables, args+1))
return 1;
Item_in_subselect * sub= (Item_in_subselect *)args[1];
if (args[0]->cols() != sub->engine->cols())