Creating Trace Files - Oracle 5.0 Reference Manual

Hello, I am your AI assistant. How can I help you?
Table of Contents

Advertisement

21.3.1.1. Compiling MySQL for Debugging
If you have some very specific problem, you can always try to debug MySQL. To do this you must
configure MySQL with the
check whether MySQL was compiled with debugging by doing:
flag is listed with the options then you have debugging enabled.
version as
mysqld
If you are using gcc, the recommended
CC=gcc CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors \
-fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql \
--with-debug --with-extra-charsets=complex
This avoids problems with the
problems with C++ exceptions in threaded code) and compile a MySQL version with support for all
character sets.
If you suspect a memory overrun error, you can configure MySQL with
which installs a memory allocation (SAFEMALLOC) checker. However, running with
is quite slow, so if you get performance problems you should start
safemalloc
free().
If
stops crashing when you compile it with
mysqld
a compiler bug or a timing bug within MySQL. In this case, you can try to add
variables above and not use
CXXFLAGS
to it with
gdb
When you configure MySQL for debugging you automatically enable a lot of extra safety check
functions that monitor the health of mysqld. If they find something "unexpected," an entry is written
to stderr, which
unexpected problems with MySQL and are using a source distribution, the first thing you should do is to
configure MySQL for debugging! (The second thing is to send mail to a MySQL mailing list and ask for
help. See
Section 1.6.1, "MySQL Mailing
the instructions at
In the Windows MySQL distribution,
See also
Section 21.3.1.2, "Creating Trace

21.3.1.2. Creating Trace Files

If the
mysqld
file to find the problem.
To do this, you must have a
this by executing
trace files. (On Windows, the debugging server is named
MySQL 4.1.)
Start the
mysqld
Windows:
shell>
mysqld --debug
On Windows, you should also use the
console window, use this command:
C:\>
mysqld-debug --debug --standalone
After this, you can use the
the problem. You can stop the
Debugging a MySQL Server
--with-debug
mysql ... --debug
libstdc++
[421]
option. This disables the memory overrun checks for each call to
or use
on the core file to find out what happened.
gdb
directs to the error log! This also means that if you are having some
mysqld_safe
Section 1.7, "How to Report Bugs or
server doesn't start or if you can cause it to crash quickly, you can try to create a trace
mysqld
-V. If the version number ends with -debug, it is compiled with support for
mysqld
server with a trace log in
mysql.exe
mysqld
[122]
or the
--with-debug=full
in this case.
line is:
configure
library and with C++ exceptions (many compilers have
--with-debug
[122]. If
--with-debug
Lists". If you believe that you have found a bug, please use
Problems".
is by default compiled with support for trace files.
mysqld.exe
Files".
that has been compiled with debugging support. You can check
mysqld-debug
/tmp/mysqld.trace
[421]
--standalone
command-line tool in a second console window to reproduce
server with
mysqladmin
2822
[122]
--help. If the
mysqld
mysqladmin ver
--with-debug=full
SAFEMALLOC
with the
mysqld
[122], you probably have found
to the
-g
dies, you can at least attach
mysqld
rather than
on Unix or
C:\mysqld.trace
flag to not start
mysqld
shutdown.
option. You can
[405]
--debug
also lists the
[122],
--skip-
and
malloc()
and
CFLAGS
as of
mysqld
on
as a service. In a

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents