This paper proposes ERIQ, a novel testing approach for detecting DBMS logic bugs from the perspective of checking result consistency across Equivalent Representations of Intermediate Query Results, and evaluated ERIQ on four widely used open-source DBMSs.
Abstract
Database Management Systems (DBMSs) support multiple SQL mechanisms for representing intermediate query results, including VIEWs, Common Table Expressions (CTEs), and Temporary Tables (TEMPTs). When these mechanisms are used to represent the same intermediate query result, the corresponding queries are expected to produce consistent results. However, we observe that such queries can return inconsistent results, indicating potential DBMS logic bugs. Existing approaches for detecting DBMS logic bugs have never explored result consistency across such equivalent representations. In this paper, we propose ERIQ, a novel testing approach for detecting DBMS logic bugs from the perspective of checking result consistency across Equivalent Representations of Intermediate Query Results. ERIQ constructs SQL variants using a VIEW, a CTE, or a TEMPT to represent the same intermediate query result, executes these variants, and compares their returned results. We evaluated ERIQ on four widely used open-source DBMSs: MySQL, MariaDB, Percona, and OceanBase. In total, ERIQ detected 64 bugs, 63 of which were confirmed by developers, and two have been fixed. Among the confirmed bugs, 54 were unique and previously unknown logic bugs, and one was a documentation issue.
Relational Database Management Systems (DBMSs) serve as foundational systems for data storage and management, supporting a rich variety of data types to specify storage formats and value ranges. These data types play a critical role in both data storage and computation. However, complex data computation operations (e.g...
Jiansen Song, Wensheng Dou, Ying-Ying Zheng et al.· Proceedings of the VLDB Endo...· 0 citations
These findings characterize the potential of single-engine diversity to detect wrong-result failures and select correct results, together with the execution costs and reference-validity constraints that shape its practical use.
Ze-Lin Wang, Ping Chen, Jin Wei et al.· Security and Safety· 0 citations
It is found that although the queries triggering slow planning are largely DBMS-specific, recurring pathologies involving correlated subqueries, CTE expansion, repeated subquery expressions, disjunctive joins, and constant folding affect multiple systems.
Geoffrey X. Yu, Ryan Marcus, Tim Kraska· 0 citations
This paper introduces Controlled Pushdown Execution (CPE), a white-box method that enables systematic validation of computation pushdown and shows that CPE can control all supported operators across different systems.
Jinsheng Ba, Zu-Ming Jiang, Zhen-Dong Su· Proceedings of the ACM on So...· 0 citations
The N+1 query problem (issuing one database query per element of a collection instead of a single batched query) is among the most common and costly performance defects in data-access code, yet tool support on the Java Virtual Machine (JVM) is fragmented. Raw Java Database Connectivity (JDBC) interceptors log statement...
Mahmoud Khawaja· Companion Proceedings of the...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.