1. 08 Mar, 2017 6 commits
    • Kevin Burke's avatar
      database/sql: fix spelling mistake in tests · 6fbedc1a
      Kevin Burke authored
      Change-Id: I04e150d4e4123aad2f277e5c6e9f2abd15628a28
      Reviewed-on: https://go-review.googlesource.com/37941Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      6fbedc1a
    • Robert Griesemer's avatar
      cmd/compile: fix recorded export data position info · 2123a6c6
      Robert Griesemer authored
      The position information recorded now consists of the line-
      directive relative filename and line number. It would be
      relatively easy to also encode absolute position information
      as necessary (by serializing src.PosBase data).
      
      For example, given $GOROOT/src/tmp/x.go:
      
      	package p
      
      	const C0 = 0
      
      	//line c.go:10
      	const C1 = 1
      
      	//line t.go:20
      	type T int
      
      	//line v.go:30
      	var V T
      
      	//line f.go:40
      	func F() {}
      
      The recorded positions for the exported entities are:
      
      	C0 $GOROOT/src/tmp/x.go 3
      	C1 c.go 10
      	T t.go 20
      	V v.go 30
      	F f.go 40
      
      Fix verified by manual inspection. There's currently no easy way
      to test this, but it will eventually be tested when we fix #7311.
      
      Fixes #19391.
      
      Change-Id: I6269067ea58358250fe6dd1f73bdf9e5d2adfe3d
      Reviewed-on: https://go-review.googlesource.com/37936Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      2123a6c6
    • Sarah Adams's avatar
      database/sql: proper prepared statement support in transactions · 82e1732f
      Sarah Adams authored
      This change was originally written by Marko Tiikkaja <marko@joh.to>.
      https://go-review.googlesource.com/#/c/2035/
      
      Previously *Tx.Stmt always prepared a new statement, even if an
      existing one was available on the connection the transaction was on.
      Now we first see if the statement is already available on the
      connection and only prepare if it isn't. Additionally, when we do
      need to prepare one, we store it in the parent *Stmt to allow it to be
      later reused by other calls to *Tx.Stmt on that statement or just
      straight up by *Stmt.Exec et al.
      
      To make sure that the statement doesn't disappear unexpectedly, we
      record a dependency from the statement returned by *Tx.Stmt to the
      *Stmt it came from and set a new field, parentStmt, to point to the
      originating *Stmt. When the transaction's *Stmt is closed, we remove
      the dependency. This way the "parent" *Stmt can be closed by the user
      without her having to know whether any transactions are still using it
      or not.
      
      Fixes #15606
      
      Change-Id: I41b5056847e117ac61130328b0239d1e000a4a08
      Reviewed-on: https://go-review.googlesource.com/35476
      Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDaniel Theophanes <kardianos@gmail.com>
      82e1732f
    • Johan Brandhorst's avatar
      net/http: use httptest.Server Client in tests · 3b988eb6
      Johan Brandhorst authored
      After merging https://go-review.googlesource.com/c/34639/,
      it was pointed out to me that a lot of tests under net/http
      could use the new functionality to simplify and unify testing.
      
      Using the httptest.Server provided Client removes the need to
      call CloseIdleConnections() on all Transports created, as it
      is automatically called on the Transport associated with the
      client when Server.Close() is called.
      
      Change the transport used by the non-TLS
      httptest.Server to a new *http.Transport rather than using
      http.DefaultTransport implicitly. The TLS version already
      used its own *http.Transport. This change is to prevent
      concurrency problems with using DefaultTransport implicitly
      across several httptest.Server's.
      
      Add tests to ensure the httptest.Server.Client().Transport
      RoundTripper interface is implemented by a *http.Transport,
      as is now assumed across large parts of net/http tests.
      
      Change-Id: I9f9d15f59d72893deead5678d314388718c91821
      Reviewed-on: https://go-review.googlesource.com/37771
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      3b988eb6
    • Hiroshi Ioka's avatar
      net/mail: fix wrong error message in consumePhrase · 2bd6360e
      Hiroshi Ioka authored
      Fixes #19415
      
      Change-Id: I6414f82e42bd09f1793156befce326aeac919ea2
      Reviewed-on: https://go-review.googlesource.com/37911Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      2bd6360e
    • Russ Cox's avatar
      runtime/pprof: add GNU build IDs to Mappings recorded from /proc/self/maps · c797256a
      Russ Cox authored
      This helps systems that maintain an external database mapping
      build ID to symbol information for the given binary, especially
      in the case where /proc/self/maps lists many different files
      (for example, many shared libraries).
      
      Avoid importing debug/elf to avoid dragging in that whole
      package (and its dependencies like debug/dwarf) into the
      build of every program that generates a profile.
      
      Fixes #19431.
      
      Change-Id: I6d4362a79fe23e4f1726dffb0661d20bb57f766f
      Reviewed-on: https://go-review.googlesource.com/37855
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      c797256a
  2. 07 Mar, 2017 24 commits
  3. 06 Mar, 2017 10 commits