Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
database/sql: last connection in pool not handed out correctly #7219
From golang-dev: "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! " Reply: "It's a known bug in Go 1.2, fixed in 1.3 via commit 8a7ac002f840." Which is: https://golang.org/cl/40410043 Maybe a candidate for Go 1.2.1?
Okay for Go 1.2.1. My reasoning is that people cannot easily make a copy of database/sql because other code they want to use (the drivers) depends on using database/sql, so you'd have to fork database/sql, database/sql/driver, and the actual driver, just to get a 1-line fix for a bug that makes database/sql wedge.