diff --git a/system-test/maxtest/include/maxtest/mariadb_nodes.hh b/system-test/maxtest/include/maxtest/mariadb_nodes.hh index 6e9e2b258..e2337b81a 100644 --- a/system-test/maxtest/include/maxtest/mariadb_nodes.hh +++ b/system-test/maxtest/include/maxtest/mariadb_nodes.hh @@ -355,8 +355,10 @@ public: /** * @brief Flush hosts, adjust settings, remove anonymous users, etc. + * @param conn Valid handle to some node. * @return True in case of success, false otherwise. */ + bool prepare_for_test(MYSQL* conn); bool prepare_for_test(); /** diff --git a/system-test/maxtest/src/mariadb_nodes.cc b/system-test/maxtest/src/mariadb_nodes.cc index 05f8b9c12..93b67f865 100644 --- a/system-test/maxtest/src/mariadb_nodes.cc +++ b/system-test/maxtest/src/mariadb_nodes.cc @@ -1028,7 +1028,7 @@ std::vector Mariadb_nodes::get_all_server_ids() return rval; } -bool do_prepare_for_test(MYSQL* conn) +bool Mariadb_nodes::prepare_for_test(MYSQL* conn) { int local_result = 0; @@ -1100,9 +1100,10 @@ bool Mariadb_nodes::prepare_for_test() for (int i = 0; i < N; i++) { - std::packaged_task task(do_prepare_for_test); + bool (Mariadb_nodes::*function)(MYSQL*) = &Mariadb_nodes::prepare_for_test; + std::packaged_task task(function); futures.push_back(task.get_future()); - std::thread(std::move(task), nodes[i]).detach(); + std::thread(std::move(task), this, nodes[i]).detach(); } for (auto& f : futures)