Documentation Home
MySQL Internals Manual
Download this Manual
EPUB - 0.8Mb

MySQL Internals Manual  /  ...  /  The dbug Directory

A.1.5 The dbug Directory

Fred Fish's dbug library.

This is not really part of the MySQL package. Rather, it's a set of public-domain routines which are useful for debugging MySQL programs. The MySQL Server and all .c and .cc programs support the use of this package.

How it works: One inserts a function call that begins with DBUG_* in one of the regular MYSQL programs. For example, in get_password.c, you will find this line:


at the start of a routine, and this line:


at the end of the routine. These lines don't affect production code. Features of the dbug library include extensive reporting and profiling (the latter has not been used by the MySQL team).

The C programs in this directory are:

  • dbug.c --- The main module

  • dbug_analyze.c --- Reads a file produced by trace functions

  • example1.c --- A tiny example

  • example2.c --- A tiny example

  • example3.c --- A tiny example

  • factorial.c --- A tiny example

  • main.c --- A tiny example

  • my_main.c --- MySQL-specific main.c variant

  • sanity.c --- Declaration of a variable

Download this Manual
EPUB - 0.8Mb
User Comments
Sign Up Login You must be logged in to post a comment.