aboutsummaryrefslogtreecommitdiff
path: root/src/server/database/Updater
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/database/Updater')
-rw-r--r--src/server/database/Updater/DBUpdater.cpp10
-rw-r--r--src/server/database/Updater/DBUpdater.h3
2 files changed, 9 insertions, 4 deletions
diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp
index d0ddfcaf9ab..61b82e91099 100644
--- a/src/server/database/Updater/DBUpdater.cpp
+++ b/src/server/database/Updater/DBUpdater.cpp
@@ -220,7 +220,7 @@ bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool)
try
{
DBUpdater<T>::ApplyFile(pool, pool.GetConnectionInfo()->host, pool.GetConnectionInfo()->user, pool.GetConnectionInfo()->password,
- pool.GetConnectionInfo()->port_or_socket, "", temp);
+ pool.GetConnectionInfo()->port_or_socket, "", pool.GetConnectionInfo()->ssl, temp);
}
catch (UpdateException&)
{
@@ -355,12 +355,13 @@ template<class T>
void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, Path const& path)
{
DBUpdater<T>::ApplyFile(pool, pool.GetConnectionInfo()->host, pool.GetConnectionInfo()->user, pool.GetConnectionInfo()->password,
- pool.GetConnectionInfo()->port_or_socket, pool.GetConnectionInfo()->database, path);
+ pool.GetConnectionInfo()->port_or_socket, pool.GetConnectionInfo()->database, pool.GetConnectionInfo()->ssl, path);
}
template<class T>
void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& host, std::string const& user,
- std::string const& password, std::string const& port_or_socket, std::string const& database, Path const& path)
+ std::string const& password, std::string const& port_or_socket, std::string const& database, std::string const& ssl,
+ Path const& path)
{
std::vector<std::string> args;
args.reserve(8);
@@ -404,6 +405,9 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
// Set max allowed packet to 1 GB
args.push_back("--max-allowed-packet=1GB");
+ if (ssl == "ssl")
+ args.push_back("--ssl");
+
// Database
if (!database.empty())
args.push_back(database);
diff --git a/src/server/database/Updater/DBUpdater.h b/src/server/database/Updater/DBUpdater.h
index 6bb052b36ce..691777e39e0 100644
--- a/src/server/database/Updater/DBUpdater.h
+++ b/src/server/database/Updater/DBUpdater.h
@@ -89,7 +89,8 @@ private:
static void Apply(DatabaseWorkerPool<T>& pool, std::string const& query);
static void ApplyFile(DatabaseWorkerPool<T>& pool, Path const& path);
static void ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& host, std::string const& user,
- std::string const& password, std::string const& port_or_socket, std::string const& database, Path const& path);
+ std::string const& password, std::string const& port_or_socket, std::string const& database, std::string const& ssl,
+ Path const& path);
};
#endif // DBUpdater_h__