diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-01-15 14:57:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-01-15 14:57:07 +0200 |
commit | b98d3675792004fba106d1bc8acee871989a467b (patch) | |
tree | ed343cbe69176177c173dae6e5726aa23c053c44 | |
parent | 91976751cf0bc98c358b18815d2921c5bad6b64c (diff) |
Check that max connections is greater or equal than min in connection pool
-rw-r--r-- | odb/oracle/connection-factory.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/odb/oracle/connection-factory.hxx b/odb/oracle/connection-factory.hxx index ce193e5..bc7c530 100644 --- a/odb/oracle/connection-factory.hxx +++ b/odb/oracle/connection-factory.hxx @@ -9,6 +9,7 @@ #include <vector> #include <cstddef> // std::size_t +#include <cassert> #include <odb/details/mutex.hxx> #include <odb/details/condition.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 |