---
title: "BuzzHouse: Bridging the database fuzzing gap for testing ClickHouse"
description: "BuzzHouse is a new ClickHouse fuzzer that generates complex but mostly semantically valid SQL backed by a tracked catalog of tables, filling a gap left by SQLsmith, SQLancer, the AST fuzzer and WINGFUZZ."
url: "https://swe.quest/articles/buzzhouse-bridging-the-database-fuzzing-gap-for-testing-clickhouse-7d42aa00b0761971"
canonical: "https://clickhouse.com/blog/buzzhouse-bridging-the-database-fuzzing-gap-for-testing-clickhouse"
source: "ClickHouse"
published: "2025-01-21"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["testing","databases","analytics","sql"]
---

# BuzzHouse: Bridging the database fuzzing gap for testing ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-01-21, 8 min read, Case study. Original: [https://clickhouse.com/blog/buzzhouse-bridging-the-database-fuzzing-gap-for-testing-clickhouse](https://clickhouse.com/blog/buzzhouse-bridging-the-database-fuzzing-gap-for-testing-clickhouse)

## Summary

BuzzHouse is a new ClickHouse fuzzer that generates complex but mostly semantically valid SQL backed by a tracked catalog of tables, filling a gap left by SQLsmith, SQLancer, the AST fuzzer and WINGFUZZ. It has found about 100 new issues. Correctness is checked by dumping and re-reading tables, comparing equivalent queries via SQLancer-style oracles, re-running queries under different settings, and comparing results against another relational database. The design tradeoffs covered include valid versus random identifiers, why coverage-guided fuzzing was skipped, and how statement probabilities (e.g. DROP frequency) shape what the fuzzer can reach.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)

## Prerequisites

- SQL semantics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- fuzz testing basics ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))

## Keywords

BuzzHouse, ClickHouse, SQLancer, SQLsmith, AFL, libFuzzer, TPC-H

## Related posts

- [Fuzzing collaboration with WINGFUZZ - Part 1](https://swe.quest/articles/fuzzing-collaboration-with-wingfuzz-part-1-659c66e435090a2d.md): ClickHouse · 2023-08-08 · Easy · 4 min read · Testing, Vulnerability research, Databases, Analytics & OLAP
  WINGFUZZ, a DBMS fuzzing engine, found eight new bugs in ClickHouse, some introduced only four months earlier, using two techniques.
- [Fuzzing ClickHouse](https://swe.quest/articles/fuzzing-clickhouse-2e19ad8301dd21c4.md): ClickHouse · 2021-03-11 · Medium · 8 min read · Testing, Databases, Vulnerability research, CI/CD
  ClickHouse's AST-based query fuzzer takes SQL queries from the regression test suite, parses them, and randomly mutates the AST.
- [Decorating a Christmas Tree With the Help Of Flaky Tests](https://swe.quest/articles/decorating-a-christmas-tree-with-the-help-of-flaky-tests-286b59f771e1aae7.md): ClickHouse · 2021-12-27 · Medium · 3 min read · Testing, CI/CD, Concurrency
  ClickHouse treats flaky tests as bugs to investigate rather than noise to mute or retry, and deliberately makes tests flakier to surface hidden issues.
- [Fuzzer Blind Spots (Meet Jepsen!)](https://swe.quest/articles/fuzzer-blind-spots-meet-jepsen-95901ab1fc56e123.md): TigerBeetle · 2025-06-06 · Hard · 7 min read · Testing, Formal methods, Storage engines, Query engines, Debugging
  Jepsen found a missing-results bug in TigerBeetle's query engine despite four fuzzers covering it, because the VOPR and LSM query fuzzer pre-registered disjoint queries whose matching objects were always consecutive in every secondary index, so zig-zag merge join probing was never exercised.
- [ClickHouse Newsletter November 2022: The purifying effects of obfuscation](https://swe.quest/articles/clickhouse-newsletter-november-2022-the-purifying-effects-of-obfuscation-ba5293e588a311a6.md): ClickHouse · 2022-11-10 · Medium · 8 min read · Analytics & OLAP, Testing, Privacy, Databases
  ClickHouse Cloud pricing now charges only for compute and storage, and ClickHouse 22.10 adds S3 backups (full and incremental), \`SET setting = DEFAULT\`, forced merging of old parts via \`min\_age\_to\_force\_merge\_seconds\`, a relaxed too-many-parts check for large partitions, new random-distribution functions and a preview Kafka Connect sink with exactly-once semantics.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
