jamieb
jamieb

Reputation: 10033

How to print messages from MySQL for debugging purposes?

I'm more of a MS-SQL / PostgreSQL guy, but I'm working on a MySQL project. In one of my sprocs (functions) I would like to simply output the value of a variable at runtime for debugging purposes.

With PostgreSQL, this is done using RAISE NOTICE. This there an equivalent method in MySQL?

Upvotes: 2

Views: 11741

Answers (2)

Veger
Veger

Reputation: 37905

This is not available for MySQL.

But you can create something similar yourself by storing debugging values in a separate table as this article describes.

Upvotes: 1

Jon Black
Jon Black

Reputation: 16559

MySQL procs are in their infancy compared to most modern RDBMS. You'll have to use the poor Man's debugging approach - select var from dual where applicable.

Upvotes: 0

Related Questions