Details
-
New Feature
-
Status: In Testing (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
The hint limits the time of statement execution to the number of milliseconds given in the hint argument. The syntax is as follows:
SELECT /*+ MAX_EXECUTION_TIME(milliseconds) */ ... |
Only top-level SELECT statements support the hint. Trying to apply it to INSERT, REPLACE, UPDATE and DELETE must issue a warning. The hint is not supported inside stored procedures, triggers, events and subqueries.
Correctly handle situations where max_statement_time variable is set like here:
SET STATEMENT max_statement_time=1 FOR |
SELECT /*+ MAX_EXECUTION_TIME(500) */ count(*) FROM t1 a; |
In this case a warning must be issued, and the hint MAX_EXECUTION_TIME must be ignored.
Attachments
Issue Links
- causes
-
MDEV-35817 MAX_EXECUTION_TIME does not honor SLEEP(.5)
- In Progress
-
MDEV-35822 UBSAN: UndefinedBehaviorSanitizer: function-type-mismatch in process_timers when using MAX_EXECUTION_TIME
- Closed
-
MDEV-35871 Query that runs for 2ms was not terminated when using MAX_EXECUTION_TIME(1)
- Open
-
MDEV-35880 Incorrect error message when MAX_EXECUTION_TIME was exceeded
- Confirmed
- relates to
-
MDEV-35851 SIGSEGV in list_add on INSERT
- Closed
-
MDEV-33285 Assertion `m_table' failed in ha_perfschema::rnd_end on CHECKSUM TABLE
- In Review
-
MDEV-35483 Docs for optimizer hints
- In Progress
-
MDEV-35819 Documentation: versions for Optimizer hints
- Confirmed
- split from
-
MDEV-33281 Implement optimizer hints like in MySQL 8
- In Progress
The final version is in the branch
bb-opt-hints-1
.