File: ndb_dbug_tc_select.result

package info (click to toggle)
percona-xtrabackup 2.2.3-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 293,260 kB
  • ctags: 146,881
  • sloc: cpp: 1,051,960; ansic: 570,217; java: 54,595; perl: 53,495; pascal: 44,194; sh: 27,826; yacc: 15,314; python: 12,142; xml: 7,848; sql: 4,125; makefile: 1,459; awk: 785; lex: 758
file content (121 lines) | stat: -rw-r--r-- 6,120 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
drop table if exists t1,t2;
#
# Test tc select with 2-way joins with unique lookups
#
create table t1 (a int key, b int) engine ndb;
create table t2 (a int, b int, c int, d int, primary key(a,b), unique(d)) engine ndb partition by key(a);
#
# 2-way join tc selection in pk
#
explain select t2.c from t1,t2 where t1.a=50 and t2.a=t1.a and t2.b=t1.b;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	const	PRIMARY	PRIMARY	4	const	#	Parent of 2 pushed join@1
1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	8	const,test.t1.b	#	Child of 't1' in pushed join@1
#
# 2-way join tc selection in unique key
#
explain select t1.b from t1,t2 where t2.d=50 and t1.a=t2.a;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	ref	PRIMARY,d	d	5	const	#	Parent of 2 pushed join@1; Using where with pushed condition
1	SIMPLE	t1	eq_ref	PRIMARY	PRIMARY	4	test.t2.a	#	Child of 't2' in pushed join@1
drop table t1,t2;
#
# Test tc select with 2-way joins with scan followed by unique lookup
#
create table t1 (a int, b int, primary key(a,b)) engine ndb partition by key (a);
create table t2 (a int, b int, c int, primary key(a,b)) engine ndb partition by key (a);
explain select t2.c from t1,t2 where t1.a=50 and t2.a=t1.a and t2.b=t1.b;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	PRIMARY	PRIMARY	4	const	#	Parent of 2 pushed join@1
1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	8	const,test.t1.b	#	Child of 't1' in pushed join@1
drop table t1,t2;
create table t1 (a int , b varchar(22), c int, primary key(a), unique(b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a varchar(1024), b int , c int, primary key(a), unique(b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a varchar(32), b varchar(257), c int, primary key(a), unique(b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a int , b int, c int, d int, primary key(a,c), unique(c,b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a int, b char(22) , c char(12), d int, primary key(a,c), unique(c,b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a varchar(32), b int, c varchar(257), d int, primary key(a,c), unique(c,b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a int , b int, c int, d int, e int, primary key(a,c,e), unique(c,b,d)) engine ndb partition by key(c,e);
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a int, b varchar(22) , c char(12), d int, e varchar(257), primary key(a,c,e), unique(c,b,d)) engine ndb partition by key(c,e);
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a varchar(1024), b char(22), c varchar(257), d int, e char(12), primary key(a,c,e), unique(c,b,d)) engine ndb partition by key(c,e);
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;