1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.7' into 10.8

This commit is contained in:
Oleksandr Byelkin
2022-02-04 14:50:25 +01:00
907 changed files with 20182 additions and 6211 deletions

View File

@@ -1,5 +1,5 @@
/* Copyright (c) 2002, 2015, Oracle and/or its affiliates.
Copyright (c) 2012, 2021, MariaDB Corporation.
Copyright (c) 2012, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@
#include "sql_plugin.h"
#include "sql_priv.h"
#include "sql_class.h" // set_var.h: THD
#include "sys_vars.ic"
#include "sys_vars.inl"
#include "my_sys.h"
#include "events.h"
@@ -3279,6 +3279,21 @@ static Sys_var_charptr_fscs Sys_secure_file_priv(
PREALLOCATED READ_ONLY GLOBAL_VAR(opt_secure_file_priv),
CMD_LINE(REQUIRED_ARG), DEFAULT(0));
static bool check_server_id(sys_var *self, THD *thd, set_var *var)
{
#ifdef WITH_WSREP
if (WSREP_ON && WSREP_PROVIDER_EXISTS && !wsrep_new_cluster && wsrep_gtid_mode)
{
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
ER_WRONG_VALUE_FOR_VAR,
"Can't change server_id because wsrep and wsrep_gtid_mode is set."
" You can set server_id only with wsrep_new_cluster. ");
return true;
}
#endif /* WITH_WSREP */
return false;
}
static bool fix_server_id(sys_var *self, THD *thd, enum_var_type type)
{
if (type == OPT_GLOBAL)
@@ -3303,7 +3318,7 @@ Sys_server_id(
"replication partners",
SESSION_VAR(server_id), CMD_LINE(REQUIRED_ARG, OPT_SERVER_ID),
VALID_RANGE(1, UINT_MAX32), DEFAULT(1), BLOCK_SIZE(1), NO_MUTEX_GUARD,
NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_server_id));
NOT_IN_BINLOG, ON_CHECK(check_server_id), ON_UPDATE(fix_server_id));
static Sys_var_on_access_global<Sys_var_mybool,
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_COMPRESSED_PROTOCOL>