EVOLUTION-MANAGER
Edit File: db397_update_trigger.result
set default_storage_engine='tokudb'; drop table if exists t1, t1_audit; create table t1 ( col1 int not null, col2 int not null, primary key (col1)); create table t1_audit ( col1 int not null, action varchar(32) not null, ts timestamp not null default now()); insert into t1 (col1,col2) values (0,0); insert into t1_audit (col1,action) values (0,'DUMMY'); set local tokudb_prelock_empty=0; create trigger t1_trigger before update on t1 for each row insert into t1_audit (col1, action) values (old.col1, 'BEFORE UPDATE'); insert into t1 (col1,col2) values (1,1); start transaction; update t1 set col2=1000 where col1 = 1; select col1,col2 from t1; col1 col2 0 0 1 1000 select col1,action from t1_audit; col1 action 0 DUMMY 1 BEFORE UPDATE select locks_dname,locks_key_left,locks_key_right from information_schema.tokudb_locks order by locks_dname,locks_key_left,locks_key_right; locks_dname locks_key_left locks_key_right ./test/t1-main 0001000000 0001000000 ./test/t1-main ff01000000 0101000000 ./test/t1_audit-main 0200000000000000 0200000000000000 commit; drop trigger t1_trigger; create trigger t1_trigger after update on t1 for each row insert into t1_audit (col1, action) values (old.col1, 'AFTER UPDATE'); insert into t1 (col1,col2) values (2,2); start transaction; update t1 set col2=1001 where col1 = 2; select col1,col2 from t1; col1 col2 0 0 1 1000 2 1001 select col1,action from t1_audit; col1 action 0 DUMMY 1 BEFORE UPDATE 2 AFTER UPDATE select locks_dname,locks_key_left,locks_key_right from information_schema.tokudb_locks order by locks_dname,locks_key_left,locks_key_right; locks_dname locks_key_left locks_key_right ./test/t1-main 0002000000 0002000000 ./test/t1-main ff02000000 0102000000 ./test/t1_audit-main 0300000000000000 0300000000000000 commit; drop trigger t1_trigger; drop table t1, t1_audit;