Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Sequel::DatabaseConnectionError, for indicating that Sequel wasn'…
…t able to connect to the database This error is only raised by the connection pool if there is an error calling the connection proc (or the connection proc returns nil). Generally, it indicates that your database connection parameters are wrong (bad host, bad username, bad password, etc.). This commit also fixes a bug that would cause the created_count of the connection pool to increase when there was an error raised during the connection. In practice, this didn't matter much as the connection pool would be unlikely to have valid connections (at least for the same server). The reason it catches nil as well is that is also what is returned by make_new if it is not able to get a valid connection. Before, Adapters that returned nil instead of raising an error on a call to connect would cause a busy wait in the connection pool.
- Loading branch information
1 parent
5313fc6
commit 2aa33cd
Showing
4 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters