| 1 |
include/master-slave.inc [rpl_server_count=3] |
| 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 |
[connection master] |
| 6 |
CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; |
| 7 |
CREATE TABLE t2 (a int key) ENGINE = NDB ; |
| 8 |
reset master; |
| 9 |
SHOW TABLES; |
| 10 |
Tables_in_test |
| 11 |
t1 |
| 12 |
t2 |
| 13 |
INSERT INTO t1 VALUES ("row1","will go away",1); |
| 14 |
SELECT * FROM t1 ORDER BY c3; |
| 15 |
c1 c2 c3 |
| 16 |
row1 will go away 1 |
| 17 |
SELECT * FROM t1 ORDER BY c3; |
| 18 |
c1 c2 c3 |
| 19 |
row1 will go away 1 |
| 20 |
SELECT MAX(epoch) FROM mysql.ndb_apply_status into @the_epoch; |
| 21 |
SELECT @the_epoch; |
| 22 |
@the_epoch |
| 23 |
<the_epoch> |
| 24 |
SELECT * FROM t1 ORDER BY c3; |
| 25 |
c1 c2 c3 |
| 26 |
row1 will go away 1 |
| 27 |
stop slave; |
| 28 |
Warnings: |
| 29 |
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead |
| 30 |
set SQL_LOG_BIN=0; |
| 31 |
insert into t2 values (1); |
| 32 |
include/show_binlog_events.inc |
| 33 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 34 |
master-bin.000001 # Query # # BEGIN |
| 35 |
master-bin.000001 # Table_map # # table_id: # (test.t1) |
| 36 |
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) |
| 37 |
master-bin.000001 # Write_rows # # table_id: # |
| 38 |
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
| 39 |
master-bin.000001 # Query # # COMMIT |
| 40 |
set SQL_LOG_BIN=1; |
| 41 |
include/rpl_change_topology.inc [new topology=3->2] |
| 42 |
Warnings: |
| 43 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 44 |
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. |
| 45 |
include/start_slave.inc |
| 46 |
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); |
| 47 |
DELETE FROM t1 WHERE c3 = 1; |
| 48 |
UPDATE t1 SET c2="should go away" WHERE c3 = 2; |
| 49 |
UPDATE t1 SET c2="C" WHERE c3 = 3; |
| 50 |
DELETE FROM t1 WHERE c3 = 2; |
| 51 |
SELECT * FROM t1 ORDER BY c3; |
| 52 |
c1 c2 c3 |
| 53 |
row3 C 3 |
| 54 |
row4 D 4 |
| 55 |
INSERT INTO t1 VALUES ("row5","E",5); |
| 56 |
SELECT * FROM t1 ORDER BY c3; |
| 57 |
c1 c2 c3 |
| 58 |
row3 C 3 |
| 59 |
row4 D 4 |
| 60 |
row5 E 5 |
| 61 |
SELECT * FROM t1 ORDER BY c3; |
| 62 |
c1 c2 c3 |
| 63 |
row3 C 3 |
| 64 |
row4 D 4 |
| 65 |
row5 E 5 |
| 66 |
==== clean up ==== |
| 67 |
DROP TABLE t1; |
| 68 |
DROP TABLE t2; |
| 69 |
include/rpl_end.inc |