File: tablespace_temp_table_debug.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 (170 lines) | stat: -rw-r--r-- 3,508 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
call mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* table .* does not exist "
			 "in the InnoDB internal");
set global innodb_file_per_table = off;
"testing creation of tablepsace by enabling error path"
# files in MYSQL_DATA_DIR
ibtmp1
"Temp-tablespace removed on shutdown"
# files in MYSQL_DATA_DIR
--innodb-force-recovery-crash=100
"Next stmt will crash server"
Pattern "Creating shared tablespace for temporary tables" found
# restart
# files in MYSQL_DATA_DIR
ibtmp1
create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine=innodb;
insert into t1 values (1, 'c', 'b');
select * from t1;
keyc	c1	c2
1	c	b
drop table t1;
"try hitting crash-point during table creation"
# files in MYSQL_DATA_DIR
ibtmp1
set session debug="+d,ib_ddl_crash_during_create2";
create temporary table t1
(a int, b int, primary key(a), index(b)) engine = innodb;
ERROR HY000: Lost connection to MySQL server during query
# files in MYSQL_DATA_DIR
ibtmp1
create temporary table t1
(a int, b int, primary key(a), index(b)) engine = innodb;
insert into t1 values (1, 2);
select * from t1;
a	b
1	2
drop table t1;
set session debug="-d,ib_ddl_crash_during_create";
use test;
create temporary table t1
(a int, b char(100), c char(100)) engine = innodb;
create table t2
(a int, b char(100), c char(100)) engine = innodb;
create procedure populate_t1_t2()
begin
declare i int default 1;
while (i <= 5000) DO
insert into t1 values (i, 'a', 'b');
insert into t2 values (i, 'a', 'b');
set i = i + 1;
end while;
end|
set autocommit = 0;
# set debug point ib_crash_during_tablespace_extension
set session debug="+d,ib_crash_during_tablespace_extension";
select count(*) from t1;
count(*)
5000
select count(*) from t2;
count(*)
5000
commit;
show tables;
Tables_in_test
t2
select count(*) from t1;
count(*)
5000
select count(*) from t2;
count(*)
5000
# stnt will result in tablespace extension
call populate_t1_t2();
ERROR HY000: Lost connection to MySQL server during query
use test;
show tables;
Tables_in_test
t2
select count(*) from t2;
count(*)
5000
select * from t2 limit 10;
a	b	c
1	a	b
2	a	b
3	a	b
4	a	b
5	a	b
6	a	b
7	a	b
8	a	b
9	a	b
10	a	b
set autocommit = 1;
truncate table t2;
select count(*) from t2;
count(*)
0
drop procedure populate_t1_t2;
drop table t2;
use test;
create temporary table t1
(a int, b char(100), c char(100)) engine = innodb;
create table t2
(a int, b char(100), c char(100)) engine = innodb;
insert into t1 values (1, 'a', 'b');
insert into t2 values (1, 'a', 'b');
select * from t1;
a	b	c
1	a	b
select * from t2;
a	b	c
1	a	b
set session debug="+d,crash_commit_after";
insert into t2 values (2, 'a', 'b');
ERROR HY000: Lost connection to MySQL server during query
use test;
show tables;
Tables_in_test
t2
select * from t2;
a	b	c
1	a	b
2	a	b
insert into t2 values (3, 'a', 'b');
select * from t2;
a	b	c
1	a	b
2	a	b
3	a	b
create temporary table t1
(a int, b char(100), c char(100)) engine = innodb;
insert into t1 values (1, 'a', 'b');
begin;
insert into t2 values (4, 'a', 'b');
# Kill and restart
show tables;
Tables_in_test
t2
select * from t2;
a	b	c
1	a	b
2	a	b
3	a	b
update t2 set a = a * -1;
select * from t2 order by a;
a	b	c
-3	a	b
-2	a	b
-1	a	b
create temporary table t1
(a int, b char(100), c char(100)) engine = innodb;
insert into t1 values (1, 'a', 'b');
begin;
insert into t1 values (4, 'a', 'b');
# Kill and restart
show tables;
Tables_in_test
t2
SELECT * from t2;
a	b	c
-1	a	b
-2	a	b
-3	a	b
update t2 set a = a * -1;
SELECT * from t2 order by a;
a	b	c
1	a	b
2	a	b
3	a	b
drop table t2;