diff options
author | unknown <pem@mysql.com> | 2005-11-23 11:56:53 +0100 |
---|---|---|
committer | unknown <pem@mysql.com> | 2005-11-23 11:56:53 +0100 |
commit | b118282377a7b80b8d50b996d896bd5424d5d52e (patch) | |
tree | 7ca8eb3c54bc1d029f63f069d01992739288eb36 /mysql-test/r/sp_trans.result | |
parent | 0026b6f46e550ff8f8c874f55272d15f4a19f3ac (diff) | |
download | mariadb-git-b118282377a7b80b8d50b996d896bd5424d5d52e.tar.gz |
Fixed BUG#13729 Stored procedures: packet error after exception handled
Don't set thd->is_fatal_error in sql_update for duplicate key errors.
mysql-test/r/sp.result:
New test case for BUG#13729.
mysql-test/r/sp_trans.result:
New test case for BUG#14840.
mysql-test/t/sp.test:
New test case for BUG#13729.
mysql-test/t/sp_trans.test:
New test case for BUG#14840.
sql/sql_update.cc:
Don't set thd->is_fatal_error if it's a duplicate key error.
Diffstat (limited to 'mysql-test/r/sp_trans.result')
-rw-r--r-- | mysql-test/r/sp_trans.result | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index bb742d0d3d7..8f2bd9985fc 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -369,3 +369,59 @@ drop procedure bug13825_0| drop procedure bug13825_1| drop procedure bug13825_2| drop table t1, t2| +drop table if exists t3| +drop procedure if exists bug14840_1| +drop procedure if exists bug14840_2| +create table t3 +( +x int, +y int, +primary key (x) +) engine=InnoDB| +create procedure bug14840_1() +begin +declare err int default 0; +declare continue handler for sqlexception +set err = err + 1; +start transaction; +update t3 set x = 1, y = 42 where x = 2; +insert into t3 values (3, 4711); +if err > 0 then +rollback; +else +commit; +end if; +select * from t3; +end| +create procedure bug14840_2() +begin +declare err int default 0; +declare continue handler for sqlexception +begin +set err = err + 1; +select err as 'Ping'; +end; +update t3 set x = 1, y = 42 where x = 2; +update t3 set x = 1, y = 42 where x = 2; +insert into t3 values (3, 4711); +select * from t3; +end| +insert into t3 values (1, 3), (2, 5)| +call bug14840_1()| +x y +1 3 +2 5 +delete from t3| +insert into t3 values (1, 3), (2, 5)| +call bug14840_2()| +Ping +1 +Ping +2 +x y +1 3 +2 5 +3 4711 +drop procedure bug14840_1| +drop procedure bug14840_2| +drop table t3| |