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: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2833%2Fhead;p=thirdparty%2Fpdns.git Unbreak building against older MySQLs This was introduced in 8ea3eb9 --- diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index 6d391a047d..58a754ed8d 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);