diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-08-07 17:21:37 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-08-07 17:21:37 +0400 |
commit | a3d79f2e58562c7b50d50827a0149234c225ea43 (patch) | |
tree | c266edef9eaf41a612e77972163d3d8eb0d280ba /mysql-test/t/signal.test | |
parent | 8e36dde7e1f149d8973fe14d8288e678d1ba9b61 (diff) | |
parent | a765e035a0c40ee04df42fba5c02484e83d31483 (diff) | |
download | mariadb-git-a3d79f2e58562c7b50d50827a0149234c225ea43.tar.gz |
Merge 10.0-serg -> 10.0
Diffstat (limited to 'mysql-test/t/signal.test')
-rw-r--r-- | mysql-test/t/signal.test | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mysql-test/t/signal.test b/mysql-test/t/signal.test index 13a0db2029b..31bc7bc9633 100644 --- a/mysql-test/t/signal.test +++ b/mysql-test/t/signal.test @@ -1551,15 +1551,24 @@ drop procedure test_signal $$ --echo # Test where SIGNAL can be used --echo # +--echo +--echo # RETURN statement clears Diagnostics Area, thus +--echo # the warnings raised in a stored function are not +--echo # visible outsidef the stored function. So, we're using +--echo # @@warning_count variable to check that SIGNAL succeeded. +--echo + create function test_signal_func() returns integer begin + DECLARE v INT; DECLARE warn CONDITION FOR SQLSTATE "01XXX"; SIGNAL warn SET MESSAGE_TEXT = "This function SIGNAL a warning", MYSQL_ERRNO = 1012; - return 5; + SELECT @@warning_count INTO v; + return v; end $$ select test_signal_func() $$ |