Tips on debugging stored programs

Debugging a stored program can be tricky in MariaDB. There are several reasons. The most obvious is that MariaDB does not have any native debug API. Some debuggers exist, but they use dirty techniques to emulate the debugger process. Some of them parse the stored programs code and transparently add some statements that emulate a checkpoint, or keep track of the call stack, or return information to the debugger. This technique heavily modifies the code, thus it is not always reliable. Other debuggers execute the code internally to be able to implement debugging features. However, they cannot reproduce the exact behavior of MariaDB and MySQL in all circumstances, especially if you consider that several versions ...

Get Mastering MariaDB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.