mariadb/mysql-test/r/ndb_cache_multi2.result
unknown 701bd9ed85 Bug#16795 ndb_cache_multi2
- Change && to ||
 - Check for return value != 0 in "ndb->init()"


mysql-test/r/ndb_cache_multi2.result:
  Update test result
mysql-test/t/ndb_cache_multi2.test:
  Update test case
  - add printouts for what server the queries are from
  - Run the query from "while" once on server1 to cache it
sql/ha_ndbcluster.cc:
  && => ||, to call both the function "thd->store_global()" and "ndb->init()" 
  ndb_init returns 0 on sucess. Fail if not zero.
2006-02-27 10:29:55 +01:00

75 lines
1.7 KiB
Text

drop table if exists t1, t2;
== Connected to server1 ==
set GLOBAL query_cache_type=on;
set GLOBAL query_cache_size=1355776;
set GLOBAL ndb_cache_check_time=1;
reset query cache;
flush status;
== Connected to server2 ==
set GLOBAL query_cache_type=on;
set GLOBAL query_cache_size=1355776;
set GLOBAL ndb_cache_check_time=1;
reset query cache;
flush status;
== Connected to server1 ==
create table t1 (a int) engine=ndbcluster;
create table t2 (a int) engine=ndbcluster;
insert into t1 value (2);
insert into t2 value (3);
select * from t1;
a
2
select a != 3 from t1;
a != 3
1
select * from t2;
a
3
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 3
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 3
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 0
== Connected to server2 ==
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 0
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 0
select * from t1;
a
2
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 1
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 0
update t1 set a=3 where a=2;
== Connected to server1 ==
select * from t1;
a
3
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 3
drop table t1, t2;
set GLOBAL query_cache_size=0;
set GLOBAL ndb_cache_check_time=0;
reset query cache;
flush status;
set GLOBAL query_cache_size=0;
set GLOBAL ndb_cache_check_time=0;
reset query cache;
flush status;