2005-03-18 14:33:46 +01:00
|
|
|
drop procedure if exists bug8850|
|
2005-03-17 22:15:23 +01:00
|
|
|
create table t1 (a int) engine=innodb|
|
2005-03-18 14:33:46 +01:00
|
|
|
create procedure bug8850()
|
2005-03-17 22:15:23 +01:00
|
|
|
begin
|
|
|
|
truncate table t1; insert t1 values (1); rollback;
|
|
|
|
end|
|
2005-03-18 14:33:46 +01:00
|
|
|
set autocommit=0|
|
|
|
|
insert t1 values (2)|
|
|
|
|
call bug8850()|
|
2005-03-17 22:15:23 +01:00
|
|
|
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
2005-03-18 14:33:46 +01:00
|
|
|
commit|
|
|
|
|
select * from t1|
|
2005-03-17 22:15:23 +01:00
|
|
|
a
|
|
|
|
2
|
2005-03-18 14:33:46 +01:00
|
|
|
call bug8850()|
|
2005-03-17 22:15:23 +01:00
|
|
|
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
2005-03-18 14:33:46 +01:00
|
|
|
set autocommit=1|
|
|
|
|
select * from t1|
|
2005-03-17 22:15:23 +01:00
|
|
|
a
|
|
|
|
2
|
2005-03-18 14:33:46 +01:00
|
|
|
drop table t1|
|
|
|
|
drop procedure bug8850|
|