From: Pieter Lexis Date: Tue, 27 Oct 2015 09:05:06 +0000 (+0100) Subject: Unbreak building against older MySQLs X-Git-Tag: dnsdist-1.0.0-alpha1~230^2~22^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d87562d667c2d547a0e972e13aab6715e2e2e81;p=pdns Unbreak building against older MySQLs This was introduced in 8ea3eb9 --- 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);