You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create two tables t_ test1、t_ test2, the storage engine is tianmu, and then create triggers to intsert data to table t_test1, the data is synchronized to table t_test2. When the insert is executed, the database instance crashes. When the tables are stored in InnoDB, there is no such failure.
Expected behavior
insert success
How To Reproduce
CREATE TABLE t_test1(
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(10) NOT NULL,
last_name VARCHAR(10) NOT NULL,
sex VARCHAR(5) NOT NULL,
score INT NOT NULL,
copy_id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=stonedb;
CREATE TABLE t_test2(
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(10) NOT NULL,
last_name VARCHAR(10) NOT NULL,
sex VARCHAR(5) NOT NULL,
score INT NOT NULL,
copy_id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=stonedb;
DELIMITER //
create trigger insert_trigger_t_test2 after insert on
t_test1
for each row
BEGIN
insert into test.t_test2(id,first_name,last_name,sex,score,copy_id) VALUES(new.id,new.first_name,new.last_name,new.sex,new.score,new.copy_id);
end //
DELIMITER ;
insert into t_test1 values(1,'张','三','1',100,1);
Environment
centos 7.9
Are you interested in submitting a PR to solve the problem?
Yes, I will!
The text was updated successfully, but these errors were encountered:
After checking the code, it was found that after auto-commit was turned on, the transaction could not be registered at the session level, but only at the statement level, and here we can refer to the processing flow of mysql 5.7 (innodb).
Describe the problem
Create two tables t_ test1、t_ test2, the storage engine is tianmu, and then create triggers to intsert data to table t_test1, the data is synchronized to table t_test2. When the insert is executed, the database instance crashes. When the tables are stored in InnoDB, there is no such failure.
Expected behavior
insert success
How To Reproduce
CREATE TABLE t_test1(
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(10) NOT NULL,
last_name VARCHAR(10) NOT NULL,
sex VARCHAR(5) NOT NULL,
score INT NOT NULL,
copy_id INT NOT NULL,
PRIMARY KEY (
id
)) ENGINE=stonedb;
CREATE TABLE t_test2(
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(10) NOT NULL,
last_name VARCHAR(10) NOT NULL,
sex VARCHAR(5) NOT NULL,
score INT NOT NULL,
copy_id INT NOT NULL,
PRIMARY KEY (
id
)) ENGINE=stonedb;
DELIMITER //
create trigger insert_trigger_t_test2 after insert on
t_test1
for each row
BEGIN
insert into test.t_test2(id,first_name,last_name,sex,score,copy_id) VALUES(new.id,new.first_name,new.last_name,new.sex,new.score,new.copy_id);
end //
DELIMITER ;
insert into t_test1 values(1,'张','三','1',100,1);
Environment
centos 7.9
Are you interested in submitting a PR to solve the problem?
The text was updated successfully, but these errors were encountered: