Skip to main content
This guide covers GDB debugging, running the server test suite, and contributing to VillageSQL. Start with Build from Source to get a working build before using this guide.

Debugging with GDB

For development and troubleshooting, you can run VillageSQL under GDB: Linux:
macOS:
Inside GDB:
Common GDB commands for MySQL debugging:

Running Tests

VillageSQL includes both unit tests and regression tests to verify functionality.

Unit Tests

Run VillageSQL-specific unit tests (from within your build directory):
Or run all unit tests:

Regression Tests

Change to the mysql-test directory:
Run the full MySQL test suite (slow):
Run VillageSQL-specific tests only:
Run VillageSQL tests including all sub-suites:
—suite vs —do-suite:
  • --suite=villagesql runs only top-level villagesql tests
  • --do-suite=villagesql runs all tests including sub-suites (insert, select, stored_procedure, etc.)

Running Individual Tests

Run a specific test by name:
Run a test from a sub-suite:

Updating Test Results

If you’ve changed functionality and need to update expected test output:
Test Recording: Always review changes to .result files to ensure they reflect intended behavior, not bugs. The --record flag blindly overwrites expected output.

Test Portability

When test output includes paths from the test runner’s temp directory, add this directive inside your .test file so recorded results don’t contain absolute paths that break on other machines:

Debugging Test Failures

VillageSQL-specific log messages (emitted via LogVSQL()) are suppressed by default. To surface them in the error log during a test run:
The full error log is at mysql-test/var/log/mysqld.1.err. For writing extension regression tests, see the Development Guide.

Installing Binaries

To install VillageSQL system-wide (requires appropriate permissions):
This installs binaries to /usr/local/mysql/ by default. You can customize the installation prefix:

Contributing

If you’re contributing to VillageSQL, please see the contributing guidelines for coding standards and development workflows.