Commit e1facda4 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Fix for some failing tests.

parent f64a0c3f
--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 @@ ...@@ -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.
} }
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: ...@@ -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 ...@@ -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: ...@@ -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;
#
# 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
#
# 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
#
# 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
--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
--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
--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 @@ ...@@ -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
......
--ignore-builtin-innodb --loose-innodb --log-bin
#
# 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;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment