From: Timo Sirainen Date: Wed, 17 Nov 2010 16:55:56 +0000 (+0000) Subject: mysql: When using multiple hosts, it never connected to more than the first one. X-Git-Tag: 2.0.8~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b57cd9928909b51fa473c3eea81442e296006438;p=thirdparty%2Fdovecot%2Fcore.git mysql: When using multiple hosts, it never connected to more than the first one. --- diff --git a/src/lib-sql/driver-mysql.c b/src/lib-sql/driver-mysql.c index 1f50606439..f8b9df7d70 100644 --- a/src/lib-sql/driver-mysql.c +++ b/src/lib-sql/driver-mysql.c @@ -61,6 +61,8 @@ static int driver_mysql_connect(struct sql_db *_db) i_assert(db->api.state == SQL_DB_STATE_DISCONNECTED); + sql_db_set_state(&db->api, SQL_DB_STATE_CONNECTING); + if (*db->host == '/') { unix_socket = db->host; host = NULL;