E.2. Debugging a MySQL Client

MySQL 5.0

E.2. Debugging a MySQL Client

To be able to debug a MySQL client with the integrated debug package, you should configure MySQL with or . See Section 2.9.2, “Typical configure Options”.

Before running a client, you should set the environment variable:

shell> 
shell> 

This causes clients to generate a trace file in .

If you have problems with your own client code, you should attempt to connect to the server and run your query using a client that is known to work. Do this by running mysql in debugging mode (assuming that you have compiled MySQL with debugging on):

shell> 

This provides useful information in case you mail a bug report. See Section 1.8, “How to Report Bugs or Problems”.

If your client crashes at some 'legal' looking code, you should check that your include file matches your MySQL library file. A very common mistake is to use an old file from an old MySQL installation with new MySQL library.