# # Bug #17598: privilege checks when trigger is executed. # DROP TABLE IF EXISTS t1; create user u1; GRANT CREATE ON test.* TO u1; # Change to user u1. create table t1 (c1 int); # Change to user root. create user u2; GRANT INSERT, TRIGGER ON test.t1 TO u2; # Change to user u2. # Create a trigger that updates the NEW pseudovariable. CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1 = 42; INSERT INTO t1 VALUES (1), (2), (3); SELECT * FROM t1; c1 42 42 42 # Change to user root. DROP TRIGGER tr1; DROP TABLE t1; DROP USER u1, u2;