Common SQL Errors

MySQL Error 87: EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR – How to Fix and Prevent

Galaxy Team
August 5, 2025

The server cannot complete a collation comparison because it failed to reset weight levels before a tertiary ignorable Unicode character.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 87 EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR?

MySQL Error 87: EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR occurs when the server hits a collation bug while comparing or sorting Unicode text. Upgrade to a fixed 8.0.x release or switch the column to a stable utf8mb4 collation to eliminate the failure.

Error Highlights

Typical Error Message

Failed to reset before a tertiary ignorable character %s. EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR was added in 8.0.13.

Error Type

Collation Error

Language

MySQL

Symbol

EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR

Error Code

87

SQL State

Explanation

Table of Contents

What is MySQL error 87 EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR?

The error is raised by MySQL’s ICU-based collations when the comparison engine cannot reset weight levels before meeting a tertiary ignorable Unicode character such as variation selectors or some punctuation. MySQL aborts the statement and returns error code 87 instead of producing possibly incorrect sort results.

The condition was introduced in MySQL 8.0.13 together with the 0900 UCA collations.

It can surface during SELECT, ORDER BY, GROUP BY, DISTINCT, CREATE INDEX, or ALTER TABLE operations that touch affected character columns.

When does the error usually appear?

The message most often shows up on servers using utf8mb4uca_0900asci or utf8mb4uca_0900aici collations while processing data that contains zero-width joiners, variation selectors, or malformed UTF-8 sequences.

It may also fire during replication if a downstream replica runs an older patch level.

Why is it critical to fix quickly?

The failure aborts the running statement, rolls back open transactions, and can break replication. Ignoring it leaves queries unreliable and indexes unusable. Production systems risk downtime until the root cause is removed.

.

Common Causes

ICU collation bug in early 8.0.13-8.0.18 builds

Several patch levels shipped with a defect that mishandled tertiary ignorable weights, triggering the reset failure during comparisons.

Columns using unstable utf8mb4_0900_xx collations

The 0900 collations rely on newer UCA rules.

Edge Unicode code points introduced inconsistencies that expose the error.

Malformed or over-long UTF-8 byte sequences

Illegal bytes stored before migrations confuse the comparator, causing it to mis-reset and throw the error.

Mismatched libicu version after OS upgrade

If the server links to a different ICU minor than the one it was compiled with, internal weight tables may mismatch and fail.

.

Related Errors

FAQs

Does the error damage data?

No data is corrupted. MySQL aborts the statement before writing inconsistent results.

Can I ignore the error with SQL_MODE options?

No. The failure is fatal and cannot be masked by changing SQL_MODE. A fix or workaround is required.

Will Galaxy detect this issue?

Yes. Galaxy’s AI copilot surfaces server errors instantly and suggests collation fixes, reducing diagnosis time.

Is changing collation risky?

Changing collation may reorder text. Always back up and test in staging before altering production schemas.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo