tags:

views:

23

answers:

3

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?

A: 

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.

f00
A: 

It looks like there are some options, but it's very limited: http://dev.mysql.com/doc/refman/5.1/en/declare-handler.html

Frank Heikens
A: 

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.

Veger