diff options
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 91257c31fb9..60f80249e94 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -483,7 +483,14 @@ bool Item_in_optimizer::fix_left(THD *thd, return 1; cache->setup(args[0]); - cache->store(args[0]); + /* + If it is preparation PS only then we do not know values of parameters => + cant't get there values and do not need that values. + + TODO: during merge with 5.0 it should be changed on !thd->only_prepare() + */ + if (!thd->current_statement) + cache->store(args[0]); if (cache->cols() == 1) { if ((used_tables_cache= args[0]->used_tables())) |