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:macOS (lldb)
Run VillageSQL under lldb: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):Regression Tests
Change to the mysql-test directory:—suite vs —do-suite:
--suite=villagesql/insertruns one sub-suite--do-suite=villagesqlruns all tests including sub-suites (insert, select, stored_procedure, etc.)--nounit-testsskips the unit tests MTR would otherwise run alongside the suite. Those are upstream MySQL unit tests and include known failures; run the VillageSQL ones on their own with the Unit Tests commands above.
Running Individual Tests
Run a specific test by name:Updating Test Results
If you’ve changed functionality and need to update expected test output:Test Portability
When test output includes paths from the test runner’s temp directory, add this directive before each statement that prints one, so recorded results don’t contain absolute paths that break on other machines:Debugging Test Failures
VillageSQL-specific log messages (emitted viaLogVSQL()) are written to the error log at --log-error-verbosity=3, which MTR sets by default. To set the level for one run:
mysql-test/var/log/mysqld.1.err for a single-worker run. Under --parallel, each worker writes to mysql-test/var/<N>/log/mysqld.1.err instead.
For writing extension regression tests, see C++ Testing.
Installing Binaries
To install VillageSQL system-wide (requires appropriate permissions):/usr/local/mysql/ by default. You can customize the installation prefix:

