1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -249,7 +249,11 @@ RETURN f2();
END;
END;
$$
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
show warnings;
Level Code Message
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
DROP PACKAGE test2;
#
# Broken CREATE PACKAGE at a package function call time
@ -271,11 +275,23 @@ UPDATE mysql.proc SET `body`='garbage'
WHERE db='test' AND name='test2' AND type='PACKAGE';
# sp-cache-invalidate
SELECT test2.f1();
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
show warnings;
Level Code Message
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
SELECT test2.f1();
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
show warnings;
Level Code Message
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
SELECT test2.f1();
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
show warnings;
Level Code Message
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
DROP PACKAGE test2;
#
# Broken CREATE PACKAGE at a package procedure call time
@ -297,11 +313,23 @@ UPDATE mysql.proc SET `body`='garbage'
WHERE db='test' AND name='test2' AND type='PACKAGE';
# sp-cache-invalidate
CALL test2.p1();
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
show warnings;
Level Code Message
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
CALL test2.p1();
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
show warnings;
Level Code Message
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
CALL test2.p1();
ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
show warnings;
Level Code Message
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
DROP PACKAGE test2;
#
# Bad routine names