Skip to content

Commit 86783dc

Browse files
Michael Highsteadsiddontang
authored andcommitted
Add support for TCP protocol (go-mysql-org#352)
1 parent 584e5cc commit 86783dc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dump/dump.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type Dumper struct {
2020
Addr string
2121
User string
2222
Password string
23+
Protocol string
2324

2425
// Will override Databases
2526
Tables []string
@@ -143,6 +144,10 @@ func (d *Dumper) Dump(w io.Writer) error {
143144
args = append(args, fmt.Sprintf("--max-allowed-packet=%dM", d.maxAllowedPacket))
144145
}
145146

147+
if d.Protocol != "" {
148+
args = append(args, fmt.Sprintf("--protocol=%s", d.Protocol))
149+
}
150+
146151
args = append(args, "--single-transaction")
147152
args = append(args, "--skip-lock-tables")
148153

0 commit comments

Comments
 (0)