I created a trigger which throws an error whenever new entry is stored. Here is the trigger:
CREATE TRIGGER `htmlid` BEFORE INSERT ON `makelist_food`
FOR EACH ROW BEGIN
IF (NEW.html_id IS NULL) THEN
INSERT INTO makelist_food SET html_id = CONCAT('f', NEW.id);
END IF;
END
And the error is: #1442 - Can't update table 'makelist_food' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
There are many discussions out there about this error but I haven't found any solution or workaround. Here is an answer from 2010 stackoverflow.com/questions/1582683/mysql-trigger-stored-trigger-is-already-used-by-statement-which-invoked-stored-t which states that this is simply not supported in MySQL.
Since this is more than 2 years old answer I was wondering if SO knows some workaround for this problem. I couldn't find any.