From b582669ec304ade3fc744523a1c9a6de6c3117b6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 15 Jan 2013 14:57:06 +0200 Subject: Check that max connections is greater or equal than min in connection pool --- odb/mssql/connection-factory.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/odb/mssql/connection-factory.hxx b/odb/mssql/connection-factory.hxx index eb78495..540bf20 100644 --- a/odb/mssql/connection-factory.hxx +++ b/odb/mssql/connection-factory.hxx @@ -9,6 +9,7 @@ #include #include // std::size_t +#include #include #include @@ -88,7 +89,9 @@ namespace odb db_ (0), cond_ (mutex_) { - // @@ check min_ <= max_ + // max_connections == 0 means unlimited. + // + assert (max_connections == 0 || max_connections >= min_connections); } virtual connection_ptr -- cgit v1.1