mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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:
@@ -380,7 +380,7 @@ protected:
|
||||
|
||||
|
||||
/*
|
||||
A rule consisting of a choice of thee rules:
|
||||
A rule consisting of a choice of three rules:
|
||||
rule ::= rule1 | rule2 | rule3
|
||||
|
||||
For the case when the three branches have incompatible storage
|
||||
@@ -478,7 +478,50 @@ protected:
|
||||
|
||||
|
||||
/*
|
||||
A list with at least MIN_COUNT elements (typlically 0 or 1),
|
||||
A rule consisting of a choice of four rules:
|
||||
rule ::= rule1 | rule2 | rule3 | rule4
|
||||
|
||||
For the case when the three branches have incompatible storage
|
||||
*/
|
||||
template<class PARSER, class A, class B, class C, class D>
|
||||
class OR4: public A, public B, public C, public D
|
||||
{
|
||||
public:
|
||||
OR4()
|
||||
{ }
|
||||
OR4(OR4 &&rhs)
|
||||
:A(std::move(static_cast<A&&>(rhs))),
|
||||
B(std::move(static_cast<B&&>(rhs))),
|
||||
C(std::move(static_cast<C&&>(rhs))),
|
||||
D(std::move(static_cast<D&&>(rhs)))
|
||||
{ }
|
||||
OR4 & operator=(OR4 &&rhs)
|
||||
{
|
||||
A::operator=(std::move(static_cast<A&&>(rhs)));
|
||||
B::operator=(std::move(static_cast<B&&>(rhs)));
|
||||
C::operator=(std::move(static_cast<C&&>(rhs)));
|
||||
D::operator=(std::move(static_cast<D&&>(rhs)));
|
||||
return *this;
|
||||
}
|
||||
OR4(PARSER *p)
|
||||
:A(p),
|
||||
B(A::operator bool() ? B() : B(p)),
|
||||
C(A::operator bool() || B::operator bool() ? C() : C(p)),
|
||||
D(A::operator bool() || B::operator bool() || C::operator bool() ?
|
||||
D() : D(p))
|
||||
{
|
||||
DBUG_ASSERT(!operator bool() || !p->is_error());
|
||||
}
|
||||
operator bool() const
|
||||
{
|
||||
return A::operator bool() || B::operator bool() || C::operator bool() ||
|
||||
D::operator bool();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
A list with at least MIN_COUNT elements (typically 0 or 1),
|
||||
with or without a token separator between elements:
|
||||
|
||||
list ::= element [ {, element }... ] // with a separator
|
||||
|
Reference in New Issue
Block a user