EUVIMEDEUVIMED entdecken
Crossref

Detecting Logic Bugs in DBMSs via Equivalent Data Construction

Wenqian Deng, Jie Liang, Zhiyong Wu, Jingzhou Fu, Yu Jiang

Proceedings of the ACM on Management of Data · 04.12.2025 · 3 (6) · 1-25

DOI: 10.1145/3769779 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the ACM on Management of Data, online erschienen am 05.12.2025. Verfasst von Wenqian Deng und 4 weiteren Autor:innen. Die Arbeit wurde bisher 2-mal zitiert (Crossref) und nennt 53 Literaturangaben.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Database Management Systems (DBMS) perform various data operations such as arithmetic calculations and string manipulations when executing SQL queries. These operations are complex due to the wide range of data types and the intricate interactions between different data. Consequently, errors in implementing these data operations can lead to logic bugs, potentially causing issues such as implicit type coercion, overflow, and precision loss. Existing logic bug detection methods primarily focus on issues introduced during query optimization by adapting query-level strategies. However, these methods have limitations when it comes to detecting logic bugs caused by implementation errors in data types and operations. To address this, we propose equivalent data construction (EDC), a novel approach to detect logic bugs in data operation implementations within DBMSs. The core insight is that for data operation expressions in SQL queries, substituting them with precomputed result values should yield identical query outcomes. EDC mainly involves the following steps: first, construct equivalent data for an operation by calculating and storing the results in a derived equivalent table; then, transform the query by replacing the operation expressions with the precomputed results from the equivalent table. Any inconsistencies between the results of the base and transformed queries indicate potential logic bugs. We implemented EDC and evaluated it on six well-tested and widely-used DBMSs(e.g.,MySQL, MariaDB). Our evaluation revealed 52 previously unknown bugs, of which 38 have been confirmed by developers. Developers took these findings seriously. For example, MariaDB developers described our findings as counterintuitive, helping them uncover more issues related to data operations.

Zitieren

APA

Deng, W., Liang, J., Wu, Z., Fu, J., & Jiang, Y. (2025). Detecting Logic Bugs in DBMSs via Equivalent Data Construction. Proceedings of the ACM on Management of Data, 3(6), 1-25. https://doi.org/10.1145/3769779

Vancouver

Deng W, Liang J, Wu Z, Fu J, Jiang Y. Detecting Logic Bugs in DBMSs via Equivalent Data Construction. Proceedings of the ACM on Management of Data. 2025;3(6):1-25. doi:10.1145/3769779

BibTeX
@article{Deng2025,
  author = {Deng, Wenqian and Liang, Jie and Wu, Zhiyong and Fu, Jingzhou and Jiang, Yu},
  title = {Detecting Logic Bugs in DBMSs via Equivalent Data Construction},
  journal = {Proceedings of the ACM on Management of Data},
  year = {2025},
  volume = {3},
  number = {6},
  pages = {1--25},
  doi = {10.1145/3769779}
}
Kostenlos starten →