summaryrefslogtreecommitdiff
path: root/libmysqlpp
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqlpp')
-rw-r--r--libmysqlpp/my-mock.cpp11
-rw-r--r--libmysqlpp/my-mock.h1
2 files changed, 10 insertions, 2 deletions
diff --git a/libmysqlpp/my-mock.cpp b/libmysqlpp/my-mock.cpp
index 2eee416..8cf3057 100644
--- a/libmysqlpp/my-mock.cpp
+++ b/libmysqlpp/my-mock.cpp
@@ -2,15 +2,22 @@
#include "my-mock.h"
#include <compileTimeFormatter.h>
+NAMEDFACTORY("mysql", MySQL::Mock, DB::MockDatabaseFactory);
+
namespace MySQL {
-Mock::Mock(const std::string & name, const std::vector<boost::filesystem::path> & ss) :
- MockServerDatabase("options=p2testmysql", name, "mysql")
+Mock::Mock(const std::string & master, const std::string & name, const std::vector<boost::filesystem::path> & ss) :
+ MockServerDatabase(master, name, "mysql")
{
CreateNewDatabase();
PlaySchemaScripts(ss);
}
+Mock::Mock(const std::string & name, const std::vector<boost::filesystem::path> & ss) :
+ Mock("options=p2testmysql", name, ss)
+{
+}
+
AdHocFormatter(MockConnStr, "options=p2testmysql;database=%?");
DB::Connection *
Mock::openConnection() const
diff --git a/libmysqlpp/my-mock.h b/libmysqlpp/my-mock.h
index ce4fdf2..0855015 100644
--- a/libmysqlpp/my-mock.h
+++ b/libmysqlpp/my-mock.h
@@ -9,6 +9,7 @@ namespace MySQL {
class DLL_PUBLIC Mock : public DB::MockServerDatabase {
public:
+ Mock(const std::string & master, const std::string & name, const std::vector<boost::filesystem::path> & ss);
Mock(const std::string & name, const std::vector<boost::filesystem::path> & ss);
~Mock();