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
commit54eac28ae913c6c18e6beb0f39c3c13091f62fb5 (patch)
tree3f9743c646d24b36a80f26e4bc852010677e0af6
parent805912c9c66a89bfbf5598f805eb5f664e32ae6e (diff)
Check that max connections is greater or equal than min in connection pool
-rw-r--r--odb/sqlite/connection-factory.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/odb/sqlite/connection-factory.hxx b/odb/sqlite/connection-factory.hxx
index 4f59791..e2274c2 100644
--- a/odb/sqlite/connection-factory.hxx
+++ b/odb/sqlite/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>
@@ -158,7 +159,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