Had this pop up this week and thought this would be a good tip. Replication had stopped working between the two databases, all of a sudden, no changes had been made at all said the developers!!.
When looking at the slave by typing
show slave status\G;
It showed the above error but had the database and function names, and that replication was quite a bit behind.
So from there I used the following to check the functions on the primary database.
use database_name; SHOW FUNCTION STATUS;
This showed the functions has just been created the day before, this caused the replication to crash. If this case the functions were on the primary but not the standby. I got a copy of two pieces of code and done the following
stop slave; \. filename1.sql \. filename2.sql start slave;
After this when I done show slave status again, I could see that the replication had no more errors, and could see the replication was so many seconds behind, it only took about an hour to catch up the 20 plus hours it has been down for.
I am always interested in feedback so please feel free to add any comments, or you can mail me here. If you would like to submit a quick tip with full credit and links back to your site then also feel free to contact me.