| 1 |
include/rpl_init.inc [topology=1->2->1] |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 5 |
Warnings: |
| 6 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 7 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 8 |
include/rpl_connect.inc [creating master] |
| 9 |
include/rpl_connect.inc [creating slave] |
| 10 |
CREATE TABLE t1 (a int key, b int) ENGINE=ndb; |
| 11 |
SHOW TABLES; |
| 12 |
Tables_in_test |
| 13 |
t1 |
| 14 |
INSERT INTO t1 VALUES (1,2); |
| 15 |
INSERT INTO t1 VALUES (2,3); |
| 16 |
SELECT * FROM t1 ORDER BY a; |
| 17 |
a b |
| 18 |
1 2 |
| 19 |
2 3 |
| 20 |
include/check_slave_no_error.inc |
| 21 |
include/check_slave_is_running.inc |
| 22 |
Slave Binlog contains all ops as log_replica_updates is on |
| 23 |
show variables like 'server_id'; |
| 24 |
Variable_name Value |
| 25 |
server_id 2 |
| 26 |
show variables like 'log_bin'; |
| 27 |
Variable_name Value |
| 28 |
log_bin ON |
| 29 |
show variables like 'log_replica_updates'; |
| 30 |
Variable_name Value |
| 31 |
log_replica_updates ON |
| 32 |
include/show_binlog_events.inc |
| 33 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 34 |
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int key, b int) ENGINE=ndb |
| 35 |
slave-bin.000001 # Query # # BEGIN |
| 36 |
slave-bin.000001 # Table_map # # table_id: # (test.t1) |
| 37 |
slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) |
| 38 |
slave-bin.000001 # Write_rows # # table_id: # |
| 39 |
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
| 40 |
slave-bin.000001 # Query # # COMMIT |
| 41 |
slave-bin.000001 # Query # # BEGIN |
| 42 |
slave-bin.000001 # Table_map # # table_id: # (test.t1) |
| 43 |
slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) |
| 44 |
slave-bin.000001 # Write_rows # # table_id: # |
| 45 |
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
| 46 |
slave-bin.000001 # Query # # COMMIT |
| 47 |
include/check_slave_is_running.inc |
| 48 |
SELECT * FROM t1 ORDER BY a; |
| 49 |
a b |
| 50 |
1 2 |
| 51 |
2 3 |
| 52 |
include/check_slave_is_running.inc |
| 53 |
Master Binlog contains only Master ops as log_replica_updates is off |
| 54 |
show variables like 'server_id'; |
| 55 |
Variable_name Value |
| 56 |
server_id 1 |
| 57 |
show variables like 'log_bin'; |
| 58 |
Variable_name Value |
| 59 |
log_bin ON |
| 60 |
show variables like 'log_replica_updates'; |
| 61 |
Variable_name Value |
| 62 |
log_replica_updates OFF |
| 63 |
include/show_binlog_events.inc |
| 64 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 65 |
master-bin.000001 # Query # # BEGIN |
| 66 |
master-bin.000001 # Table_map # # table_id: # (test.t1) |
| 67 |
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) |
| 68 |
master-bin.000001 # Write_rows # # table_id: # |
| 69 |
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
| 70 |
master-bin.000001 # Query # # COMMIT |
| 71 |
STOP SLAVE; |
| 72 |
Warnings: |
| 73 |
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead |
| 74 |
DROP TABLE t1; |
| 75 |
start slave; |
| 76 |
Warnings: |
| 77 |
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead |
| 78 |
create table t1 (a int primary key, b int) engine=ndb; |
| 79 |
show variables like '%log_orig%'; |
| 80 |
Variable_name Value |
| 81 |
ndb_log_orig ON |
| 82 |
'Master' has only slave's serverid entry |
| 83 |
select server_id, log_name from mysql.ndb_apply_status order by server_id; |
| 84 |
server_id log_name |
| 85 |
2 slave-bin.000001 |
| 86 |
set global ndb_log_apply_status=On; |
| 87 |
show variables like 'ndb_log_apply_status'; |
| 88 |
Variable_name Value |
| 89 |
ndb_log_apply_status ON |
| 90 |
'Slave' has only Master's serverid entry |
| 91 |
select server_id, log_name from mysql.ndb_apply_status order by server_id; |
| 92 |
server_id log_name |
| 93 |
1 master-bin.000001 |
| 94 |
'Slave' has following ndb_binlog_index entries |
| 95 |
select inserts, updates, deletes, schemaops, orig_server_id from mysql.ndb_binlog_index order by position,orig_epoch; |
| 96 |
inserts updates deletes schemaops orig_server_id |
| 97 |
1 0 0 0 1 |
| 98 |
1 0 0 0 2 |
| 99 |
set global ndb_log_apply_status=On; |
| 100 |
show variables like 'ndb_log_apply_status'; |
| 101 |
Variable_name Value |
| 102 |
ndb_log_apply_status ON |
| 103 |
stop slave; |
| 104 |
Warnings: |
| 105 |
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead |
| 106 |
insert into t1 values (1,1); |
| 107 |
'Slave' still has only Master's serverid entry |
| 108 |
select server_id, log_name from mysql.ndb_apply_status order by server_id; |
| 109 |
server_id log_name |
| 110 |
1 master-bin.000001 |
| 111 |
'Slave' has following ndb_binlog_index entries |
| 112 |
select inserts, updates, deletes, schemaops, orig_server_id from mysql.ndb_binlog_index order by position,orig_epoch; |
| 113 |
inserts updates deletes schemaops orig_server_id |
| 114 |
1 0 0 0 1 |
| 115 |
1 0 0 0 2 |
| 116 |
0 0 0 0 2 |
| 117 |
1 0 0 0 1 |
| 118 |
'Master' still has only Slave's serverid entry |
| 119 |
select server_id, log_name from mysql.ndb_apply_status order by server_id; |
| 120 |
server_id log_name |
| 121 |
2 slave-bin.000001 |
| 122 |
start slave; |
| 123 |
Warnings: |
| 124 |
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead |
| 125 |
'Master' now has own serverid entry as well. |
| 126 |
select server_id, log_name from mysql.ndb_apply_status order by server_id; |
| 127 |
server_id log_name |
| 128 |
1 master-bin.000001 |
| 129 |
2 slave-bin.000001 |
| 130 |
'Slave' still only has 'Master''s serverid entry |
| 131 |
select server_id, log_name from mysql.ndb_apply_status order by server_id; |
| 132 |
server_id log_name |
| 133 |
1 master-bin.000001 |
| 134 |
Now create event originating at Slave |
| 135 |
insert into t1 values (2,2); |
| 136 |
'Slave' now also has its own serverid entry |
| 137 |
select server_id, log_name from mysql.ndb_apply_status order by server_id; |
| 138 |
server_id log_name |
| 139 |
1 master-bin.000001 |
| 140 |
2 slave-bin.000001 |
| 141 |
stop slave; |
| 142 |
Warnings: |
| 143 |
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead |
| 144 |
set global ndb_log_apply_status=off; |
| 145 |
set global ndb_log_apply_status=off; |
| 146 |
stop slave; |
| 147 |
Warnings: |
| 148 |
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead |
| 149 |
drop table t1; |
| 150 |
drop table t1; |
| 151 |
include/rpl_end.inc |