Bug #31561 Loose old value using an after delete trigger (funcs_1.falcon_trig_09.test)
Submitted: 12 Oct 2007 9:41 Modified: 4 Aug 2009 6:43
Reporter: Horst Hunger Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S2 (Serious)
Version:6.0.4-alpha-debug OS:Linux (Suse 10.2)
Assigned to: Alexander Nozdrin CPU Architecture:Any
Tags: pb2, test failure

[12 Oct 2007 9:41] Horst Hunger
Description:
Differences in results of falcon_trig_09.test. 
The old value seems to get lost when using a after delete trigger.
see attached test program containing a short version to reproduce the behaviour.

How to repeat:
execute the attached test program.
[18 Oct 2007 22:10] Kevin Lewis
Calvin,  This looks like a problem with triggers.
[23 Oct 2007 22:40] Sveta Smirnova
Thank you for the report.

Verified as described using attached test case. In my case variable seems to have garbage value:

create database test_d1;
use test_d1;
create table t1 (c1 int, c2 text) engine=falcon;
insert into t1 values (1,'das ist ein text');
Create trigger trig_t1_bd before delete on t1 for each row
set @tr_var_b_c2=old.c2;
Create trigger trig_t1_ad after delete on t1 for each row
set @tr_var_a_c2=old.c2;
delete from t1 where c2='das ist ein text';
select * from t1 order by c1;
c1      c2
select  @tr_var_b_c2;
@tr_var_b_c2
das ist ein text
select  @tr_var_a_c2;
@tr_var_a_c2
îîîîîîîîîîîîîîîî
drop database test_d1;
create database test_d1;
use test_d1;
create table t1 (c1 int, c2 text) engine=innodb;
Warnings:
Warning 1286    Unknown table engine 'innodb'
Warning 1266    Using storage engine MyISAM for table 't1'
insert into t1 values (1,'das ist ein text');
Create trigger trig_t1_bd before delete on t1 for each row
set @tr_var_b_c2=old.c2;
Create trigger trig_t1_ad after delete on t1 for each row
set @tr_var_a_c2=old.c2;
delete from t1 where c2='das ist ein text';
select * from t1 order by c1;
c1      c2
select  @tr_var_b_c2;
@tr_var_b_c2
das ist ein text
select  @tr_var_a_c2;
@tr_var_a_c2
das ist ein text
drop database test_d1;
[3 Aug 2009 17:04] Konstantin Osipov
Is this still present? Why is this bug "Open"?
[4 Aug 2009 6:43] Sveta Smirnova
Bug is not repeatable with current falcon-team tree.