Testing Database Systems via Differential Query Execution

被引:4
|
作者
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 条
  • [11] 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
  • [12] Automatic Testing of Symbolic Execution Engines via Program Generation and Differential Testing
    Kapus, Timotej
    Cadar, Cristian
    PROCEEDINGS OF THE 2017 32ND IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE'17), 2017, : 590 - 600
  • [13] A TECHNIQUE FOR ANALYZING QUERY EXECUTION IN A MULTIPROCESSOR DATABASE MACHINE
    CESARINI, F
    PIPPOLINI, F
    SODA, G
    LECTURE NOTES IN COMPUTER SCIENCE, 1987, 257 : 184 - 207
  • [14] Turbocharging Database Query Processing and Testing
    Haritsa, Jayant R.
    Sudarshan, S.
    COMMUNICATIONS OF THE ACM, 2019, 62 (11) : 48 - 49
  • [15] A systematic review of deep learning applications in database query execution
    Milicevic, Bogdan
    Babovic, Zoran
    JOURNAL OF BIG DATA, 2024, 11 (01)
  • [16] Finding Bugs in Gremlin-Based Graph Database Systems via Randomized Differential Testing
    Zheng, Yingying
    Dou, Wensheng
    Wang, Yicheng
    Qin, Zheng
    Tang, Lei
    Gao, Yu
    Wang, Dong
    Wang, Wei
    Wei, Jun
    PROCEEDINGS OF THE 31ST ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2022, 2022, : 302 - 313
  • [17] A Study on Database Intrusion Detection Based on Query Execution Plans
    Morzy, Tadeusz
    Zakrzewicz, Maciej
    BIG DATA ANALYTICS AND KNOWLEDGE DISCOVERY, DAWAK 2024, 2024, 14912 : 353 - 358
  • [18] Speeding up spatial database query execution using GPUs
    Simion, Bogdan
    Ray, Suprio
    Brown, Angela Demke
    PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON COMPUTATIONAL SCIENCE, ICCS 2012, 2012, 9 : 1870 - 1879
  • [19] Facilitating XML Query Processing Via Execution Plan
    Izadi, Sayyed Kamyar
    Garakani, Vahid
    Haghjoo, Mostafa S.
    ADVANCES IN COMPUTER SCIENCE AND ENGINEERING, 2008, 6 : 917 - 920
  • [20] ENCAPSULATION OF PARALLELISM AND ARCHITECTURE-INDEPENDENCE IN EXTENSIBLE DATABASE QUERY EXECUTION
    GRAEFE, G
    DAVISON, DL
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1993, 19 (08) : 749 - 764