@@ -117,7 +117,8 @@ func TestPlannedReparentShardNoPrimaryProvided(t *testing.T) {
117
117
goodReplica1 .FakeMysqlDaemon .Replicating = true
118
118
goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
119
119
goodReplica1 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
120
- // These 3 statements come from tablet startup
120
+ // These 4 statements come from tablet startup
121
+ "STOP SLAVE" ,
121
122
"RESET SLAVE ALL" ,
122
123
"FAKE SET MASTER" ,
123
124
"START SLAVE" ,
@@ -236,7 +237,8 @@ func TestPlannedReparentShardNoError(t *testing.T) {
236
237
goodReplica1 .FakeMysqlDaemon .Replicating = true
237
238
goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
238
239
goodReplica1 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
239
- // These 3 statements come from tablet startup
240
+ // These 4 statements come from tablet startup
241
+ "STOP SLAVE" ,
240
242
"RESET SLAVE ALL" ,
241
243
"FAKE SET MASTER" ,
242
244
"START SLAVE" ,
@@ -252,7 +254,8 @@ func TestPlannedReparentShardNoError(t *testing.T) {
252
254
goodReplica2 .FakeMysqlDaemon .ReadOnly = true
253
255
goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
254
256
goodReplica2 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
255
- // These 3 statements come from tablet startup
257
+ // These 4 statements come from tablet startup
258
+ "STOP SLAVE" ,
256
259
"RESET SLAVE ALL" ,
257
260
"FAKE SET MASTER" ,
258
261
"START SLAVE" ,
@@ -460,7 +463,8 @@ func TestPlannedReparentShardWaitForPositionFail(t *testing.T) {
460
463
goodReplica1 .FakeMysqlDaemon .Replicating = true
461
464
goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
462
465
goodReplica1 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
463
- // These 3 statements come from tablet startup
466
+ // These 4 statements come from tablet startup
467
+ "STOP SLAVE" ,
464
468
"RESET SLAVE ALL" ,
465
469
"FAKE SET MASTER" ,
466
470
"START SLAVE" ,
@@ -476,7 +480,8 @@ func TestPlannedReparentShardWaitForPositionFail(t *testing.T) {
476
480
goodReplica2 .FakeMysqlDaemon .ReadOnly = true
477
481
goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
478
482
goodReplica2 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
479
- // These 3 statements come from tablet startup
483
+ // These 4 statements come from tablet startup
484
+ "STOP SLAVE" ,
480
485
"RESET SLAVE ALL" ,
481
486
"FAKE SET MASTER" ,
482
487
"START SLAVE" ,
@@ -573,7 +578,8 @@ func TestPlannedReparentShardWaitForPositionTimeout(t *testing.T) {
573
578
goodReplica1 .FakeMysqlDaemon .Replicating = true
574
579
goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
575
580
goodReplica1 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
576
- // These 3 statements come from tablet startup
581
+ // These 4 statements come from tablet startup
582
+ "STOP SLAVE" ,
577
583
"RESET SLAVE ALL" ,
578
584
"FAKE SET MASTER" ,
579
585
"START SLAVE" ,
@@ -589,7 +595,8 @@ func TestPlannedReparentShardWaitForPositionTimeout(t *testing.T) {
589
595
goodReplica2 .FakeMysqlDaemon .ReadOnly = true
590
596
goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
591
597
goodReplica2 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
592
- // These 3 statements come from tablet startup
598
+ // These 4 statements come from tablet startup
599
+ "STOP SLAVE" ,
593
600
"RESET SLAVE ALL" ,
594
601
"FAKE SET MASTER" ,
595
602
"START SLAVE" ,
@@ -654,7 +661,8 @@ func TestPlannedReparentShardRelayLogError(t *testing.T) {
654
661
goodReplica1 .FakeMysqlDaemon .Replicating = true
655
662
goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (primary .Tablet ))
656
663
goodReplica1 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
657
- // These 3 statements come from tablet startup
664
+ // These 4 statements come from tablet startup
665
+ "STOP SLAVE" ,
658
666
"RESET SLAVE ALL" ,
659
667
"FAKE SET MASTER" ,
660
668
"START SLAVE" ,
@@ -739,7 +747,8 @@ func TestPlannedReparentShardRelayLogErrorStartReplication(t *testing.T) {
739
747
goodReplica1 .FakeMysqlDaemon .CurrentSourcePort = int (primary .Tablet .MysqlPort )
740
748
goodReplica1 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
741
749
// simulate error that will trigger a call to RestartReplication
742
- // These 3 statements come from tablet startup
750
+ // These 4 statements come from tablet startup
751
+ "STOP SLAVE" ,
743
752
"RESET SLAVE ALL" ,
744
753
"FAKE SET MASTER" ,
745
754
"START SLAVE" ,
@@ -852,7 +861,8 @@ func TestPlannedReparentShardPromoteReplicaFail(t *testing.T) {
852
861
goodReplica1 .FakeMysqlDaemon .Replicating = true
853
862
goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
854
863
goodReplica1 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
855
- // These 3 statements come from tablet startup
864
+ // These 4 statements come from tablet startup
865
+ "STOP SLAVE" ,
856
866
"RESET SLAVE ALL" ,
857
867
"FAKE SET MASTER" ,
858
868
"START SLAVE" ,
@@ -868,7 +878,8 @@ func TestPlannedReparentShardPromoteReplicaFail(t *testing.T) {
868
878
goodReplica2 .FakeMysqlDaemon .ReadOnly = true
869
879
goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (newPrimary .Tablet ), topoproto .MysqlAddr (oldPrimary .Tablet ))
870
880
goodReplica2 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
871
- // These 3 statements come from tablet startup
881
+ // These 4 statements come from tablet startup
882
+ "STOP SLAVE" ,
872
883
"RESET SLAVE ALL" ,
873
884
"FAKE SET MASTER" ,
874
885
"START SLAVE" ,
@@ -973,7 +984,8 @@ func TestPlannedReparentShardSamePrimary(t *testing.T) {
973
984
goodReplica1 .FakeMysqlDaemon .Replicating = true
974
985
goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica1 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (oldPrimary .Tablet ))
975
986
goodReplica1 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
976
- // These 3 statements come from tablet startup
987
+ // These 4 statements come from tablet startup
988
+ "STOP SLAVE" ,
977
989
"RESET SLAVE ALL" ,
978
990
"FAKE SET MASTER" ,
979
991
"START SLAVE" ,
@@ -989,7 +1001,8 @@ func TestPlannedReparentShardSamePrimary(t *testing.T) {
989
1001
goodReplica2 .FakeMysqlDaemon .ReadOnly = true
990
1002
goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs = append (goodReplica2 .FakeMysqlDaemon .SetReplicationSourceInputs , topoproto .MysqlAddr (oldPrimary .Tablet ))
991
1003
goodReplica2 .FakeMysqlDaemon .ExpectedExecuteSuperQueryList = []string {
992
- // These 3 statements come from tablet startup
1004
+ // These 4 statements come from tablet startup
1005
+ "STOP SLAVE" ,
993
1006
"RESET SLAVE ALL" ,
994
1007
"FAKE SET MASTER" ,
995
1008
"START SLAVE" ,
0 commit comments