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
dbe6c702
Commit
dbe6c702
authored
Jul 23, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
parents
27815b9c
e9507f0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
6 deletions
+61
-6
mysql-test/r/sp.result
mysql-test/r/sp.result
+21
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+30
-0
sql/sp_head.cc
sql/sp_head.cc
+10
-6
No files found.
mysql-test/r/sp.result
View file @
dbe6c702
...
...
@@ -1387,6 +1387,27 @@ group_concat(v)
yz,yz
drop procedure bug3368|
drop table t3|
drop table if exists t3|
create table t3 (f1 int, f2 int);
insert into t3 values (1,1);
create procedure bug4579_1 ()
begin
declare sf1 int;
select f1 into sf1 from t3 where f1=1 and f2=1;
update t3 set f2 = f2 + 1 where f1=1 and f2=1;
call bug4579_2();
end|
create procedure bug4579_2 ()
begin
end|
call bug4579_1()|
call bug4579_1()|
Warnings:
call bug4579_1()|
Warnings:
drop procedure bug4579_1|
drop procedure bug4579_2|
drop table t3|
drop table if exists fac|
create table fac (n int unsigned not null primary key, f bigint unsigned)|
create procedure ifac(n int unsigned)
...
...
mysql-test/t/sp.test
View file @
dbe6c702
...
...
@@ -1592,6 +1592,36 @@ call bug3368('yz')|
drop
procedure
bug3368
|
drop
table
t3
|
#
# BUG#4579
#
--
disable_warnings
drop
table
if
exists
t3
|
--
enable_warnings
create
table
t3
(
f1
int
,
f2
int
);
insert
into
t3
values
(
1
,
1
);
create
procedure
bug4579_1
()
begin
declare
sf1
int
;
select
f1
into
sf1
from
t3
where
f1
=
1
and
f2
=
1
;
update
t3
set
f2
=
f2
+
1
where
f1
=
1
and
f2
=
1
;
call
bug4579_2
();
end
|
create
procedure
bug4579_2
()
begin
end
|
call
bug4579_1
()
|
call
bug4579_1
()
|
call
bug4579_1
()
|
drop
procedure
bug4579_1
|
drop
procedure
bug4579_2
|
drop
table
t3
|
#
# Some "real" examples
...
...
sql/sp_head.cc
View file @
dbe6c702
...
...
@@ -377,9 +377,11 @@ sp_head::execute(THD *thd)
DBUG_ENTER
(
"sp_head::execute"
);
char
olddb
[
128
];
bool
dbchanged
;
sp_rcontext
*
ctx
=
thd
->
spcont
;
sp_rcontext
*
ctx
;
int
ret
=
0
;
uint
ip
=
0
;
Item_arena
*
old_arena
;
#ifndef EMBEDDED_LIBRARY
if
(
check_stack_overrun
(
thd
,
olddb
))
...
...
@@ -392,10 +394,12 @@ sp_head::execute(THD *thd)
if
((
ret
=
sp_use_new_db
(
thd
,
m_db
.
str
,
olddb
,
sizeof
(
olddb
),
0
,
&
dbchanged
)))
goto
done
;
if
(
ctx
)
if
(
(
ctx
=
thd
->
spcont
)
)
ctx
->
clear_handler
();
thd
->
query_error
=
0
;
old_arena
=
thd
->
current_arena
;
thd
->
current_arena
=
this
;
do
{
sp_instr
*
i
;
...
...
@@ -433,14 +437,14 @@ sp_head::execute(THD *thd)
}
while
(
ret
==
0
&&
!
thd
->
killed
&&
!
thd
->
query_error
&&
!
thd
->
net
.
report_error
);
if
(
thd
->
current_arena
)
cleanup_items
(
thd
->
current_arena
->
free_list
);
thd
->
current_arena
=
old_arena
;
done:
DBUG_PRINT
(
"info"
,
(
"ret=%d killed=%d query_error=%d"
,
ret
,
thd
->
killed
,
thd
->
query_error
));
if
(
thd
->
current_arena
)
cleanup_items
(
thd
->
current_arena
->
free_list
);
thd
->
current_arena
=
0
;
if
(
thd
->
killed
||
thd
->
query_error
||
thd
->
net
.
report_error
)
ret
=
-
1
;
/* If the DB has changed, the pointer has changed too, but the
...
...
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