From cfc9c1fa3cab07396b38d192da3d0b6bfa36d0f5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Feb 2011 10:42:13 +0200 Subject: Don't reuse failed connections If MySQL API returns an error indicating the connection is no longer usable, mark it as failed. In connection_pool_factory free failed connections instead of returning them to the pool. --- odb/mysql/connection.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'odb/mysql/connection.cxx') diff --git a/odb/mysql/connection.cxx b/odb/mysql/connection.cxx index 1395592..7679e27 100644 --- a/odb/mysql/connection.cxx +++ b/odb/mysql/connection.cxx @@ -20,6 +20,7 @@ namespace odb connection:: connection (database_type& db) : db_ (db), + failed_ (false), handle_ (&mysql_), active_ (0), statement_cache_ (new statement_cache_type (*this)) -- cgit v1.1