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

# Technical Advisory 71002

Publication date: October 7, 2021

## Description

A bug was introduced in CockroachDB v21.1.9 that causes the database to drop `WHERE` predicates from prepared statements in specific circumstances.

The bug can only be triggered when a prepared statement references a boolean column in top-level `AND` clauses in `WHERE` clauses or `JOIN … ON` clauses. In such statements, it is possible for the part of the filter referencing the boolean column, or any other child of an adjacent `AND` expression to be omitted during execution.

Only CockroachDB version 21.1.9 is affected by this bug.

## Statement

The fix has been applied to CockroachDB 21.1.10.

## Mitigation

Users of CockroachDB 21.1.9 are encouraged to upgrade to 21.1.10 or a later version.

## Impact

Users who ran prepared statements with `WHERE` clauses and `JOIN.. ON` clauses that contained references to a boolean column in top-level `AND` expressions could have gotten incorrect query results, caused by incorrect omission of parts of the filter.

Please reach out to the [support team](https://support.cockroachlabs.com/) if you need more information or assistance.
