1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-23518 Syntax error in ond SP results in misleading message on SHOW CREATE PROCEDURE

Add info to the error message how to get details about error which happened.
This commit is contained in:
Oleksandr Byelkin
2020-08-28 16:05:38 +02:00
parent bd64c2e8cc
commit acb0c9e8fd
9 changed files with 164 additions and 17 deletions

View File

@ -246,3 +246,39 @@ SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,nu
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.long_query_time,null);
-- echo # End of 10.3 tests
--echo #
--echo # MDEV-23518: Syntax error in ond SP results in misleading
--echo # message on SHOW CREATE PROCEDURE
--echo #
DELIMITER $$;
CREATE PROCEDURE P1 ()
BEGIN NOT ATOMIC
IF (SELECT 2) THEN
SELECT 4;
END IF ;
END;
$$
DELIMITER ;$$
select name,db,body from mysql.proc where name = "P1";
update mysql.proc set body_utf8="BEGIN NOT ATOMIC
IF (SELECT 2) OR foo = 3 THEN
SELECT 4;
END IF ;
END", body="BEGIN NOT ATOMIC
IF (SELECT 2) OR foo = 3 THEN
SELECT 4;
END IF ;
END"where name = "P1";
--error ER_SP_PROC_TABLE_CORRUPT
show create procedure P1;
show warnings;
drop procedure P1;
-- echo # End of 10.4 tests