summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2005-08-10 21:17:52 +0000
committersergefp@mysql.com <>2005-08-10 21:17:52 +0000
commit9125477df54aff3f7cdaf64637f5867cc8a8d75d (patch)
tree7cf1a45d0722c48c30871c34d564241d5bf84dad /mysql-test
parent8392a814af9c80c7c6b8c1a4819b278e43a7e93d (diff)
parentfbab5fc5685076a43f52f55a1633207709ef953c (diff)
downloadmariadb-git-9125477df54aff3f7cdaf64637f5867cc8a8d75d.tar.gz
Merge mysql.com:/home/psergey/mysql-5.0-bug12228-r4
into mysql.com:/home/psergey/mysql-5.0-bug12228-r5
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp-threads.result25
-rw-r--r--mysql-test/r/type_bit.result2
-rw-r--r--mysql-test/r/view.result2
-rw-r--r--mysql-test/t/sp-threads.test43
-rw-r--r--mysql-test/t/type_bit.test2
-rw-r--r--mysql-test/t/view.test4
6 files changed, 76 insertions, 2 deletions
diff --git a/mysql-test/r/sp-threads.result b/mysql-test/r/sp-threads.result
index 2f7e8021aa7..c516d7a643f 100644
--- a/mysql-test/r/sp-threads.result
+++ b/mysql-test/r/sp-threads.result
@@ -37,6 +37,7 @@ Id User Host db Command Time State Info
# root localhost test Sleep # NULL
# root localhost test Query # Locked update t1, t2 set val= 1 where id1=id2
# root localhost test Query # NULL show processlist
+# root localhost test Sleep # NULL
unlock tables;
drop procedure bug9486;
drop table t1, t2;
@@ -64,3 +65,27 @@ insert into t1 (select f from v1);
drop function bug11554;
drop table t1;
drop view v1;
+drop procedure if exists p1;
+drop procedure if exists p2;
+create table t1 (s1 int)|
+create procedure p1() select * from t1|
+create procedure p2()
+begin
+insert into t1 values (1);
+call p1();
+select * from t1;
+end|
+use test;
+lock table t1 write;
+ call p2();
+use test;
+drop procedure p1;
+create procedure p1() select * from t1;
+unlock tables;
+s1
+1
+s1
+1
+drop procedure p1;
+drop procedure p2;
+drop table t1;
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index 035af0d82ac..5988b4f745e 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -34,7 +34,7 @@ select 0 + b'1111111111111111';
select 0 + b'1000000000000001';
0 + b'1000000000000001'
32769
-drop table if exists t1;
+drop table if exists t1,t2;
create table t1 (a bit(65));
ERROR 42000: Display width out of range for column 'a' (max = 64)
create table t1 (a bit(0));
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index f6b5018cf3a..98020c7ec33 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -1880,6 +1880,8 @@ test.v5 check error View 'test.v5' references invalid table(s) or column(s) or f
test.v6 check status OK
drop view v1, v2, v3, v4, v5, v6;
drop table t2;
+drop function if exists f1;
+drop function if exists f2;
CREATE TABLE t1 (col1 time);
CREATE TABLE t2 (col1 time);
CREATE TABLE t3 (col1 time);
diff --git a/mysql-test/t/sp-threads.test b/mysql-test/t/sp-threads.test
index 4733201cde2..70c1efb1f0b 100644
--- a/mysql-test/t/sp-threads.test
+++ b/mysql-test/t/sp-threads.test
@@ -5,6 +5,7 @@
connect (con1root,localhost,root,,);
connect (con2root,localhost,root,,);
+connect (con3root,localhost,root,,);
connection con1root;
use test;
@@ -130,6 +131,48 @@ drop function bug11554;
drop table t1;
drop view v1;
+
+# BUG#12228
+--disable_warnings
+drop procedure if exists p1;
+drop procedure if exists p2;
+--enable_warnings
+
+connection con1root;
+delimiter |;
+create table t1 (s1 int)|
+create procedure p1() select * from t1|
+create procedure p2()
+begin
+ insert into t1 values (1);
+ call p1();
+ select * from t1;
+end|
+delimiter ;|
+
+connection con2root;
+use test;
+lock table t1 write;
+
+connection con1root;
+send call p2();
+
+connection con3root;
+use test;
+drop procedure p1;
+create procedure p1() select * from t1;
+
+connection con2root;
+unlock tables;
+
+connection con1root;
+# Crash will be here if we hit BUG#12228
+reap;
+
+drop procedure p1;
+drop procedure p2;
+drop table t1;
+
#
# BUG#NNNN: New bug synopsis
#
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index 005a2c78a14..6906cfc2808 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -16,7 +16,7 @@ select 0 + b'1111111111111111';
select 0 + b'1000000000000001';
--disable_warnings
-drop table if exists t1;
+drop table if exists t1,t2;
--enable_warnings
--error 1439
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 9885566442f..cba2d75fb7c 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -1711,6 +1711,10 @@ CHECK TABLE v1, v2, v3, v4, v5, v6;
drop view v1, v2, v3, v4, v5, v6;
drop table t2;
+--disable_warnings
+drop function if exists f1;
+drop function if exists f2;
+--enable_warnings
CREATE TABLE t1 (col1 time);
CREATE TABLE t2 (col1 time);
CREATE TABLE t3 (col1 time);