diff options
author | Nirbhay Choubey <nirbhay.choubey@gmail.com> | 2014-09-08 13:19:20 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay.choubey@gmail.com> | 2014-09-08 13:19:20 -0400 |
commit | 26e048ffd30e05a60a330a708341e1fff0df0a9e (patch) | |
tree | 24b2b820de9eb8e61659df21768617ef7fa7690e /mysql-test/suite/sys_vars/t/wsrep_causal_reads_basic.test | |
parent | 7c58dd80e599862f42c60186c0c913cb9f64b6b6 (diff) | |
download | mariadb-git-26e048ffd30e05a60a330a708341e1fff0df0a9e.tar.gz |
Merged sys_vars.wsrep_* tests from maria-10.0-galera tree.
Diffstat (limited to 'mysql-test/suite/sys_vars/t/wsrep_causal_reads_basic.test')
-rw-r--r-- | mysql-test/suite/sys_vars/t/wsrep_causal_reads_basic.test | 52 |
1 files changed, 42 insertions, 10 deletions
diff --git a/mysql-test/suite/sys_vars/t/wsrep_causal_reads_basic.test b/mysql-test/suite/sys_vars/t/wsrep_causal_reads_basic.test index 2fb597e842e..6539e5cba85 100644 --- a/mysql-test/suite/sys_vars/t/wsrep_causal_reads_basic.test +++ b/mysql-test/suite/sys_vars/t/wsrep_causal_reads_basic.test @@ -1,13 +1,45 @@ ---source include/galera_cluster.inc ---source include/have_innodb.inc +--source include/have_wsrep.inc -set @start_value = @@wsrep_causal_reads; +--echo # +--echo # wsrep_causal_reads +--echo # -set @@global.wsrep_causal_reads=ON; -set @@global.wsrep_causal_reads=OFF; -set @@global.wsrep_causal_reads=1; -set @@global.wsrep_causal_reads=0; ---Error 1231 -SET @@global.wsrep_causal_reads = -1; +--echo # save the initial values +SET @wsrep_causal_reads_global_saved = @@global.wsrep_causal_reads; +SET @wsrep_causal_reads_session_saved = @@session.wsrep_causal_reads; -set @@global.wsrep_causal_reads = @start_value; +--echo # default +SELECT @@global.wsrep_causal_reads; +SELECT @@session.wsrep_causal_reads; + +--echo +--echo # scope and valid values +SET @@global.wsrep_causal_reads=OFF; +SELECT @@global.wsrep_causal_reads; +SET @@global.wsrep_causal_reads=ON; +SELECT @@global.wsrep_causal_reads; + +SET @@session.wsrep_causal_reads=OFF; +SELECT @@session.wsrep_causal_reads; +SET @@session.wsrep_causal_reads=ON; +SELECT @@session.wsrep_causal_reads; +SET @@session.wsrep_causal_reads=default; +SELECT @@session.wsrep_causal_reads; + +--echo +--echo # invalid values +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.wsrep_causal_reads=NULL; +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.wsrep_causal_reads='junk'; +--error ER_WRONG_VALUE_FOR_VAR +SET @@session.wsrep_causal_reads=NULL; +--error ER_WRONG_VALUE_FOR_VAR +SET @@session.wsrep_causal_reads='junk'; + +--echo +--echo # restore the initial values +SET @@global.wsrep_causal_reads = @wsrep_causal_reads_global_saved; +SET @@session.wsrep_causal_reads = @wsrep_causal_reads_session_saved; + +--echo # End of test |