after creating tables with
CREATE TABLE test1(a1 INT);
CREATE TABLE test2(a2 INT);
CREATE TABLE test3(a3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
CREATE TABLE test4(
a4 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
b4 INT DEFAULT 0
);
and running the following sql query directly
delimiter |
CREATE TRIGGER testref BEFORE INSERT ON test1
FOR EACH ROW
BEGIN
INSERT INTO test2 SET a2 = NEW.a1;
DELETE FROM test3 WHERE a3 = NEW.a1;
UPDATE test4 SET b4 = b4 + 1 WHERE a4 = NEW.a1;
END;
|
delimiter ;
our apache webserver maxes out on cpu usage until it is exited which results in an internal server error. the same tests on the demo interface (latest stable + latest git) e.g. http://demo.phpmyadmin.net/STABLE/ results in import.php returning
<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.2.1</center>
</body>
</html>
after a few seconds
tested locally with versions 4.4.1.1 going downwards until 4.3.8. bevhaviour was always the same (100% cpu, internal server error from apache)
Possibly related to https://sourceforge.net/p/phpmyadmin/bugs/4829/
Fixed with https://github.com/phpmyadmin/phpmyadmin/commit/be47fbac53be8d86b8d3f116682c862a289c6d7a