How I Typically Compile MySQL and Run a Single Test Case in Linux
  1. Make sure I'm not root
  2. Start with a freshly untarred MySQL distribution
  3. Change to the base directory for the distribution
  4. Build using the command: ./compile-amd64-debug-max
  5. Change to the mysql-test directory: cd mysql-test
  6. Run a test case: ./ log_tables

If the test succeeds, I'm done. If it fails, check the files:

  1. t/log_tables.test
  2. r/log_tables.result
  3. r/log_tables.reject
  • The test is in the "test" file
  • The expected results are in the "result" file
  • The actual results are in the "reject" file

Diff the result and the reject to see see the expected versus actual output.

To repeat with the gdb debugger, add the —gdb option to

./ —gdb log_tables

A gdb session will open in an X window and stop in the mysql_parse() function in the file sql/