FAQ
Hi,

If you run this code http://play.golang.org/p/CjkzvJYpUi it will block forever on the second time through the for loop. Change SetMaxIdleConns to 0 and it works.

Problem happens with either MySQL database driver, and with both db.Query()/Next/Close and db.QueryRow().Scan(). Is it a bug? Could someone help me understand?

Thanks!
Graham

--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Marko Tiikkaja at Jan 27, 2014 at 5:54 pm

    On 1/27/14, 6:20 PM, Graham King wrote:
    If you run this code http://play.golang.org/p/CjkzvJYpUi it will block forever on the second time through the for loop. Change SetMaxIdleConns to 0 and it works.

    Problem happens with either MySQL database driver, and with both db.Query()/Next/Close and db.QueryRow().Scan(). Is it a bug? Could someone help me understand?
    It's a known bug in Go 1.2, fixed in 1.3 via commit 8a7ac002f840.


    .marko

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Brad Fitzpatrick at Jan 27, 2014 at 7:26 pm

    On Mon, Jan 27, 2014 at 9:54 AM, Marko Tiikkaja wrote:
    On 1/27/14, 6:20 PM, Graham King wrote:

    If you run this code http://play.golang.org/p/CjkzvJYpUi it will block
    forever on the second time through the for loop. Change SetMaxIdleConns to
    0 and it works.

    Problem happens with either MySQL database driver, and with both
    db.Query()/Next/Close and db.QueryRow().Scan(). Is it a bug? Could someone
    help me understand?
    It's a known bug in Go 1.2, fixed in 1.3 via commit 8a7ac002f840.

    I opened a bug to consider cherry-picking it into Go 1.2.1 when that
    happens.

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedJan 27, '14 at 5:21p
activeJan 27, '14 at 7:26p
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase