diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-08-28 16:05:38 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-10-03 14:38:01 +0200 |
commit | acb0c9e8fd3916cd37e895ef0a1f52f856ad047b (patch) | |
tree | 5f5bd8017a0b15d3c54e1049b9c48fa5d58c505e /mysql-test/suite/compat/oracle | |
parent | bd64c2e8cc610dc774411c5f0a8ab163fc685934 (diff) | |
download | mariadb-git-acb0c9e8fd3916cd37e895ef0a1f52f856ad047b.tar.gz |
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.
Diffstat (limited to 'mysql-test/suite/compat/oracle')
-rw-r--r-- | mysql-test/suite/compat/oracle/r/sp-package.result | 42 | ||||
-rw-r--r-- | mysql-test/suite/compat/oracle/t/sp-package.test | 7 |
2 files changed, 42 insertions, 7 deletions
diff --git a/mysql-test/suite/compat/oracle/r/sp-package.result b/mysql-test/suite/compat/oracle/r/sp-package.result index 4f0f05b1939..e7ab4eaa4a2 100644 --- a/mysql-test/suite/compat/oracle/r/sp-package.result +++ b/mysql-test/suite/compat/oracle/r/sp-package.result @@ -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 diff --git a/mysql-test/suite/compat/oracle/t/sp-package.test b/mysql-test/suite/compat/oracle/t/sp-package.test index 5eac3987982..96420c18820 100644 --- a/mysql-test/suite/compat/oracle/t/sp-package.test +++ b/mysql-test/suite/compat/oracle/t/sp-package.test @@ -335,6 +335,7 @@ CREATE PACKAGE BODY test2 AS END; $$ DELIMITER ;$$ +show warnings; DROP PACKAGE test2; @@ -367,10 +368,13 @@ UPDATE mysql.proc SET `body`='garbage' --source sp-cache-invalidate.inc --error ER_SP_PROC_TABLE_CORRUPT SELECT test2.f1(); +show warnings; --error ER_SP_PROC_TABLE_CORRUPT SELECT test2.f1(); +show warnings; --error ER_SP_PROC_TABLE_CORRUPT SELECT test2.f1(); +show warnings; DROP PACKAGE test2; @@ -403,10 +407,13 @@ UPDATE mysql.proc SET `body`='garbage' --source sp-cache-invalidate.inc --error ER_SP_PROC_TABLE_CORRUPT CALL test2.p1(); +show warnings; --error ER_SP_PROC_TABLE_CORRUPT CALL test2.p1(); +show warnings; --error ER_SP_PROC_TABLE_CORRUPT CALL test2.p1(); +show warnings; DROP PACKAGE test2; |