Bug #119027 Error 2013: Lost Connection to MySQL server during query
Submitted: 17 Sep 20:51
Reporter: Ayus Mitra Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server Severity:S7 (Test Cases)
Version:8.0.43 OS:Windows (Microsoft Windows 10 Enterprise)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[17 Sep 20:51] Ayus Mitra
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.