Skip to content

Contributing

Xyranaut edited this page Jun 1, 2026 · 1 revision

Contributing

Thanks for wanting to help! omp-MySQL is open source (MIT). Bug reports, docs fixes, and code contributions are all welcome.

Reporting a bug

Open an issue: https://github.com/Mac-Andreas/omp-MySQL/issues — please include:

  • omp-MySQL version (printed on server start, or /mysql version).
  • MySQL server version and OS.
  • The smallest code that reproduces it.
  • The [omp-MySQL] debug log (mysql_debug(true)), and mysql_errno/mysql_error output if a call failed.

A clear repro is the fastest path to a fix.

Security issues

If you find a security problem (injection, auth bypass, etc.), please report it privately first (open a minimal issue asking for a contact, or use the repo's security advisory feature) rather than posting a full exploit publicly. See Security for what's already covered.

Building & testing

See Building for per-OS builds. Quick dev loop on macOS:

git clone --recurse-submodules https://github.com/Mac-Andreas/omp-MySQL
cd omp-MySQL
cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build
# drop build/omp-mysql.dylib into a macOS dev server's components/

Run the test tooling before submitting changes that touch the query paths:

cd testscripts
./feature_sweep.sh 9.2 8.4 8.0 5.7     # spins each MySQL in Docker, runs feature_probe
cat feature-matrix.txt

And, on macOS, an AddressSanitizer pass (see Building).

Pull requests

  • Keep changes focused; one logical change per PR.
  • Match the existing code style (the repo's C++ is fairly consistent — follow the surrounding file).
  • Update the docs/wiki and omp-mysql.inc comments when you change behavior or add a native.
  • Note in the PR what you tested (MySQL versions, platforms, sanitizers).
  • The CI (.github/workflows/build.yml) must pass (Windows + Linux builds).

Adding a native

  • Implement it in src/natives.cpp. Classic variadic natives (those taking a callback[]/format[]/... tail) read the first arg at params[1] and must amx_GetAddr-dereference variadic values — follow the existing natives exactly.
  • SCRIPT_API natives are simpler — use them when there's no variadic tail.
  • Declare it in include/omp-mysql.inc with a doc comment.
  • Add it to the Native reference.

Docs-only contributions

The wiki lives in its own git repo (https://github.com/Mac-Andreas/omp-MySQL.wiki.git). Typos, clearer wording, and new examples are very welcome — open an issue or PR-style suggestion.

License

By contributing you agree your contribution is licensed under the project's MIT license.

Clone this wiki locally