Detecting Logic Bugs of Join Optimizations in DBMS
Xiu Tang, Sai Wu, Dongxiang Zhang, Feifei Li, Gang Chen

TL;DR
This paper introduces TQS, a novel testing framework that effectively detects logic bugs in join optimization of DBMSs by generating multi-table queries with ground-truth verification, significantly improving debugging capabilities.
Contribution
The paper presents TQS, a new framework with data-guided schema and knowledge-guided query exploration for detecting join-related logic bugs in multi-table queries.
Findings
Detected 115 bugs across four DBMSs within 24 hours.
Effectively generates ground-truth query-result pairs for multi-table joins.
Successfully identified numerous logic bugs in industry-grade database systems.
Abstract
Generation-based testing techniques have shown their effectiveness in detecting logic bugs of DBMS, which are often caused by improper implementation of query optimizers. Nonetheless, existing generation-based debug tools are limited to single-table queries and there is a substantial research gap regarding multi-table queries with join operators. In this paper, we propose TQS, a novel testing framework targeted at detecting logic bugs derived by queries involving multi-table joins. Given a target DBMS, TQS achieves the goal with two key components: Data-guided Schema and Query Generation (DSG) and Knowledge-guided Query Space Exploration (KQE). DSG addresses the key challenge of multi-table query debugging: how to generate ground-truth (query, result) pairs for verification. It adopts the database normalization technique to generate a testing schema and maintains a bitmap index for…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Advanced Database Systems and Queries · Software System Performance and Reliability
