Commit e4e0d6e0 authored by Rich Prohaska's avatar Rich Prohaska

#4621 move tokudb.join mysql tests to common mysql test dir refs[t:4621]

git-svn-id: file:///svn/mysql/tests/mysql-test@40911 c7de825b-a66e-492c-adef-691d508d4ae1
parent ba27a89f
drop table if exists tab;
drop table if exists tbc;
create table tab (a int, b int) engine=tokudb;
insert into tab values (1,1),(2,1),(2,2),(3,1),(3,2),(3,3);
select * from tab;
a b
1 1
2 1
2 2
3 1
3 2
3 3
create table tbc (b int, c int) engine=innodb;
insert into tbc values (2,4),(3,9),(3,27),(4,1);
select * from tbc;
b c
2 4
3 9
3 27
4 1
select a,tab.b,c from tab join tbc on tab.b = tbc.b;
a b c
2 2 4
3 2 4
3 3 9
3 3 27
select a,tab.b,tbc.b,c from tab join tbc on tab.b < tbc.b;
a b b c
1 1 2 4
1 1 3 9
1 1 3 27
1 1 4 1
2 1 2 4
2 1 3 9
2 1 3 27
2 1 4 1
2 2 3 9
2 2 3 27
2 2 4 1
3 1 2 4
3 1 3 9
3 1 3 27
3 1 4 1
3 2 3 9
3 2 3 27
3 2 4 1
3 3 4 1
select a,tab.b,tbc.b,c from tab join tbc on tab.b > tbc.b;
a b b c
3 3 2 4
drop table tab;
drop table tbc;
drop table if exists tab;
drop table if exists tbc;
create table tab (a int, b int) engine=tokudb;
insert into tab values (1,1),(2,1),(2,2),(3,1),(3,2),(3,3);
select * from tab;
a b
1 1
2 1
2 2
3 1
3 2
3 3
create table tbc (b int, c int) engine=myisam;
insert into tbc values (2,4),(3,9),(3,27),(4,1);
select * from tbc;
b c
2 4
3 9
3 27
4 1
select a,tab.b,c from tab join tbc on tab.b = tbc.b;
a b c
2 2 4
3 2 4
3 3 9
3 3 27
select a,tab.b,tbc.b,c from tab join tbc on tab.b < tbc.b;
a b b c
1 1 2 4
1 1 3 9
1 1 3 27
1 1 4 1
2 1 2 4
2 1 3 9
2 1 3 27
2 1 4 1
2 2 3 9
2 2 3 27
2 2 4 1
3 1 2 4
3 1 3 9
3 1 3 27
3 1 4 1
3 2 3 9
3 2 3 27
3 2 4 1
3 3 4 1
select a,tab.b,tbc.b,c from tab join tbc on tab.b > tbc.b;
a b b c
3 3 2 4
drop table tab;
drop table tbc;
# simple join tokudb and innodb
--source include/have_innodb.inc
--source include/have_tokudb.inc
--disable_warnings
drop table if exists tab;
drop table if exists tbc;
--enable_warnings
create table tab (a int, b int) engine=tokudb;
insert into tab values (1,1),(2,1),(2,2),(3,1),(3,2),(3,3);
select * from tab;
create table tbc (b int, c int) engine=innodb;
insert into tbc values (2,4),(3,9),(3,27),(4,1);
select * from tbc;
select a,tab.b,c from tab join tbc on tab.b = tbc.b;
select a,tab.b,tbc.b,c from tab join tbc on tab.b < tbc.b;
select a,tab.b,tbc.b,c from tab join tbc on tab.b > tbc.b;
drop table tab;
drop table tbc;
# simple join tokudb and innodb
--disable_warnings
drop table if exists tab;
drop table if exists tbc;
--enable_warnings
create table tab (a int, b int) engine=tokudb;
insert into tab values (1,1),(2,1),(2,2),(3,1),(3,2),(3,3);
select * from tab;
create table tbc (b int, c int) engine=myisam;
insert into tbc values (2,4),(3,9),(3,27),(4,1);
select * from tbc;
select a,tab.b,c from tab join tbc on tab.b = tbc.b;
select a,tab.b,tbc.b,c from tab join tbc on tab.b < tbc.b;
select a,tab.b,tbc.b,c from tab join tbc on tab.b > tbc.b;
drop table tab;
drop table tbc;
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