aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/connection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/mysql/connection.cxx')
-rw-r--r--odb/mysql/connection.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/odb/mysql/connection.cxx b/odb/mysql/connection.cxx
index 3c17869..0b38d35 100644
--- a/odb/mysql/connection.cxx
+++ b/odb/mysql/connection.cxx
@@ -3,11 +3,12 @@
// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
-#include <new> // std::bad_alloc
+#include <new> // std::bad_alloc
#include <odb/mysql/database.hxx>
#include <odb/mysql/connection.hxx>
#include <odb/mysql/exceptions.hxx>
+#include <odb/mysql/statement-cache.hxx>
using namespace std;
@@ -17,7 +18,9 @@ namespace odb
{
connection::
connection (database& db)
- : handle_ (&mysql_), active_ (0), statement_cache_ (*this)
+ : handle_ (&mysql_),
+ active_ (0),
+ statement_cache_ (new statement_cache_type (*this))
{
if (mysql_init (handle_) == 0)
throw bad_alloc ();