You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`gh-ost` is a Go project; it is built with Go `1.12` and above. To build on your own, use either:
97
+
`gh-ost` is a Go project; it is built with Go `1.14` and above. To build on your own, use either:
98
98
-[script/build](https://github.com/github/gh-ost/blob/master/script/build) - this is the same build script used by CI hence the authoritative; artifact is `./bin/gh-ost` binary.
99
99
-[build.sh](https://github.com/github/gh-ost/blob/master/build.sh) for building `tar.gz` artifacts in `/tmp/gh-ost`
100
100
@@ -109,3 +109,4 @@ Generally speaking, `master` branch is stable, but only [releases](https://githu
Copy file name to clipboardExpand all lines: go/cmd/gh-ost/main.go
+18-5Lines changed: 18 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ import (
14
14
15
15
"github.com/github/gh-ost/go/base"
16
16
"github.com/github/gh-ost/go/logic"
17
+
"github.com/github/gh-ost/go/sql"
17
18
_ "github.com/go-sql-driver/mysql"
18
19
"github.com/outbrain/golib/log"
19
20
@@ -48,6 +49,7 @@ func main() {
48
49
flag.StringVar(&migrationContext.InspectorConnectionConfig.Key.Hostname, "host", "127.0.0.1", "MySQL hostname (preferably a replica, not the master)")
49
50
flag.StringVar(&migrationContext.AssumeMasterHostname, "assume-master-host", "", "(optional) explicitly tell gh-ost the identity of the master. Format: some.host.com[:port] This is useful in master-master setups where you wish to pick an explicit master, or in a tungsten-replicator where gh-ost is unable to determine the master")
50
51
flag.IntVar(&migrationContext.InspectorConnectionConfig.Key.Port, "port", 3306, "MySQL port (preferably a replica, not the master)")
52
+
flag.Float64Var(&migrationContext.InspectorConnectionConfig.Timeout, "mysql-timeout", 0.0, "Connect, read and write timeout for MySQL")
flag.StringVar(&migrationContext.CliMasterUser, "master-user", "", "MySQL user on master, if different from that on replica. Requires --assume-master-host")
@@ -172,14 +174,25 @@ func main() {
172
174
migrationContext.Log.SetLevel(log.ERROR)
173
175
}
174
176
177
+
ifmigrationContext.AlterStatement=="" {
178
+
log.Fatalf("--alter must be provided and statement must not be empty")
0 commit comments