Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
025aadce
Commit
025aadce
authored
Jan 08, 2008
by
davi@mysql.com/endora.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#29770 Two handlers are allowed to catch an error in an stored procedure.
Add test case.
parent
4bb50356
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+16
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+24
-0
No files found.
mysql-test/r/sp.result
View file @
025aadce
...
...
@@ -6578,6 +6578,22 @@ DROP PROCEDURE db28318_a.t1;
DROP PROCEDURE db28318_b.t2;
DROP DATABASE db28318_a;
DROP DATABASE db28318_b;
USE test;
DROP TABLE IF EXISTS t1;
DROP PROCEDURE IF EXISTS bug29770;
CREATE TABLE t1(a int);
CREATE PROCEDURE bug29770()
BEGIN
DECLARE CONTINUE HANDLER FOR SQLSTATE '42S22' SET @state:= 'run';
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @exception:= 'run';
SELECT x FROM t1;
END|
CALL bug29770();
SELECT @state, @exception;
@state @exception
run NULL
DROP TABLE t1;
DROP PROCEDURE bug29770;
# ------------------------------------------------------------------
# -- End of 5.0 tests
# ------------------------------------------------------------------
mysql-test/t/sp.test
View file @
025aadce
...
...
@@ -7698,6 +7698,30 @@ DROP PROCEDURE db28318_a.t1;
DROP
PROCEDURE
db28318_b
.
t2
;
DROP
DATABASE
db28318_a
;
DROP
DATABASE
db28318_b
;
USE
test
;
#
# Bug#29770 Two handlers are allowed to catch an error in an stored procedure.
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
DROP
PROCEDURE
IF
EXISTS
bug29770
;
--
enable_warnings
CREATE
TABLE
t1
(
a
int
);
delimiter
|
;
CREATE
PROCEDURE
bug29770
()
BEGIN
DECLARE
CONTINUE
HANDLER
FOR
SQLSTATE
'42S22'
SET
@
state
:=
'run'
;
DECLARE
CONTINUE
HANDLER
FOR
SQLEXCEPTION
SET
@
exception
:=
'run'
;
SELECT
x
FROM
t1
;
END
|
delimiter
;
|
CALL
bug29770
();
SELECT
@
state
,
@
exception
;
DROP
TABLE
t1
;
DROP
PROCEDURE
bug29770
;
--
echo
# ------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment