My current process for debugging stored procedures is very simple. I create a table called "debug" where I insert variable values from the stored procedure as it runs. This allows me to see the value of any variable at a given point in the script, but is there a better way to debug MySQL stored procedures?
Mysql – How to debug MySQL stored procedures
databasedebuggingMySQLstored-procedures
Related Topic
- Sql – Insert results of a stored procedure into a temporary table
- Mysql – List of Stored Procedures/Functions Mysql Command Line
- Javascript – How to debug Node.js applications
- Mysql – How to add indexes to MySQL tables
- Php – Reference – What does this error mean in PHP
- Mysql – How to import an SQL file using the command line in MySQL
Best Answer
The following
debug_msg
procedure can be called to simply output a debug message to the console:Then run the test like this:
It will result in the following output: