Skip to content

Commit c03d025

Browse files
author
holyfoot@deer.(none)
committed
Embedded-server related tests fixes
1 parent 42dd692 commit c03d025

15 files changed

+315
-211
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
drop table if exists t1;
2+
set names cp932;
3+
set character_set_database = cp932;
4+
RESET MASTER;
5+
CREATE TABLE t1(f1 blob);
6+
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
7+
SET @var1= x'8300';
8+
EXECUTE stmt1 USING @var1;
9+
SHOW BINLOG EVENTS FROM 102;
10+
Log_name Pos Event_type Server_id End_log_pos Info
11+
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
12+
master-bin.000001 # Table_map 1 # test.t1
13+
master-bin.000001 # Write_rows 1 #
14+
SELECT HEX(f1) FROM t1;
15+
HEX(f1)
16+
8300
17+
DROP table t1;

mysql-test/r/innodb.result

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,25 +2635,6 @@ checksum table t1;
26352635
Table Checksum
26362636
test.t1 2050879373
26372637
drop table t1;
2638-
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
2639-
insert t1 values (1,100);
2640-
create function f1 () returns integer begin
2641-
declare var1 int;
2642-
select col2 into var1 from t1 where col1=1 for update;
2643-
return var1;
2644-
end|
2645-
start transaction;
2646-
select f1();
2647-
f1()
2648-
100
2649-
update t1 set col2=0 where col1=1;
2650-
select * from t1;
2651-
col1 col2
2652-
1 100
2653-
rollback;
2654-
rollback;
2655-
drop table t1;
2656-
drop function f1;
26572638
create table t1 (
26582639
a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
26592640
) character set utf8 engine = innodb;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
2+
insert t1 values (1,100);
3+
create function f1 () returns integer begin
4+
declare var1 int;
5+
select col2 into var1 from t1 where col1=1 for update;
6+
return var1;
7+
end|
8+
start transaction;
9+
select f1();
10+
f1()
11+
100
12+
update t1 set col2=0 where col1=1;
13+
select * from t1;
14+
col1 col2
15+
1 100
16+
rollback;
17+
rollback;
18+
drop table t1;
19+
drop function f1;

mysql-test/r/query_cache.result

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,56 +1105,20 @@ call f1();
11051105
s1
11061106
s1
11071107
s1
1108-
show status like "Qcache_queries_in_cache";
1109-
Variable_name Value
1110-
Qcache_queries_in_cache 3
1111-
show status like "Qcache_inserts";
1112-
Variable_name Value
1113-
Qcache_inserts 3
1114-
show status like "Qcache_hits";
1115-
Variable_name Value
1116-
Qcache_hits 0
11171108
call f1();
11181109
s1
11191110
s1
11201111
s1
1121-
show status like "Qcache_queries_in_cache";
1122-
Variable_name Value
1123-
Qcache_queries_in_cache 3
1124-
show status like "Qcache_inserts";
1125-
Variable_name Value
1126-
Qcache_inserts 3
1127-
show status like "Qcache_hits";
1128-
Variable_name Value
1129-
Qcache_hits 3
11301112
call f1();
11311113
s1
11321114
s1
11331115
s1
11341116
select sql_cache * from t1;
11351117
s1
1136-
show status like "Qcache_queries_in_cache";
1137-
Variable_name Value
1138-
Qcache_queries_in_cache 4
1139-
show status like "Qcache_inserts";
1140-
Variable_name Value
1141-
Qcache_inserts 4
1142-
show status like "Qcache_hits";
1143-
Variable_name Value
1144-
Qcache_hits 6
11451118
insert into t1 values (1);
11461119
select sql_cache * from t1;
11471120
s1
11481121
1
1149-
show status like "Qcache_queries_in_cache";
1150-
Variable_name Value
1151-
Qcache_queries_in_cache 1
1152-
show status like "Qcache_inserts";
1153-
Variable_name Value
1154-
Qcache_inserts 5
1155-
show status like "Qcache_hits";
1156-
Variable_name Value
1157-
Qcache_hits 6
11581122
call f1();
11591123
s1
11601124
1
@@ -1172,15 +1136,6 @@ s1
11721136
select sql_cache * from t1;
11731137
s1
11741138
1
1175-
show status like "Qcache_queries_in_cache";
1176-
Variable_name Value
1177-
Qcache_queries_in_cache 4
1178-
show status like "Qcache_inserts";
1179-
Variable_name Value
1180-
Qcache_inserts 8
1181-
show status like "Qcache_hits";
1182-
Variable_name Value
1183-
Qcache_hits 10
11841139
flush query cache;
11851140
reset query cache;
11861141
flush status;

mysql-test/r/query_cache_notembedded.result

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,224 @@ a
9494
SELECT * FROM t1;
9595
a
9696
drop table t1;
97+
flush query cache;
98+
reset query cache;
99+
flush status;
100+
create table t1 (s1 int)//
101+
create procedure f1 () begin
102+
select sql_cache * from t1;
103+
select sql_cache * from t1;
104+
select sql_cache * from t1;
105+
end;//
106+
create procedure f2 () begin
107+
select sql_cache * from t1 where s1=1;
108+
select sql_cache * from t1;
109+
end;//
110+
create procedure f3 () begin
111+
select sql_cache * from t1;
112+
select sql_cache * from t1 where s1=1;
113+
end;//
114+
create procedure f4 () begin
115+
select sql_cache * from t1;
116+
select sql_cache * from t1 where s1=1;
117+
select sql_cache * from t1;
118+
select sql_cache * from t1 where s1=1;
119+
select sql_cache * from t1 where s1=1;
120+
end;//
121+
call f1();
122+
s1
123+
s1
124+
s1
125+
show status like "Qcache_queries_in_cache";
126+
Variable_name Value
127+
Qcache_queries_in_cache 3
128+
show status like "Qcache_inserts";
129+
Variable_name Value
130+
Qcache_inserts 3
131+
show status like "Qcache_hits";
132+
Variable_name Value
133+
Qcache_hits 0
134+
call f1();
135+
s1
136+
s1
137+
s1
138+
show status like "Qcache_queries_in_cache";
139+
Variable_name Value
140+
Qcache_queries_in_cache 3
141+
show status like "Qcache_inserts";
142+
Variable_name Value
143+
Qcache_inserts 3
144+
show status like "Qcache_hits";
145+
Variable_name Value
146+
Qcache_hits 3
147+
call f1();
148+
s1
149+
s1
150+
s1
151+
select sql_cache * from t1;
152+
s1
153+
show status like "Qcache_queries_in_cache";
154+
Variable_name Value
155+
Qcache_queries_in_cache 4
156+
show status like "Qcache_inserts";
157+
Variable_name Value
158+
Qcache_inserts 4
159+
show status like "Qcache_hits";
160+
Variable_name Value
161+
Qcache_hits 6
162+
insert into t1 values (1);
163+
select sql_cache * from t1;
164+
s1
165+
1
166+
show status like "Qcache_queries_in_cache";
167+
Variable_name Value
168+
Qcache_queries_in_cache 1
169+
show status like "Qcache_inserts";
170+
Variable_name Value
171+
Qcache_inserts 5
172+
show status like "Qcache_hits";
173+
Variable_name Value
174+
Qcache_hits 6
175+
call f1();
176+
s1
177+
1
178+
s1
179+
1
180+
s1
181+
1
182+
call f1();
183+
s1
184+
1
185+
s1
186+
1
187+
s1
188+
1
189+
select sql_cache * from t1;
190+
s1
191+
1
192+
show status like "Qcache_queries_in_cache";
193+
Variable_name Value
194+
Qcache_queries_in_cache 4
195+
show status like "Qcache_inserts";
196+
Variable_name Value
197+
Qcache_inserts 8
198+
show status like "Qcache_hits";
199+
Variable_name Value
200+
Qcache_hits 10
201+
flush query cache;
202+
reset query cache;
203+
flush status;
204+
select sql_cache * from t1;
205+
s1
206+
1
207+
select sql_cache * from t1 where s1=1;
208+
s1
209+
1
210+
call f1();
211+
s1
212+
1
213+
s1
214+
1
215+
s1
216+
1
217+
call f2();
218+
s1
219+
1
220+
s1
221+
1
222+
call f3();
223+
s1
224+
1
225+
s1
226+
1
227+
call f4();
228+
s1
229+
1
230+
s1
231+
1
232+
s1
233+
1
234+
s1
235+
1
236+
s1
237+
1
238+
call f4();
239+
s1
240+
1
241+
s1
242+
1
243+
s1
244+
1
245+
s1
246+
1
247+
s1
248+
1
249+
call f3();
250+
s1
251+
1
252+
s1
253+
1
254+
call f2();
255+
s1
256+
1
257+
s1
258+
1
259+
select sql_cache * from t1 where s1=1;
260+
s1
261+
1
262+
insert into t1 values (2);
263+
call f1();
264+
s1
265+
1
266+
2
267+
s1
268+
1
269+
2
270+
s1
271+
1
272+
2
273+
select sql_cache * from t1 where s1=1;
274+
s1
275+
1
276+
select sql_cache * from t1;
277+
s1
278+
1
279+
2
280+
call f1();
281+
s1
282+
1
283+
2
284+
s1
285+
1
286+
2
287+
s1
288+
1
289+
2
290+
call f3();
291+
s1
292+
1
293+
2
294+
s1
295+
1
296+
call f3();
297+
s1
298+
1
299+
2
300+
s1
301+
1
302+
call f1();
303+
s1
304+
1
305+
2
306+
s1
307+
1
308+
2
309+
s1
310+
1
311+
2
312+
drop procedure f1;
313+
drop procedure f2;
314+
drop procedure f3;
315+
drop procedure f4;
316+
drop table t1;
97317
set GLOBAL query_cache_size=0;

mysql-test/r/sp-error.result

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -464,19 +464,6 @@ create table t5 (x int)|
464464
call bug3294()|
465465
ERROR 42S02: Unknown table 't5'
466466
drop procedure bug3294|
467-
drop procedure if exists bug6807|
468-
create procedure bug6807()
469-
begin
470-
declare id int;
471-
set id = connection_id();
472-
kill query id;
473-
select 'Not reached';
474-
end|
475-
call bug6807()|
476-
ERROR 70100: Query execution was interrupted
477-
call bug6807()|
478-
ERROR 70100: Query execution was interrupted
479-
drop procedure bug6807|
480467
drop procedure if exists bug8776_1|
481468
drop procedure if exists bug8776_2|
482469
drop procedure if exists bug8776_3|

0 commit comments

Comments
 (0)