Detecting Logic Bugs of Join Optimizations in DBMS

Author:

Tang Xiu1ORCID,Wu Sai1ORCID,Zhang Dongxiang1ORCID,Li Feifei1ORCID,Chen Gang1ORCID

Affiliation:

1. Zhejiang University, Hangzhou, China

Abstract

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 PolarDB. 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 PolarDB respectively.

Funder

National Natural Science Foundation of China

Publisher

Association for Computing Machinery (ACM)

Reference62 articles.

1. Gü nes Alucc , Olaf Hartig , M. Tamer Ö zsu, and Khuzaima Daudjee . 2014 a. Diversified Stress Testing of RDF Data Management Systems. In ISWC. Springer , 197--212. Gü nes Alucc, Olaf Hartig, M. Tamer Ö zsu, and Khuzaima Daudjee. 2014a. Diversified Stress Testing of RDF Data Management Systems. In ISWC. Springer, 197--212.

2. Günecs Alucc , Olaf Hartig , M Tamer Özsu , and Khuzaima Daudjee . 2014 b. Diversified stress testing of RDF data management systems . In International Semantic Web Conference. 197--212 . Günecs Alucc, Olaf Hartig, M Tamer Özsu, and Khuzaima Daudjee. 2014b. Diversified stress testing of RDF data management systems. In International Semantic Web Conference. 197--212.

3. HD-index

4. Guillaume Bagan , Angela Bonifati , Radu Ciucanu , George H. L. Fletcher , Auré lien Lemay, and Nicky Advokaat . 2017 . gMark: Schema-Driven Generation of Graphs and Queries. In ICDE. 63--64. Guillaume Bagan, Angela Bonifati, Radu Ciucanu, George H. L. Fletcher, Auré lien Lemay, and Nicky Advokaat. 2017. gMark: Schema-Driven Generation of Graphs and Queries. In ICDE. 63--64.

5. Hardik Bati Leo Giakoumakis Steve Herbert and Aleksandras Surna. 2007. A genetic approach for random testing of database systems. In VLDB. ACM 1243--1251. Hardik Bati Leo Giakoumakis Steve Herbert and Aleksandras Surna. 2007. A genetic approach for random testing of database systems. In VLDB. ACM 1243--1251.

Cited by 1 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. A Demonstration of DLBD: Database Logic Bug Detection System;Proceedings of the VLDB Endowment;2023-08

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3