Debian Codegraph @

mysql-test/suite/innodb/r/tablespace_temp_table_debug.result

raw
1 call mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* table .* does not exist "
2 "in the InnoDB internal");
3 set global innodb_file_per_table = off;
4 "testing creation of tablepsace by enabling error path"
5 # files in MYSQL_DATA_DIR
6 ibtmp1
7 "Temp-tablespace removed on shutdown"
8 # files in MYSQL_DATA_DIR
9 --innodb-force-recovery-crash=100
10 "Next stmt will crash server"
11 Pattern "Creating shared tablespace for temporary tables" found
12 # restart
13 # files in MYSQL_DATA_DIR
14 ibtmp1
15 create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine=innodb;
16 insert into t1 values (1, 'c', 'b');
17 select * from t1;
18 keyc c1 c2
19 1 c b
20 drop table t1;
21 "try hitting crash-point during table creation"
22 # files in MYSQL_DATA_DIR
23 ibtmp1
24 set session debug="+d,ib_ddl_crash_during_create2";
25 create temporary table t1
26 (a int, b int, primary key(a), index(b)) engine = innodb;
27 ERROR HY000: Lost connection to MySQL server during query
28 # files in MYSQL_DATA_DIR
29 ibtmp1
30 create temporary table t1
31 (a int, b int, primary key(a), index(b)) engine = innodb;
32 insert into t1 values (1, 2);
33 select * from t1;
34 a b
35 1 2
36 drop table t1;
37 set session debug="-d,ib_ddl_crash_during_create";
38 use test;
39 create temporary table t1
40 (a int, b char(100), c char(100)) engine = innodb;
41 create table t2
42 (a int, b char(100), c char(100)) engine = innodb;
43 create procedure populate_t1_t2()
44 begin
45 declare i int default 1;
46 while (i <= 5000) DO
47 insert into t1 values (i, 'a', 'b');
48 insert into t2 values (i, 'a', 'b');
49 set i = i + 1;
50 end while;
51 end|
52 set autocommit = 0;
53 # set debug point ib_crash_during_tablespace_extension
54 set session debug="+d,ib_crash_during_tablespace_extension";
55 select count(*) from t1;
56 count(*)
57 5000
58 select count(*) from t2;
59 count(*)
60 5000
61 commit;
62 show tables;
63 Tables_in_test
64 t2
65 select count(*) from t1;
66 count(*)
67 5000
68 select count(*) from t2;
69 count(*)
70 5000
71 # stnt will result in tablespace extension
72 call populate_t1_t2();
73 ERROR HY000: Lost connection to MySQL server during query
74 use test;
75 show tables;
76 Tables_in_test
77 t2
78 select count(*) from t2;
79 count(*)
80 5000
81 select * from t2 limit 10;
82 a b c
83 1 a b
84 2 a b
85 3 a b
86 4 a b
87 5 a b
88 6 a b
89 7 a b
90 8 a b
91 9 a b
92 10 a b
93 set autocommit = 1;
94 truncate table t2;
95 select count(*) from t2;
96 count(*)
97 0
98 drop procedure populate_t1_t2;
99 drop table t2;
100 use test;
101 create temporary table t1
102 (a int, b char(100), c char(100)) engine = innodb;
103 create table t2
104 (a int, b char(100), c char(100)) engine = innodb;
105 insert into t1 values (1, 'a', 'b');
106 insert into t2 values (1, 'a', 'b');
107 select * from t1;
108 a b c
109 1 a b
110 select * from t2;
111 a b c
112 1 a b
113 set session debug="+d,crash_commit_after";
114 insert into t2 values (2, 'a', 'b');
115 ERROR HY000: Lost connection to MySQL server during query
116 use test;
117 show tables;
118 Tables_in_test
119 t2
120 select * from t2;
121 a b c
122 1 a b
123 2 a b
124 insert into t2 values (3, 'a', 'b');
125 select * from t2;
126 a b c
127 1 a b
128 2 a b
129 3 a b
130 create temporary table t1
131 (a int, b char(100), c char(100)) engine = innodb;
132 insert into t1 values (1, 'a', 'b');
133 begin;
134 insert into t2 values (4, 'a', 'b');
135 # Kill and restart
136 show tables;
137 Tables_in_test
138 t2
139 select * from t2;
140 a b c
141 1 a b
142 2 a b
143 3 a b
144 update t2 set a = a * -1;
145 select * from t2 order by a;
146 a b c
147 -3 a b
148 -2 a b
149 -1 a b
150 create temporary table t1
151 (a int, b char(100), c char(100)) engine = innodb;
152 insert into t1 values (1, 'a', 'b');
153 begin;
154 insert into t1 values (4, 'a', 'b');
155 # Kill and restart
156 show tables;
157 Tables_in_test
158 t2
159 SELECT * from t2;
160 a b c
161 -1 a b
162 -2 a b
163 -3 a b
164 update t2 set a = a * -1;
165 SELECT * from t2 order by a;
166 a b c
167 1 a b
168 2 a b
169 3 a b
170 drop table t2;