stonedb
stonedb copied to clipboard
bug: incorrect result set.Before delete trigger,Does not take effect
Describe the problem
create table t1 (i int)engine=tianmu;
insert into t1 values (1),(2),(3),(4);
create trigger trg before delete on t1 for each row
set @del_sum:= @del_sum + old.i;
set @del_sum:= 0;
delete from t1 where i <= 3;
select @del_sum;
##Incorrect test results
select @del_sum;
+----------+
| @del_sum |
+----------+
| 0 |
+----------+
drop trigger trg;
drop table t1;
Expected behavior
#Correct test results(note:Innodb test verification, test results are as follows)
mysql> select @del_sum;
+----------+
| @del_sum |
+----------+
| 6 |
+----------+
1 row in set (0.00 sec)
How To Reproduce
Follow the test steps above
Environment
./mysqld Ver 5.7.36_v1.0.1_beta-StoneDB for Linux on x86_64 (build-)
build information as follow:
Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
Branch name: stonedb-5.7-dev
Last commit ID: 208f79d
Last commit time: Date: Sat Sep 17 16:19:42 2022 +0800
Build time: Date: Sat Sep 17 17:59:04 CST 2022
Are you interested in submitting a PR to solve the problem?
- [ ] Yes, I will!
ACK
The same problem as #580, has been fixed in #647.
Regression tests passed