aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-01-15 14:57:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-01-15 14:57:06 +0200
commitb582669ec304ade3fc744523a1c9a6de6c3117b6 (patch)
tree32ebbae8ba749051e0dae5e738410b6ef6dbe29e
parent79121ca0e7ffdad212513a05fba76c1a19a73df5 (diff)
Check that max connections is greater or equal than min in connection pool
-rw-r--r--odb/mssql/connection-factory.hxx5
1 files changed, 4 insertions, 1 deletions
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 <vector>
#include <cstddef> // std::size_t
+#include <cassert>
#include <odb/mssql/version.hxx>
#include <odb/mssql/forward.hxx>
@@ -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