[Maria-developers] Regarding debugging MariaDB
Hi Alexander, I wanted to run mysqld in debug mode to check the trace file and get to know workflow of SQL commands. I tried following command mysqld --user=<username> --debug Then, after connecting I executed some commands. But, the trace file is not created in /tmp folder. Is there anything I need to do while building the source code in order for the debug mode to work? Thanks, Sriram
Hi Sriram, On 05/17/2014 10:00 AM, sriram patil wrote:
Hi Alexander,
I wanted to run mysqld in debug mode to check the trace file and get to know workflow of SQL commands. I tried following command
mysqld --user=<username> --debug
Then, after connecting I executed some commands. But, the trace file is not created in /tmp folder.
Is there anything I need to do while building the source code in order for the debug mode to work?
Make sure that you compile a debug binary rather than a release binary (which is default). I usually compile and install like this: cmake . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/mariadb-10.0 make make install The "-DCMAKE_BUILD_TYPE=Debug" part is responsible to enable a debug build. Note, you can check which version you're running by using this SQL query: SELECT VERSION(); In case of a debug build it will be: +-----------------------+ | version() | +-----------------------+ | 10.0.11-MariaDB-debug | +-----------------------+ and in case of a release build it will be just: +-----------------+ | version() | +-----------------+ | 10.0.10-MariaDB | +-----------------+ Note, before re-running cmake, it's usually a good idea to remove its cache file like this: rm CMakeCache.txt
Thanks, Sriram
participants (2)
-
Alexander Barkov
-
sriram patil