mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Fix for some failing tests.
This commit is contained in:
6
mysql-test/include/have_innodb_disallow_writes.inc
Normal file
6
mysql-test/include/have_innodb_disallow_writes.inc
Normal file
@@ -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'
|
||||||
|
}
|
@@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`)
|
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.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
mysql-test/r/innodb_load_xa_with_wsrep.result
Normal file
18
mysql-test/r/innodb_load_xa_with_wsrep.result
Normal file
@@ -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;
|
@@ -917,6 +917,11 @@ The following options may be given as the first argument:
|
|||||||
--wsrep-retry-autocommit=#
|
--wsrep-retry-autocommit=#
|
||||||
Max number of times to retry a failed autocommit
|
Max number of times to retry a failed autocommit
|
||||||
statement
|
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=#
|
--wsrep-slave-threads=#
|
||||||
Number of slave appliers to launch
|
Number of slave appliers to launch
|
||||||
--wsrep-sst-auth=name
|
--wsrep-sst-auth=name
|
||||||
@@ -1209,6 +1214,8 @@ wsrep-recover FALSE
|
|||||||
wsrep-replicate-myisam FALSE
|
wsrep-replicate-myisam FALSE
|
||||||
wsrep-restart-slave FALSE
|
wsrep-restart-slave FALSE
|
||||||
wsrep-retry-autocommit 1
|
wsrep-retry-autocommit 1
|
||||||
|
wsrep-slave-FK-checks TRUE
|
||||||
|
wsrep-slave-UK-checks FALSE
|
||||||
wsrep-slave-threads 1
|
wsrep-slave-threads 1
|
||||||
wsrep-sst-auth (No default value)
|
wsrep-sst-auth (No default value)
|
||||||
wsrep-sst-donor
|
wsrep-sst-donor
|
||||||
|
@@ -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
|
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;
|
left join t1 on variable_name=test_name where test_name is null;
|
||||||
there should be *no* variables listed below:
|
there should be *no* variables listed below:
|
||||||
innodb_disallow_writes
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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
|
42
mysql-test/suite/sys_vars/t/wsrep_slave_fk_checks_basic.test
Normal file
42
mysql-test/suite/sys_vars/t/wsrep_slave_fk_checks_basic.test
Normal file
@@ -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
|
42
mysql-test/suite/sys_vars/t/wsrep_slave_uk_checks_basic.test
Normal file
42
mysql-test/suite/sys_vars/t/wsrep_slave_uk_checks_basic.test
Normal file
@@ -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
|
@@ -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
|
# 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_embedded.inc
|
||||||
|
--source include/not_wsrep.inc
|
||||||
|
|
||||||
if (!$HA_INNODB_SO) {
|
if (!$HA_INNODB_SO) {
|
||||||
--skip Need InnoDB plugin
|
--skip Need InnoDB plugin
|
||||||
|
1
mysql-test/t/innodb_load_xa_with_wsrep.opt
Normal file
1
mysql-test/t/innodb_load_xa_with_wsrep.opt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--ignore-builtin-innodb --loose-innodb --log-bin
|
19
mysql-test/t/innodb_load_xa_with_wsrep.test
Normal file
19
mysql-test/t/innodb_load_xa_with_wsrep.test
Normal file
@@ -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;
|
Reference in New Issue
Block a user