<html><head></head><body>I will look into it later today.<br>
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.<br><br><div class="gmail_quote">Sandro Tosi <sandro.tosi@register.it> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre style="white-space: pre-wrap; word-wrap:break-word; ">Anyone has comment on this patch? Is there a better place I can send it  for review and (possible) inclusion?

Regards,
Sandro

On 03/08/2011 04:44 PM, Sandro Tosi wrote:
> Hi,
> we're configuring to pdns with a MySQL backend, and using stored
> procedures to query the database.
>
> Sadly, we're facing a problem since mysql_real_connect() in <a href="http://smysql.cc">smysql.cc</a>
> does not have the CLIENT_MULTI_RESULTS argument, needed[1][2] to fetch
> multiple rows from a stored proc.
>
> [1] <a href="http://dev.mysql.com/doc/refman/5.5/en/c-api-multiple-queries.html">http://dev.mysql.com/doc/refman/5.5/en/c-api-multiple-queries.html</a>
> [2] <a href="http://dev.mysql.com/doc/refman/5.5/en/mysql-real-connect.html">http://dev.mysql.com/doc/refman/5.5/en/mysql-real-connect.html</a>
>
> We're about to apply the attached patch and recompile pdns, but I'd like
> to hear from you what do you think about it and if you'd like to
> consider it for inclusion in the pdns upstream source code.
>
> Regards,
> Sandro
>
> PS: this is a known problem:
> <a href="http://old.nabble.com/gmysql-backend-and-stored-procedures-td19035294.html">http://old.nabble.com/gmysql-backend-and-stored-procedures-td19035294.html</a>
>
>
>
> client_multi_results
>
>
> Index: debian-pdns/modules/gmysqlbackend/<a href="http://smysql.cc">smysql.cc</a>
><hr />> --- debian-pdns.orig/modules/gmysqlbackend/<a href="http://smysql.cc">smysql.cc</a>  2011-03-08 15:57:20.000000000 +0100
> +++ debian-pdns/modules/gmysqlbackend/<a href="http://smysql.cc">smysql.cc</a>       2011-03-08 15:57:45.000000000 +0100
> @@ -20,7 +20,7 @@
>                      password.empty() ? 0 : password.c_str(),
>                      database.c_str(), port,
>                      msocket.empty() ? 0 : msocket.c_str(),
> -                    0)) {
> +                    CLIENT_MULTI_RESULTS)) {
>
>       throw sPerrorException("Unable to connect to database");
>     }
> @@ -91,6 +91,13 @@
>       return true;
>     }
>     mysql_free_result(d_rres);
> +
> +  while (mysql_next_result(&d_db) == 0) {
> +    if (d_rres = mysql_use_result(&d_db)) {
> +      mysql_free_result(d_rres);
> +    }
> +  }
> +
>     d_rres=0;
>     return false;
>   }
>
>
> ATT00001.txt
>
>
><hr />> Pdns-users mailing list
> Pdns-users@mailman.powerdns.com
> <a href="http://mailman.powerdns.com/mailman/listinfo/pdns-users">http://mailman.powerdns.com/mailman/listinfo/pdns-users</a>

-- 
Sandro Tosi
Product Engineer
Shared Hosting Products
R&D | <a href="http://Dada.pro">Dada.pro</a> eml sandro.tosi@register.it<hr />Pdns-users mailing list
Pdns-users@mailman.powerdns.com
<a href="http://mailman.powerdns.com/mailman/listinfo/pdns-users">http://mailman.powerdns.com/mailman/listinfo/pdns-users</a>

</pre></blockquote></div></body></html>