MySQL: Insert delayed gotcha within stored procedures

There are many restrictions on stored routines and triggers. However it turned out though a query is fallen under the restrictions it may not cause an error message but simply work a different way. So developers may not be aware that their queries do not work as expected.

For example, inserts cannot be delayed within stored procedures BUT INSERT DELAYED syntax is accepted. The statement is handled as a normal INSERT though.

Working on the task which involved high insert load, we debated either utilize delayed insert or regular one. Later it turned out that delayed insert was not even an option. Thus stay on guard and don’t let MySQL to confuse you. 🙂

No Comment

No comments yet

Leave a reply