config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/ndb/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/ndb/t/ndb_many_fragments.test

# The include statement below is a temp one for tests that are yet to
#be ported to run with InnoDB,
#but needs to be kept for tests that would need MyISAM in future.
--source include/force_myisam_default.inc

--source include/have_ndb.inc
#
# Tests of table partotioned across a large number
# of fragments. Intended to test possible issues
# with large signal fanout, breaking the '1::4 rule'
#


create table parent(a int primary key, b int) engine=ndb;
create table child(a int, b int, primary key(a,b)) engine=ndb;

alter table parent partition by key(a) partitions 128;
alter table child  partition by key(a,b) partitions 128;

insert into parent values (1,1), (2,2), (3,3), (4,4);
insert into parent select a+4, b+4 from parent;
insert into parent select a+8, b+8 from parent;
insert into parent select a+16, b+16 from parent;
insert into parent select a+32, b+32 from parent;
insert into parent select a+64, b+64 from parent;
insert into parent select a+128, b+128 from parent;

insert into child select * from parent;
analyze table parent, child;

let $query =
 select straight_join count(*) from parent
 join child as c1 on c1.a = parent.b
 join child as c2 on c2.a = parent.b
 join child as c3 on c3.a = parent.b
 join child as c4 on c4.a = parent.b
 join child as c5 on c5.a = parent.b
 join child as c6 on c6.a = parent.b
 join child as c7 on c7.a = parent.b
 join child as c8 on c8.a = parent.b
 join child as c9 on c9.a = parent.b
 join child as c10 on c10.a = parent.b
 join child as c11 on c11.a = parent.b
 join child as c12 on c12.a = parent.b
 join child as c13 on c13.a = parent.b
 join child as c14 on c14.a = parent.b
 join child as c15 on c15.a = parent.b
 join child as c16 on c16.a = parent.b
 where parent.b < 2
;

set ndb_join_pushdown = false;
--replace_column 10 # 11 #
eval explain $query;
eval $query;

set ndb_join_pushdown = true;
--replace_column 10 # 11 #
eval explain $query;
eval $query;

drop table parent, child;

Man Man