Reproduce “Testing Database Engines via Query Plan Guidance” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Jinsheng Ba, Manuel Rigger

Query Plan Guidance (QPG) introduces a black-box methodology for automated database management system (DBMS) testing by leveraging query plans to guide test case generation. This approach uncovered 53 unique, previously unknown bugs, including long-standing issues in SQLite, TiDB, and CockroachDB, by exploring more diverse and complex execution paths.

Key insights

  • Query plans provide a robust, black-box metric for guiding automated testing of stateful DBMSs, effectively steering test generation towards diverse and potentially more complex internal execution behaviors.
  • Mutating the database state, influenced by MAB-guided selection of DDL/DML operations, is a highly effective strategy to induce new query plans while preserving the validity of queries for logic bug oracles.
  • Many previously discovered logic bugs were associated with relatively simple query plans, suggesting that more intricate and deeper bugs are often hidden in scenarios requiring significantly more complex execution paths.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.