Skip to main content
This guide covers debugging, running the server test suite, and contributing to VillageSQL. It assumes a working source build — see Build from Source if you haven’t done that yet.

Debugging

VillageSQL server debugging uses GDB on Linux and lldb on macOS. GDB on macOS requires code signing, which is painful to set up — lldb is the standard macOS debugger and works out of the box.

Linux (GDB)

Run VillageSQL under GDB:
Inside GDB:
Common GDB commands:

macOS (lldb)

Run VillageSQL under lldb:
Inside lldb:
Common lldb commands:

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.