From 6b453d0f0f50dccd0333d0d6e8cd0246e86d24a9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 13 Jun 2021 01:09:01 +0100 Subject: Create and drop MySQL mock DBs as needed --- lib/input/mysqlConn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/input/mysqlConn.cpp') diff --git a/lib/input/mysqlConn.cpp b/lib/input/mysqlConn.cpp index c7705f5..362f9ea 100644 --- a/lib/input/mysqlConn.cpp +++ b/lib/input/mysqlConn.cpp @@ -13,12 +13,12 @@ namespace MyGrate::Input { MySQLErr::MySQLErr(const std::string & when, MYSQL * c) : std::runtime_error(when + ": " + mysql_error(c)) { } - MySQLConn::MySQLConn( - const char * const host, const char * const user, const char * const pass, unsigned short port) : + MySQLConn::MySQLConn(const char * const host, const char * const user, const char * const pass, unsigned short port, + const char * const db) : st_mysql {} { mysql_init(this); - if (!mysql_real_connect(this, host, user, pass, "", port, nullptr, 0)) { + if (!mysql_real_connect(this, host, user, pass, db, port, nullptr, 0)) { mysql_close(this); throw MySQLErr("Connecting", this); } -- cgit v1.2.3