summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/r/dir_per_db.result
blob: 30d4e4244fd0015ad7dfda25623bd29b63b48ee4 (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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
SET @orig_tokudb_dir_per_db=@@global.tokudb_dir_per_db;
########
#  tokudb_dir_per_db = 1
########
SET GLOBAL tokudb_dir_per_db= 1;
########
#  CREATE
########
CREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, b INT(10) UNSIGNED NOT NULL) ENGINE=tokudb;
INSERT INTO t1 SET b = 10;
INSERT INTO t1 SET b = 20;
SELECT b FROM t1 ORDER BY a;
b
10
20
CREATE INDEX b ON t1 (b);
CREATE INDEX ab ON t1 (a,b);
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
t1_key_ab_id.tokudb
t1_key_b_id.tokudb
t1_main_id.tokudb
t1_status_id.tokudb
########
#  RENAME
########
RENAME TABLE t1 TO t2;
SELECT b FROM t2 ORDER BY a;
b
10
20
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
t2_key_ab_id.tokudb
t2_key_b_id.tokudb
t2_main_id.tokudb
t2_status_id.tokudb
########
#  DROP
########
DROP TABLE t2;
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
########
#  tokudb_dir_per_db = 0
########
SET GLOBAL tokudb_dir_per_db= 0;
########
#  CREATE
########
CREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, b INT(10) UNSIGNED NOT NULL) ENGINE=tokudb;
INSERT INTO t1 SET b = 10;
INSERT INTO t1 SET b = 20;
SELECT b FROM t1 ORDER BY a;
b
10
20
CREATE INDEX b ON t1 (b);
CREATE INDEX ab ON t1 (a,b);
## Looking for *.tokudb files in data_dir
_test_t1_key_ab_id.tokudb
_test_t1_key_b_id.tokudb
_test_t1_main_id.tokudb
_test_t1_status_id.tokudb
## Looking for *.tokudb files in data_dir/test
########
#  RENAME
########
RENAME TABLE t1 TO t2;
SELECT b FROM t2 ORDER BY a;
b
10
20
## Looking for *.tokudb files in data_dir
_test_t1_key_ab_id.tokudb
_test_t1_key_b_id.tokudb
_test_t1_main_id.tokudb
_test_t1_status_id.tokudb
## Looking for *.tokudb files in data_dir/test
########
#  DROP
########
DROP TABLE t2;
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
########
#  CREATE on tokudb_dir_per_db = 0 and RENAME on tokudb_dir_per_db = 1 and vice versa
########
########
#  tokudb_dir_per_db = (1 - 1);
########
SET GLOBAL tokudb_dir_per_db= (1 - 1);;
########
#  CREATE
########
CREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, b INT(10) UNSIGNED NOT NULL) ENGINE=tokudb;
INSERT INTO t1 SET b = 10;
INSERT INTO t1 SET b = 20;
SELECT b FROM t1 ORDER BY a;
b
10
20
CREATE INDEX b ON t1 (b);
CREATE INDEX ab ON t1 (a,b);
## Looking for *.tokudb files in data_dir
_test_t1_key_ab_id.tokudb
_test_t1_key_b_id.tokudb
_test_t1_main_id.tokudb
_test_t1_status_id.tokudb
## Looking for *.tokudb files in data_dir/test
########
#  tokudb_dir_per_db = 1
########
SET GLOBAL tokudb_dir_per_db= 1;
########
#  RENAME
########
RENAME TABLE t1 TO t2;
SELECT b FROM t2 ORDER BY a;
b
10
20
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
t2_key_ab_id.tokudb
t2_key_b_id.tokudb
t2_main_id.tokudb
t2_status_id.tokudb
########
#  DROP
########
DROP TABLE t2;
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
########
#  tokudb_dir_per_db = (1 - 0);
########
SET GLOBAL tokudb_dir_per_db= (1 - 0);;
########
#  CREATE
########
CREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, b INT(10) UNSIGNED NOT NULL) ENGINE=tokudb;
INSERT INTO t1 SET b = 10;
INSERT INTO t1 SET b = 20;
SELECT b FROM t1 ORDER BY a;
b
10
20
CREATE INDEX b ON t1 (b);
CREATE INDEX ab ON t1 (a,b);
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
t1_key_ab_id.tokudb
t1_key_b_id.tokudb
t1_main_id.tokudb
t1_status_id.tokudb
########
#  tokudb_dir_per_db = 0
########
SET GLOBAL tokudb_dir_per_db= 0;
########
#  RENAME
########
RENAME TABLE t1 TO t2;
SELECT b FROM t2 ORDER BY a;
b
10
20
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
t1_key_ab_id.tokudb
t1_key_b_id.tokudb
t1_main_id.tokudb
t1_status_id.tokudb
########
#  DROP
########
DROP TABLE t2;
## Looking for *.tokudb files in data_dir
## Looking for *.tokudb files in data_dir/test
CREATE DATABASE `a::a@@`;
CREATE TABLE `a::a@@`.`t1` (a INT) ENGINE=TOKUDB;
CREATE DATABASE `!@#$%^&*()`;
ALTER TABLE `a::a@@`.`t1` RENAME `!@#$%^&*()`.`t1`;
DROP TABLE `!@#$%^&*()`.`t1`;
DROP DATABASE `!@#$%^&*()`;
DROP DATABASE `a::a@@`;
SET GLOBAL tokudb_dir_per_db=@orig_tokudb_dir_per_db;