1connect  con1root,localhost,root,,;
2connect  con2root,localhost,root,,;
3connect  con3root,localhost,root,,;
4connection con1root;
5use test;
6drop table if exists t1;
7create table t1 (s1 int, s2 int, s3 int);
8create procedure bug4934()
9begin
10insert into t1 values (1,0,1);
11end//
12connection con2root;
13use test;
14call bug4934();
15select * from t1;
16s1	s2	s3
171	0	1
18connection con1root;
19drop table t1;
20create table t1 (s1 int, s2 int, s3 int);
21drop procedure bug4934;
22create procedure bug4934()
23begin
24end//
25connection con2root;
26select * from t1;
27s1	s2	s3
28call bug4934();
29select * from t1;
30s1	s2	s3
31connection con1root;
32drop table t1;
33drop procedure bug4934;
34drop procedure if exists bug9486;
35drop table if exists t1, t2;
36create table t1 (id1 int, val int);
37create table t2 (id2 int);
38create procedure bug9486()
39update t1, t2 set val= 1 where id1=id2;
40call bug9486();
41connection con2root;
42lock tables t2 write;
43connection con1root;
44call bug9486();
45connection con2root;
46SELECT state,info FROM information_schema.processlist WHERE id=con1root_id;
47state	info
48Waiting for table metadata lock	update t1, t2 set val= 1 where id1=id2
49unlock tables;
50connection con1root;
51drop procedure bug9486;
52drop table t1, t2;
53drop procedure if exists bug11158;
54create procedure bug11158() delete t1 from t1, t2 where t1.id = t2.id;
55create table t1 (id int, j int);
56insert into t1 values (1, 1), (2, 2);
57create table t2 (id int);
58insert into t2 values (1);
59call bug11158();
60select * from t1;
61id	j
622	2
63connection con2root;
64lock tables t2 read;
65connection con1root;
66call bug11158();
67connection con2root;
68unlock tables;
69connection con1root;
70drop procedure bug11158;
71drop table t1, t2;
72drop function if exists bug11554;
73drop view if exists v1;
74create table t1 (i int);
75create function bug11554 () returns int return 1;
76create view v1 as select bug11554() as f;
77connection con2root;
78insert into t1 (select f from v1);
79connection con1root;
80drop function bug11554;
81drop table t1;
82drop view v1;
83drop procedure if exists p1;
84drop procedure if exists p2;
85connection con1root;
86create table t1 (s1 int)|
87create procedure p1() select * from t1|
88create procedure p2()
89begin
90insert into t1 values (1);
91call p1();
92select * from t1;
93end|
94connection con2root;
95use test;
96lock table t1 write;
97connection con1root;
98call p2();
99connection con3root;
100use test;
101drop procedure p1;
102create procedure p1() select * from t1;
103connection con2root;
104unlock tables;
105connection con1root;
106s1
1071
108s1
1091
110drop procedure p1;
111drop procedure p2;
112drop table t1;
113connection default;
114disconnect con1root;
115disconnect con2root;
116disconnect con3root;
117