mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed BUG#6600: Stored procedure crash after repeated calls with check table.
Sedond attempt: Simply disallow CHECK in SPs, since it can't work. mysql-test/r/sp-error.result: New test cast for BUG#6600 mysql-test/r/sp.result: Removed old test case for BUG#6600 mysql-test/t/sp-error.test: New test cast for BUG#6600 mysql-test/t/sp.test: Removed old test case for BUG#6600 sql/share/errmsg.txt: Made the SP bad statement error message more general. sql/sp_head.cc: CHECK is not possible in stored procedures. sql/sql_parse.cc: Undid attempt to fix CHECK in stored procedures, it didn't work. sql/sql_yacc.yy: CHECK is not possible in stored procedures. (And updated error messages for LOCK/UNLOCK.)
This commit is contained in:
@ -494,4 +494,13 @@ declare continue handler for sqlstate '42x00' begin end;
|
||||
begin end;
|
||||
end|
|
||||
ERROR 42000: Bad SQLSTATE: '42x00'
|
||||
create procedure bug6600()
|
||||
check table t1|
|
||||
ERROR 0A000: CHECK is not allowed in stored procedures
|
||||
create procedure bug6600()
|
||||
lock table t1 read|
|
||||
ERROR 0A000: LOCK is not allowed in stored procedures
|
||||
create procedure bug6600()
|
||||
unlock table t1|
|
||||
ERROR 0A000: UNLOCK is not allowed in stored procedures
|
||||
drop table t1|
|
||||
|
@ -2779,23 +2779,4 @@ a
|
||||
3.2000
|
||||
drop procedure bug8937|
|
||||
delete from t1|
|
||||
drop procedure if exists bug6600|
|
||||
drop table if exists t3|
|
||||
drop view if exists v1|
|
||||
create table t3 (s1 decimal(31,30))|
|
||||
create view v1 as select * from t3|
|
||||
create procedure bug6600()
|
||||
check table v1|
|
||||
call bug6600()|
|
||||
Table Op Msg_type Msg_text
|
||||
test.v1 check status OK
|
||||
call bug6600()|
|
||||
Table Op Msg_type Msg_text
|
||||
test.v1 check status OK
|
||||
call bug6600()|
|
||||
Table Op Msg_type Msg_text
|
||||
test.v1 check status OK
|
||||
drop procedure bug6600|
|
||||
drop view v1|
|
||||
drop table t3|
|
||||
drop table t1,t2;
|
||||
|
@ -680,6 +680,23 @@ begin
|
||||
end|
|
||||
|
||||
|
||||
#
|
||||
# BUG#6600: Stored procedure crash after repeated calls with check table
|
||||
#
|
||||
--error ER_SP_BADSTATEMENT
|
||||
create procedure bug6600()
|
||||
check table t1|
|
||||
|
||||
# Check these two as well, while we're at it. (Although it isn't really
|
||||
# related to the bug report, but to the fix.)
|
||||
--error ER_SP_BADSTATEMENT
|
||||
create procedure bug6600()
|
||||
lock table t1 read|
|
||||
--error ER_SP_BADSTATEMENT
|
||||
create procedure bug6600()
|
||||
unlock table t1|
|
||||
|
||||
|
||||
#
|
||||
# BUG#NNNN: New bug synopsis
|
||||
#
|
||||
|
@ -3398,28 +3398,6 @@ drop procedure bug8937|
|
||||
delete from t1|
|
||||
|
||||
|
||||
#
|
||||
# BUG#6600: Stored procedure crash after repeated calls with check table
|
||||
#
|
||||
--disable_warnings
|
||||
drop procedure if exists bug6600|
|
||||
drop table if exists t3|
|
||||
drop view if exists v1|
|
||||
--enable_warnings
|
||||
create table t3 (s1 decimal(31,30))|
|
||||
create view v1 as select * from t3|
|
||||
|
||||
create procedure bug6600()
|
||||
check table v1|
|
||||
|
||||
call bug6600()|
|
||||
call bug6600()|
|
||||
call bug6600()|
|
||||
drop procedure bug6600|
|
||||
drop view v1|
|
||||
drop table t3|
|
||||
|
||||
|
||||
#
|
||||
# BUG#NNNN: New bug synopsis
|
||||
#
|
||||
|
Reference in New Issue
Block a user