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 条
  • [21] Hierarchical query execution in a parallel object-oriented database system
    Bassiliades, N
    Vlahavas, I
    PARALLEL COMPUTING, 1996, 22 (07) : 1017 - 1048
  • [22] Towards Predicting Query Execution Time for Concurrent and Dynamic Database Workloads
    Wu, Wentao
    Chi, Yun
    Hacigumus, Hakan
    Naughton, Jeffrey F.
    PROCEEDINGS OF THE VLDB ENDOWMENT, 2013, 6 (10): : 925 - 936
  • [23] Representation and execution of inquiries in database systems
    Ivanov, YN
    Kochin, YY
    AUTOMATION AND REMOTE CONTROL, 1996, 57 (02) : 295 - 301
  • [24] Query optimization in compressed database systems
    Chen, ZY
    Gehrke, J
    Korn, F
    SIGMOD RECORD, 2001, 30 (02) : 271 - 282
  • [25] QUERY PROCESSING IN DISTRIBUTED DATABASE SYSTEMS
    HEVNER, AR
    YAO, SB
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1979, 5 (03) : 177 - 187
  • [26] Query batching optimization in database systems
    Eslami, Mehrad
    Mahmoodian, Vahid
    Dayarian, Iman
    Charkhgard, Hadi
    Tu, Yicheng
    COMPUTERS & OPERATIONS RESEARCH, 2020, 121
  • [27] QUERY OPTIMIZATION IN DATABASE-SYSTEMS
    JARKE, M
    KOCH, J
    COMPUTING SURVEYS, 1984, 16 (02) : 111 - 152
  • [28] A method for query in heterogeneous database systems
    Dept. of Electronics, East China Shipbuilding, Zhenjiang Jiangsu 212003, China
    Huadong Chuanbo Gongye Xueyuan Xuebao/Journal of East China Shipbuilding Institute, 2001, 15 (01): : 23 - 31
  • [29] Query optimization in encrypted database systems
    Hacigümüs, H
    Iyer, B
    Mehrotra, S
    DATABASE SYSTEMS FOR ADVANCED APPLICATIONS, PROCEEDINGS, 2005, 3453 : 43 - 55
  • [30] Database Buffer Cache Simulator to Study and Predict Cache Behavior for Query Execution
    Phalak, Chetan
    Singhal, Rekha
    Jhunjhunwala, Tanmay
    DATA: PROCEEDINGS OF THE 5TH INTERNATIONAL CONFERENCE ON DATA MANAGEMENT TECHNOLOGIES AND APPLICATIONS, 2016, : 71 - 78