diff options
Diffstat (limited to 'libdbpp/mockDatabase.cpp')
-rw-r--r-- | libdbpp/mockDatabase.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libdbpp/mockDatabase.cpp b/libdbpp/mockDatabase.cpp index 52deb7e..8951189 100644 --- a/libdbpp/mockDatabase.cpp +++ b/libdbpp/mockDatabase.cpp @@ -1,5 +1,5 @@ #include "mockDatabase.h" -#include <buffer.h> +#include <compileTimeFormatter.h> #include <fstream> #include <modifycommand.h> #include <plugins.impl.h> @@ -68,10 +68,11 @@ MockDatabase::PlaySchemaScript(DB::Connection * conn, const boost::filesystem::p f.close(); } +AdHocFormatter(MockServerDatabaseName, "test_%?_%?"); MockServerDatabase::MockServerDatabase(const std::string & masterdb, const std::string & name, const std::string & type) : MockDatabase(name), master(DB::ConnectionFactory::createNew(type, masterdb)), - testDbName(stringbf("test_%d_%d", getpid(), ++mocked)) + testDbName(MockServerDatabaseName::get(getpid(), ++mocked)) { } |