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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c40e51f2
Commit
c40e51f2
authored
Jan 08, 2004
by
pem@mysql.comhem.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix BUG#2260: Handler NOT FOUND declaration does't work in stored procedure
parent
cfd97c02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
3 deletions
+37
-3
mysql-test/r/sp.result
mysql-test/r/sp.result
+15
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+19
-0
sql/sp_rcontext.cc
sql/sp_rcontext.cc
+3
-3
No files found.
mysql-test/r/sp.result
View file @
c40e51f2
...
@@ -893,6 +893,21 @@ avg 0 4.4
...
@@ -893,6 +893,21 @@ avg 0 4.4
delete from t1|
delete from t1|
delete from t2|
delete from t2|
drop procedure bug1874|
drop procedure bug1874|
create procedure bug2260()
begin
declare v1 int;
declare continue handler for not found set @x2 = 1;
declare c1 cursor for select data from t1;
open c1;
fetch c1 into v1;
set @x2 = 2;
close c1;
end|
call bug2260()|
select @x2|
@x2
2
drop procedure bug2260|
drop table if exists fac|
drop table if exists fac|
create table fac (n int unsigned not null primary key, f bigint unsigned)|
create table fac (n int unsigned not null primary key, f bigint unsigned)|
create procedure ifac(n int unsigned)
create procedure ifac(n int unsigned)
...
...
mysql-test/t/sp.test
View file @
c40e51f2
...
@@ -1036,6 +1036,25 @@ delete from t1|
...
@@ -1036,6 +1036,25 @@ delete from t1|
delete
from
t2
|
delete
from
t2
|
drop
procedure
bug1874
|
drop
procedure
bug1874
|
#
# BUG#2260
#
create
procedure
bug2260
()
begin
declare
v1
int
;
declare
continue
handler
for
not
found
set
@
x2
=
1
;
declare
c1
cursor
for
select
data
from
t1
;
open
c1
;
fetch
c1
into
v1
;
set
@
x2
=
2
;
close
c1
;
end
|
call
bug2260
()
|
select
@
x2
|
drop
procedure
bug2260
|
#
#
# Some "real" examples
# Some "real" examples
...
...
sql/sp_rcontext.cc
View file @
c40e51f2
...
@@ -72,15 +72,15 @@ sp_rcontext::find_handler(uint sql_errno)
...
@@ -72,15 +72,15 @@ sp_rcontext::find_handler(uint sql_errno)
found
=
1
;
found
=
1
;
break
;
break
;
case
sp_cond_type_t
:
:
warning
:
case
sp_cond_type_t
:
:
warning
:
if
(
sqlstate
[
0
]
==
'0'
&&
sqlstate
[
0
]
==
'1'
)
if
(
sqlstate
[
0
]
==
'0'
&&
sqlstate
[
1
]
==
'1'
)
found
=
1
;
found
=
1
;
break
;
break
;
case
sp_cond_type_t
:
:
notfound
:
case
sp_cond_type_t
:
:
notfound
:
if
(
sqlstate
[
0
]
==
'0'
&&
sqlstate
[
0
]
==
'2'
)
if
(
sqlstate
[
0
]
==
'0'
&&
sqlstate
[
1
]
==
'2'
)
found
=
1
;
found
=
1
;
break
;
break
;
case
sp_cond_type_t
:
:
exception
:
case
sp_cond_type_t
:
:
exception
:
if
(
sqlstate
[
0
]
!=
'0'
||
sqlstate
[
0
]
>
'2'
)
if
(
sqlstate
[
0
]
!=
'0'
||
sqlstate
[
1
]
>
'2'
)
found
=
1
;
found
=
1
;
break
;
break
;
}
}
...
...
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