Testing Database Systems via Differential Query Execution

被引:2
|
作者
Song, Jiansen [1 ,2 ]
Dou, Wensheng [1 ,2 ,3 ,4 ]
Cui, Ziyu [1 ,2 ]
Dai, Qianwang [1 ,2 ]
Wang, Wei [1 ,2 ,3 ,4 ]
Wei, Jun [1 ,2 ,3 ,4 ]
Zhong, Hua [1 ,2 ]
Huang, Tao [1 ,2 ]
机构
[1] Chinese Acad Sci, Inst Software, State Key Lab Comp Sci, Beijing, Peoples R China
[2] Univ Chinese Acad Sci, Beijing, Peoples R China
[3] Univ Chinese Acad Sci, Nanjing Coll, Nanjing, Peoples R China
[4] Nanjing Inst Software Technol, Nanjing, Peoples R China
基金
国家重点研发计划; 中国国家自然科学基金;
关键词
Database system; DBMS testing; logic bug;
D O I
10.1109/ICSE48619.2023.00175
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Database Management Systems (DBMSs) provide efficient data retrieval and manipulation for many applications through Structured Query Language (SQL). Incorrect implementations of DBMSs can result in logic bugs, which cause SELECT queries to fetch incorrect results, or UPDATE and DELETE queries to generate incorrect database states. Existing approaches mainly focus on detecting logic bugs in SELECT queries. However, logic bugs in UPDATE and DELETE queries have not been tackled. In this paper, we propose a novel and general approach, which we have termed Differential Query Execution (DQE), to detect logic bugs in SELECT, UPDATE and DELETE queries of DBMSs. The core idea of DQE is that different SQL queries with the same predicate usually access the same rows in a database. For example, a row updated by an UPDATE query with a predicate. should also be fetched by a SELECT query with the same predicate.. If not, a logic bug is revealed in the target DBMS. To evaluate the effectiveness and generality of DQE, we apply DQE on five production-level DBMSs, i.e., MySQL, MariaDB, TiDB, CockroachDB and SQLite. In total, we have detected 50 unique bugs in these DBMSs, 41 of which have been confirmed, and 11 have been fixed. We expect that the simplicity and generality of DQE can greatly improve the reliability of DBMSs.
引用
收藏
页码:2072 / 2084
页数:13
相关论文
共 50 条
  • [1] Cross-Engine Query Execution in Federated Database Systems
    Gupta, Ankush M.
    Gadepally, Vijay
    Stonebraker, Michael
    2016 IEEE HIGH PERFORMANCE EXTREME COMPUTING CONFERENCE (HPEC), 2016,
  • [2] A Query Simulation System To Illustrate Database Query Execution
    Allenstein, Brett
    Yost, Andrew
    Wagner, Paul
    Morrison, Joline
    SIGCSE'08: PROCEEDINGS OF THE 39TH ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION, 2008, : 493 - 497
  • [3] Query Execution over Encrypted Database
    Kumar, Raju Ranjan
    Hussain, Muzzammil
    2015 SECOND INTERNATIONAL CONFERENCE ON ADVANCES IN COMPUTING AND COMMUNICATION ENGINEERING ICACCE 2015, 2015, : 459 - 464
  • [4] Testing Database Engines via Query Plan Guidance
    Ba, Jinsheng
    Rigger, Manuel
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ICSE, 2023, : 2060 - 2071
  • [5] Testing Graph Database Engines via Query Partitioning
    Kamm, Matteo
    Rigger, Manuel
    Zhang, Chengyu
    Su, Zhendong
    PROCEEDINGS OF THE 32ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2023, 2023, : 140 - 149
  • [6] Testing Database Engines via Pivoted Query Synthesis
    Rigger, Manuel
    Su, Zhendong
    PROCEEDINGS OF THE 14TH USENIX SYMPOSIUM ON OPERATING SYSTEMS DESIGN AND IMPLEMENTATION (OSDI '20), 2020, : 667 - 682
  • [8] MULTIPLE QUERY EXECUTION ON A MULTIPROCESSOR DATABASE MACHINE
    GRIGORAS, D
    COMPUTERS AND ARTIFICIAL INTELLIGENCE, 1991, 10 (03): : 255 - 264
  • [9] Finding Bugs in Database Systems via Query Partitioning
    Rigger, Manuel
    Su, Zhendong
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (04):
  • [10] Thrifty Query Execution via Incrementability
    Tang, Dixin
    Shang, Zechao
    Elmore, Aaron J.
    Krishnan, Sanjay
    Franklin, Michael J.
    SIGMOD'20: PROCEEDINGS OF THE 2020 ACM SIGMOD INTERNATIONAL CONFERENCE ON MANAGEMENT OF DATA, 2020, : 1241 - 1256