Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Cannot Reproduce
-
N/A
Description
This issue is sporadic, and possibly [OS] timing related. For me it replays once every 1 to 13 attempts, provided the server is restarted each attempt.
SELECT /*+ MAX_EXECUTION_TIME(1) */ SLEEP(.5); |
Leads to, pre-patch:
CS 11.8.0 7734c85c31c9e292ef1133115fba2f7edd71dd51 (Optimized) |
11.8.0-opt>SELECT /*+ MAX_EXECUTION_TIME(1) */ SLEEP(.5); # Note the extra syntax is not valid and ignored here
|
+-----------+
|
| SLEEP(.5) |
|
+-----------+
|
| 0 |
|
+-----------+
|
1 row in set (0.500 sec)
|
Versus post-patch:
bb-11.8-MDEV-35504-opt-hints CS 11.8.0 6d92aa1cf0a042e506189b6739e03a8b45e20ee7 (Optimized) |
11.8.0-opt>SELECT /*+ MAX_EXECUTION_TIME(1) */ SLEEP(.5);
|
+-----------+
|
| SLEEP(.5) |
|
+-----------+
|
| 1 |
|
+-----------+
|
1 row in set (0.002 sec)
|
Note the incorrect 0.002 sec as well as the '1' output. When the feature works as epected we instead see:
bb-11.8-MDEV-35504-opt-hints CS 11.8.0 6d92aa1cf0a042e506189b6739e03a8b45e20ee7 (Optimized) |
11.8.0-opt>SELECT /*+ MAX_EXECUTION_TIME(1) */ SLEEP(.5);
|
ERROR 1969 (70100): Query execution was interrupted (max_statement_time exceeded)
|
Additionally, and though not related to the feature, as the following reports a warning:
bb-11.8-MDEV-35504-opt-hints CS 11.8.0 6d92aa1cf0a042e506189b6739e03a8b45e20ee7 (Optimized) |
11.8.0-opt>SELECT /*+ INVALID(1) */ SLEEP(.5);
|
+-----------+
|
| SLEEP(.5) |
|
+-----------+
|
| 0 |
|
+-----------+
|
1 row in set, 1 warning (0.500 sec)
|
|
11.8.0-opt>SHOW WARNINGS;
|
+---------+------+----------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------------------------------------+
|
| Warning | 1064 | Optimizer hint syntax error near 'INVALID(1) */ SLEEP(.5)' at line 1 |
|
+---------+------+----------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|
one would expect a similar warning pre-patch for the there-invalid MAX_EXECUTION_TIME hint, which is not present as can be seen from the first output above.
Perhaps this can be fixed at the same time, or we can open a new ticket.
Attachments
Issue Links
- is caused by
-
MDEV-34860 Implement MAX_EXECUTION_TIME hint
-
- Stalled
-
The issue does not reproduce under MTR, irrespective of how many parallel threads, repeats,restarts and/or server kills etc. are used.
Please use the native CLI, either directly (with restarts/fresh data dirs) or with some script. For me the following worked well:
Where anc is a shortcut script that brings up a new server instance with a fresh data dir, and mysql.out is the output written by ./test which does:
And in.sql contained the original testcase posted above. This produces the issue once every 1 to 13 loops.