Hewlett-Packard has developed a tool for debugging stored procedures and functions written for MariaDB 5.5 or MySQL 5.5. MDBug consists of a low-level debugger (analogous to gdb) written in SQL, and a high-level Eclipse plugin GUI (analogous to ddd) written in Java. It's 100% open source -- licensed under GPL v2 with an Eclipse exception -- and has been tested on Linux and on Windows. MDBug supports breakpoints, conditions, variable display or setting, and other functionality that one would hope for in a complete debugging environment.