Mozi: Discovering DBMS Bugs via Configuration-Based Equivalent Transformation
Jie Liang, Zhiyong Wu, Jingzhou Fu, Mingzhe Wang, Chengnian Sun, Yu Jiang
摘要
Testing database management systems (DBMSs) is a complex task. Traditional approaches, such as metamorphic testing, need a precise comprehension of the SQL specification to create diverse inputs with equivalent semantics. The vagueness and intricacy of the SQL specification make it challenging to accurately model query semantics, thereby posing difficulties in testing the correctness and performance of DBMSs. To address this, we propose Mozi, a framework that finds DBMS bugs via configuration-based equivalent transformation. The key idea behind Mozi is to compare the results of equivalent DBMSs with different configurations, rather than between semantically equivalent queries. The framework involves analyzing the query plan, changing configurations to transform the DBMS to an equivalent one, and re-executing the query to compare the results using various test oracles. For example, detecting differences in query results indicates correctness bugs, while observing faster execution times on the optimization-closed DBMS suggests performance bugs. We demonstrate the effectiveness of Mozi by evaluating it on four widely used DBMSs, namely MySQL, MariaDB, Clickhouse, and PostgreSQL. In the continuous testing, Mozi found a total of 101 previously unknown bugs, including 49 correctness and 52 performance bugs in four DBMSs. Among them, 90 bugs are confirmed and 57 bugs have been fixed. In addition, Mozi can be extended to other DBMS fuzzers for testing various types of bugs. With Mozi, testing DBMSs becomes simpler and more effective, potentially saving time and effort that would otherwise be spent on precisely modeling SQL specifications for testing purposes.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper12
- Detecting Metadata-Related Logic Bugs in Database Systems via Raw Database ConstructionJiansen Song, Wensheng Dou, Yu Gao, Ziyu Cui 等VLDB 2024 · 被引用 13 次
- PolyJuice: Detecting Mis-compilation Bugs in Tensor Compilers with Equality Saturation Based RewritingChijin Zhou, Bingzhou Qian, Gwihwan Go, Quan Zhang 等OOPSLA 2024 · 被引用 7 次
- Understanding and Detecting SQL Function Bugs: Using Simple Boundary Arguments to Trigger Hundreds of DBMS BugsJingzhou Fu, Jie Liang, Zhiyong Wu, Yanyang Zhao 等EuroSys 2025 · 被引用 6 次
- Detecting Schema-Related Logic Bugs in Relational DBMSs via Equivalent Database ConstructionJiansen Song, Wensheng Dou, Yingying Zheng, Yu Gao 等VLDB 2025 · 被引用 6 次
- Scaling Automated Database System TestingSuyang Zhong, Manuel RiggerASPLOS 2026 · 被引用 4 次
它引用的顶会 Paper18
- Testing Database Engines via Pivoted Query SynthesisManuel Rigger, Zhendong SuOSDI 2020 · 被引用 150 次
- EnFuzz: Ensemble Fuzzing with Seed Synchronization among Diverse FuzzersYuanliang Chen, Yu Jiang, Fuchen Ma, Jie Liang 等USENIX Security 2019 · 被引用 139 次
- Finding bugs in database systems via query partitioningManuel Rigger, Zhendong SuOOPSLA 2020 · 被引用 116 次
- An Inquiry into Machine Learning-based Automatic Configuration Tuning Services on Real-World Database Management SystemsDana Van Aken, Dongsheng Yang, Sebastien Brillard, Ari Fiorino 等VLDB 2021 · 被引用 108 次
- Detecting optimization bugs in database engines via non-optimizing reference engine constructionManuel Rigger, Zhendong SuFSE 2020 · 被引用 104 次
相关 Paper
- A Set-Theoretic Approach to Detecting Logic Bugs in DBMS Inner Join OptimizationsCe Lyu, Changzheng Wei, Yanhao Wang, Jie Liang 等ICDE 2026
- Detecting Logic Bugs in Database Engines via Equivalent Expression TransformationZu-Ming Jiang, Zhendong SuOSDI 2024 · 被引用 22 次
- One DBMS, Two Modes, and a Bunch of Bugs: Catching Logic Bugs in Distributed DBMSs via Differential TestingZi-Xuan Fu, Jia-Ju Bai, Hong-Bo Feng, Kang ChenSIGMOD 2026
- DynSQL: Stateful Fuzzing for Database Management Systems with Complex and Valid SQL Query GenerationZu-Ming Jiang, Jia-Ju Bai, Zhendong SuUSENIX Security 2023
- Detecting Isolation Bugs via Transaction Oracle ConstructionWensheng Dou, Ziyu Cui, Qianwang Dai, Jiansen Song 等ICSE 2023 · 被引用 21 次
