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:
DBUG_ENTER("get_tty_password");
at the start of a routine, and this line:
DBUG_RETURN(my_strdup(to,MYF(MY_FAE)));
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