开发者

How to print messages from MySQL for debugging purposes?

开发者 https://www.devze.com 2022-12-25 04:34 出处:网络
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 debuggin

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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消