]> granicus.if.org Git - pdns/commitdiff
Unbreak building against older MySQLs
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 27 Oct 2015 09:05:06 +0000 (10:05 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 27 Oct 2015 09:05:06 +0000 (10:05 +0100)
This was introduced in 8ea3eb9

modules/gmysqlbackend/smysql.cc

index 6d391a047d64b045f39892d3b44c19bf9c3e62fa..58a754ed8ddde1a15deb687c1aa71c44c9c9fd08 100644 (file)
@@ -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);