How to Fix MySQL Error 1279 (ER_UNTIL_COND_IGNORED)

Published
Length
3 min read

Luis Felipe Dias

All posts

You trigger mysql error 1279 when you set a replication stop point without starting the SQL thread. You fix it by starting the SQL thread along with your stop condition. MySQL uses two main threads on a replica server to copy data. The I/O thread reads events from the source and writes the relay log. The SQL thread reads that relay log and runs the changes on the replica. When you ask the replica to stop at a set point, the SQL thread tracks that point. If you only start the I/O thread, the eng

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You trigger mysql error 1279 when you set a replication stop point without starting the SQL thread. You fix it by starting the SQL thread along with your stop condition.

MySQL uses two main threads on a replica server to copy data. The I/O thread reads events from the source and writes the relay log. The SQL thread reads that relay log and runs the changes on the replica. When you ask the replica to stop at a set point, the SQL thread tracks that point. If you only start the I/O thread, the engine has no way to enforce the stop rule.

What causes mysql error 1279 in replication

The official symbol for mysql error 1279 is ER_UNTIL_COND_IGNORED, which maps to SQLSTATE HY000. The database returns a clear message when this event occurs. It says the SQL thread is not starting, so the stop options are ignored. In many cases, the engine returns this code as a warning rather than a hard stop.

This issue happens during point-in-time recovery or controlled replica catch-up tasks. An operator wants the replica to process changes up to a specific log position or transaction identifier. Still, the command sent to the database only tells the I/O thread to start. Because the SQL thread stays off, the database drops the stop condition right away.

This creates a serious risk for your data if you do not spot the warning. The I/O thread will keep fetching events from the source server without stopping. Later, another admin might start the SQL thread without setting the stop condition again. The replica will then run all fetched events past your target recovery point.

How to diagnose and fix the replication thread state

First, check the current state of both replication threads on your replica server. Look at the replica status output to see which threads are running right now. Check if the I/O thread is active while the SQL thread is still off. You should also check the current relay log position and executed transaction set.

Next, stop the replica threads if the I/O thread started without your intended limits. Verify that no unintended changes were applied to your tables on the replica. If the SQL thread never started, your data is still at the old point.

MySQL Access Governance + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix the problem, run your start command again with the right thread options. You must include the SQL thread whenever you pass a stop condition to the replica. You can start both threads together, or you can start only the SQL thread. Once the SQL thread starts, it will read the relay log up to your target point. When it reaches that exact transaction or log position, the SQL thread stops on its own.

How to prevent replication mistakes in production

Running manual replication commands in production carries high risk for your data. A small typo in a start command can push a replica past a bad transaction. For example, someone might drop a table on the source by mistake. You then use a delayed replica to recover the lost data right before that drop. If mysql error 1279 occurs and goes unnoticed, you might replay the drop statement too.

Teams should restrict who can run replication control statements on production database nodes. Do not give full superuser roles to every engineer who needs to check replica health. Set up read-only roles for checking thread status and log positions. Require peer review before anyone runs commands that change replication state or stop rules.

You should also add automated checks to your database management scripts. Make sure your scripts check for SQLSTATE HY000 warnings right after starting replica threads. If the script sees code 1279, it should halt and alert the operator right away. Catching this warning early keeps your recovery process safe and predictable.

Check MySQL queries and results on the wire

MySQL grants control who logs in. They do not check single queries or mask sensitive columns once a session starts. With hoop.dev, you run an open-source proxy, a sidecar for your MySQL, inline in the MySQL wire protocol. On every query an AI agent or human runs against production MySQL, RDS, or Aurora, hoop.dev decides to pass, mask, block, or hold it for review.

Multi-statement batches and prepared queries are split and checked one by one by hoop.dev guardrails, which refuse banned queries with a native MySQL error or hold risky ones for approval. On the response path, hoop.dev data masking rewrites string values in returned rows in memory, and every decision is logged. See the MIT-licensed project on GitHub.

Frequently asked questions

Does mysql error 1279 stop the I/O thread from running?

No, the database usually treats code 1279 as a warning and starts the I/O thread anyway. The engine simply drops the stop condition because the SQL thread is not starting.

Can I use a stop condition with only the I/O thread?

No, stop conditions in MySQL replication apply to the SQL execution thread. You must start the SQL thread alone or start both threads together to use a stop point.

What happens if I start the SQL thread later without the stop rule?

Because the database ignored your earlier stop rule, the SQL thread will have no limit set. It will run every event in the relay log and pass your target recovery point.

The query runs. The emails stay hidden.