From 617ba29f8e9b09aa55272579dbfc307d48380984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 27 Jan 2021 15:42:15 +0100 Subject: [PATCH] Code clean up on test_set_collation-t Added mysql_free_result() Removed a set of redendant checks --- test/tap/tests/test_set_collation-t.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/tap/tests/test_set_collation-t.cpp b/test/tap/tests/test_set_collation-t.cpp index e5872f791..f40d6a967 100644 --- a/test/tap/tests/test_set_collation-t.cpp +++ b/test/tap/tests/test_set_collation-t.cpp @@ -107,6 +107,7 @@ int main(int argc, char** argv) { ); proxy_res = mysql_store_result(mysql); check_variables(proxy_res, collation); + mysql_free_result(proxy_res); } /** @@ -118,13 +119,6 @@ int main(int argc, char** argv) { std::string collation = collations[i]; MYSQL_RES* proxy_res = nullptr; - MYSQL_QUERY( - mysql, - "SHOW VARIABLES WHERE Variable_name IN ('character_set_client', 'character_set_connection', 'character_set_results', 'collation_connection')" - ); - proxy_res = mysql_store_result(mysql); - check_variables(proxy_res, collation); - for (int j = 0; j < iterations; j++) { MYSQL_QUERY( mysql, @@ -133,7 +127,7 @@ int main(int argc, char** argv) { ); proxy_res = mysql_store_result(mysql); check_variables(proxy_res, collation); - + mysql_free_result(proxy_res); } }