Thursday, June 23, 2005
Runaway Daemon
Not another Julia movie but this is a disaster! Running MySQL 5 out of the box with default setting, this code means sudden death (both CPU and memory resources!):
Suggestions:
Implement a time-limit mechanism, which the administrator can enforce
Limited memory space (again, administrator enforced)
DROP FUNCTION IF EXISTS runaway;
delimiter //
CREATE FUNCTION runaway () RETURNS char(255)
BEGIN
DECLARE result CHAR(255);
SET result = "";
maddy: LOOP
SET result = CONCAT(result,'a');
ITERATE maddy;
END LOOP maddy;
RETURN result;
END
//
Suggestions:

