mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-34860 Implement MAX_EXECUTION_TIME hint
It places a limit N (a timeout value in milliseconds) on how long a statement is permitted to execute before the server terminates it. Syntax: SELECT /*+ MAX_EXECUTION_TIME(milliseconds) */ ... Only top-level SELECT statements support the hint.
This commit is contained in:
@ -6040,7 +6040,7 @@ public:
|
||||
ulonglong num_of_strings_sorted_on_truncated_length;
|
||||
|
||||
public:
|
||||
void set_query_timer()
|
||||
void set_query_timer_if_needed()
|
||||
{
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
/*
|
||||
@ -6059,9 +6059,13 @@ public:
|
||||
*/
|
||||
if (!timeout_val || spcont || in_sub_stmt || query_timer.expired == 0)
|
||||
return;
|
||||
thr_timer_settime(&query_timer, timeout_val);
|
||||
set_query_timer_force(timeout_val);
|
||||
#endif
|
||||
}
|
||||
void set_query_timer_force(ulonglong timeout_val)
|
||||
{
|
||||
thr_timer_settime(&query_timer, timeout_val);
|
||||
}
|
||||
void reset_query_timer()
|
||||
{
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
|
Reference in New Issue
Block a user