Wednesday 4 November 2020

How do you debug MySQL stored procedures?

 

I'll usually include a DEBUG param that defaults to false and I can set to true at run time. Then wrap the debug statements into an "If DEBUG" block.

I also use a logging table with many of my jobs so that I can review processes and timing. My Debug code gets output there as well. I include the calling param name, a brief description, row counts affected (if appropriate), a comments field and a time stamp.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive