ISSTA 2025
Wed 25 - Sat 28 June 2025 Trondheim, Norway
co-located with FSE 2025
Wed 25 Jun 2025 16:00 - 16:25 at Aurora B - Database Testing Chair(s): Alberto Martin-Lopez

Metamorphic testing is a widely used method to detect logical bugs in Database Management Systems (DBMSs), referred to herein as MOLT (Metamorphic-Oracle based Logical Bug Detection Techinique). This technique involves constructing SQL statement pairs, including original and mutated queries, and assessing whether the execution results conform to predefined metamorphic relations to detect logical bugs. However, current MOLTs rely heavily on specific DBMS grammars to generate valid SQL statement pairs, which makes it challenging to adapt these techniques to various DBMSs with different grammatical structures. As a result, only a few popular DBMSs, such as PostgreSQL, MySQL, and MariaDB, are supported by existing MOLTs, with extensive manual effort required to expand to other DBMSs. Given that many DBMSs remain inadequately tested, there is a pressing need for a method that enables effortless extension of MOLTs across diverse DBMSs.

In this paper, we propose QTRAN, a novel LLM-powered approach that automatically extends existing MOLTs to various DBMSs. Our key insight is to translate SQL statement pairs to target DBMSs for metamorphic testing from existing MOLTs using LLMs. To address the challenges of LLMs’ limited understanding of dialect differences and metamorphic mechanisms, we propose a two-phase approach comprising the transfer and mutation phases. QTRAN tackles these challenges by drawing inspiration from the developer’s process of creating a MOLT, which includes understanding the grammar of the target DBMS to generate original queries and employing a mutator for customized mutations. The transfer phase is designed to identify potential dialects and leverage information from SQL documents to enhance query retrieval, enabling LLMs to translate original queries across different DBMSs accurately. During the mutation phase, we gather SQL statement pairs from existing MOLTs to fine-tune the pretrained model, tailoring it specifically for mutation tasks. Then we employ the customized LLM to mutate the translated original queries, preserving the defined relationships necessary for metamorphic testing.

We implement our approach as a tool and apply it to extend four state-of-the-art MOLTs for eight DBMSs: MySQL, MariaDB, TiDB, PostgreSQL, SQLite, MonetDB, DuckDB, and ClickHouse. The evaluation results show that over 99% of the SQL statement pairs transfered by QTRAN satisfy the metamorphic relations required for testing. Furthermore, we have detected 24 logical bugs among these DBMSs, with 16 confirmed as unique and previously unknown bugs. We believe that the generality of QTRAN can significantly enhance the reliability of DBMSs.

Wed 25 Jun

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

16:00 - 17:15
Database TestingResearch Papers at Aurora B
Chair(s): Alberto Martin-Lopez Software Institute - USI, Lugano
16:00
25m
Talk
QTRAN: Extending Metamorphic-Oracle based Logical Bug Detection Techniques for Multiple-DBMS Dialect Support
Research Papers
Li Lin Xiamen University, Qinglin Zhu School of Informatics, Xiamen University, Hongqiao Chen School of Informatics, Xiamen University, Zhuangda Wang Xiamen University, Rongxin Wu Xiamen University, Xiaoheng Xie Ant Group
DOI
16:25
25m
Talk
Detecting Isolation Anomalies in Relational DBMSs
Research Papers
Rui Yang Institute of Software, Chinese Academy of Sciences, Ziyu Cui Institute of Software at Chinese Academy of Sciences, Wensheng Dou Institute of Software Chinese Academy of Sciences, Yu Gao Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences, Jiansen Song Institute of Software at Chinese Academy of Sciences, Xudong Xie Institute of Software Chinese Academy of Sciences, China, Jun Wei Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences
DOI
16:50
25m
Talk
Understanding Practitioners’ Expectations on Clear Code Review Comments
Research Papers
Junkai Chen Singapore Management University, Singapore, Zhenhao Li York University, Qiheng Mao Zhejiang University, Xing Hu Zhejiang University, Kui Liu Huawei, Xin Xia Zhejiang University
DOI

Information for Participants
Wed 25 Jun 2025 16:00 - 17:15 at Aurora B - Database Testing Chair(s): Alberto Martin-Lopez
Info for room Aurora B:

Aurora B is the second room in the Aurora wing.

When facing the main Cosmos Hall, access to the Aurora wing is on the right, close to the side entrance of the hotel.

:
:
:
: