summaryrefslogtreecommitdiff
path: root/mysql-test/r/signal.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/signal.result')
-rw-r--r--mysql-test/r/signal.result47
1 files changed, 14 insertions, 33 deletions
diff --git a/mysql-test/r/signal.result b/mysql-test/r/signal.result
index 062b866475d..a5eb24442b4 100644
--- a/mysql-test/r/signal.result
+++ b/mysql-test/r/signal.result
@@ -1191,8 +1191,6 @@ end $$
call test_signal() $$
Caught by SQLSTATE
Caught by SQLSTATE
-Warnings:
-Warning 1012 Raising a warning
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1208,8 +1206,6 @@ end $$
call test_signal() $$
Caught by number
Caught by number
-Warnings:
-Warning 1012 Raising a warning
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1225,8 +1221,6 @@ end $$
call test_signal() $$
Caught by SQLWARNING
Caught by SQLWARNING
-Warnings:
-Warning 1012 Raising a warning
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1242,8 +1236,6 @@ end $$
call test_signal() $$
Caught by SQLSTATE
Caught by SQLSTATE
-Warnings:
-Error 1012 Raising a not found
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1259,8 +1251,6 @@ end $$
call test_signal() $$
Caught by number
Caught by number
-Warnings:
-Error 1012 Raising a not found
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1276,8 +1266,6 @@ end $$
call test_signal() $$
Caught by NOT FOUND
Caught by NOT FOUND
-Warnings:
-Error 1012 Raising a not found
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1293,8 +1281,6 @@ end $$
call test_signal() $$
Caught by SQLSTATE
Caught by SQLSTATE
-Warnings:
-Error 1012 Raising an error
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1310,8 +1296,6 @@ end $$
call test_signal() $$
Caught by number
Caught by number
-Warnings:
-Error 1012 Raising an error
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1327,25 +1311,29 @@ end $$
call test_signal() $$
Caught by SQLEXCEPTION
Caught by SQLEXCEPTION
-Warnings:
-Error 1012 Raising an error
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
@@ -1468,7 +1456,6 @@ after RESIGNAL
after RESIGNAL
Warnings:
Warning 1012 Raising a warning
-Warning 1012 Raising a warning
drop procedure test_resignal $$
create procedure test_resignal()
begin
@@ -1523,7 +1510,6 @@ after RESIGNAL
after RESIGNAL
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-Warning 1264 Out of range value for column 'a' at row 1
drop procedure test_resignal $$
create procedure test_resignal()
begin
@@ -1557,7 +1543,7 @@ end $$
call test_resignal() $$
before RESIGNAL
before RESIGNAL
-ERROR 42S02: Unknown table 'no_such_table'
+ERROR 42S02: Unknown table 'test.no_such_table'
drop procedure test_resignal $$
create procedure test_resignal()
begin
@@ -1580,7 +1566,6 @@ before RESIGNAL
after RESIGNAL
after RESIGNAL
Warnings:
-Warning 1012 Raising a warning
Warning 5555 RESIGNAL of a warning
drop procedure test_resignal $$
create procedure test_resignal()
@@ -1641,7 +1626,6 @@ before RESIGNAL
after RESIGNAL
after RESIGNAL
Warnings:
-Warning 1264 Out of range value for column 'a' at row 1
Warning 5555 RESIGNAL of a warning
drop procedure test_resignal $$
create procedure test_resignal()
@@ -2054,7 +2038,7 @@ before RESIGNAL
after RESIGNAL
after RESIGNAL
Warnings:
-Error 1051 Unknown table 'no_such_table'
+Error 1051 Unknown table 'test.no_such_table'
Warning 5555 RESIGNAL to a warning
drop procedure test_resignal $$
create procedure test_resignal()
@@ -2075,7 +2059,7 @@ before RESIGNAL
ERROR 02444: RESIGNAL to a not found
show warnings $$
Level Code Message
-Error 1051 Unknown table 'no_such_table'
+Error 1051 Unknown table 'test.no_such_table'
Error 5555 RESIGNAL to a not found
drop procedure test_resignal $$
create procedure test_resignal()
@@ -2096,7 +2080,7 @@ before RESIGNAL
ERROR 44444: RESIGNAL to an error
show warnings $$
Level Code Message
-Error 1051 Unknown table 'no_such_table'
+Error 1051 Unknown table 'test.no_such_table'
Error 5555 RESIGNAL to an error
drop procedure test_resignal $$
#
@@ -2143,9 +2127,6 @@ CALL peter_p2() $$
ERROR 42000: Hi, I am a useless error message
show warnings $$
Level Code Message
-Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
-Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
-Error 9999 Variable 'sql_mode' can't be set to the value of 'NULL'
Error 9999 Hi, I am a useless error message
drop procedure peter_p1 $$
drop procedure peter_p2 $$