mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal
state" to sp-error.test. According to Per-Erik all SP related tests which should result in error should go into sp-error.test and not in sp.test, because we want to be able to run sp.test using normal client. mysql-test/r/sp-error.result: Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal state" to sp-error.test. mysql-test/r/sp.result: Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal state" to sp-error.test. mysql-test/t/sp-error.test: Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal state" to sp-error.test. mysql-test/t/sp.test: Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal state" to sp-error.test.
This commit is contained in:
@@ -503,4 +503,14 @@ ERROR 0A000: LOCK is not allowed in stored procedures
|
|||||||
create procedure bug6600()
|
create procedure bug6600()
|
||||||
unlock table t1|
|
unlock table t1|
|
||||||
ERROR 0A000: UNLOCK is not allowed in stored procedures
|
ERROR 0A000: UNLOCK is not allowed in stored procedures
|
||||||
|
drop procedure if exists bug9566|
|
||||||
|
create procedure bug9566()
|
||||||
|
begin
|
||||||
|
select * from t1;
|
||||||
|
end|
|
||||||
|
lock table t1 read|
|
||||||
|
call bug9566()|
|
||||||
|
ERROR HY000: Table 'proc' was not locked with LOCK TABLES
|
||||||
|
unlock tables|
|
||||||
|
drop procedure bug9566|
|
||||||
drop table t1|
|
drop table t1|
|
||||||
|
@@ -2779,14 +2779,4 @@ a
|
|||||||
3.2000
|
3.2000
|
||||||
drop procedure bug8937|
|
drop procedure bug8937|
|
||||||
delete from t1|
|
delete from t1|
|
||||||
drop procedure if exists bug9566|
|
|
||||||
create procedure bug9566()
|
|
||||||
begin
|
|
||||||
select * from t1;
|
|
||||||
end|
|
|
||||||
lock table t1 read|
|
|
||||||
call bug9566()|
|
|
||||||
ERROR HY000: Table 'proc' was not locked with LOCK TABLES
|
|
||||||
unlock tables|
|
|
||||||
drop procedure bug9566|
|
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
@@ -696,6 +696,29 @@ create procedure bug6600()
|
|||||||
create procedure bug6600()
|
create procedure bug6600()
|
||||||
unlock table t1|
|
unlock table t1|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#9566: explicit LOCK TABLE and store procedures result in illegal state
|
||||||
|
#
|
||||||
|
# We should not think that mysql.proc table does not exist if we are unable
|
||||||
|
# to open it under LOCK TABLE or in prelocked mode. Probably this test
|
||||||
|
# should be removed when Monty will allow access to mysql.proc without
|
||||||
|
# locking it.
|
||||||
|
#
|
||||||
|
--disable_warnings
|
||||||
|
drop procedure if exists bug9566|
|
||||||
|
--enable_warnings
|
||||||
|
create procedure bug9566()
|
||||||
|
begin
|
||||||
|
select * from t1;
|
||||||
|
end|
|
||||||
|
lock table t1 read|
|
||||||
|
# This should fail because we forgot to lock mysql.proc table explicitly
|
||||||
|
--error 1100
|
||||||
|
call bug9566()|
|
||||||
|
unlock tables|
|
||||||
|
# This should succeed
|
||||||
|
drop procedure bug9566|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#NNNN: New bug synopsis
|
# BUG#NNNN: New bug synopsis
|
||||||
|
@@ -3397,29 +3397,6 @@ call bug8937()|
|
|||||||
drop procedure bug8937|
|
drop procedure bug8937|
|
||||||
delete from t1|
|
delete from t1|
|
||||||
|
|
||||||
#
|
|
||||||
# BUG#9566: explicit LOCK TABLE and store procedures result in illegal state
|
|
||||||
#
|
|
||||||
# We should not think that mysql.proc table does not exist if we are unable
|
|
||||||
# to open it under LOCK TABLE or in prelocked mode. Probably this test
|
|
||||||
# should be removed when Monty will allow access to mysql.proc without
|
|
||||||
# locking it.
|
|
||||||
#
|
|
||||||
--disable_warnings
|
|
||||||
drop procedure if exists bug9566|
|
|
||||||
--enable_warnings
|
|
||||||
create procedure bug9566()
|
|
||||||
begin
|
|
||||||
select * from t1;
|
|
||||||
end|
|
|
||||||
lock table t1 read|
|
|
||||||
# This should fail because we forgot to lock mysql.proc table explicitly
|
|
||||||
--error 1100
|
|
||||||
call bug9566()|
|
|
||||||
unlock tables|
|
|
||||||
# This should succeed
|
|
||||||
drop procedure bug9566|
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#NNNN: New bug synopsis
|
# BUG#NNNN: New bug synopsis
|
||||||
|
Reference in New Issue
Block a user