diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-08-28 16:05:38 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-10-02 13:49:26 +0200 |
commit | 2f4540783d87e3b424f3ccc42be9858abbb38b7b (patch) | |
tree | c6d24fe4e538f79ef2f93c9c847a6bfa9e09781c /mysql-test/main/errors.test | |
parent | bd64c2e8cc610dc774411c5f0a8ab163fc685934 (diff) | |
download | mariadb-git-bb-10.4-MDEV-23518.tar.gz |
MDEV-23518 Syntax error in ond SP results in misleading message on SHOW CREATE PROCEDUREbb-10.4-MDEV-23518
Add info to the error message how to get details about error which happened.
Diffstat (limited to 'mysql-test/main/errors.test')
-rw-r--r-- | mysql-test/main/errors.test | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/main/errors.test b/mysql-test/main/errors.test index f3aedc8e491..a4b95d48e5d 100644 --- a/mysql-test/main/errors.test +++ b/mysql-test/main/errors.test @@ -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 |