Lune

SIGMOD2023顶会

Detecting Logic Bugs of Join Optimizations in DBMS

Xiu Tang, Sai Wu, Dongxiang Zhang, Feifei Li, Gang Chen

摘要

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 result tracking. To improve debug efficiency, DSG also artificially inserts some noises into the generated data. To avoid repetitive query space search, KQE forms the problem as isomorphic graph set discovery and combines the graph embedding and weighted random walk for query generation. We evaluated TQS on four popular DBMSs: MySQL, MariaDB, TiDB and the gray release of an industry-leading cloud-native database, anonymized as X-DB. Experimental results show that TQS is effective in finding logic bugs of join optimization in database management systems. It successfully detected 115 bugs within 24 hours, including 31 bugs in MySQL, 30 in MariaDB, 31 in TiDB, and 23 in X-DB respectively.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 17 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Keep It Simple: Testing Databases via Differential Query Plans 引用了 Finding bugs in database systems via query partitioning
  • Keep It Simple: Testing Databases via Differential Query Plans 引用了 Detecting optimization bugs in database engines via non-optimizing reference engine construction
  • Keep It Simple: Testing Databases via Differential Query Plans 引用了 APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database Systems
  • Keep It Simple: Testing Databases via Differential Query Plans 引用了 Testing Database Engines via Pivoted Query Synthesis
  • Scaling Automated Database System Testing 引用了 Keep It Simple: Testing Databases via Differential Query Plans
  • Scaling Automated Database System Testing 引用了 Constant Optimization Driven Database System Testing
  • Scaling Automated Database System Testing 引用了 Finding bugs in database systems via query partitioning
  • Scaling Automated Database System Testing 引用了 Detecting optimization bugs in database engines via non-optimizing reference engine construction
  • Scaling Automated Database System Testing 引用了 Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation
  • Scaling Automated Database System Testing 引用了 Testing Database Engines via Pivoted Query Synthesis
  • Constant Optimization Driven Database System Testing 引用了 Finding bugs in database systems via query partitioning
  • Constant Optimization Driven Database System Testing 引用了 Detecting optimization bugs in database engines via non-optimizing reference engine construction
  • Constant Optimization Driven Database System Testing 引用了 Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation
  • Constant Optimization Driven Database System Testing 引用了 APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database Systems
  • Constant Optimization Driven Database System Testing 引用了 Testing Database Engines via Pivoted Query Synthesis
  • Understanding and Reusing Test Suites Across Database Systems 引用了 Finding bugs in database systems via query partitioning
  • Understanding and Reusing Test Suites Across Database Systems 引用了 Detecting optimization bugs in database engines via non-optimizing reference engine construction
  • Understanding and Reusing Test Suites Across Database Systems 引用了 APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database Systems
  • Understanding and Reusing Test Suites Across Database Systems 引用了 Testing Database Engines via Pivoted Query Synthesis
  • Finding bugs in database systems via query partitioning 引用了 Detecting optimization bugs in database engines via non-optimizing reference engine construction
  • Finding bugs in database systems via query partitioning 引用了 APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database Systems
  • Finding bugs in database systems via query partitioning 引用了 Testing Database Engines via Pivoted Query Synthesis
  • Detecting optimization bugs in database engines via non-optimizing reference engine construction 引用了 APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database Systems
  • Detecting optimization bugs in database engines via non-optimizing reference engine construction 引用了 Testing Database Engines via Pivoted Query Synthesis
  • Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation 引用了 Finding bugs in database systems via query partitioning
  • Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation 引用了 Detecting optimization bugs in database engines via non-optimizing reference engine construction
  • Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation 引用了 APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database Systems
  • Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation 引用了 Testing Database Engines via Pivoted Query Synthesis
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper17

  1. Keep It Simple: Testing Databases via Differential Query PlansJinsheng Ba, Manuel RiggerSIGMOD 2024 · 23 次引用
  2. Detecting Logic Bugs in Database Engines via Equivalent Expression TransformationZu-Ming Jiang, Zhendong SuOSDI 2024 · 22 次引用
  3. Constant Optimization Driven Database System TestingChi Zhang, Manuel RiggerSIGMOD 2025 · 8 次引用
  4. Scaling Automated Database System TestingSuyang Zhong, Manuel RiggerASPLOS 2026 · 4 次引用
  5. Understanding and Reusing Test Suites Across Database SystemsSuyang Zhong, Manuel RiggerSIGMOD 2025 · 4 次引用

它引用的 Paper6

  1. Testing Database Engines via Pivoted Query SynthesisManuel Rigger, Zhendong SuOSDI 2020 · 150 次引用
  2. Finding bugs in database systems via query partitioningManuel Rigger, Zhendong SuOOPSLA 2020 · 116 次引用
  3. Detecting optimization bugs in database engines via non-optimizing reference engine constructionManuel Rigger, Zhendong SuFSE 2020 · 104 次引用
  4. APOLLO: Automatic Detection and Diagnosis of Performance Regressions in Database SystemsJinho Jung, Hong Hu, Joy Arulraj, Taesoo Kim 等VLDB 2020 · 77 次引用
  5. Efficient Bi-triangle Counting for Large Bipartite NetworksYixing Yang, Yixiang Fang, Maria E. Orlowska, Wenjie Zhang 等VLDB 2021 · 39 次引用

相关 Paper

  1. SRS: Detecting Logic Bugs of Join Implementation in DBMSs via Set Relation SynthesisJinhui Lai, Chi Zhang, Bingyan Li, Chenglin Liang 等SIGMOD 2026 · 4 次引用
  2. Testing Database Systems via Differential Query ExecutionJiansen Song, Wensheng Dou, Ziyu Cui, Qianwang Dai 等ICSE 2023 · 26 次引用
  3. A Set-Theoretic Approach to Detecting Logic Bugs in DBMS Inner Join OptimizationsCe Lyu, Changzheng Wei, Yanhao Wang, Jie Liang 等ICDE 2026
  4. Testing Graph Databases with Synthesized QueriesZijing Yin, Si Liu, David A. BasinSIGMOD 2026 · 2 次引用
  5. Detecting Join Bugs in Database Engines via Join Implication ReasoningZhaokun Xiang, Suyang Zhong, Manuel RiggerSIGMOD 2026
黄昏的海面,两侧是细线勾勒的悬崖