SCALE@NTU Invited Talk: Detecting Logic Bugs of Join Optimizations in DBMS

01 Aug 2023 10.30 AM - 11.30 AM Public

This research seminar is organized by Singtel Cognitive and Artificial Intelligence Lab for Enterprises (SCALE@NTU). Please find below the registration information:

To attend the seminar physically (limited seats available), click here

To attend the seminar on Teams, click here

Abstract : Generation-based testing techniques have shown their effective-ness in detecting logic bugs of DBMS, which are often caused by improper implementation of query optimizers. Nonetheless, existing generation-based debug tools are limited to single-table queries and there is a substantial research gap regarding multi-table queries with join operators. In this talk, we present the TQS, a novel testing framework targeted at detecting logic bugs derived by queries involving multi-table joins. Given a target DBMS, TQS achieves the goal with two key components: Data-guided Schema and Query Generation (DSG) and Knowledge-guided Query Space Exploration (KQE). DSG addresses the key challenge of multi-table query debugging: how to generate ground-truth (query, result) pairs for verification. It adopts the database normalization technique to generate a testing schema and maintains a bitmap index for result tracking. To improve debug efficiency, DSG also artificially inserts some noises into the generated data. To avoid repetitive query space search, KQE forms the problem as isomorphic graph set discovery and combines the graph embedding and weighted random walk for query generation. We evaluated TQS on four popular DBMSs: MySQL, MariaDB, TiDB and the gray release of an industry-leading cloud-native database, anonymized as X-DB. Experimental results show that TQS is effective in finding logic bugs of join optimization in database management systems. It successfully detected 115 bugs within 24 hours, including 31 bugs in MySQL, 30 in MariaDB, 31 in TiDB, and 23 in X-DB respectively.

Speaker : Sai Wu is a professor at the Department of Computer Science at Zhejiang University. He obtained his doctoral degree from the National University of Singapore in 2011. His main research areas include databases, big data, and data management system for artificial intelligence.

As the principal technical leader, he successfully completed the development of a real-time big data intelligent processing platform that combines batch and streaming processing. This achievement earned him the first prize (4/10) in the 2016 Ministry of Education Science and Technology Progress Award (China), and the special first prize (6/15) in the 2019 China Electronics Association Science and Technology Progress Award (China). The performance of the platform improved more than tenfold compared to similar products like Flink.

He also participated in the research and development of PolarDB, Alibaba’s cloud-native database, which has served over 100,000 corporate users in the last three years. This accomplishment received the first prize (3/15) in the 2020 Electronic Society Science and Technology Progress Award (China).

In recognition of his work, he was awarded the Best Paper Award at VLDB 2014 and the Best Paper Award at SIGMOD 2023.