1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-33386 Wrong error message on GRANT .. ON PACKAGE no_such_package ..

When displaying the ER_SP_DOES_NOT_EXIST error, use
Sp_handler::type_lex_cstring() to the the underlying
object type:
- PROCEDURE
- FUNCTION
- PACKAGE
- PACKAGE BODY
instead of hard-coded "FUNCTION or PROCEDURE".
This commit is contained in:
Alexander Barkov
2024-02-05 14:41:44 +04:00
parent 2e83ab4126
commit e30e9fc628
4 changed files with 34 additions and 3 deletions

View File

@ -1,6 +1,10 @@
--source include/not_embedded.inc
--source include/default_charset.inc
--echo #
--echo # Start of 11.4 tests
--echo #
CREATE DATABASE db1;
CREATE USER u1@localhost IDENTIFIED BY '';
GRANT SELECT ON db1.* TO u1@localhost;
@ -320,3 +324,17 @@ DELIMITER ;$$
CALL p1.p1;
DROP PACKAGE p1;
DROP USER xxx@localhost;
--echo #
--echo # MDEV-33386 Wrong error message on `GRANT .. ON PACKAGE no_such_package ..`
--echo #
--error ER_SP_DOES_NOT_EXIST
GRANT EXECUTE ON PACKAGE no_such_package TO PUBLIC;
--error ER_SP_DOES_NOT_EXIST
GRANT EXECUTE ON PACKAGE BODY no_such_package TO PUBLIC;
--echo #
--echo # End of 11.4 tests
--echo #