mirror of
https://github.com/MariaDB/server.git
synced 2025-11-25 17:25:02 +03:00
47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
drop table if exists t4|
|
|
create table t4 (
|
|
a mediumint(8) unsigned not null auto_increment,
|
|
b smallint(5) unsigned not null,
|
|
c char(32) not null,
|
|
primary key (a)
|
|
) engine=myisam default charset=latin1|
|
|
insert into t4 values (1, 2, 'oneword')|
|
|
insert into t4 values (2, 2, 'anotherword')|
|
|
drop table if exists t3|
|
|
create table t3 ( x int unique ) engine=pbxt|
|
|
create procedure bug7049_1()
|
|
begin
|
|
insert into t3 values (42);
|
|
insert into t3 values (42);
|
|
end|
|
|
create procedure bug7049_2()
|
|
begin
|
|
declare exit handler for sqlexception
|
|
select 'Caught it' as 'Result';
|
|
call bug7049_1();
|
|
select 'Missed it' as 'Result';
|
|
end|
|
|
create function bug7049_1()
|
|
returns int
|
|
begin
|
|
insert into t3 values (42);
|
|
insert into t3 values (42);
|
|
return 42;
|
|
end|
|
|
create function bug7049_2()
|
|
returns int
|
|
begin
|
|
declare x int default 0;
|
|
declare continue handler for sqlexception
|
|
set x = 1;
|
|
set x = bug7049_1();
|
|
return x;
|
|
end|
|
|
call bug7049_2()|
|
|
Result
|
|
Caught it
|
|
drop procedure bug7049_1|
|
|
drop function bug7049_1|
|
|
drop procedure bug7049_2|
|
|
drop function bug7049_2|
|