diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-12 10:17:52 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-12 10:17:52 +0200 |
commit | 3cd1861a81f5c858014c8bbb67440daaffb05cce (patch) | |
tree | 361f04d90380771c79ea35ac7290eca17a01c5d0 /mysql-test/r/signal.result | |
parent | f0502cf87ce7f2795edfcf94d2dcad86ce3d190f (diff) | |
download | mariadb-git-3cd1861a81f5c858014c8bbb67440daaffb05cce.tar.gz |
merge bugfuxes for sp-error.test
Diffstat (limited to 'mysql-test/r/signal.result')
-rw-r--r-- | mysql-test/r/signal.result | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mysql-test/r/signal.result b/mysql-test/r/signal.result index 407f5f21745..a5eb24442b4 100644 --- a/mysql-test/r/signal.result +++ b/mysql-test/r/signal.result @@ -1315,19 +1315,25 @@ drop procedure test_signal $$ # # Test where SIGNAL can be used # + +# RETURN statement clears Diagnostics Area, thus +# the warnings raised in a stored function are not +# visible outsidef the stored function. So, we're using +# @@warning_count variable to check that SIGNAL succeeded. + 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() $$ test_signal_func() -5 -Warnings: -Warning 1012 This function SIGNAL a warning +1 drop function test_signal_func $$ create function test_signal_func() returns integer begin |