Common SQL Errors

MySQL Error 86: EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR - Fix and Prevention

Galaxy Team
August 5, 2025

The server fails to reset its collation state before encountering a primary ignorable Unicode character, halting the current operation.

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 code 86: EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR?

MySQL Error 86: EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR happens when the server cannot reset its collation iterator before a primary-ignorable Unicode character. Upgrade to 8.0.34 or apply the ICU collation patch, then rerun the statement to resolve the issue.

Error Highlights

Typical Error Message

Failed to reset before a primary ignorable character %s. EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR was added in 8.0.13.

Error Type

Encoding Error

Language

MySQL

Symbol

EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR

Error Code

86

SQL State

Explanation

Table of Contents

What is MySQL error code 86: EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR?

This global MySQL error appears when the server's collation iterator fails to reset before a primary ignorable Unicode character such as a combining mark. The failure interrupts the SQL statement and returns error 86.

The condition name EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR was introduced in MySQL 8.0.13 and is tied to the ICU collation engine.

It mainly affects ORDER BY, GROUP BY, and index-related operations using Unicode collations.

What Causes This Error?

The error is triggered by an internal bug or misconfiguration in the ICU ordering logic.

It usually surfaces when sorting or comparing strings that begin with or contain primary ignorable characters in Unicode-based collations such as utf8mb4_0900_ai_ci.

Outdated server binaries, corrupted ICU data files, or custom collations compiled without full reset support can also provoke the fault.

How to Fix MySQL Error 86: EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR

The quickest remedy is to upgrade to a MySQL version where the bug is patched (8.0.34 or later).

The upgrade refreshes ICU libraries and resets internal collation tables.

If an upgrade is not possible, rebuild MySQL with a newer ICU release, or disable the problematic collation by switching affected columns to a stable alternative like utf8mb4_general_ci.

Common Scenarios and Solutions

Ordering customer names that start with accents may fail on 8.0.19. Switching to utf8mb4_unicode_ci or upgrading the server fixes the issue instantly.

Bulk importing multilingual data can crash at the first primary ignorable character.

Import the data with the --skip-constraints flag, then ALTER TABLE to a safe collation post load.

Best Practices to Avoid This Error

Always test Unicode heavy workloads on staging after each MySQL upgrade.

Include edge cases with leading combining marks.

Pin your Docker images to a specific minor version known to be stable, and automate integration tests that sort and compare sample strings containing primary ignorable characters.

Related Errors and Solutions

Error 184 – EE_ICU_COLLATION_ERROR occurs when the ICU engine hits a general collation fault. Upgrading ICU or switching collations solves both 184 and 86.

Error 1273 – Unknown collation 'utf8mb4_0900_ai_ci' surfaces when the target server lacks the collation included in 8.0.13+.

Replace the collation string or upgrade the server.

.

Common Causes

Related Errors

FAQs

Does this error corrupt data?

No. The operation aborts before data is written, so tables remain intact. Still, rerun integrity checks after fixing.

Can I ignore the error and continue?

Not safely. The statement fails and any dependent process stops. Apply a fix to restore stability.

Is changing collation enough?

Often yes. Switching to a stable collation circumvents the buggy code paths, but upgrading remains the long-term solution.

How does Galaxy help?

Galaxy lets you version upgrade scripts, test different collations in sandbox connections, and share endorsed fixes across your team.

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