mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#28846 Use of undocumented Prepared Statements crashes server
ALTER VIEW is currently not supported as a prepared statement and should be disabled as such as they otherwise could cause server crashes. ALTER VIEW is currently not supported when called from stored procedures or functions for related reasons and should also be disabled. This patch disables these DDL statements and adjusts the appropriate test cases accordingly. Additional tests has been added to reflect on the fact that we do support CREATE/ALTER/DROP TABLE for Prepared Statements (PS), Stored Procedures (SP) and PS within SP.
This commit is contained in:
@@ -1087,12 +1087,12 @@ delimiter ;|
|
||||
#
|
||||
# BUG 12490 (Packets out of order if calling HELP CONTENTS from Stored Procedure)
|
||||
#
|
||||
--error 1314
|
||||
--error ER_SP_BADSTATEMENT
|
||||
CREATE PROCEDURE BUG_12490() HELP CONTENTS;
|
||||
--error 1314
|
||||
--error ER_SP_BADSTATEMENT
|
||||
CREATE FUNCTION BUG_12490() RETURNS INT HELP CONTENTS;
|
||||
CREATE TABLE t_bug_12490(a int);
|
||||
--error 1314
|
||||
--error ER_SP_BADSTATEMENT
|
||||
CREATE TRIGGER BUG_12490 BEFORE UPDATE ON t_bug_12490 FOR EACH ROW HELP CONTENTS;
|
||||
DROP TABLE t_bug_12490;
|
||||
|
||||
@@ -1397,9 +1397,9 @@ CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN create view v1 as sele
|
||||
-- error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
CREATE FUNCTION bug_13627_f() returns int BEGIN create view v1 as select 1; return 1; END |
|
||||
|
||||
-- error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
-- error ER_SP_BADSTATEMENT
|
||||
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN alter view v1 as select 1; END |
|
||||
-- error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
-- error ER_SP_BADSTATEMENT
|
||||
CREATE FUNCTION bug_13627_f() returns int BEGIN alter view v1 as select 1; return 1; END |
|
||||
|
||||
-- error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
|
||||
Reference in New Issue
Block a user