mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Fixed BUG#4905: Stored procedure doesn't clear for "Rows affected".
mysql-test/r/sp.result: New test case for BUG#4905 mysql-test/t/sp.test: New test case for BUG#4905 sql/sql_parse.cc: Reset row count before CALL.
This commit is contained in:
parent
f61034d721
commit
aaa54ac7e7
3 changed files with 56 additions and 0 deletions
|
|
@ -2056,6 +2056,35 @@ flush query cache|
|
|||
delete from t1|
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue