> ## 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 54418

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

Publication date: September 24, 2020

## Description

CockroachDB introduced a bug in the <InternalLink version="releases" path="v20.1">v20.1.4 release</InternalLink> that affects [`UPSERT`](https://www.cockroachlabs.com/docs/v20.1/upsert) and [`INSERT … ON CONFLICT DO UPDATE SET x = excluded.x`](https://www.cockroachlabs.com/docs/v20.1/insert#on-conflict-clause) statements involving more than 10,000 rows. This bug results in the following behavior:

* The execution of a single `UPSERT` statement will stop, without a visible error, after reaching 10,000 rows. The reported number of affected rows will be incorrect, reported as 0.
* Executing a single `UPSERT … RETURNING` statement will return at most 10,000 rows.

This bug was introduced in a PR which was intended to correct a previously-identified error in `UPSERT` handling. A fix (#54418) is available in the <InternalLink version="releases" path="v20.1">v20.1.6 release</InternalLink>.

## Statement

To track this issue the pull request correcting the aforementioned bugs.

## Mitigation

This regression is critical as it could silently corrupt SQL data without remediation. All unaffected customers are urged to skip releases v20.1.4 and v20.1.5 or ensure that their application code processes at most 10,000 rows per `UPSERT` statement. Customers running versions v20.1.4 or v20.1.5 are strongly encouraged to upgrade to <InternalLink version="releases" path="v20.1">v20.1.6</InternalLink>.

## Impact

All deployments running CockroachDB <InternalLink version="releases" path="v20.1">v20.1.4 release</InternalLink> and <InternalLink version="releases" path="v20.1">v20.1.5 release</InternalLink> are affected. Cockroach Labs has issued a fix in <InternalLink version="releases" path="v20.1">v20.1.6</InternalLink>. All of the other supported releases (v19.1.X, v19.2.X, v20.1.0-20.1.3) are not impacted.

Questions about any technical alert can be directed to our [support team](https://support.cockroachlabs.com/).
