diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-03-21 10:36:49 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-03-21 10:36:49 +0200 |
commit | 82aeb6b59640b9733c4026bda71887720153b70a (patch) | |
tree | 06ea8909b396e3a16042437b9574a85ee0156487 /sql/wsrep_var.cc | |
parent | 34b03da2114892d96af651a953f6c2527437ad15 (diff) | |
parent | eee73ddfbb29816320c9fc78c8ff1012cac6567a (diff) | |
download | mariadb-git-82aeb6b59640b9733c4026bda71887720153b70a.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/wsrep_var.cc')
-rw-r--r-- | sql/wsrep_var.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index b9eb546bf76..38d727fb470 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -26,6 +26,7 @@ #include <cstdio> #include <cstdlib> +ulong wsrep_reject_queries; static long wsrep_prev_slave_threads = wsrep_slave_threads; @@ -413,6 +414,27 @@ void wsrep_provider_options_init(const char* value) wsrep_provider_options = (value) ? my_strdup(value, MYF(0)) : NULL; } +bool wsrep_reject_queries_update(sys_var *self, THD* thd, enum_var_type type) +{ + switch (wsrep_reject_queries) { + case WSREP_REJECT_NONE: + WSREP_INFO("Allowing client queries due to manual setting"); + break; + case WSREP_REJECT_ALL: + WSREP_INFO("Rejecting client queries due to manual setting"); + break; + case WSREP_REJECT_ALL_KILL: + wsrep_close_client_connections(FALSE); + WSREP_INFO("Rejecting client queries and killing connections due to manual setting"); + break; + default: + WSREP_INFO("Unknown value for wsrep_reject_queries: %lu", + wsrep_reject_queries); + return true; + } + return false; +} + static int wsrep_cluster_address_verify (const char* cluster_address_str) { /* There is no predefined address format, it depends on provider. */ |