Skip to content
FalconTechDevPublic

About

Same SQL, different results: MySQL, MariaDB, PostgreSQL, SQL Server (measured in Docker)

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

sql-traps

Queries that look the same but return different results on MySQL, MariaDB, PostgreSQL and SQL Server. Every result in the matrix comes from actually running the query in Docker; engine versions and run time are stored with it.

Run

docker compose up -d
python -m venv .venv && .venv/bin/pip install -r requirements.txt   # Windows: .venv\Scripts\pip
.venv/bin/python runner/runner.py      # writes results/results.json
.venv/bin/python runner/matrix.py      # results/matrix.md
.venv/bin/python runner/site.py        # site/index.html
.venv/bin/pytest -q tests

Note: the SQL Server image needs ACCEPT_EULA=Y (set in docker-compose.yml, Developer edition); the compose passwords are throwaway local test values.

Trap format

traps/<id>.yaml: setup, cases (name + sql), teardown, then explanation and sources (URL + date checked). Claims without a verified source are marked "not checked".

Status (2026-10-18)

30 traps, 4 engines (versions in results/results.json). Most explanations are observations from the run; only those with a linked, fetched doc page cite it, the rest say "docs: not checked". Controls with no divergence: count-star-vs-col, distinct-null, window-default-frame, not-in-null. Not done: green CI on GitHub (Actions is disabled for the account), Pages deploy, release tag.

About

Same SQL, different results: MySQL, MariaDB, PostgreSQL, SQL Server (measured in Docker)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages