Skip to content

Commit

Permalink
Merge pull request #9695 from tamird/update-deps
Browse files Browse the repository at this point in the history
GLOCKFILE: update deps
  • Loading branch information
tamird authored Oct 4, 2016
2 parents 78a5fc1 + 6b953df commit c505fea
Show file tree
Hide file tree
Showing 16 changed files with 188 additions and 100 deletions.
16 changes: 8 additions & 8 deletions GLOCKFILE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmd github.com/client9/misspell/cmd/misspell
cmd github.com/cockroachdb/c-protobuf/cmd/protoc
cmd github.com/cockroachdb/crlfmt
cmd github.com/cockroachdb/cockroach/cmd/protoc-gen-gogoroach
cmd github.com/cockroachdb/crlfmt
cmd github.com/cockroachdb/stress
cmd github.com/cockroachdb/yacc
cmd github.com/golang/lint/golint
Expand Down Expand Up @@ -47,11 +47,11 @@ github.com/cockroachdb/pq 44a6473ebbc26e3af09fe57bbdf761475c2c9f7c
github.com/cockroachdb/stress 029c9348806514969d1109a6ae36e521af411ca7
github.com/cockroachdb/yacc 7c99dfd2164a5d23c3f495ffc2e0b72b6379d066
github.com/codahale/hdrhistogram f8ad88b59a584afeee9d334eff879b104439117b
github.com/coreos/etcd 02912fe8c43da66d263baffdd88d18400c1b3ef8
github.com/coreos/etcd 33e4f2ea283c187cac459462994d084f44d7c9de
github.com/cpuguy83/go-md2man a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa
github.com/davecgh/go-spew 6d212800a42e8ab5c146b8ace3490ee17e5225f9
github.com/docker/distribution 99cb7c0946d2f5a38015443e515dc916295064d7
github.com/docker/docker 7e29b33546098816d5dbc1fc429e868f02b69e44
github.com/docker/docker bd57e6d25c2c9d41a6cf2c9931606f58bb66a07d
github.com/docker/go-connections 988efe982fdecb46f01d53465878ff1f2ff411ce
github.com/docker/go-units f2145db703495b2e525c59662db69a7344b00bb8
github.com/dustin/go-humanize bd88f87ad3a420f7bcf05e90566fd1ceb351fa7f
Expand All @@ -62,10 +62,10 @@ github.com/go-ole/go-ole 7dfdcf409020452e29b4babcbb22f984d2aa308a
github.com/go-sql-driver/mysql 0b58b37b664c21f3010e836f1b931e1d0b0b0685
github.com/gogo/protobuf fdc14ac22689d09f8639e603614593811bc1d81c
github.com/golang/glog 23def4e6c14b4da8ac2ed8007337bc5eb5007998
github.com/golang/lint c6242afa6ced3be489e1184eb80bc2d85f1f5e7b
github.com/golang/lint 64229b89515c2a585c623c79a7ccdea71e8589ff
github.com/golang/protobuf df1d3ca07d2d07bba352d5b73c4313b4e2a6203e
github.com/google/btree 7364763242911ab6d418d2722e237194938ebad0
github.com/gordonklaus/ineffassign cb7fbaf18166b1f12a02c381e89ab5ce538a02ec
github.com/gordonklaus/ineffassign 99762ed65232b1477364c8c53778f8b6503e868c
github.com/grpc-ecosystem/grpc-gateway acebe0f9ff5993e130b141ee60e83e592839ca22
github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
github.com/jteeuwen/go-bindata a0ff2567cfb70903282db057e799fd826784d41d
Expand All @@ -84,7 +84,7 @@ github.com/mdempsky/unconvert beb68d938016d2dec1d1b078054f4d3db25f97be
github.com/mibk/dupl d8ac57fa998861b7aeaa149bba1cb7fceeace18f
github.com/montanaflynn/stats 60dcacf48f43d6dd654d0ed94120ff5806c5ca5c
github.com/olekukonko/tablewriter bdcc175572fd7abece6c831e643891b9331bc9e7
github.com/opencontainers/runc 7b1bcb3762feb762eb53b7cf167372320c2bcf9e
github.com/opencontainers/runc 02f8fa7863dd3f82909a73e2061897828460d52f
github.com/opennota/check 5b00aacd5639507d2b039245a278ec9f5505509f
github.com/opentracing/basictracer-go 1b32af207119a14b1b231d451df3ed04a72efebf
github.com/opentracing/opentracing-go 30dda9350627161ff15581c0bdc504e32ec9a536
Expand All @@ -105,13 +105,13 @@ github.com/stretchr/testify 976c720a22c8eb4eb6a0b4348ad85ad12491a506
github.com/tebeka/go2xunit cb8eb3dedfac9cf4cb1f2d8988f3390f2d0cf2e7
github.com/termie/go-shutil bcacb06fecaeec8dc42af03c87c6949f4a05c74c
github.com/wadey/gocovmerge b5bfa59ec0adc420475f97f89b58045c721d761c
golang.org/x/crypto 84e98f45760e87786b7f24603b8166a6fa09811d
golang.org/x/crypto 484eb34681af59703e639b971bc307019182c41f
golang.org/x/net 0f2be02c5ddfa7c7936000ad519b04c6c795eab3
golang.org/x/oauth2 3c3a985cb79f52a3190fbc056984415ca6763d01
golang.org/x/sys 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9
golang.org/x/text 098f51fb687dbaba1f6efabeafbb6461203f9e21
golang.org/x/tools fc2b74b64ef08c618146ebc92062f6499db5314c
google.golang.org/appengine 150dc57a1b433e64154302bdc40b6bb8aefa313a
google.golang.org/appengine 926995697fa8241be2dc73eb318666e24f44ed51
google.golang.org/grpc 79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b
gopkg.in/check.v1 4f90aeace3a26ad7021961c297b22c42160c7b25
gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
Expand Down
2 changes: 1 addition & 1 deletion build/check-style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ TestImportNames() {
}

TestIneffassign() {
! ineffassign . | grep -vF '.pb.go' # https://github.com/gogo/protobuf/issues/149
! ineffassign . | grep -vF 'ineffectual assignment to sqlDollar' | grep -vF '.pb.go' # https://github.com/gogo/protobuf/issues/149
}

TestErrcheck() {
Expand Down
6 changes: 3 additions & 3 deletions server/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,10 @@ func (s *adminServer) waitForStoreFrozen(
delete(mu.oks, storeID)
}
mu.Unlock()
err = stream.Send(&serverpb.ClusterFreezeResponse{
Message: message,
})
}
err = stream.Send(&serverpb.ClusterFreezeResponse{
Message: message,
})
}()
conn, err := s.server.rpcContext.GRPCDial(addr)
if err != nil {
Expand Down
5 changes: 2 additions & 3 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,11 @@ func TestMultiRangeScanDeleteRange(t *testing.T) {
var delTS hlc.Timestamp
for i, k := range writes {
put := roachpb.NewPut(k, roachpb.MakeValueFromBytes(k))
reply, err := client.SendWrapped(tds, nil, put)
if err != nil {
if _, err := client.SendWrapped(tds, nil, put); err != nil {
t.Fatal(err)
}
scan := roachpb.NewScan(writes[0], writes[len(writes)-1].Next())
reply, err = client.SendWrapped(tds, nil, scan)
reply, err := client.SendWrapped(tds, nil, scan)
if err != nil {
t.Fatal(err)
}
Expand Down
3 changes: 3 additions & 0 deletions sql/backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ func (sc *SchemaChanger) truncateAndBackfillColumnsChunk(

curIndexKey, _, err = sqlbase.EncodeIndexKey(
tableDesc, &tableDesc.PrimaryIndex, colIDtoRowIndex, row, indexKeyPrefix)
if err != nil {
return err
}

for j, col := range added {
if defaultExprs == nil || defaultExprs[j] == nil {
Expand Down
3 changes: 3 additions & 0 deletions sql/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ func (p *planner) validateCheckExpr(
// would be marginal compared to the work of the actual query, so the added
// complexity seems unjustified.
rows, err := p.SelectClause(sel, nil, lim, nil, publicColumns)
if err != nil {
return err
}
if err := rows.expandPlan(); err != nil {
return err
}
Expand Down
14 changes: 7 additions & 7 deletions sql/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func TestGetZoneConfig(t *testing.T) {
defer srv.Stopper().Stop()
s := srv.(*server.TestServer)

expectedCounter := uint32(keys.MaxReservedDescID + 1)
expectedCounter := uint32(keys.MaxReservedDescID)

defaultZoneConfig := config.DefaultZoneConfig()
defaultZoneConfig.RangeMinBytes = 1 << 20
Expand All @@ -114,41 +114,41 @@ func TestGetZoneConfig(t *testing.T) {
// db1 has tables tb11 and tb12
// db2 has tables tb21 and tb22

expectedCounter++
db1 := expectedCounter
if _, err := sqlDB.Exec(`CREATE DATABASE db1`); err != nil {
t.Fatal(err)
}
expectedCounter++

expectedCounter++
db2 := expectedCounter
if _, err := sqlDB.Exec(`CREATE DATABASE db2`); err != nil {
t.Fatal(err)
}
expectedCounter++

expectedCounter++
tb11 := expectedCounter
if _, err := sqlDB.Exec(`CREATE TABLE db1.tb1 (k INT PRIMARY KEY, v INT)`); err != nil {
t.Fatal(err)
}
expectedCounter++

expectedCounter++
tb12 := expectedCounter
if _, err := sqlDB.Exec(`CREATE TABLE db1.tb2 (k INT PRIMARY KEY, v INT)`); err != nil {
t.Fatal(err)
}
expectedCounter++

expectedCounter++
tb21 := expectedCounter
if _, err := sqlDB.Exec(`CREATE TABLE db2.tb1 (k INT PRIMARY KEY, v INT)`); err != nil {
t.Fatal(err)
}
expectedCounter++

expectedCounter++
tb22 := expectedCounter
if _, err := sqlDB.Exec(`CREATE TABLE db2.tb2 (k INT PRIMARY KEY, v INT)`); err != nil {
t.Fatal(err)
}
expectedCounter++

{
cfg := forceNewConfig(t, s)
Expand Down
10 changes: 8 additions & 2 deletions sql/index_selection.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,14 @@ func (v *indexInfo) analyzeOrdering(
// Analyze the ordering provided by the index (either forward or reverse).
fwdIndexOrdering := scan.computeOrdering(v.index, v.exactPrefix, false)
revIndexOrdering := scan.computeOrdering(v.index, v.exactPrefix, true)
fwdMatch, orderCols := analyzeOrdering(fwdIndexOrdering)
revMatch, orderCols := analyzeOrdering(revIndexOrdering)
fwdMatch, fwdOrderCols := analyzeOrdering(fwdIndexOrdering)
revMatch, revOrderCols := analyzeOrdering(revIndexOrdering)

if fwdOrderCols != revOrderCols {
panic(fmt.Sprintf("fwdOrderCols(%d) != revOrderCols(%d)", fwdOrderCols, revOrderCols))
}

orderCols := fwdOrderCols

// Weigh the cost by how much of the ordering matched.
//
Expand Down
11 changes: 6 additions & 5 deletions sql/pgwire/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,14 +692,15 @@ func decodeOidDatum(id oid.Oid, code formatCode, b []byte) (parser.Datum, error)
case formatText:
ts, err := parseTs(string(b))
if err != nil {
if res, err := parser.ParseDDate(string(b), time.UTC); err == nil {
d = res
} else {
res, err := parser.ParseDDate(string(b), time.UTC)
if err != nil {
return d, errors.Errorf("could not parse string %q as date", b)
}
d = res
} else {
daysSinceEpoch := ts.Unix() / secondsInDay
d = parser.NewDDate(parser.DDate(daysSinceEpoch))
}
daysSinceEpoch := ts.Unix() / secondsInDay
d = parser.NewDDate(parser.DDate(daysSinceEpoch))
case formatBinary:
if len(b) < 4 {
return d, errors.Errorf("date requires 4 bytes for binary format")
Expand Down
12 changes: 5 additions & 7 deletions sql/rename_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,24 @@ func TestRenameTable(t *testing.T) {
s, db, kvDB := serverutils.StartServer(t, base.TestServerArgs{})
defer s.Stopper().Stop()

counter := int64(keys.MaxReservedDescID + 1)
counter := int64(keys.MaxReservedDescID)

// Table creation should fail, and nothing should have been written.
counter++
oldDBID := sqlbase.ID(counter)
if _, err := db.Exec(`CREATE DATABASE test`); err != nil {
t.Fatal(err)
}
counter++

// Create table in 'test'.
tableCounter := counter
counter++
oldName := "foo"
if _, err := db.Exec(`CREATE TABLE test.foo (k INT PRIMARY KEY, v int)`); err != nil {
t.Fatal(err)
}
counter++

// Check the table descriptor.
desc := &sqlbase.Descriptor{}
tableDescKey := sqlbase.MakeDescMetadataKey(sqlbase.ID(tableCounter))
tableDescKey := sqlbase.MakeDescMetadataKey(sqlbase.ID(counter))
if err := kvDB.GetProto(context.TODO(), tableDescKey, desc); err != nil {
t.Fatal(err)
}
Expand All @@ -71,11 +69,11 @@ func TestRenameTable(t *testing.T) {
}

// Create database test2.
counter++
newDBID := sqlbase.ID(counter)
if _, err := db.Exec(`CREATE DATABASE test2`); err != nil {
t.Fatal(err)
}
counter++

// Move table to test2 and change its name as well.
newName := "bar"
Expand Down
4 changes: 3 additions & 1 deletion sql/sqlbase/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ func DecodeIndexKeyPrefix(
if tableID == desc.ID {
// Once desc's table id has been decoded, there can be no more
// interleaves.
remaining = key
break
}

Expand Down Expand Up @@ -569,6 +568,9 @@ func DecodeIndexKey(

length := int(ancestor.SharedPrefixLen)
key, err = DecodeKeyVals(a, valTypes[:length], vals[:length], colDirs[:length], key)
if err != nil {
return nil, false, err
}
valTypes, vals, colDirs = valTypes[length:], vals[length:], colDirs[length:]

// We reuse NotNullDescending as the interleave sentinel, consume it.
Expand Down
Loading

0 comments on commit c505fea

Please sign in to comment.