From 5d87562d667c2d547a0e972e13aab6715e2e2e81 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Tue, 27 Oct 2015 10:05:06 +0100 Subject: [PATCH] Unbreak building against older MySQLs This was introduced in 8ea3eb9 --- modules/gmysqlbackend/smysql.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index 6d391a047..58a754ed8 100644 --- a/modules/gmysqlbackend/smysql.cc +++ b/modules/gmysqlbackend/smysql.cc @@ -257,9 +257,11 @@ public: if (!d_stmt) return this; int err; mysql_stmt_free_result(d_stmt); +#if MYSQL_VERSION_ID >= 50500 while((err = mysql_stmt_next_result(d_stmt)) == 0) { mysql_stmt_free_result(d_stmt); } +#endif if (err>0) { string error(mysql_stmt_error(d_stmt)); throw SSqlException("Could not get next result from mysql statement: " + d_query + string(": ") + error); -- 2.40.0