Hello people ... i face this problem when working with MySQL Server 5.0.45
I've creating a new database on this MySQL Server and create many routines (stored procedure and function). And when i renaming the database name then all my routines related to the database i renamed is gone. All is gone.
I try to find out manually on the MySQL information schema because all the routines of all database is stored there but i find nothing except the other routines for other database. This is terrible and do not let you face the same problem.
So, be careful to backup your MySQL routines (stored procedure and function) before renaming the database name. Hope this helps !