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
f3a0ba35
Commit
f3a0ba35
authored
Sep 29, 2004
by
pem@mysql.comhem.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed BUG#4905: Stored procedure doesn't clear for "Rows affected".
parent
350dc64c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
+56
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+26
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+29
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-0
No files found.
mysql-test/r/sp.result
View file @
f3a0ba35
...
@@ -1894,6 +1894,32 @@ flush status|
...
@@ -1894,6 +1894,32 @@ flush status|
flush query cache|
flush query cache|
delete from t1|
delete from t1|
drop procedure bug3583|
drop procedure bug3583|
drop table if exists t3|
drop procedure if exists bug4905|
create table t3 (s1 int,primary key (s1))|
create procedure bug4905()
begin
declare v int;
declare continue handler for sqlstate '23000' set v = 5;
insert into t3 values (1);
end|
call bug4905()|
select row_count()|
row_count()
1
call bug4905()|
select row_count()|
row_count()
0
call bug4905()|
select row_count()|
row_count()
0
select * from t3|
s1
1
drop procedure bug4905|
drop table t3|
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 @
f3a0ba35
...
@@ -2056,6 +2056,35 @@ flush query cache|
...
@@ -2056,6 +2056,35 @@ flush query cache|
delete
from
t1
|
delete
from
t1
|
drop
procedure
bug3583
|
drop
procedure
bug3583
|
#
# BUG#4905: Stored procedure doesn't clear for "Rows affected"
#
--
disable_warnings
drop
table
if
exists
t3
|
drop
procedure
if
exists
bug4905
|
--
enable_warnings
create
table
t3
(
s1
int
,
primary
key
(
s1
))
|
create
procedure
bug4905
()
begin
declare
v
int
;
declare
continue
handler
for
sqlstate
'23000'
set
v
=
5
;
insert
into
t3
values
(
1
);
end
|
call
bug4905
()
|
select
row_count
()
|
call
bug4905
()
|
select
row_count
()
|
call
bug4905
()
|
select
row_count
()
|
select
*
from
t3
|
drop
procedure
bug4905
|
drop
table
t3
|
#
#
# Some "real" examples
# Some "real" examples
...
...
sql/sql_parse.cc
View file @
f3a0ba35
...
@@ -3724,6 +3724,7 @@ purposes internal to the MySQL server", MYF(0));
...
@@ -3724,6 +3724,7 @@ purposes internal to the MySQL server", MYF(0));
select_limit
=
thd
->
variables
.
select_limit
;
select_limit
=
thd
->
variables
.
select_limit
;
thd
->
variables
.
select_limit
=
HA_POS_ERROR
;
thd
->
variables
.
select_limit
=
HA_POS_ERROR
;
thd
->
row_count_func
=
0
;
res
=
sp
->
execute_procedure
(
thd
,
&
lex
->
value_list
);
res
=
sp
->
execute_procedure
(
thd
,
&
lex
->
value_list
);
thd
->
variables
.
select_limit
=
select_limit
;
thd
->
variables
.
select_limit
=
select_limit
;
...
...
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