File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ func (b *BinlogSyncer) writeRegisterSlaveCommand() error {
596596 hostname := b .localHostname ()
597597
598598 // This should be the name of slave host not the host we are connecting to.
599- data := make ([]byte , 4 + 1 + 4 + 1 + len (hostname )+ 1 + len (b .cfg .User )+ 1 + len ( b . cfg . Password ) + 2 + 4 + 4 )
599+ data := make ([]byte , 4 + 1 + 4 + 1 + len (hostname )+ 1 + len (b .cfg .User )+ 1 + 2 + 4 + 4 )
600600 pos := 4
601601
602602 data [pos ] = COM_REGISTER_SLAVE
@@ -616,10 +616,8 @@ func (b *BinlogSyncer) writeRegisterSlaveCommand() error {
616616 n = copy (data [pos :], b .cfg .User )
617617 pos += n
618618
619- data [pos ] = uint8 (len ( b . cfg . Password ) )
619+ data [pos ] = uint8 (0 )
620620 pos ++
621- n = copy (data [pos :], b .cfg .Password )
622- pos += n
623621
624622 binary .LittleEndian .PutUint16 (data [pos :], b .cfg .Port )
625623 pos += 2
You can’t perform that action at this time.
0 commit comments