> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-3000-to-3099/e3024.md).

# Error 3024: You should never see it

| Error Code | SQLSTATE | Error         | Description             |
| ---------- | -------- | ------------- | ----------------------- |
| 3024       | HY000    | ER\_UNUSED\_1 | You should never see it |

## Possible Causes and Solutions

MariaDB doesn't use this error code. In MySQL, error 3024 is `ER_QUERY_TIMEOUT` (`Query execution was interrupted, maximum statement execution time exceeded`), which MySQL returns when a `SELECT` statement runs longer than its `max_execution_time` variable or its `MAX_EXECUTION_TIME` optimizer hint allows.

In MariaDB, a statement that runs too long fails with [error 1969](/docs/server/reference/error-codes/mariadb-error-codes-1900-to-1999/e1969.md) instead:

```
SET STATEMENT max_statement_time=0.1 FOR SELECT SLEEP(1) FROM seq_1_to_3;
ERROR 1969 (70100): Query was interrupted: execution time limit 0.1 sec exceeded
```

The time limit comes from one of these:

* The [max\_statement\_time](/docs/server/server-management/variables-and-modes/server-system-variables.md#max_statement_time) system variable, in seconds. MariaDB has no `max_execution_time` variable. On a replica, [slave\_max\_statement\_time](/docs/server/ha-and-performance/standard-replication/replication-and-binary-log-system-variables.md#slave_max_statement_time) limits replicated statements.
* The [MAX\_EXECUTION\_TIME](/docs/server/ha-and-performance/optimization-and-tuning/optimizer-hints/expanded-optimizer-hints.md#max_execution_time) optimizer hint, in milliseconds, from MariaDB 12.0.

If you migrate from MySQL, replace `SET max_execution_time=N` (milliseconds) with `SET max_statement_time=N/1000` (seconds), and handle error 1969 where the application handled error 3024.

To avoid the timeout, either increase the time limit or find out [why the query is slow](/docs/server/ha-and-performance/optimization-and-tuning/query-optimizations.md). Start with [EXPLAIN](/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain.md) or [ANALYZE](/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-statement.md) to see how the query is executed.

## See Also

* [Aborting Statements that Exceed a Certain Time to Execute](/docs/server/ha-and-performance/optimization-and-tuning/query-optimizations/aborting-statements.md)

{% hint style="success" %}
This article has no content. [You can help!](/docs/general-resources/about/readme/contributing-documentation.md)
{% endhint %}

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
