Conformance Testing of Relational DBMS Against SQL Specifications

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Liu, Shuang, Tian, Chenglin, Sun, Jun, Wang, Ruifeng, Lu, Wei, Zhao, Yongxin, Xue, Yinxing, Wang, Junjie, Du, Xiaoyong
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912374861070336
author Liu, Shuang
Tian, Chenglin
Sun, Jun
Wang, Ruifeng
Lu, Wei
Zhao, Yongxin
Xue, Yinxing
Wang, Junjie
Du, Xiaoyong
author_facet Liu, Shuang
Tian, Chenglin
Sun, Jun
Wang, Ruifeng
Lu, Wei
Zhao, Yongxin
Xue, Yinxing
Wang, Junjie
Du, Xiaoyong
contents A Relational Database Management System (RDBMS) is one of the fundamental software that supports a wide range of applications, making it critical to identify bugs within these systems. There has been active research on testing RDBMS, most of which employ crash or use metamorphic relations as the oracle. Although existing approaches can detect bugs in RDBMS, they are far from comprehensively evaluating the RDBMS's correctness (i.e., with respect to the semantics of SQL). In this work, we propose a method to test the semantic conformance of RDBMS i.e., whether its behavior respects the intended semantics of SQL. Specifically, we have formally defined the semantics of SQL and implemented them in Prolog. Then, the Prolog implementation serves as the reference RDBMS, enabling differential testing on existing RDBMS. We applied our approach to four widely-used and thoroughly tested RDBMSs, i.e., MySQL, TiDB, SQLite, and DuckDB. In total, our approach uncovered 19 bugs and 11 inconsistencies, which are all related to violating the SQL specification or missing/unclear specification, thereby demonstrating the effectiveness and applicability of our approach.
format Preprint
id arxiv_https___arxiv_org_abs_2406_09469
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Conformance Testing of Relational DBMS Against SQL Specifications
Liu, Shuang
Tian, Chenglin
Sun, Jun
Wang, Ruifeng
Lu, Wei
Zhao, Yongxin
Xue, Yinxing
Wang, Junjie
Du, Xiaoyong
Databases
A Relational Database Management System (RDBMS) is one of the fundamental software that supports a wide range of applications, making it critical to identify bugs within these systems. There has been active research on testing RDBMS, most of which employ crash or use metamorphic relations as the oracle. Although existing approaches can detect bugs in RDBMS, they are far from comprehensively evaluating the RDBMS's correctness (i.e., with respect to the semantics of SQL). In this work, we propose a method to test the semantic conformance of RDBMS i.e., whether its behavior respects the intended semantics of SQL. Specifically, we have formally defined the semantics of SQL and implemented them in Prolog. Then, the Prolog implementation serves as the reference RDBMS, enabling differential testing on existing RDBMS. We applied our approach to four widely-used and thoroughly tested RDBMSs, i.e., MySQL, TiDB, SQLite, and DuckDB. In total, our approach uncovered 19 bugs and 11 inconsistencies, which are all related to violating the SQL specification or missing/unclear specification, thereby demonstrating the effectiveness and applicability of our approach.
title Conformance Testing of Relational DBMS Against SQL Specifications
topic Databases
url https://arxiv.org/abs/2406.09469