summaryrefslogtreecommitdiff
path: root/mysql-test/suite/compat/oracle/t/sp.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/compat/oracle/t/sp.test')
-rw-r--r--mysql-test/suite/compat/oracle/t/sp.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/suite/compat/oracle/t/sp.test b/mysql-test/suite/compat/oracle/t/sp.test
index 3ea9c2a9276..1880f153f2a 100644
--- a/mysql-test/suite/compat/oracle/t/sp.test
+++ b/mysql-test/suite/compat/oracle/t/sp.test
@@ -377,3 +377,31 @@ BEGIN NOT ATOMIC
END
/
DELIMITER ;/
+
+
+--echo # Testing exceptions
+
+CREATE TABLE t1 (c1 INT);
+
+DELIMITER /;
+
+CREATE PROCEDURE sp1 (p1 IN VARCHAR2(20), p2 OUT VARCHAR2(30))
+IS
+ v1 INT;
+BEGIN
+ EXCEPTION WHEN NOT FOUND THEN
+ BEGIN
+ p2 := 'def';
+ END;
+ SELECT c1 INTO v1 FROM t1;
+ p2 := p1;
+END;
+/
+
+DELIMITER ;/
+
+CALL sp1('abc', @a);
+SELECT @a;
+
+DROP PROCEDURE sp1;
+DROP TABLE t1;