1476
MySQLERRORNotableQueryHIGH confidence

Query execution was interrupted by KILL QUERY

Production Risk

Medium — the query did not complete; results were not returned.

What this means

ER_QUERY_INTERRUPTED (1476, SQLSTATE 70100) is raised when a query is terminated by a KILL QUERY command or the client disconnects.

Why it happens
  1. 1DBA executed KILL QUERY <thread_id> to stop a long-running query
  2. 2Client disconnected mid-query
  3. 3Query timeout via MAX_EXECUTION_TIME or wait_timeout
How to reproduce
trigger — this will error
trigger — this will error
-- From another session:
KILL QUERY 42;  -- Terminates query running on thread 42

expected output

ERROR 1476 (70100): Query execution was interrupted

Fix

Identify and optimize the slow query

Identify and optimize the slow query
-- Find long-running queries:
SHOW PROCESSLIST;

-- Check slow query log:
SHOW VARIABLES LIKE 'slow_query_log%';

-- Optimize with EXPLAIN:
EXPLAIN SELECT * FROM large_table WHERE unindexed_col = 'value';

Why this works

If the query was killed due to performance, optimize it with proper indexing and query restructuring.

Sources
Official documentation ↗

MySQL 8.0 — 1476 ER_QUERY_INTERRUPTED

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors