mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Pool: fixed error [#CONV-3288].
This commit is contained in:
parent
b444be951e
commit
ed8905bcf6
@ -264,7 +264,7 @@ public:
|
||||
throw Poco::Exception("mysqlxx::Pool is full");
|
||||
|
||||
/// Выделение нового соединения.
|
||||
Connection * Conn = AllocConnection();
|
||||
Connection * Conn = AllocConnection(true);
|
||||
if (Conn)
|
||||
return Entry(Conn, this);
|
||||
|
||||
@ -333,7 +333,7 @@ private:
|
||||
}
|
||||
|
||||
/** @brief Создает новое соединение. */
|
||||
Connection * AllocConnection()
|
||||
Connection * AllocConnection(bool dont_throw_if_failed_first_time = false)
|
||||
{
|
||||
Poco::Util::Application & app = Poco::Util::Application::instance();
|
||||
Connection * Conn;
|
||||
@ -347,7 +347,7 @@ private:
|
||||
}
|
||||
catch (mysqlxx::ConnectionFailed & e)
|
||||
{
|
||||
if (!was_successful
|
||||
if ((!was_successful && !dont_throw_if_failed_first_time)
|
||||
|| e.errnum() == ER_ACCESS_DENIED_ERROR
|
||||
|| e.errnum() == ER_DBACCESS_DENIED_ERROR
|
||||
|| e.errnum() == ER_BAD_DB_ERROR)
|
||||
|
Loading…
Reference in New Issue
Block a user