MySQL 5 Stored Procedures and INFORMATION_SCHEMA

A Handy One-Two Punch for Administrators

In writing Pro MySQL, I’ve become extremely excited about the new features debuting in MySQL 5—features that have already started to get thoroughly tested by the development community and have leveled MySQL with Oracle, SQL Server, and PostgreSQL on functional equivalencies long sought-after by developers and administrators.

I figured, partly in response to Arjen Lentz’ call to action, I’d write about two of these functional areas in this article: stored procedures and the INFORMATION_SCHEMA virtual database. Both features are detailed thoroughly in Pro MySQL, Chapters 9 and 21, respectively, but I wanted to do a quick article combining these two features into a practical example of MySQL 5 functionality.

When I worked for RadioShack, a Microsoft shop, we used stored procedures and MS SQL Server’s INFORMATION_SCHEMA views all the time. Since making the move to MySQL, I’ve missed these two features sorely. Well, now the wait’s over.