> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ast_fuzzer_* 会话设置

> ClickHouse ast_fuzzer_* 分组中的会话设置。

这些设置可在 [system.settings](https://clickhouse.com/docs/zh/reference/system-tables/settings.md) 中查看，并由 [源文件](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

## ast\_fuzzer\_any\_query

[Experimental 功能](https://clickhouse.com/docs/reference/settings/beta-and-experimental-features.md#experimental-features)

类型

Bool

默认值

0

当为 false (默认值) 时，服务器端 AST fuzzer (由 `ast_fuzzer_runs` 控制) 仅对只读查询 (SELECT、EXPLAIN、SHOW、DESCRIBE、EXISTS) 进行 fuzzing。当为 true 时，则会对所有查询类型进行 fuzzing，包括 DDL 和 INSERT。

## ast\_fuzzer\_oracle

[Experimental 功能](https://clickhouse.com/docs/reference/settings/beta-and-experimental-features.md#experimental-features)

类型

Bool

默认值

0

与 `ast_fuzzer_runs` 一同启用时，会对成功执行的经模糊测试的 SELECT 查询应用一组正确性预言机检查：TLP WHERE/DISTINCT/GROUP BY/HAVING/Aggregate、NoREC、DQP (切换各个 optimizer 设置) 、Identity WHERE 和 Subquery wrap。若检查结果不一致，将抛出 `AST_FUZZER_ORACLE_MISMATCH` 异常。

## ast\_fuzzer\_runs

[Experimental 功能](https://clickhouse.com/docs/reference/settings/beta-and-experimental-features.md#experimental-features)

类型

Float

默认值

0

启用服务器端 AST fuzzer。它会在每次普通查询后运行随机查询，并丢弃其结果。

* 0：禁用 (默认) 。
* 大于 0 且小于 1 的值 (exclusive) ：运行单个模糊测试查询的概率。
* 值 >= 1：每次普通查询要运行的模糊测试查询数量。

fuzzer 会跨所有会话累积来自全部查询的 AST 片段，并随着时间推移生成越来越有意思的变体。执行失败的模糊测试查询会被静默丢弃；结果绝不会返回给客户端。
