一句话:提出 Mozi 框架,通过比较不同配置下等价 DBMS 的查询执行结果来发现正确性与性能缺陷。
数据库管理系统(DBMS)的测试十分复杂。传统变形测试需要精确理解 SQL 规范,以构造语义等价的多样化输入,但 SQL 规范模糊且复杂,难以准确建模查询语义,从而给 DBMS 正确性与性能测试带来困难。为此,作者提出 Mozi:一种基于配置的等价变换框架。其核心思想是比较不同配置下的等价 DBMS,而非比较语义等价的查询。Mozi 分析查询计划,修改配置将 DBMS 变换为等价系统,再重新执行查询,并利用多种测试预言比较结果:查询结果出现差异说明存在正确性缺陷,而关闭优化后执行更快则揭示性能缺陷。
Testing database management systems (DBMSs) is a complex task. Traditional approaches, such as metamorphic testing, need a precise comprehension of the SQL specification to create diverse inputs with equivalent semantics. The vagueness and intricacy of the SQL specification make it challenging to accurately model query semantics, thereby posing difficulties in testing the correctness and performance of DBMSs. To address this, we propose Mozi, a framework that finds DBMS bugs via configuration-based equivalent transformation. The key idea behind Mozi is to compare the results of equivalent DBMSs with different configurations, rather than between semantically equivalent queries. The framework involves analyzing the query plan, changing configurations to transform the DBMS to an equivalent one, and re-executing the query to compare the results using various test oracles. For example, detecting differences in query results indicates correctness bugs, while observing faster execution times on the optimization-closed DBMS suggests performance bugs.
@inproceedings{paperbot11374,
title = {Mozi: Discovering DBMS Bugs via Configuration-Based Equivalent Transformation},
author = {Jie Liang and Zhiyong Wu and Jingzhou Fu and Mingzhe Wang and Chengnian Sun and Yu Jiang},
booktitle = {ICSE},
year = {2024},
doi = {10.1145/3597503.3639112}
}