Commit ee358a42 authored by Rich Prohaska's avatar Rich Prohaska

#2968 test the mysql query planner's ability to select clustering keys over...

#2968 test the mysql query planner's ability to select clustering keys over full table scans for join keys refs[t:2968]

git-svn-id: file:///svn/mysql/tests/mysql-test@24879 c7de825b-a66e-492c-adef-691d508d4ae1
parent a371e097
This diff is collapsed.
# test that the query planner picks clustering keys for joins
# create table s
drop table if exists s;
create table s (a int, b int, c int) engine=tokudb;
# populate table s
let $a = 10;
while ($a) {
let $b = 10;
while ($b) {
let $c = 10;
while ($c) {
eval insert into s values ($a,$b,$c);
dec $c;
}
dec $b;
}
dec $a;
}
# create table t
drop table if exists t;
create table t like s;
insert into t select * from s;
# join with no keys
show create table s;
show create table t;
explain select straight_join * from s,t where s.b = t.b;
# join with clustering keys
alter table s add clustering key(b);
alter table t add clustering key(b);
show create table s;
show create table t;
explain select straight_join * from s,t where s.b = t.b;
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