Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\48679025\AppData\Roaming\MySQL\Workbench\log\wb.log]
I am running the following code,
`Use employees;
COMMIT;
DELIMITER $$
CREATE TRIGGER before_salaries_insert
BEFORE INSERT ON salaries
FOR EACH ROW
BEGIN
IF NEW.salary < 0 THEN
SET NEW.salary = 0;
END IF;
END$$
DELIMITER ;`
The query looks okay but when I run it, it takes 30 secs and then the error is displayed. I tried changing the timeout limit but nothing changed.
How to repeat:
CREATE TRIGGER before_salaries_insert
BEFORE INSERT ON salaries
FOR EACH ROW
BEGIN
IF NEW.salary < 0 THEN
SET NEW.salary = 0;
END IF;
END$$
DELIMITER ;`
The query looks okay but when I run it, it takes 30 secs and then the error is displayed. I tried changing the timeout limit but nothing changed.