File tree 1 file changed +2
-4
lines changed
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 {
596
596
hostname := b .localHostname ()
597
597
598
598
// 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 + 1 + 2 + 4 + 4 )
600
600
pos := 4
601
601
602
602
data [pos ] = COM_REGISTER_SLAVE
@@ -616,10 +616,8 @@ func (b *BinlogSyncer) writeRegisterSlaveCommand() error {
616
616
n = copy (data [pos :], b .cfg .User )
617
617
pos += n
618
618
619
- data [pos ] = uint8 (len ( b . cfg . Password ) )
619
+ data [pos ] = uint8 (0 )
620
620
pos ++
621
- n = copy (data [pos :], b .cfg .Password )
622
- pos += n
623
621
624
622
binary .LittleEndian .PutUint16 (data [pos :], b .cfg .Port )
625
623
pos += 2
You can’t perform that action at this time.
0 commit comments