Merge branch 'master' into reject-rename-table-addendum

This commit is contained in:
Shlomi Noach 2018-05-08 07:57:46 +03:00
commit a64613dc3f
6 changed files with 25 additions and 24 deletions

View File

@ -94,7 +94,7 @@ Please see [Coding gh-ost](doc/coding-ghost.md) for a guide to getting started d
[Download latest release here](https://github.com/github/gh-ost/releases/latest) [Download latest release here](https://github.com/github/gh-ost/releases/latest)
`gh-ost` is a Go project; it is built with Go `1.8` (though `1.7` should work as well). To build on your own, use either: `gh-ost` is a Go project; it is built with Go `1.9` and above. To build on your own, use either:
- [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. - [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.
- [build.sh](https://github.com/github/gh-ost/blob/master/build.sh) for building `tar.gz` artifacts in `/tmp/gh-ost` - [build.sh](https://github.com/github/gh-ost/blob/master/build.sh) for building `tar.gz` artifacts in `/tmp/gh-ost`

View File

@ -10,7 +10,7 @@ function build {
GOOS=$3 GOOS=$3
GOARCH=$4 GOARCH=$4
if [[ $(go version | egrep "go1[.][012345678]") ]]; then if ! go version | egrep -q 'go(1[.]9|1[.]1[0-9])' ; then
echo "go version is too low. Must use 1.9 or above" echo "go version is too low. Must use 1.9 or above"
exit 1 exit 1
fi fi

View File

@ -28,23 +28,23 @@ type RowsEstimateMethod string
const ( const (
TableStatusRowsEstimate RowsEstimateMethod = "TableStatusRowsEstimate" TableStatusRowsEstimate RowsEstimateMethod = "TableStatusRowsEstimate"
ExplainRowsEstimate = "ExplainRowsEstimate" ExplainRowsEstimate RowsEstimateMethod = "ExplainRowsEstimate"
CountRowsEstimate = "CountRowsEstimate" CountRowsEstimate RowsEstimateMethod = "CountRowsEstimate"
) )
type CutOver int type CutOver int
const ( const (
CutOverAtomic CutOver = iota CutOverAtomic CutOver = iota
CutOverTwoStep = iota CutOverTwoStep
) )
type ThrottleReasonHint string type ThrottleReasonHint string
const ( const (
NoThrottleReasonHint ThrottleReasonHint = "NoThrottleReasonHint" NoThrottleReasonHint ThrottleReasonHint = "NoThrottleReasonHint"
UserCommandThrottleReasonHint = "UserCommandThrottleReasonHint" UserCommandThrottleReasonHint ThrottleReasonHint = "UserCommandThrottleReasonHint"
LeavingHibernationThrottleReasonHint = "LeavingHibernationThrottleReasonHint" LeavingHibernationThrottleReasonHint ThrottleReasonHint = "LeavingHibernationThrottleReasonHint"
) )
const ( const (

View File

@ -7,17 +7,18 @@ package binlog
import ( import (
"fmt" "fmt"
"github.com/github/gh-ost/go/sql"
"strings" "strings"
"github.com/github/gh-ost/go/sql"
) )
type EventDML string type EventDML string
const ( const (
NotDML EventDML = "NoDML" NotDML EventDML = "NoDML"
InsertDML = "Insert" InsertDML EventDML = "Insert"
UpdateDML = "Update" UpdateDML EventDML = "Update"
DeleteDML = "Delete" DeleteDML EventDML = "Delete"
) )
func ToEventDML(description string) EventDML { func ToEventDML(description string) EventDML {

View File

@ -15,11 +15,11 @@ type ValueComparisonSign string
const ( const (
LessThanComparisonSign ValueComparisonSign = "<" LessThanComparisonSign ValueComparisonSign = "<"
LessThanOrEqualsComparisonSign = "<=" LessThanOrEqualsComparisonSign ValueComparisonSign = "<="
EqualsComparisonSign = "=" EqualsComparisonSign ValueComparisonSign = "="
GreaterThanOrEqualsComparisonSign = ">=" GreaterThanOrEqualsComparisonSign ValueComparisonSign = ">="
GreaterThanComparisonSign = ">" GreaterThanComparisonSign ValueComparisonSign = ">"
NotEqualsComparisonSign = "!=" NotEqualsComparisonSign ValueComparisonSign = "!="
) )
// EscapeName will escape a db/table/column/... name by wrapping with backticks. // EscapeName will escape a db/table/column/... name by wrapping with backticks.

View File

@ -15,13 +15,13 @@ import (
type ColumnType int type ColumnType int
const ( const (
UnknownColumnType ColumnType = iota UnknownColumnType ColumnType = iota
TimestampColumnType = iota TimestampColumnType
DateTimeColumnType = iota DateTimeColumnType
EnumColumnType = iota EnumColumnType
MediumIntColumnType = iota MediumIntColumnType
JSONColumnType = iota JSONColumnType
FloatColumnType = iota FloatColumnType
) )
const maxMediumintUnsigned int32 = 16777215 const maxMediumintUnsigned int32 = 16777215