Detecting Metadata-Related Logic Bugs in Database Systems via Raw Database Construction
Jiansen Song, Wensheng Dou, Yu Gao, Ziyu Cui, Yingying Zheng, Dong Wang, Wei Wang, Jun Wei, Tao Huang
Abstract
Database Management Systems (DBMSs) are widely used to efficiently store and retrieve data. DBMSs usually support various metadata, e.g., integrity constraints for ensuring data integrity and indexes for locating data. DBMSs can further utilize these metadata to optimize query evaluation. However, incorrect metadata-related optimizations can introduce metadata-related logic bugs, which can cause a DBMS to return an incorrect query result for a given query. In this paper, we propose a general and effective testing approach, Raw database construction (Radar), to detect metadata-related logic bugs in DBMSs. Given a database db containing some metadata, Radar first constructs a raw database rawDb , which wipes out the metadata in db and contains the same data as db. Since db and rawDb have the same data, they should return the same query result for a given query. Any inconsistency in their returned query results indicates a metadata-related logic bug. To effectively detect metadata-related logic bugs, we further propose a metadata-oriented testing optimization strategy to focus on testing previously unseen metadata, thus detecting more metadata-related logic bugs quickly. We implement and evaluate Radar on five widely-used DBMSs, and have detected 42 bugs, of which 38 have been confirmed as new bugs and 16 have been fixed by DBMS developers.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c17032b6-7026-4f70-b2be-868c52cf551dCited by top-tier papers11
- Detecting Schema-Related Logic Bugs in Relational DBMSs via Equivalent Database ConstructionJiansen Song, Wensheng Dou, Yingying Zheng, Yu Gao et al.VLDB 2025 · 6 citations
- Testing Gremlin-Based Graph Database Systems via Query DisassemblingYingying Zheng, Wensheng Dou, Lei Tang, Ziyu Cui et al.ISSTA 2024 · 6 citations
- Scaling Automated Database System TestingSuyang Zhong, Manuel RiggerASPLOS 2026 · 4 citations
- Simple Testing Can Expose Most Critical Transaction Bugs: Understanding and Detecting Write-Specific Serializability Violations in Database SystemsZiyu Cui, Wensheng Dou, Yu Gao, Rui Yang et al.VLDB 2025 · 4 citations
- Detecting Isolation Anomalies in Relational DBMSsRui Yang, Ziyu Cui, Wensheng Dou, Yu Gao et al.ISSTA 2025 · 3 citations
Builds on27
- Testing Database Engines via Pivoted Query SynthesisManuel Rigger, Zhendong SuOSDI 2020 · 150 citations
- Finding bugs in database systems via query partitioningManuel Rigger, Zhendong SuOOPSLA 2020 · 116 citations
- Detecting optimization bugs in database engines via non-optimizing reference engine constructionManuel Rigger, Zhendong SuFSE 2020 · 104 citations
- Elle: Inferring Isolation Anomalies from Experimental ObservationsPeter Alvaro, Kyle KingsburyVLDB 2021 · 88 citations
- APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database SystemsJinho Jung, Hong Hu, Joy Arulraj, Taesoo Kim et al.VLDB 2020 · 77 citations
Related papers
- Constant Optimization Driven Database System TestingChi Zhang, Manuel RiggerSIGMOD 2025 · 8 citations
- Testing Database Systems via Differential Query ExecutionJiansen Song, Wensheng Dou, Ziyu Cui, Qianwang Dai et al.ICSE 2023 · 26 citations
- Detecting Logic Bugs in DBMSs via Equivalent Data ConstructionWenqian Deng, Jie Liang, Zhiyong Wu, Jingzhou Fu et al.SIGMOD 2026 · 1 citation
- SRS: Detecting Logic Bugs of Join Implementation in DBMSs via Set Relation SynthesisJinhui Lai, Chi Zhang, Bingyan Li, Chenglin Liang et al.SIGMOD 2026 · 4 citations
- Pinolo: Detecting Logical Bugs in Database Management Systems with Approximate Query SynthesisZongyin Hao, Quanfeng Huang, Chengpeng Wang, Jianfeng Wang et al.USENIX ATC 2023 · 26 citations
