i have two mysql tables – employee and employee_log
i have written below trigger for it, intention is, what data is inserted in employee same data should be inserted in employee_log.
delimiter |
CREATE TRIGGER `emp`
AFTER INSERT ON `employee`
FOR EACH ROW
BEGIN
INSERT INTO employee_log (id,userId,firstname,lastname)
VALUES (NEW.id,NEW.userId,NEW.firstname,NEW.lastname);
END |
above trigger is executes well,
Now i have tried insert record in employee table it is giving me below error, i have no idea what went wrong here, please help ..
Error is -
#1436 - Thread stack overrun: 5848 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack.
try setting value of
thread_stackglobal variable to default value196608inmy.cnffile and then restart the MySQL server also try:I hope you find answer here: MySQL error 1436: Thread stack overrun, with simple query