Skip to content
Open access

MimicDB: Runtime Defense against Wrong-Result Bugs in Database Query Optimizers via Query-Rewriting Diversity

Sep 2026 · Security and Safety · 0 citations

TL;DR

These findings characterize the potential of single-engine diversity to detect wrong-result failures and select correct results, together with the execution costs and reference-validity constraints that shape its practical use.

Abstract

Wrong-result bugs undermine database reliability by allowing queries to com- plete successfully while silently returning incorrect data. Cross-product diversity can help expose these failures, but requires replicated state and compatibility across database sys- tems. MimicDB explores an alternative: selective query protection through diversity within a single database instance. It combines DQP-, CODD-, and TLP-inspired execution bod- ies with shared-snapshot reads and result adjudication, enabling diverse executions to be compared over a consistent database state. We evaluate MimicDB on eight TPC-H-derived queries and one custom query. In diagnostic fault-injection experiments, the fully heteroge- neous configuration (C4) detects 74.2% and 82.8% of triggered plan-conditioned corruptions at scale factors 1 and 10, respectively. Reference-priority adjudication (policy D) increases correct-result selection from 21.0% to 45.2% at SF1 and from 31.2% to 54.7% at SF10, rela- tive to strict majority. Reference-corruption tests demonstrate the dependence of these gains on reference validity and reveal the availability cost of abstaining on conflicting results. A separate online evaluation uses strict-majority adjudication (policy M). At SF1, synchronous C4 achieves 7.0–13.4% of the throughput of a single-execution gateway baseline across the tested concurrency levels. Asynchronous execution returns the original query result before validation while retaining the background validation work. Shared-snapshot reads eliminate observed state-induced disagreement across 240 concurrent-write rounds, while historical cases illustrate targeted bypasses. These findings characterize the potential of single-engine diversity to detect wrong-result failures and select correct results, together with the execution costs and reference-validity constraints that shape its practical use.

Read PDF

Similar papers

Book Open access Oct 2026

Query Analyzer: Framework-Agnostic, Confidence-Based N+1 Detection for the JVM

The N+1 query problem (issuing one database query per element of a collection instead of a single batched query) is among the most common and costly performance defects in data-access code, yet tool support on the Java Virtual Machine (JVM) is fragmented. Raw Java Database Connectivity (JDBC) interceptors log statement...

Mahmoud Khawaja · 0 citations
Book Open access Aug 2026

DBRepro: Automated Database Synthesis via a Hybrid Constraint-Solving Approach for Reproducing Slow Queries

DBRepro is presented, an automated end-to-end framework that formulates database generation as a constrained distribution synthesis problem that reproduces the execution performance of complex slow queries with high fidelity on a nearly 1 TB real-world dataset.

Zhao-Yang Zhang, Shuang Liu, Deng-Feng Xu et al. · 0 citations
Preprint Sep 2026

Distribution-Aware Distributed Database Testing (Extended Version)

DAT (Distribution-Aware Testing) is proposed, a novel automated approach for detecting query-processing bugs related to distribution strategies and distributed optimizations in DDBMSs, by systematically leveraging distribution-aware information throughout the testing pipeline.

Zhou Zhou, Si Liu, Heng-Feng Wei et al. · 0 citations
Book Open access Apr 2026

DBcover: A White-box SQL Test Generation Framework for Coverage Improvement

DBcover is proposed, an LLM-driven database test generation framework that performs white-box, code-aware SQL test generation through contextual reasoning, and substantially outperforms existing fuzzers.

Yan-Kai Rong, Shuang Liu, Jin-Hao Dong et al. · 0 citations
Open access Oct 2026

Testing Computation Pushdown in Distributed Database Systems

This paper introduces Controlled Pushdown Execution (CPE), a white-box method that enables systematic validation of computation pushdown and shows that CPE can control all supported operators across different systems.

Jinsheng Ba, Zu-Ming Jiang, Zhen-Dong Su · 0 citations
Open access Oct 2026

SmartFuzz: Leveraging Large Language Models and Feature Composition to Generate High-Quality Seeds for Database Fuzzing

SmartFuzz, an automated framework for synthesizing high-quality initial SQL seeds for mutation-based DBMS fuzzing using Large Language Models (LLMs), is proposed and demonstrated that it significantly improves bug discovery and code coverage compared to state-of-the-art mutation-based fuzzers.

Li Lin, Jin-Tai Hong, Yan Zhuang et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.