![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_16461962843.webp)
Debugging a MySQL Server
2823
The trace file can become very large! To generate a smaller trace file, you can use debugging options
something like this:
mysqld --debug=d,info,error,query,general,where:O,/tmp/mysqld.trace
This only prints information with the most interesting tags to the trace file.
If you make a bug report about this, please only send the lines from the trace file to the appropriate
mailing list where something seems to go wrong! If you can't locate the wrong place, you can open a
bug report and upload the trace file to the report, so that a MySQL developer can take a look at it. For
instructions, see
Section 1.7, “How to Report Bugs or Problems”
.
The trace file is made with the DBUG package by Fred Fish. See
Section 21.3.3, “The DBUG
Package”
.
21.3.1.3. Using
pdb
to create a Windows crashdump
Starting with MySQL 5.0.24 the Program Database files (extension
pdb
) are included in the Noinstall
distribution of MySQL. These files provide information for debugging your MySQL installation in the
event of a problem.
The PDB file contains more detailed information about
mysqld
and other tools that enables more
detailed trace and dump files to be created. You can use these with Dr Watson,
WinDbg
and Visual
Studio to debug
mysqld
.
For more information on PDB files, see
Microsoft Knowledge Base Article 121366
. For more
information on the debugging options available, see
Debugging Tools for Windows
.
Dr Watson is installed with all Windows distributions, but if you have installed Windows development
tools, Dr Watson may have been replaced with WinDbg, the debugger included with Visual Studio, or
the debugging tools provided with Borland or Delphi.
To generate a crash file using Dr Watson, follow these steps:
1. Start Dr Watson by running
drwtsn32.exe
interactively using the
-i
option:
C:\> drwtsn32 -i
2. Set the Log File Path to the directory where you want to store trace files.
3. Make sure Dump All Thread Contexts and Append To Existing Log File.
4. Uncheck Dump Symbol Table, Visual Notification, Sound Notification and Create Crash Dump
File.
5. Set the Number of Instructions to a suitable value to capture enough calls in the stacktrace. A
value of at 25 should be enough.
Note that the file generated can become very large.
21.3.1.4. Debugging
mysqld
under
gdb
On most systems you can also start
mysqld
from
gdb
to get more information if
mysqld
crashes.
With some older
gdb
versions on Linux you must use
run --one-thread
if you want to be able
to debug
mysqld
threads. In this case, you can only have one thread active at a time. It is best to
upgrade to
gdb
5.1 because thread debugging works much better with this version!
NPTL threads (the new thread library on Linux) may cause problems while running
mysqld
under
gdb
.
Some symptoms are:
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...