Commit 4bdb560f authored by unknown's avatar unknown

Fix for bug#17826 'type_decimal' fails with ps-protocol

 removed unnecessary calculation of cache value 
 otherwise Join::preapre tries to calculate 
 undefined values(filed values)


mysql-test/r/type_decimal.result:
  Fix for bug#17826 'type_decimal' fails with ps-protocol
   test case, this test case reproduce the same bug but without PS protocol
mysql-test/t/type_decimal.test:
  Fix for bug#17826 'type_decimal' fails with ps-protocol
   test case, this test case reproduce the same bug but without PS protocol
parent 8aa3924d
......@@ -772,3 +772,10 @@ productid zlevelprice
003trans 39.98
004trans 31.18
drop table t1, t2;
create table t1 (f1 decimal(5));
insert into t1 values (40);
flush tables;
select f1 from t1 where f1 in (select f1 from t1);
f1
40
drop table t1;
......@@ -377,3 +377,11 @@ insert INTO t2 SELECT * FROM t1;
select * from t2;
drop table t1, t2;
#
# Bug #17826 'type_decimal' fails with ps-protocol
#
create table t1 (f1 decimal(5));
insert into t1 values (40);
flush tables;
select f1 from t1 where f1 in (select f1 from t1);
drop table t1;
......@@ -698,12 +698,6 @@ bool Item_in_optimizer::fix_left(THD *thd, Item **ref)
return 1;
cache->setup(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.
*/
if (!thd->stmt_arena->is_stmt_prepare())
cache->store(args[0]);
if (cache->cols() == 1)
{
if ((used_tables_cache= args[0]->used_tables()))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment