summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/r/prim_key_3.result
blob: 34e3a2fba3dba505f1c6f012975d2fb9868b0a03 (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
SET DEFAULT_STORAGE_ENGINE='tokudb';
*** Bug #22169 ***
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int, b bigint, c char(10), d date, e int, primary key (a));
INSERT into t1 values (1,54,"zardosht", '1986-08-30', 3287);
INSERT into t1 values (2,8709,"Alaadin", '1789-01-31', 8327);
INSERT into t1 values (3,234,"Gilbert", '1325-05-21', 871233);
INSERT into t1 values (4,563,"Lois", '1981-11-06', 654);
INSERT into t1 values (5,587,"Lexington", '1844-03-01', 75);
INSERT into t1 values (6,934764,"Goliath", '1161-11-01', 453);
INSERT into t1 values (7,109234,"Peter", '2005-11-01', 5);
INSERT into t1 values (8,9438,"Bart", '1472-11-01', 234);
INSERT into t1 values (9,111111111,"Superman", '1776-07-04', 65);
INSERT into t1 values (10,50000004,"Batman", '1981-11-01', 87423);
SELECT * from t1;
a	b	c	d	e
1	54	zardosht	1986-08-30	3287
2	8709	Alaadin	1789-01-31	8327
3	234	Gilbert	1325-05-21	871233
4	563	Lois	1981-11-06	654
5	587	Lexington	1844-03-01	75
6	934764	Goliath	1161-11-01	453
7	109234	Peter	2005-11-01	5
8	9438	Bart	1472-11-01	234
9	111111111	Superman	1776-07-04	65
10	50000004	Batman	1981-11-01	87423
alter table t1 drop primary key;
SELECT * from t1;
a	b	c	d	e
1	54	zardosht	1986-08-30	3287
2	8709	Alaadin	1789-01-31	8327
3	234	Gilbert	1325-05-21	871233
4	563	Lois	1981-11-06	654
5	587	Lexington	1844-03-01	75
6	934764	Goliath	1161-11-01	453
7	109234	Peter	2005-11-01	5
8	9438	Bart	1472-11-01	234
9	111111111	Superman	1776-07-04	65
10	50000004	Batman	1981-11-01	87423
alter table t1 add primary key (c(3));
SELECT * from t1;
a	b	c	d	e
2	8709	Alaadin	1789-01-31	8327
8	9438	Bart	1472-11-01	234
10	50000004	Batman	1981-11-01	87423
3	234	Gilbert	1325-05-21	871233
6	934764	Goliath	1161-11-01	453
5	587	Lexington	1844-03-01	75
4	563	Lois	1981-11-06	654
7	109234	Peter	2005-11-01	5
9	111111111	Superman	1776-07-04	65
1	54	zardosht	1986-08-30	3287
alter table t1 drop primary key;
SELECT * from t1;
a	b	c	d	e
2	8709	Alaadin	1789-01-31	8327
8	9438	Bart	1472-11-01	234
10	50000004	Batman	1981-11-01	87423
3	234	Gilbert	1325-05-21	871233
6	934764	Goliath	1161-11-01	453
5	587	Lexington	1844-03-01	75
4	563	Lois	1981-11-06	654
7	109234	Peter	2005-11-01	5
9	111111111	Superman	1776-07-04	65
1	54	zardosht	1986-08-30	3287
alter table t1 add primary key (a,c(3));
SELECT * from t1;
a	b	c	d	e
1	54	zardosht	1986-08-30	3287
2	8709	Alaadin	1789-01-31	8327
3	234	Gilbert	1325-05-21	871233
4	563	Lois	1981-11-06	654
5	587	Lexington	1844-03-01	75
6	934764	Goliath	1161-11-01	453
7	109234	Peter	2005-11-01	5
8	9438	Bart	1472-11-01	234
9	111111111	Superman	1776-07-04	65
10	50000004	Batman	1981-11-01	87423
alter table t1 drop primary key;
SELECT * from t1;
a	b	c	d	e
1	54	zardosht	1986-08-30	3287
2	8709	Alaadin	1789-01-31	8327
3	234	Gilbert	1325-05-21	871233
4	563	Lois	1981-11-06	654
5	587	Lexington	1844-03-01	75
6	934764	Goliath	1161-11-01	453
7	109234	Peter	2005-11-01	5
8	9438	Bart	1472-11-01	234
9	111111111	Superman	1776-07-04	65
10	50000004	Batman	1981-11-01	87423
alter table t1 add primary key (c(3),a);
SELECT * from t1;
a	b	c	d	e
2	8709	Alaadin	1789-01-31	8327
8	9438	Bart	1472-11-01	234
10	50000004	Batman	1981-11-01	87423
3	234	Gilbert	1325-05-21	871233
6	934764	Goliath	1161-11-01	453
5	587	Lexington	1844-03-01	75
4	563	Lois	1981-11-06	654
7	109234	Peter	2005-11-01	5
9	111111111	Superman	1776-07-04	65
1	54	zardosht	1986-08-30	3287
alter table t1 drop primary key;
SELECT * from t1;
a	b	c	d	e
2	8709	Alaadin	1789-01-31	8327
8	9438	Bart	1472-11-01	234
10	50000004	Batman	1981-11-01	87423
3	234	Gilbert	1325-05-21	871233
6	934764	Goliath	1161-11-01	453
5	587	Lexington	1844-03-01	75
4	563	Lois	1981-11-06	654
7	109234	Peter	2005-11-01	5
9	111111111	Superman	1776-07-04	65
1	54	zardosht	1986-08-30	3287
alter table t1 add primary key (c(3),e);
SELECT * from t1;
a	b	c	d	e
2	8709	Alaadin	1789-01-31	8327
8	9438	Bart	1472-11-01	234
10	50000004	Batman	1981-11-01	87423
3	234	Gilbert	1325-05-21	871233
6	934764	Goliath	1161-11-01	453
5	587	Lexington	1844-03-01	75
4	563	Lois	1981-11-06	654
7	109234	Peter	2005-11-01	5
9	111111111	Superman	1776-07-04	65
1	54	zardosht	1986-08-30	3287
alter table t1 drop primary key;
SELECT * from t1;
a	b	c	d	e
2	8709	Alaadin	1789-01-31	8327
8	9438	Bart	1472-11-01	234
10	50000004	Batman	1981-11-01	87423
3	234	Gilbert	1325-05-21	871233
6	934764	Goliath	1161-11-01	453
5	587	Lexington	1844-03-01	75
4	563	Lois	1981-11-06	654
7	109234	Peter	2005-11-01	5
9	111111111	Superman	1776-07-04	65
1	54	zardosht	1986-08-30	3287
alter table t1 add primary key (e,c(3));
SELECT * from t1;
a	b	c	d	e
7	109234	Peter	2005-11-01	5
9	111111111	Superman	1776-07-04	65
5	587	Lexington	1844-03-01	75
8	9438	Bart	1472-11-01	234
6	934764	Goliath	1161-11-01	453
4	563	Lois	1981-11-06	654
1	54	zardosht	1986-08-30	3287
2	8709	Alaadin	1789-01-31	8327
10	50000004	Batman	1981-11-01	87423
3	234	Gilbert	1325-05-21	871233
DROP TABLE t1;