List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:January 1 2002 3:35pm
Subject:How to debug?
View as plain text  

>>>>> "Sri" == Sri  <lakshmi@stripped> writes:

Sri> 	Sorry to ask you this silly question.
Sri> But how can we put debugging statements while developing mysql.
Sri> I tried to look at my_printf_error function. But couldn't understand
Sri> anything. 

Sri> 	If possible please tell me how to send error or debugging messages
Sri> to the client or to any log file.

Sri> Thanking you in anticipation.
Sri> Srilakshmi.

The best way to do this is to use the DBUG_PRINT syntax.

DBUG_PRINT("SRI",("normal printf statement: %s","hello"));

To use the print statement, you just have to start mysqld as follows:

mysqld --debug

You can find all your print statement (and a LOT of other useful
ones) in /tmp/mysqld.trace

If you just want to see yours, you can do:

mysqld --debug=d,SRI

Please read more about this in the MySQL manual under 'Creating trace
files' section!


For technical support contracts, goto
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Michael Widenius <monty@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
How to debug?Sri1 Jan
  • Re: How to debug?Sri1 Jan
  • How to debug?Michael Widenius2 Jan