Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL)
-
None
-
10.1.22
Description
I create a role and a procedure p1:
CREATE ROLE IF NOT EXISTS testrole; |
DELIMITER /
|
CREATE OR REPLACE PROCEDURE p1() |
BEGIN
|
END; |
/
|
DELIMITER ;
|
Now I create a procedure p2 and execute it. It works fine:
DELIMITER /
|
CREATE OR REPLACE PROCEDURE p2 (IN wgrp VARCHAR(10)) |
BEGIN
|
DECLARE wcmd VARCHAR(200); |
set wcmd=concat('GRANT EXECUTE ON PROCEDURE p1 TO ',wgrp); |
-- This works fine |
EXECUTE IMMEDIATE wcmd; |
END; |
/
|
DELIMITER ;
|
CALL p2('testrole'); |
Now I change the procedure body slightly and re-run it. It crashes:
DELIMITER /
|
CREATE OR REPLACE PROCEDURE p2 (wgrp VARCHAR(10)) |
BEGIN
|
-- assertion failed |
EXECUTE IMMEDIATE concat('GRANT EXECUTE ON PROCEDURE p1 TO ',wgrp); |
END; |
/
|
DELIMITER ;
|
CALL p2('testrole'); |
This procedure also crashes:
DELIMITER /
|
CREATE OR REPLACE PROCEDURE p2 () |
BEGIN
|
EXECUTE IMMEDIATE concat(_utf8'GRANT EXECUTE ON PROCEDURE p1 TO ',_latin1'testrole'); |
END; |
/
|
DELIMITER ;
|
CALL p2();
|
So does this one:
DELIMITER /
|
CREATE OR REPLACE PROCEDURE p2 () |
BEGIN
|
PREPARE stmt FROM concat(_utf8'GRANT EXECUTE ON PROCEDURE p1 TO ',_latin1' testrole'); |
EXECUTE stmt; |
DEALLOCATE PREPARE stmt; |
END; |
/
|
DELIMITER ;
|
CALL p2();
|
Attachments
Issue Links
- relates to
-
MDEV-14603 signal 11 with short stacktrace
- Closed