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
8881bead
Commit
8881bead
authored
Jan 20, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed using in SP sentences which use Item tree temporary changes rollback (BUG#7992)
parent
5ed1b144
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
+35
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+13
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+21
-0
sql/sp_head.cc
sql/sp_head.cc
+1
-0
No files found.
mysql-test/r/sp.result
View file @
8881bead
...
@@ -2321,3 +2321,16 @@ select `foo` ();
...
@@ -2321,3 +2321,16 @@ select `foo` ();
`foo` ()
`foo` ()
5
5
drop function `foo`;
drop function `foo`;
drop procedure if exists p1;
create table t1(id int);
insert into t1 values(1);
create procedure p1()
begin
declare i int;
select max(id)+1 into i from t1;
end
//
call p1()//
call p1()//
drop procedure p1;
drop table t1;
mysql-test/t/sp.test
View file @
8881bead
...
@@ -2739,3 +2739,24 @@ drop function if exists foo;
...
@@ -2739,3 +2739,24 @@ drop function if exists foo;
create
function
`
foo
` () returns int return 5;
create
function
`
foo
` () returns int return 5;
select `
foo
` ();
select `
foo
` ();
drop function `
foo
`
;
drop function `
foo
`
;
#
# rolling back temporary Item tree changes in SP
#
--
disable_warnings
drop
procedure
if
exists
p1
;
--
enable_warnings
create
table
t1
(
id
int
);
insert
into
t1
values
(
1
);
delimiter
//;
create
procedure
p1
()
begin
declare
i
int
;
select
max
(
id
)
+
1
into
i
from
t1
;
end
//
call
p1
()
//
call
p1
()
//
delimiter
;
//
drop
procedure
p1
;
drop
table
t1
;
sql/sp_head.cc
View file @
8881bead
...
@@ -482,6 +482,7 @@ sp_head::execute(THD *thd)
...
@@ -482,6 +482,7 @@ sp_head::execute(THD *thd)
break
;
break
;
DBUG_PRINT
(
"execute"
,
(
"Instruction %u"
,
ip
));
DBUG_PRINT
(
"execute"
,
(
"Instruction %u"
,
ip
));
ret
=
i
->
execute
(
thd
,
&
ip
);
ret
=
i
->
execute
(
thd
,
&
ip
);
thd
->
rollback_item_tree_changes
();
if
(
i
->
free_list
)
if
(
i
->
free_list
)
cleanup_items
(
i
->
free_list
);
cleanup_items
(
i
->
free_list
);
// Check if an exception has occurred and a handler has been found
// Check if an exception has occurred and a handler has been found
...
...
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