Coni: Detecting Database Connector Bugs via State-Aware Test Case Generation
Wenqian Deng, Jie Liang, Zhiyong Wu, Jingzhou Fu, Mingzhe Wang, Yu Jiang
Abstract
Database connectors are widely used in many applications to facilitate flexible and convenient database interactions. Potential bugs in database connectors can lead to various abnormal behaviors within applications, such as returning incorrect results or experiencing unexpected connection interruption. However, existing DBMS fuzzing works cannot be directly applied to testing database connectors as they mainly focus on SQL generation and use a small subset of connector interfaces. Automated test case generation also struggles to generate effective test cases that explore intricate interactions of database connectors due to a lack of domain knowledge. The main challenge in testing database connectors is generating semantically correct test cases that can trigger various connector state transitions. To address that, we propose CONI, a framework designed for detecting logic bugs of database connectors with state-aware test case generation. First, we define the database connector state model by analyzing the corresponding standard specification. Building upon this model, CONI generates interface call sequences within test cases to encompass various state transitions. After that, CONI generates suitable parameter values based on the parameter information and contextual information collected during runtime. Then the test cases are executed on a target and a reference database connector. Inconsistent results indicate potential bugs. We evaluated CONI on 5 widelyused JDBC database connectors, namely MySQL Connector/J, MariaDB Connector/J, AWS JDBC Driver for MySQL, PGJDBC, and PG JDBC NG. In total, CONI reported 44 previously unknown bugs, of which 34 have been confirmed. * Jie Liang and Yu Jiang are the corresponding authors. important, as any shortcomings or bugs in their functionality can impact the overall performance of the software system. To provide applications with increased flexibility and convenience in their interactions with databases, most database vendors implement database connectors following unified standards such as JDBC (Java Database Connectivity) [2] and ODBC (Open Database Connectivity) [3] . Due to the richness of functionality provided by these standards and the variety of use cases for database connectors, database connector implementations may have many potential bugs. The issue tracking systems for popular JDBC implementations such as PGJDBC [4] and MariaDB Connector/J [5] have already collected thousands of bug reports in recent years. These bugs can result in various abnormal behaviors within the application, such as returning incorrect results or experiencing unexpected connection interruptions [6, 7, 8, 9] . MariaDB CONJ 1071 Error During Bulk Execution Might Result in Connection Wrong State id (PK) field 1 Mike 2 Jack Origin Table t0 Connector INSERT INTO t0 VALUES (1, null) INSERT INTO t0 VALUES (2, Lily)
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers1
Ask how each one uses itBuilds on12
- Using an LLM to Help With Code UnderstandingDaye Nam, Andrew Macvean, Vincent J. Hellendoorn, Bogdan Vasilescu et al.ICSE 2024 · 264 citations
- Testing Database Engines via Pivoted Query SynthesisManuel Rigger, Zhendong SuOSDI 2020 · 150 citations
- Griffin : Grammar-Free DBMS FuzzingJingzhou Fu, Jie Liang, Zhiyong Wu, Mingzhe Wang et al.ASE 2022 · 44 citations
- Sequence-Oriented DBMS FuzzingJie Liang, Yaoguang Chen, Zhiyong Wu, Jingzhou Fu et al.ICDE 2023 · 29 citations
- Recovering fitness gradients for interprocedural Boolean flags in search-based testingYun Lin, Jun Sun, Gordon Fraser, Ziheng Xiu et al.ISSTA 2020 · 25 citations
Related papers
- Pinolo: Detecting Logical Bugs in Database Management Systems with Approximate Query SynthesisZongyin Hao, Quanfeng Huang, Chengpeng Wang, Jianfeng Wang et al.USENIX ATC 2023 · 26 citations
- Mozi: Discovering DBMS Bugs via Configuration-Based Equivalent TransformationJie Liang, Zhiyong Wu, Jingzhou Fu, Mingzhe Wang et al.ICSE 2024 · 18 citations
- Detecting Logic Bugs of Join Optimizations in DBMSXiu Tang, Sai Wu, Dongxiang Zhang, Feifei Li et al.SIGMOD 2023 · 34 citations
- Fucci: Database Transaction Fuzzing via Random Conflict Construction and Multilevel Constraint SolvingXiyue Gao, Zhuang Liu, Yiran Shen, Hui Li et al.VLDB 2025 · 2 citations
- Detecting Metadata-Related Logic Bugs in Database Systems via Raw Database ConstructionJiansen Song, Wensheng Dou, Yu Gao, Ziyu Cui et al.VLDB 2024 · 13 citations
