EUVIMEDOpdag EUVIMED
Crossref

SRS: Detecting Logic Bugs of Join Implementation in DBMSs via Set Relation Synthesis

Jinhui Lai, Chi Zhang, Bingyan Li, Chenglin Liang, Jie Liang, Zhiyong Wu, Jingzhou Fu, Yu Jiang, Zichen Xu

Proceedings of the ACM on Management of Data · 2025-12-04 · 3 (6) · 1-24

DOI: 10.1145/3769828 ↗

At a glance

Journal article in Proceedings of the ACM on Management of Data, published online on 2025-12-05. Written by Jinhui Lai and 8 co-authors. Cited 5 times so far (Crossref); 33 references.

AbstractBibliografiske oplysningerCiteRelated studies

Abstract (original language)

Logic bugs can cause DBMSs to silently produce incorrect results for a given query, posing significant threats to software reliability and remaining challenging to detect. Join is a fundamental operation in DBMSs, enabling the combination of data from multiple tables; however, due to its complexity, it is also susceptible to logic bugs. Existing works detect logic bugs in join optimizations by altering query hints and system variables to alter the optimizer's choice of execution plans. However, these approaches struggle to detect logic bugs when query hints or system variables fail to influence the optimizer's behavior, or when the logic bugs reside in join implementation code that is unrelated to optimization. In this paper, we present S et R elation S ynthesis (SRS), a black-box testing approach that detects logic bugs of join implementation in DBMSs by leveraging set relations among different join operations. SRS applies transformations to the original join queries, including modifications to join types, join orders, and join conditions, while ensuring that the outputs of both the original and transformed queries preserve the expected set relations. Violations of these set relations indicate potential logic bugs. We realized SRS and evaluated it on five widely-used and extensively-tested DBMSs: MySQL, MariaDB, TiDB, PostgreSQL, and DuckDB. SRS uncovered 33 previously unknown and unique bugs, all of which have been confirmed, with 12 already fixed. Among these, 33 are logic bugs, demonstrating SRS's effectiveness and practicality in detecting logic bugs in the implementation of join operations within DBMSs.

Cite

APA

Lai, J., Zhang, C., Li, B., Liang, C., Liang, J., Wu, Z., Fu, J., Jiang, Y., & Xu, Z. (2025). SRS: Detecting Logic Bugs of Join Implementation in DBMSs via Set Relation Synthesis. Proceedings of the ACM on Management of Data, 3(6), 1-24. https://doi.org/10.1145/3769828

Vancouver

Lai J, Zhang C, Li B, Liang C, Liang J, Wu Z, et al. SRS: Detecting Logic Bugs of Join Implementation in DBMSs via Set Relation Synthesis. Proceedings of the ACM on Management of Data. 2025;3(6):1-24. doi:10.1145/3769828

BibTeX
@article{Lai2025,
  author = {Lai, Jinhui and Zhang, Chi and Li, Bingyan and Liang, Chenglin and Liang, Jie and Wu, Zhiyong and Fu, Jingzhou and Jiang, Yu and Xu, Zichen},
  title = {SRS: Detecting Logic Bugs of Join Implementation in DBMSs via Set Relation Synthesis},
  journal = {Proceedings of the ACM on Management of Data},
  year = {2025},
  volume = {3},
  number = {6},
  pages = {1--24},
  doi = {10.1145/3769828}
}
Start for free →