fix (bug #10303: Misleading Last_query_cost value).

sql/sql_cache.cc:
  fix (bug #10303: Misleading Last_query_cost value).
  set the last_query_cost to 0.0 in case we use the query cache.
This commit is contained in:
unknown 2005-09-06 15:00:35 +05:00
commit 811c6d216e
5 changed files with 43 additions and 0 deletions

View file

@ -1127,3 +1127,19 @@ Qcache_hits 9
drop procedure f1;
drop table t1;
set GLOBAL query_cache_size=0;
SET GLOBAL query_cache_size=102400;
create table t1(a int);
insert into t1 values(0), (1), (4), (5);
select * from t1 where a > 3;
a
4
5
select * from t1 where a > 3;
a
4
5
show status like 'last_query_cost';
Variable_name Value
Last_query_cost 0.000000
drop table t1;
SET GLOBAL query_cache_size=0;