polardbxengine/mysql-test/suite/ndb_rpl/t/ndb_rpl_2other.test

82 lines
2.5 KiB
Plaintext

#############################################################
# Author: Rafal Somla
# Date: 2006-08-20
# Purpose: Trying to test ability to replicate from cluster
# to other engines (innodb, myisam).
##############################################################
--source include/have_ndb.inc
--source include/have_binlog_format_mixed_or_row.inc
let $rpl_skip_start_slave= 1; # Don't start slave automatically
--source include/master-slave.inc
# On master use NDB as storage engine.
SET default_storage_engine=ndb;
--echo
--echo === NDB -> MYISAM ===
--echo
--source include/rpl_connection_slave.inc
set @old_slave_exec_mode= @@global.slave_exec_mode;
set @@global.slave_exec_mode= 'IDEMPOTENT';
# Silence warning about MyISAM not supporting HASH index algorithm
# when creating mysql.ndb_apply_status
--disable_warnings ER_UNSUPPORTED_INDEX_ALGORITHM ONCE
CREATE TABLE mysql.ndb_apply_status
( server_id INT UNSIGNED NOT NULL,
epoch BIGINT UNSIGNED NOT NULL,
log_name VARBINARY(255) NOT NULL,
start_pos BIGINT UNSIGNED NOT NULL,
end_pos BIGINT UNSIGNED NOT NULL,
PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM
CHARACTER SET latin1;
# Reconfigure slave to use MyISAM as default engine
SET @old_slave_storage_engine=@@global.default_storage_engine;
SET @@global.default_storage_engine=myisam;
--source include/start_slave.inc
# Check if log-slave-updates and slave-preserve-commit-order
# have been turned off
if (`select @@log_slave_updates`)
{
die Test requires log-slave-updates=0;
}
if (`select @@slave_preserve_commit_order`)
{
die Test requires slave-preserve-commit-order=0;
}
--source suite/ndb_rpl/t/ndb_rpl_2multi_basic.inc
--source include/rpl_connection_slave.inc
--source include/stop_slave.inc
--echo
--echo === NDB -> INNODB ===
--echo
# Reconfigure slave to use Innodb as default engine
--source include/rpl_connection_slave.inc
alter table mysql.ndb_apply_status engine=innodb;
SET @@global.default_storage_engine=innodb;
--source include/start_slave.inc
--source suite/ndb_rpl/t/ndb_rpl_2multi_basic.inc
--source include/rpl_connection_slave.inc
--source include/stop_slave.inc
# Cleanup
--source include/rpl_connection_slave.inc
drop table mysql.ndb_apply_status;
set @@global.slave_exec_mode= @old_slave_exec_mode;
SET @@global.default_storage_engine=@old_slave_storage_engine;
--let $rpl_skip_sync= 1
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc