summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars
diff options
context:
space:
mode:
authormkaruza <mario.karuza@galeracluster.com>2020-12-08 10:07:45 +0100
committerJan Lindström <jan.lindstrom@mariadb.com>2021-01-26 14:02:24 +0200
commit95a2bca01f423dc97281709a7871f5901fd05c70 (patch)
tree2b7f71719e519ff17be630446ee6b9196f6cdfac /mysql-test/suite/sys_vars
parent3f871b339429441ad907ecf7dfabdc414797e664 (diff)
downloadmariadb-git-95a2bca01f423dc97281709a7871f5901fd05c70.tar.gz
MDEV-20008: Galera strict modebb-10.6-MDEV-20008
Added new enum variable `wsrep_mode` which can be used to turn on WSREP features which are not part of default behaviour. Added enum `BINLOG_ROW_FORMAT_ONLY`, `REQUIRED_PRIMARY_KEY` and `STRICT_REPLICATION`. `wsrep-mode=STRICT_REPLICATION` behaves like variable `wsrep_strict_ddl`. Variable wsrep_strict_ddl is deprecated and if set we use new wsrep_mode setting instead. Reviewed and improved by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'mysql-test/suite/sys_vars')
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_wsrep.result15
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_strict_ddl_basic.result45
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_strict_ddl_basic.test42
3 files changed, 15 insertions, 87 deletions
diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
index 4b6abf85434..64477f0535b 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
@@ -331,6 +331,21 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME WSREP_MODE
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT Set of WSREP features that are enabled.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST STRICT_REPLICATION,BINLOG_ROW_FORMAT_ONLY,REQUIRED_PRIMARY_KEY
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_MYSQL_REPLICATION_BUNDLE
SESSION_VALUE NULL
GLOBAL_VALUE 0
diff --git a/mysql-test/suite/sys_vars/r/wsrep_strict_ddl_basic.result b/mysql-test/suite/sys_vars/r/wsrep_strict_ddl_basic.result
deleted file mode 100644
index 6d686f9de2e..00000000000
--- a/mysql-test/suite/sys_vars/r/wsrep_strict_ddl_basic.result
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# wsrep_strict_ddl
-#
-# save the initial value
-SET @wsrep_strict_ddl_global_saved = @@global.wsrep_strict_ddl;
-# default
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-0
-
-# scope
-SELECT @@session.wsrep_strict_ddl;
-ERROR HY000: Variable 'wsrep_strict_ddl' is a GLOBAL variable
-SET @@global.wsrep_strict_ddl=OFF;
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-0
-SET @@global.wsrep_strict_ddl=ON;
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-1
-
-# valid values
-SET @@global.wsrep_strict_ddl='OFF';
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-0
-SET @@global.wsrep_strict_ddl=ON;
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-1
-SET @@global.wsrep_strict_ddl=default;
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-0
-
-# invalid values
-SET @@global.wsrep_strict_ddl=NULL;
-ERROR 42000: Variable 'wsrep_strict_ddl' can't be set to the value of 'NULL'
-SET @@global.wsrep_strict_ddl='junk';
-ERROR 42000: Variable 'wsrep_strict_ddl' can't be set to the value of 'junk'
-
-# restore the initial value
-SET @@global.wsrep_strict_ddl = @wsrep_strict_ddl_global_saved;
-# End of test
diff --git a/mysql-test/suite/sys_vars/t/wsrep_strict_ddl_basic.test b/mysql-test/suite/sys_vars/t/wsrep_strict_ddl_basic.test
deleted file mode 100644
index 04d20ff3db5..00000000000
--- a/mysql-test/suite/sys_vars/t/wsrep_strict_ddl_basic.test
+++ /dev/null
@@ -1,42 +0,0 @@
---source include/have_wsrep.inc
-
---echo #
---echo # wsrep_strict_ddl
---echo #
-
---echo # save the initial value
-SET @wsrep_strict_ddl_global_saved = @@global.wsrep_strict_ddl;
-
---echo # default
-SELECT @@global.wsrep_strict_ddl;
-
---echo
---echo # scope
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.wsrep_strict_ddl;
-SET @@global.wsrep_strict_ddl=OFF;
-SELECT @@global.wsrep_strict_ddl;
-SET @@global.wsrep_strict_ddl=ON;
-SELECT @@global.wsrep_strict_ddl;
-
---echo
---echo # valid values
-SET @@global.wsrep_strict_ddl='OFF';
-SELECT @@global.wsrep_strict_ddl;
-SET @@global.wsrep_strict_ddl=ON;
-SELECT @@global.wsrep_strict_ddl;
-SET @@global.wsrep_strict_ddl=default;
-SELECT @@global.wsrep_strict_ddl;
-
---echo
---echo # invalid values
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_strict_ddl=NULL;
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_strict_ddl='junk';
-
---echo
---echo # restore the initial value
-SET @@global.wsrep_strict_ddl = @wsrep_strict_ddl_global_saved;
-
---echo # End of test