diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-08-11 17:09:59 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-08-11 17:09:59 -0400 |
commit | e1facda416897c35b9dde90a14d3578f3ca2df9b (patch) | |
tree | 43e17ecd531162f0be737e79afd4ea374267bd5b | |
parent | f64a0c3f859fbaa8160b8ea31a4b548e62a15e0f (diff) | |
download | mariadb-git-e1facda416897c35b9dde90a14d3578f3ca2df9b.tar.gz |
Fix for some failing tests.
-rw-r--r-- | mysql-test/include/have_innodb_disallow_writes.inc | 6 | ||||
-rw-r--r-- | mysql-test/include/have_wsrep.inc | 2 | ||||
-rw-r--r-- | mysql-test/r/innodb_load_xa_with_wsrep.result | 18 | ||||
-rw-r--r-- | mysql-test/r/mysqld--help.result | 7 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/all_vars.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/innodb_disallow_writes_basic.result | 45 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/wsrep_slave_fk_checks_basic.result | 45 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/wsrep_slave_uk_checks_basic.result | 45 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/t/innodb_disallow_writes_basic.test | 42 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/t/wsrep_slave_fk_checks_basic.test | 42 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/t/wsrep_slave_uk_checks_basic.test | 42 | ||||
-rw-r--r-- | mysql-test/t/innodb_load_xa.test | 1 | ||||
-rw-r--r-- | mysql-test/t/innodb_load_xa_with_wsrep.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/innodb_load_xa_with_wsrep.test | 19 |
14 files changed, 314 insertions, 2 deletions
diff --git a/mysql-test/include/have_innodb_disallow_writes.inc b/mysql-test/include/have_innodb_disallow_writes.inc new file mode 100644 index 00000000000..83b516b7a34 --- /dev/null +++ b/mysql-test/include/have_innodb_disallow_writes.inc @@ -0,0 +1,6 @@ +--source include/have_innodb.inc + +if (`SELECT COUNT(*) = 0 from INFORMATION_SCHEMA.GLOBAL_VARIABLES + WHERE VARIABLE_NAME = 'INNODB_DISALLOW_WRITES'`) { + --skip Test requires 'innodb_disallow_writes' +} diff --git a/mysql-test/include/have_wsrep.inc b/mysql-test/include/have_wsrep.inc index a3ceae41d40..52220edf481 100644 --- a/mysql-test/include/have_wsrep.inc +++ b/mysql-test/include/have_wsrep.inc @@ -3,6 +3,6 @@ if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`) { - --skip Test required wsrep plugin. + --skip Test requires wsrep plugin. } diff --git a/mysql-test/r/innodb_load_xa_with_wsrep.result b/mysql-test/r/innodb_load_xa_with_wsrep.result new file mode 100644 index 00000000000..6064dcd22d3 --- /dev/null +++ b/mysql-test/r/innodb_load_xa_with_wsrep.result @@ -0,0 +1,18 @@ +install plugin innodb soname 'ha_innodb'; +select engine,support,transactions,xa from information_schema.engines where engine='innodb'; +engine support transactions xa +InnoDB YES YES YES +create table t1 (a int) engine=innodb; +start transaction; +insert t1 values (1); +insert t1 values (2); +commit; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb +mysqld-bin.000001 # Query # # BEGIN +mysqld-bin.000001 # Query # # use `test`; insert t1 values (1) +mysqld-bin.000001 # Query # # use `test`; insert t1 values (2) +mysqld-bin.000001 # Xid # # COMMIT /* XID */ +drop table t1; +uninstall plugin innodb; diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index 1b6aeaf6326..82ef0aee3d5 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -917,6 +917,11 @@ The following options may be given as the first argument: --wsrep-retry-autocommit=# Max number of times to retry a failed autocommit statement + --wsrep-slave-FK-checks + Should slave thread do foreign key constraint checks + (Defaults to on; use --skip-wsrep-slave-FK-checks to disable.) + --wsrep-slave-UK-checks + Should slave thread do secondary index uniqueness chesks --wsrep-slave-threads=# Number of slave appliers to launch --wsrep-sst-auth=name @@ -1209,6 +1214,8 @@ wsrep-recover FALSE wsrep-replicate-myisam FALSE wsrep-restart-slave FALSE wsrep-retry-autocommit 1 +wsrep-slave-FK-checks TRUE +wsrep-slave-UK-checks FALSE wsrep-slave-threads 1 wsrep-sst-auth (No default value) wsrep-sst-donor diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result index aa40005f5e2..1bd4e394f6a 100644 --- a/mysql-test/suite/sys_vars/r/all_vars.result +++ b/mysql-test/suite/sys_vars/r/all_vars.result @@ -10,6 +10,5 @@ there should be *no* long test name listed below: select distinct variable_name as `there should be *no* variables listed below:` from t2 left join t1 on variable_name=test_name where test_name is null; there should be *no* variables listed below: -innodb_disallow_writes drop table t1; drop table t2; diff --git a/mysql-test/suite/sys_vars/r/innodb_disallow_writes_basic.result b/mysql-test/suite/sys_vars/r/innodb_disallow_writes_basic.result new file mode 100644 index 00000000000..bfb6b67b5d8 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_disallow_writes_basic.result @@ -0,0 +1,45 @@ +# +# innodb_disallow_writes +# +# save the initial value +SET @innodb_disallow_writes_global_saved = @@global.innodb_disallow_writes; +# default +SELECT @@global.innodb_disallow_writes; +@@global.innodb_disallow_writes +0 + +# scope +SELECT @@session.innodb_disallow_writes; +ERROR HY000: Variable 'innodb_disallow_writes' is a GLOBAL variable +SET @@global.innodb_disallow_writes=OFF; +SELECT @@global.innodb_disallow_writes; +@@global.innodb_disallow_writes +0 +SET @@global.innodb_disallow_writes=ON; +SELECT @@global.innodb_disallow_writes; +@@global.innodb_disallow_writes +1 + +# valid values +SET @@global.innodb_disallow_writes='OFF'; +SELECT @@global.innodb_disallow_writes; +@@global.innodb_disallow_writes +0 +SET @@global.innodb_disallow_writes=ON; +SELECT @@global.innodb_disallow_writes; +@@global.innodb_disallow_writes +1 +SET @@global.innodb_disallow_writes=default; +SELECT @@global.innodb_disallow_writes; +@@global.innodb_disallow_writes +0 + +# invalid values +SET @@global.innodb_disallow_writes=NULL; +ERROR 42000: Variable 'innodb_disallow_writes' can't be set to the value of 'NULL' +SET @@global.innodb_disallow_writes='junk'; +ERROR 42000: Variable 'innodb_disallow_writes' can't be set to the value of 'junk' + +# restore the initial value +SET @@global.innodb_disallow_writes = @innodb_disallow_writes_global_saved; +# End of test diff --git a/mysql-test/suite/sys_vars/r/wsrep_slave_fk_checks_basic.result b/mysql-test/suite/sys_vars/r/wsrep_slave_fk_checks_basic.result new file mode 100644 index 00000000000..40b3270e221 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/wsrep_slave_fk_checks_basic.result @@ -0,0 +1,45 @@ +# +# wsrep_slave_fk_checks +# +# save the initial value +SET @wsrep_slave_fk_checks_global_saved = @@global.wsrep_slave_fk_checks; +# default +SELECT @@global.wsrep_slave_fk_checks; +@@global.wsrep_slave_fk_checks +1 + +# scope +SELECT @@session.wsrep_slave_fk_checks; +ERROR HY000: Variable 'wsrep_slave_FK_checks' is a GLOBAL variable +SET @@global.wsrep_slave_fk_checks=OFF; +SELECT @@global.wsrep_slave_fk_checks; +@@global.wsrep_slave_fk_checks +0 +SET @@global.wsrep_slave_fk_checks=ON; +SELECT @@global.wsrep_slave_fk_checks; +@@global.wsrep_slave_fk_checks +1 + +# valid values +SET @@global.wsrep_slave_fk_checks='OFF'; +SELECT @@global.wsrep_slave_fk_checks; +@@global.wsrep_slave_fk_checks +0 +SET @@global.wsrep_slave_fk_checks=ON; +SELECT @@global.wsrep_slave_fk_checks; +@@global.wsrep_slave_fk_checks +1 +SET @@global.wsrep_slave_fk_checks=default; +SELECT @@global.wsrep_slave_fk_checks; +@@global.wsrep_slave_fk_checks +1 + +# invalid values +SET @@global.wsrep_slave_fk_checks=NULL; +ERROR 42000: Variable 'wsrep_slave_FK_checks' can't be set to the value of 'NULL' +SET @@global.wsrep_slave_fk_checks='junk'; +ERROR 42000: Variable 'wsrep_slave_FK_checks' can't be set to the value of 'junk' + +# restore the initial value +SET @@global.wsrep_slave_fk_checks = @wsrep_slave_fk_checks_global_saved; +# End of test diff --git a/mysql-test/suite/sys_vars/r/wsrep_slave_uk_checks_basic.result b/mysql-test/suite/sys_vars/r/wsrep_slave_uk_checks_basic.result new file mode 100644 index 00000000000..b78a83b547d --- /dev/null +++ b/mysql-test/suite/sys_vars/r/wsrep_slave_uk_checks_basic.result @@ -0,0 +1,45 @@ +# +# wsrep_slave_uk_checks +# +# save the initial value +SET @wsrep_slave_uk_checks_global_saved = @@global.wsrep_slave_uk_checks; +# default +SELECT @@global.wsrep_slave_uk_checks; +@@global.wsrep_slave_uk_checks +0 + +# scope +SELECT @@session.wsrep_slave_uk_checks; +ERROR HY000: Variable 'wsrep_slave_UK_checks' is a GLOBAL variable +SET @@global.wsrep_slave_uk_checks=OFF; +SELECT @@global.wsrep_slave_uk_checks; +@@global.wsrep_slave_uk_checks +0 +SET @@global.wsrep_slave_uk_checks=ON; +SELECT @@global.wsrep_slave_uk_checks; +@@global.wsrep_slave_uk_checks +1 + +# valid values +SET @@global.wsrep_slave_uk_checks='OFF'; +SELECT @@global.wsrep_slave_uk_checks; +@@global.wsrep_slave_uk_checks +0 +SET @@global.wsrep_slave_uk_checks=ON; +SELECT @@global.wsrep_slave_uk_checks; +@@global.wsrep_slave_uk_checks +1 +SET @@global.wsrep_slave_uk_checks=default; +SELECT @@global.wsrep_slave_uk_checks; +@@global.wsrep_slave_uk_checks +0 + +# invalid values +SET @@global.wsrep_slave_uk_checks=NULL; +ERROR 42000: Variable 'wsrep_slave_UK_checks' can't be set to the value of 'NULL' +SET @@global.wsrep_slave_uk_checks='junk'; +ERROR 42000: Variable 'wsrep_slave_UK_checks' can't be set to the value of 'junk' + +# restore the initial value +SET @@global.wsrep_slave_uk_checks = @wsrep_slave_uk_checks_global_saved; +# End of test diff --git a/mysql-test/suite/sys_vars/t/innodb_disallow_writes_basic.test b/mysql-test/suite/sys_vars/t/innodb_disallow_writes_basic.test new file mode 100644 index 00000000000..b8e5c127377 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_disallow_writes_basic.test @@ -0,0 +1,42 @@ +--source include/have_innodb_disallow_writes.inc + +--echo # +--echo # innodb_disallow_writes +--echo # + +--echo # save the initial value +SET @innodb_disallow_writes_global_saved = @@global.innodb_disallow_writes; + +--echo # default +SELECT @@global.innodb_disallow_writes; + +--echo +--echo # scope +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.innodb_disallow_writes; +SET @@global.innodb_disallow_writes=OFF; +SELECT @@global.innodb_disallow_writes; +SET @@global.innodb_disallow_writes=ON; +SELECT @@global.innodb_disallow_writes; + +--echo +--echo # valid values +SET @@global.innodb_disallow_writes='OFF'; +SELECT @@global.innodb_disallow_writes; +SET @@global.innodb_disallow_writes=ON; +SELECT @@global.innodb_disallow_writes; +SET @@global.innodb_disallow_writes=default; +SELECT @@global.innodb_disallow_writes; + +--echo +--echo # invalid values +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.innodb_disallow_writes=NULL; +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.innodb_disallow_writes='junk'; + +--echo +--echo # restore the initial value +SET @@global.innodb_disallow_writes = @innodb_disallow_writes_global_saved; + +--echo # End of test diff --git a/mysql-test/suite/sys_vars/t/wsrep_slave_fk_checks_basic.test b/mysql-test/suite/sys_vars/t/wsrep_slave_fk_checks_basic.test new file mode 100644 index 00000000000..dd60eb8694b --- /dev/null +++ b/mysql-test/suite/sys_vars/t/wsrep_slave_fk_checks_basic.test @@ -0,0 +1,42 @@ +--source include/have_wsrep.inc + +--echo # +--echo # wsrep_slave_fk_checks +--echo # + +--echo # save the initial value +SET @wsrep_slave_fk_checks_global_saved = @@global.wsrep_slave_fk_checks; + +--echo # default +SELECT @@global.wsrep_slave_fk_checks; + +--echo +--echo # scope +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.wsrep_slave_fk_checks; +SET @@global.wsrep_slave_fk_checks=OFF; +SELECT @@global.wsrep_slave_fk_checks; +SET @@global.wsrep_slave_fk_checks=ON; +SELECT @@global.wsrep_slave_fk_checks; + +--echo +--echo # valid values +SET @@global.wsrep_slave_fk_checks='OFF'; +SELECT @@global.wsrep_slave_fk_checks; +SET @@global.wsrep_slave_fk_checks=ON; +SELECT @@global.wsrep_slave_fk_checks; +SET @@global.wsrep_slave_fk_checks=default; +SELECT @@global.wsrep_slave_fk_checks; + +--echo +--echo # invalid values +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.wsrep_slave_fk_checks=NULL; +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.wsrep_slave_fk_checks='junk'; + +--echo +--echo # restore the initial value +SET @@global.wsrep_slave_fk_checks = @wsrep_slave_fk_checks_global_saved; + +--echo # End of test diff --git a/mysql-test/suite/sys_vars/t/wsrep_slave_uk_checks_basic.test b/mysql-test/suite/sys_vars/t/wsrep_slave_uk_checks_basic.test new file mode 100644 index 00000000000..c9012954371 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/wsrep_slave_uk_checks_basic.test @@ -0,0 +1,42 @@ +--source include/have_wsrep.inc + +--echo # +--echo # wsrep_slave_uk_checks +--echo # + +--echo # save the initial value +SET @wsrep_slave_uk_checks_global_saved = @@global.wsrep_slave_uk_checks; + +--echo # default +SELECT @@global.wsrep_slave_uk_checks; + +--echo +--echo # scope +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@session.wsrep_slave_uk_checks; +SET @@global.wsrep_slave_uk_checks=OFF; +SELECT @@global.wsrep_slave_uk_checks; +SET @@global.wsrep_slave_uk_checks=ON; +SELECT @@global.wsrep_slave_uk_checks; + +--echo +--echo # valid values +SET @@global.wsrep_slave_uk_checks='OFF'; +SELECT @@global.wsrep_slave_uk_checks; +SET @@global.wsrep_slave_uk_checks=ON; +SELECT @@global.wsrep_slave_uk_checks; +SET @@global.wsrep_slave_uk_checks=default; +SELECT @@global.wsrep_slave_uk_checks; + +--echo +--echo # invalid values +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.wsrep_slave_uk_checks=NULL; +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.wsrep_slave_uk_checks='junk'; + +--echo +--echo # restore the initial value +SET @@global.wsrep_slave_uk_checks = @wsrep_slave_uk_checks_global_saved; + +--echo # End of test diff --git a/mysql-test/t/innodb_load_xa.test b/mysql-test/t/innodb_load_xa.test index 52862151b22..7eac20441ca 100644 --- a/mysql-test/t/innodb_load_xa.test +++ b/mysql-test/t/innodb_load_xa.test @@ -2,6 +2,7 @@ # MDEV-6082 Assertion `0' fails in TC_LOG_DUMMY::log_and_order on DML after installing TokuDB at runtime on server with disabled InnoDB # --source include/not_embedded.inc +--source include/not_wsrep.inc if (!$HA_INNODB_SO) { --skip Need InnoDB plugin diff --git a/mysql-test/t/innodb_load_xa_with_wsrep.opt b/mysql-test/t/innodb_load_xa_with_wsrep.opt new file mode 100644 index 00000000000..4ff27e659ce --- /dev/null +++ b/mysql-test/t/innodb_load_xa_with_wsrep.opt @@ -0,0 +1 @@ +--ignore-builtin-innodb --loose-innodb --log-bin diff --git a/mysql-test/t/innodb_load_xa_with_wsrep.test b/mysql-test/t/innodb_load_xa_with_wsrep.test new file mode 100644 index 00000000000..413faf54864 --- /dev/null +++ b/mysql-test/t/innodb_load_xa_with_wsrep.test @@ -0,0 +1,19 @@ +# +# MDEV-6082 Assertion `0' fails in TC_LOG_DUMMY::log_and_order on DML after installing TokuDB at runtime on server with disabled InnoDB +# +--source include/not_embedded.inc +--source include/have_wsrep.inc + +if (!$HA_INNODB_SO) { + --skip Need InnoDB plugin +} +install plugin innodb soname 'ha_innodb'; +select engine,support,transactions,xa from information_schema.engines where engine='innodb'; +create table t1 (a int) engine=innodb; +start transaction; +insert t1 values (1); +insert t1 values (2); +commit; +--source include/show_binlog_events.inc +drop table t1; +uninstall plugin innodb; |