Debian Codegraph @

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

raw
1 #############################################################
2 # Author: Rafal Somla
3 # Date: 2006-08-20
4 # Purpose: Trying to test ability to replicate from cluster
5 # to other engines (innodb, myisam).
6 ##############################################################
7 --source include/have_ndb.inc
8 --source include/have_binlog_format_mixed_or_row.inc
9
10 let $rpl_skip_start_slave= 1; # Don't start slave automatically
11 --source suite/ndb_rpl/ndb_master-slave.inc
12
13 # On master use NDB as storage engine.
14 SET default_storage_engine=ndb;
15
16 --echo
17 --echo === NDB -> MYISAM ===
18 --echo
19 --source include/rpl_connection_slave.inc
20
21 set @old_replica_exec_mode= @@global.replica_exec_mode;
22 set @@global.replica_exec_mode= 'IDEMPOTENT';
23
24 # Silence warning about MyISAM not supporting HASH index algorithm
25 # when creating mysql.ndb_apply_status
26 --disable_warnings ER_UNSUPPORTED_INDEX_ALGORITHM ONCE
27 CREATE TABLE mysql.ndb_apply_status
28 ( server_id INT UNSIGNED NOT NULL,
29 epoch BIGINT UNSIGNED NOT NULL,
30 log_name VARBINARY(255) NOT NULL,
31 start_pos BIGINT UNSIGNED NOT NULL,
32 end_pos BIGINT UNSIGNED NOT NULL,
33 PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM
34 CHARACTER SET latin1;
35
36 # Reconfigure slave to use MyISAM as default engine
37 SET @old_slave_storage_engine=@@global.default_storage_engine;
38 SET @@global.default_storage_engine=myisam;
39
40 --source include/start_slave.inc
41
42 # Check if log-replica-updates and replica-preserve-commit-order
43 # have been turned off
44
45 if (`select @@log_replica_updates`)
46 {
47 die Test requires log-replica-updates=0;
48 }
49
50 if (`select @@replica_preserve_commit_order`)
51 {
52 die Test requires replica-preserve-commit-order=0;
53 }
54
55 --source suite/ndb_rpl/t/ndb_rpl_2multi_basic.inc
56 --source include/rpl_connection_slave.inc
57 --source include/stop_slave.inc
58
59 --echo
60 --echo === NDB -> INNODB ===
61 --echo
62
63 # Reconfigure slave to use Innodb as default engine
64 --source include/rpl_connection_slave.inc
65
66 alter table mysql.ndb_apply_status engine=innodb;
67 SET @@global.default_storage_engine=innodb;
68
69 --source include/start_slave.inc
70 --source suite/ndb_rpl/t/ndb_rpl_2multi_basic.inc
71 --source include/rpl_connection_slave.inc
72 --source include/stop_slave.inc
73
74 # Cleanup
75 --source include/rpl_connection_slave.inc
76 drop table mysql.ndb_apply_status;
77 set @@global.replica_exec_mode= @old_replica_exec_mode;
78 SET @@global.default_storage_engine=@old_slave_storage_engine;
79 --let $rpl_skip_sync= 1
80 --let $rpl_only_running_threads= 1
81 --source include/rpl_end.inc