Commit 0706420c authored by Kristian Nielsen's avatar Kristian Nielsen

MDEV-34857: After-review fixes.

Reviewed-by: default avatarMonty <monty@mariadb.org>
Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
parent d6b234d3
......@@ -1305,7 +1305,7 @@ The following specify which files/extra groups are read (specified before remain
Maximum time a slave DDL will wait for a blocking SELECT
or other user query until that query will be aborted. The
argument will be treated as a decimal value with
microsecond precision
nanosecond precision
--slave-compressed-protocol
Use compression on master/slave protocol
--slave-connections-needed-for-purge=#
......
......@@ -4015,7 +4015,7 @@ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_ABORT_BLOCKING_TIMEOUT
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Maximum time a slave DDL will wait for a blocking SELECT or other user query until that query will be aborted. The argument will be treated as a decimal value with microsecond precision
VARIABLE_COMMENT Maximum time a slave DDL will wait for a blocking SELECT or other user query until that query will be aborted. The argument will be treated as a decimal value with nanosecond precision
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
NUMERIC_BLOCK_SIZE NULL
......
......@@ -2404,6 +2404,11 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
if (abort_blocking_timeout < lock_wait_timeout &&
m_owner->get_thd()->rgi_slave)
{
/*
After @@slave_abort_blocking_timeout seconds, kill non-replication
queries that are blocking a replication event (such as an ALTER TABLE)
from proceeding.
*/
set_timespec_nsec(abs_abort_blocking_timeout,
(ulonglong)(abort_blocking_timeout * 1000000000ULL));
abort_blocking_enabled= true;
......@@ -2428,7 +2433,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
abort_blocking= true;
abort_blocking_enabled= false;
}
if (cmp_timespec(abs_shortwait, abs_timeout) > 0)
else if (cmp_timespec(abs_shortwait, abs_timeout) > 0)
break;
/* abs_timeout is far away. Wait a short while and notify locks. */
......
......@@ -2598,7 +2598,7 @@ static Sys_var_on_access_global<
"slave_abort_blocking_timeout",
"Maximum time a slave DDL will wait for a blocking SELECT or other "
"user query until that query will be aborted. The argument will be "
"treated as a decimal value with microsecond precision",
"treated as a decimal value with nanosecond precision",
GLOBAL_VAR(slave_abort_blocking_timeout), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, LONG_TIMEOUT), DEFAULT(LONG_TIMEOUT), NO_MUTEX_GUARD,
NOT_IN_BINLOG);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment