Testing Database Engines via Pivoted Query Synthesis

01/13/2020
by   Manuel Rigger, et al.
0

Relational databases are used ubiquitously. They are managed by database management systems (DBMS), which allow inserting, modifying, and querying data using a domain-specific language called Structured Query Language (SQL). Popular DBMS have been extensively tested by fuzzers, which have been successful in finding crash bugs. However, approaches to finding logic bugs, such as when a DBMS computes an incorrect result set, have remained mostly untackled. Differential testing is an effective technique to test systems that support a common language by comparing the outputs of these systems. However, this technique is ineffective for DBMS, because each DBMS typically supports its own SQL dialect. To this end, we devised a novel and general approach that we have termed Pivoted Query Synthesis. The core idea of this approach is to automatically generate queries for which we ensure that they fetch a specific, randomly selected row, called the pivot row. If the DBMS fails to fetch the pivot row, the likely cause is a bug in the DBMS. We tested our approach on three widely-used and mature DBMS, namely SQLite, MySQL, and PostgreSQL. In total, we reported 123 bugs in these DBMS, 99 of which have been fixed or verified, demonstrating that the approach is highly effective and general. We expect that the wide applicability and simplicity of our approach will enable the improvement of robustness of many DBMS.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/16/2020

Detecting Optimization Bugs in Database Engines via Non-Optimizing Reference Engine Construction

Database Management Systems (DBMS) are used ubiquitously. To efficiently...
research
05/20/2021

Testing DBMS Performance with Mutations

Because database systems are the critical component of modern data-inten...
research
07/08/2021

Duplicate-sensitivity Guided Transformation Synthesis for DBMS Correctness Bug Detection

Database Management System (DBMS) plays a core role in modern software f...
research
12/07/2020

Exposing Bugs in JavaScript Engines through Test Transplantation and Differential Testing

Context. JavaScript is a popular programming language today with several...
research
06/17/2022

GDsmith: Detecting Bugs in Graph Database Engines

Graph database engines stand out in the era of big data for their effici...
research
08/16/2023

Finding a Second Wind: Speeding Up Graph Traversal Queries in RDBMSs Using Column-Oriented Processing

Recursive queries and recursive derived tables constitute an important p...
research
04/13/2023

SIGNAL – The SAP Signavio Analytics Query Language

This paper provides an introduction to and discussion of SIGNAL, an indu...

Please sign up or login with your details

Forgot password? Click here to reset