File: tablespace_temp_table_1.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (324 lines) | stat: -rw-r--r-- 16,901 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
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
call mtr.add_suppression("Please add another temp-data file or use 'autoextend' for the last data file");
call mtr.add_suppression("The table 't1' is full");
set global innodb_file_per_table = off;
SELECT @@global.innodb_file_per_table;
@@global.innodb_file_per_table
0
SELECT @mycount_SYS_DATAFILES:=COUNT(*)  FROM information_schema.INNODB_DATAFILES;
@mycount_SYS_DATAFILES:=COUNT(*)
NUM
Warnings:
NUM	1287	Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
CREATE TEMPORARY TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b FLOAT(5,3),
c BLOB(100),d VARCHAR(100),e TEXT) ENGINE=InnoDB;
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
# creation of shared temp-tablespace in MYSQL_DATA_DIR
ibtmp1
# check no entries made INNODB_DATAFILES
SELECT @mycount_SYS_DATAFILES=COUNT(*)  FROM information_schema.INNODB_DATAFILES;
@mycount_SYS_DATAFILES=COUNT(*)
1
INSERT INTO t1(b,c,d,e) VALUES (11.111,REPEAT('a1',50),REPEAT('a1',50),
REPEAT('a1',50));
START TRANSACTION;
INSERT INTO t1(b,c,d,e) VALUES (12.111,REPEAT('a2',50),REPEAT('a2',50),
REPEAT('a2',50));
INSERT INTO t1(b,c,d,e) VALUES (13.111,REPEAT('a3',50),REPEAT('a3',50),
REPEAT('a3',50));
UPDATE t1 SET e = REPEAT('ta',50);
DELETE FROM t1 WHERE a = 3;
SAVEPOINT A;
INSERT INTO t1(b,c,d,e) VALUES (14.111,REPEAT('a4',50),REPEAT('a4',50),
REPEAT('a4',50));
UPDATE t1 SET e = REPEAT('yb',50);
DELETE FROM t1 WHERE a = 1;
SAVEPOINT B;
SELECT a,RIGHT(b,10),RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t1;
a	RIGHT(b,10)	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
2	12.111	a2a2a2a2a2	a2a2a2a2a2	ybybybybyb
4	14.111	a4a4a4a4a4	a4a4a4a4a4	ybybybybyb
ROLLBACK TO SAVEPOINT A;
COMMIT;
SELECT a,RIGHT(b,10),RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t1;
a	RIGHT(b,10)	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
1	11.111	a1a1a1a1a1	a1a1a1a1a1	tatatatata
2	12.111	a2a2a2a2a2	a2a2a2a2a2	tatatatata
ALTER TABLE t1 ADD COLUMN f BLOB(100), ADD INDEX `idx1` (d);
SELECT a,RIGHT(b,10),RIGHT(c,10),RIGHT(d,10),RIGHT(e,10),RIGHT(f,10) FROM t1;
a	RIGHT(b,10)	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)	RIGHT(f,10)
1	11.111	a1a1a1a1a1	a1a1a1a1a1	tatatatata	NULL
2	12.111	a2a2a2a2a2	a2a2a2a2a2	tatatatata	NULL
ALTER TABLE t1 DROP COLUMN f, DROP INDEX `idx1` , ADD INDEX `idx2` (d), ALGORITHM=INPLACE;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
ALTER TABLE t1 DROP COLUMN f, DROP INDEX `idx1` , ADD INDEX `idx2` (d), ALGORITHM=COPY;
SELECT a,RIGHT(b,10),RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t1;
a	RIGHT(b,10)	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
1	11.111	a1a1a1a1a1	a1a1a1a1a1	tatatatata
2	12.111	a2a2a2a2a2	a2a2a2a2a2	tatatatata
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
DROP DATABASE IF EXISTS test_db;
set global innodb_file_per_table = on;
SELECT @@global.innodb_file_per_table;
@@global.innodb_file_per_table
1
CREATE DATABASE test_db;
"Create con1 client connection"
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
# creation of shared temp-tablespace in MYSQL_DATA_DIR
ibtmp1
DROP TABLE IF EXISTS t1,t2,t3,t4;
SELECT @@global.innodb_file_per_table;
@@global.innodb_file_per_table
1
USE test;
CREATE TEMPORARY TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b FLOAT(5,3),
c BLOB(100),d VARCHAR(100),e TEXT) ENGINE=InnoDB;
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
CREATE TEMPORARY TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b FLOAT, c BLOB(100),
d VARCHAR(100),e TEXT) ENGINE=InnoDB;
CREATE TEMPORARY TABLE t3 (val INT) ENGINE = InnoDB PARTITION BY LIST(val)(
PARTITION mypart1 VALUES IN (1,3,5),
PARTITION MyPart2 VALUES IN (2,4,6)
);
ERROR HY000: Cannot create temporary table with partitions
INSERT INTO t1(b,c,d,e) VALUES (11.111,REPEAT('a1',50),REPEAT('a1',50),
REPEAT('a1',50));
INSERT INTO t2(b,c,d,e) VALUES (11.111,REPEAT('t1',50),REPEAT('t1',50),
REPEAT('a2',50));
INSERT INTO t2(b,c,d,e) VALUES (11.111,REPEAT('t2',50),REPEAT('t2',50),
REPEAT('a2',50));
SELECT t1.a,t2.a,RIGHT(t1.c,10),RIGHT(t2.c,10) FROM t1,t2 WHERE t1.c LIKE t2.c;
a	a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
SELECT t1.a,t2.a,RIGHT(t1.c,10),RIGHT(t2.c,10) FROM t1,t2 WHERE t1.c NOT LIKE t2.c AND t1.a=t2.a;
a	a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
1	1	a1a1a1a1a1	t1t1t1t1t1
CREATE OR REPLACE VIEW vw1 AS SELECT * FROM t1;
ERROR HY000: View's SELECT refers to a temporary table 't1'
CREATE TEMPORARY TABLE t3 AS
SELECT t1.a,RIGHT(t1.c,10),RIGHT(t2.c,10) FROM t1,t2
WHERE t1.c NOT LIKE t2.c AND t1.a=t2.a;
SELECT * FROM t3;
a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
1	a1a1a1a1a1	t1t1t1t1t1
CREATE TABLE t4 AS
SELECT t1.a,RIGHT(t1.c,10),RIGHT(t2.c,10) FROM t1,t2
WHERE t1.c NOT LIKE t2.c AND t1.a=t2.a;
SELECT * FROM t4;
a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
1	a1a1a1a1a1	t1t1t1t1t1
SELECT * FROM t3,t4 WHERE t3.a=t4.a;
a	RIGHT(t1.c,10)	RIGHT(t2.c,10)	a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
1	a1a1a1a1a1	t1t1t1t1t1	1	a1a1a1a1a1	t1t1t1t1t1
SELECT * FROM t3,t4 WHERE t3.a!=t4.a;
a	RIGHT(t1.c,10)	RIGHT(t2.c,10)	a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
LOCK TABLES t1 READ;
SELECT t1.a,t2.a,RIGHT(t1.c,10),RIGHT(t2.c,10) FROM t1,t2 WHERE t1.c LIKE t2.c;
a	a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
SELECT t1.a,t2.a,RIGHT(t1.c,10),RIGHT(t2.c,10) FROM t1,t2 WHERE t1.c NOT LIKE t2.c AND t1.a=t2.a;
a	a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
1	1	a1a1a1a1a1	t1t1t1t1t1
DELETE FROM t1;
SELECT * FROM t1;
a	b	c	d	e
UNLOCK TABLES;
LOCK TABLES t2 WRITE,t3 WRITE,t4 WRITE;
DELETE FROM t2 WHERE t2.c LIKE REPEAT('t2',50);
SELECT t2.a,RIGHT(t2.c,10) FROM t2;
a	RIGHT(t2.c,10)
1	t1t1t1t1t1
DELETE FROM t3;
DELETE FROM t4;
SELECT * FROM t3,t4;
a	RIGHT(t1.c,10)	RIGHT(t2.c,10)	a	RIGHT(t1.c,10)	RIGHT(t2.c,10)
UNLOCK TABLES;
ibtmp1
t4.ibd
DROP TABLE t1,t2,t3,t4;
SELECT @@global.innodb_file_per_table;
@@global.innodb_file_per_table
1
CREATE TEMPORARY TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b FLOAT(5,3),
c BLOB(100),d VARCHAR(100),e TEXT) ENGINE=InnoDB;
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b FLOAT(5,3),
c BLOB(100),d VARCHAR(100),e TEXT) ENGINE=InnoDB;
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
INSERT INTO t1(b,c,d,e) VALUES (11.111,REPEAT('a1',50),REPEAT('a1',50),
REPEAT('a1',50));
INSERT INTO t1(b,c,d,e) VALUES (11.111,REPEAT('a1',50),REPEAT('a1',50),
REPEAT('a1',50));
SELECT a,b,RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t1;
a	b	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
1	11.111	a1a1a1a1a1	a1a1a1a1a1	a1a1a1a1a1
2	11.111	a1a1a1a1a1	a1a1a1a1a1	a1a1a1a1a1
UPDATE t1 SET a = a + 5;
DELETE FROM t1 WHERE a > 6;
SELECT a,b,RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t1;
a	b	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
6	11.111	a1a1a1a1a1	a1a1a1a1a1	a1a1a1a1a1
INSERT INTO t2(b,c,d,e) VALUES (11.111,REPEAT('a1',50),REPEAT('a1',50),
REPEAT('a1',50));
SELECT a,b,RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t2;
a	b	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
1	11.111	a1a1a1a1a1	a1a1a1a1a1	a1a1a1a1a1
UPDATE t2 SET a = a + 5;
DELETE FROM t2 WHERE a > 6;
SELECT a,b,RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t2;
a	b	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
6	11.111	a1a1a1a1a1	a1a1a1a1a1	a1a1a1a1a1
# shutting down the server
# list_file, no files expected - temp tablespace cleared on stopping server
# restart
CREATE TEMPORARY TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b FLOAT(5,3),
c BLOB(100),d VARCHAR(100),e TEXT) ENGINE=InnoDB;
Warnings:
Warning	1681	Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
INSERT INTO t1(b,c,d,e) VALUES (11.111,REPEAT('a1',50),REPEAT('a1',50),
REPEAT('a1',50));
INSERT INTO t1(b,c,d,e) VALUES (11.111,REPEAT('a1',50),REPEAT('a1',50),
REPEAT('a1',50));
SELECT a,b,RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t1;
a	b	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
1	11.111	a1a1a1a1a1	a1a1a1a1a1	a1a1a1a1a1
2	11.111	a1a1a1a1a1	a1a1a1a1a1	a1a1a1a1a1
UPDATE t1 SET a = a + 5;
DELETE FROM t1 WHERE a > 6;
SELECT a,b,RIGHT(c,10),RIGHT(d,10),RIGHT(e,10) FROM t1;
a	b	RIGHT(c,10)	RIGHT(d,10)	RIGHT(e,10)
6	11.111	a1a1a1a1a1	a1a1a1a1a1	a1a1a1a1a1
DROP TABLE t1;
# restart
SHOW TABLES;
Tables_in_test
t2
DROP TABLE t2;