The MAX_EXECUTION_TIME HINT is ineffective in version 6.5

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 6.5版本的MAX_EXECUTION_TIME HINT失效

| username: dba-kit

In previous versions, /*+ MAX_EXECUTION_TIME(10) */ could normally limit the execution time of statements (this version is 5.1.2, but if I remember correctly, 6.1 was also normal).

In version 6.5, the HINT is invalid, as shown in the figure.

Reproduction SQL:

select /*+ MAX_EXECUTION_TIME(10) */ count(1) from information_schema.tables ;
| username: dba-kit | Original post link

Uh, it’s because you’re using the MariaDB client. You need to add --comments for it to recognize HINT.

| username: dba-kit | Original post link

The 5.1 cluster system is Ubuntu 20.04, using the official MySQL 5.7 client;
The 6.5 cluster system is Ubuntu 22.04, with the default installation of MySQL 8.0 client. Due to SSL certificate issues, it was replaced with the MariaDB client.

| username: ShawnYan | Original post link

There are some differences between the mariadb client and mysqlclient, after all, they are two branches.
https://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html#option_mysql_comments

| username: dba-kit | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.