views:

49

answers:

3

Hi,

Is there a way in MySQL to print debugging info - something like ...

  • 'print' in SQLServer
  • DBMS_OUTPUT.PUT_LINE in Oracle

Thanks.

A: 

I usually create log table with a stored procedure to log to it. The call the logging procedure wherever needed from the procedure under development.

Looking at other posts on this same question, it seems like a common practice, although there are some alternatives.

Rob Cooke
A: 

Dr Dobbs has a good article on debugging MySQL stored procedures which include logging.

Dr Dobbs Debugging MySQL Stored Procedures

RC
That helps a lot - thanks.
Peanut
A: 

I don't believe there is a command that is similar to this in MySQL (it would be useful)

One workaround is just to use select without any other clauses

http://lists.mysql.com/mysql/197901 is helpful

b8b8j