diff --git a/maxscale-system-test/mariadb_func.cpp b/maxscale-system-test/mariadb_func.cpp index 42ec70451..4643813f2 100644 --- a/maxscale-system-test/mariadb_func.cpp +++ b/maxscale-system-test/mariadb_func.cpp @@ -525,9 +525,9 @@ int find_field(MYSQL* conn, const char* sql, const char* field_name, char* value return ret; } -std::vector get_row(MYSQL* conn, std::string sql) +Row get_row(MYSQL* conn, std::string sql) { - std::vector rval; + Row rval; MYSQL_RES* res; if (mysql_query(conn, sql.c_str()) == 0 && (res = mysql_store_result(conn))) diff --git a/maxscale-system-test/mariadb_func.h b/maxscale-system-test/mariadb_func.h index 941a96c30..f039fab0b 100644 --- a/maxscale-system-test/mariadb_func.h +++ b/maxscale-system-test/mariadb_func.h @@ -26,6 +26,8 @@ #include #include +typedef std::vector Row; + /** * Opens connection to DB: wropper over mysql_real_connect * diff --git a/maxscale-system-test/mxs1503_extra_slaves.cpp b/maxscale-system-test/mxs1503_extra_slaves.cpp index 4af91f3ec..1f5410b64 100644 --- a/maxscale-system-test/mxs1503_extra_slaves.cpp +++ b/maxscale-system-test/mxs1503_extra_slaves.cpp @@ -21,20 +21,20 @@ int main(int argc, char** argv) test.maxscales->connect(); - auto original_row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @@server_id"); + Row original_row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @@server_id"); for (int i = 0; i < 10; i++) { connections.emplace_back(query, test.maxscales->open_rwsplit_connection(), "SELECT SLEEP(10)"); sleep(1); - auto row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @@server_id"); + Row row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @@server_id"); test.assert(row == original_row, "Value of @@server_id should not change: %s", row.at(0).c_str()); } for (auto& a: connections) { a.join(); - auto row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @@server_id"); + Row row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @@server_id"); test.assert(row == original_row, "Value of @@server_id should not change: %s", row.at(0).c_str()); } diff --git a/maxscale-system-test/mxs1506_no_master.cpp b/maxscale-system-test/mxs1506_no_master.cpp index bac4a1d98..1b95c71f4 100644 --- a/maxscale-system-test/mxs1506_no_master.cpp +++ b/maxscale-system-test/mxs1506_no_master.cpp @@ -17,7 +17,7 @@ bool query(TestConnections& test) test.maxscales->connect(); execute_query_silent(test.maxscales->conn_rwsplit[0], "SET @a = 1") == 0; sleep(5); - auto row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @a"); + Row row = get_row(test.maxscales->conn_rwsplit[0], "SELECT @a"); test.maxscales->disconnect(); return row[0] == "1"; }