TY - JOUR
T1 - Semantic Conformance Testing of Relational DBMS
AU - Liu, Shuang
AU - Tian, Chenglin
AU - Sun, Jun
AU - Wang, Ruifeng
AU - Lu, Wei
AU - Zhao, Yongxin
AU - Xue, Yinxing
AU - Wang, Junjie
AU - Du, Xiaoyong
N1 - Publisher Copyright:
© 2025, VLDB Endowment, All rights reserved.
PY - 2025
Y1 - 2025
N2 - Relational DBMS implementations are expected to adhere to SQL standards. However, there are currently no tools available that can automatically verify this conformance. The main reasons are twofold. First, the SQL standard specification, documented in natural language, tends to be ambiguous and is not directly executable. Second, it is difficult to generate test queries that thoroughly coverall aspects, e.g., keywords and parameters, defined in the SQL specification. In this work, we introduce the first method for semantic conformance testing of RDBMSs. Our contributions are threefold. Firstly, we formally define the denotational semantics of SQL and implement them in Prolog, creating an executable reference RDBMS for differential testing against existing RDBMSs. Secondly, we propose three coverage criteria based on these formal semantics, along with a coverage-guided query generation algorithm that effectively generates queries achieving high semantic coverage. Lastly, we apply our approach to six widely-used and thoroughly tested RDBMSs, e.g., MySQL, PostgreSQL and Ocean Base, uncovering 19bugs and 13 inconsistencies, all of which are confirmed by RDBMS developers.
AB - Relational DBMS implementations are expected to adhere to SQL standards. However, there are currently no tools available that can automatically verify this conformance. The main reasons are twofold. First, the SQL standard specification, documented in natural language, tends to be ambiguous and is not directly executable. Second, it is difficult to generate test queries that thoroughly coverall aspects, e.g., keywords and parameters, defined in the SQL specification. In this work, we introduce the first method for semantic conformance testing of RDBMSs. Our contributions are threefold. Firstly, we formally define the denotational semantics of SQL and implement them in Prolog, creating an executable reference RDBMS for differential testing against existing RDBMSs. Secondly, we propose three coverage criteria based on these formal semantics, along with a coverage-guided query generation algorithm that effectively generates queries achieving high semantic coverage. Lastly, we apply our approach to six widely-used and thoroughly tested RDBMSs, e.g., MySQL, PostgreSQL and Ocean Base, uncovering 19bugs and 13 inconsistencies, all of which are confirmed by RDBMS developers.
UR - https://www.scopus.com/pages/publications/105003208579
U2 - 10.14778/3712221.3712247
DO - 10.14778/3712221.3712247
M3 - 会议文章
AN - SCOPUS:105003208579
SN - 2150-8097
VL - 18
SP - 850
EP - 862
JO - Proceedings of the VLDB Endowment
JF - Proceedings of the VLDB Endowment
IS - 3
T2 - 51st International Conference on Very Large Data Bases, VLDB 2025
Y2 - 1 September 2025 through 5 September 2025
ER -