From 27dcef390026ab2ac547ed8592b9fed22cd93b70 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 6 Jun 2018 17:25:51 +0200 Subject: Add a new config variable wsrep_certification_rules This is used for controlling whether to use a new/optimized certification rules or the old/classic ones that could cause more certification failures - when foreign keys are used and two INSERTs are done concurrently to the child table from different nodes. (cherry picked from commit 815d73e6af8daace6262ab63ca6c043ffc4204b3) --- sql/sys_vars.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 8a9120abdd0..d0b07472894 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -3887,6 +3887,19 @@ static Sys_var_mybool Sys_wsrep_certify_nonPK( GLOBAL_VAR(wsrep_certify_nonPK), CMD_LINE(OPT_ARG), DEFAULT(TRUE)); +static const char *wsrep_certification_rules_names[]= { "strict", "optimized", NullS }; +static Sys_var_enum Sys_wsrep_certification_rules( + "wsrep_certification_rules", + "Certification rules to use in the cluster. Possible values are: " + "\"strict\": stricter rules that could result in more certification " + "failures. " + "\"optimized\": relaxed rules that allow more concurrency and " + "cause less certification failures.", + READ_ONLY GLOBAL_VAR(wsrep_certification_rules), CMD_LINE(REQUIRED_ARG), + wsrep_certification_rules_names, DEFAULT(WSREP_CERTIFICATION_RULES_STRICT), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(0)); + static Sys_var_mybool Sys_wsrep_causal_reads( "wsrep_causal_reads", "(DEPRECATED) Setting this variable is equivalent " "to setting wsrep_sync_wait READ flag", -- cgit v1.2.1 From 8524c81254521673bb78926cc37d77455bba792e Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 28 Aug 2018 13:02:36 +0200 Subject: Make config knob wsrep_certification_rules dynamic There is no reason for it to be readonly at runtime and it is dynamic in 5.6+ already. --- sql/sys_vars.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index d0b07472894..6f6e7da531e 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -3895,7 +3895,7 @@ static Sys_var_enum Sys_wsrep_certification_rules( "failures. " "\"optimized\": relaxed rules that allow more concurrency and " "cause less certification failures.", - READ_ONLY GLOBAL_VAR(wsrep_certification_rules), CMD_LINE(REQUIRED_ARG), + GLOBAL_VAR(wsrep_certification_rules), CMD_LINE(REQUIRED_ARG), wsrep_certification_rules_names, DEFAULT(WSREP_CERTIFICATION_RULES_STRICT), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0)); -- cgit v1.2.1