Commit 9a02c69f authored by Sergei Golubchik's avatar Sergei Golubchik

more pbxt suite fixes

parent 011cbe90
drop table if exists t1;
create table t1 (a int);
insert t1 values (1);
drop table t1;
create table t1 (a int) engine=innodb;
start transaction with consistent snapshot;
insert into t1 values(1);
......@@ -13,3 +16,4 @@ a
1
commit;
drop table t1;
drop database pbxt;
......@@ -533,10 +533,10 @@ Table Op Msg_type Msg_text
test.t2 analyze status OK
explain partitions select * from t2 where b = 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 5
1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 # 5
explain extended select * from t2 where b = 6;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ref b b 5 const 5 100.00
1 SIMPLE t2 ref b b 5 const # 100.00
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`b` = 6)
explain partitions select * from t2 where b = 6;
......
......@@ -416,26 +416,6 @@ count(*)
select count(*) from t2;
count(*)
1026
analyze table t1,t2;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t2 analyze status OK
explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range uid_index uid_index 4 NULL # Using where
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid #
explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range uid_index uid_index 4 NULL # Using where
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid #
explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range uid_index uid_index 4 NULL # Using where
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid #
explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range uid_index uid_index 4 NULL # Using where
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid #
select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
id name uid id name uid
1001 A 1 1001 A 1
......
......@@ -315,6 +315,7 @@ CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
create table t1 (a char);
set GLOBAL query_cache_size=1355776;
reset query cache;
flush status;
select metaphon('MySQL') from t1;
metaphon('MySQL')
show status like "Qcache_hits";
......
......@@ -4,6 +4,14 @@
drop table if exists t1;
--enable_warnings
#
# workaround for lp:811438
# remove when fixed.
#
create table t1 (a int);
insert t1 values (1);
drop table t1;
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
......@@ -41,3 +49,5 @@ commit;
drop table t1;
# End of 4.1 tests
drop database pbxt;
......@@ -463,7 +463,9 @@ explain partitions select * from t2 where (a = 100 OR a = 900);
explain partitions select * from t2 where (a > 100 AND a < 600);
# PBXT: wait for sweeper
analyze table t2;
--replace_column 9 #
explain partitions select * from t2 where b = 4;
--replace_column 9 #
explain extended select * from t2 where b = 6;
explain partitions select * from t2 where b = 6;
explain extended select * from t2 where b in (1,3,5);
......
......@@ -378,21 +378,6 @@ insert into t2(id, uid, name) select id, uid, name from t1;
select count(*) from t1;
select count(*) from t2;
analyze table t1,t2;
# This part doesn't make sense for pbxt as the result may vary becasue
# records_in_range() gives same results for t1 and t2.
# Added straight_join to get predictable results
--replace_column 9 #
explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
--replace_column 9 #
explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0;
--replace_column 9 #
explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
--replace_column 9 #
explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0;
select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
......
......@@ -351,6 +351,7 @@ create table t1 (a char);
set GLOBAL query_cache_size=1355776;
reset query cache;
flush status;
select metaphon('MySQL') from t1;
show status like "Qcache_hits";
......
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