DLZ-MySQL & Stored Procedures.

Kyle Mott <[email protected]> Thu, 4 Jul 2013 10:19:01 -0700
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <CANg6UnKtaFM9ChWTvYJjOkeyDWzE+izn4qoDhden1ToSckc89w@mail.gmail.com>
--===============4950893011011259199==
Content-Type: multipart/alternative; boundary=bcaec5395f24a2109904e0b2c810

--bcaec5395f24a2109904e0b2c810
Content-Type: text/plain; charset=ISO-8859-1

I've configured my named.conf with some simple stored procedures, which do
the heavy lifting of performing the SQL queries and returning a result set:
CALL FindZone('foo.com');
CALL Authority('foo.com');
[... etc ...]

However, when I put those CALL statements in my named.conf and restart
BIND, any name resolution requests appear to immediately bail out:
29-Jun-2013 16:36:31.893 database: debug 1: Query String: CALL FindZone('
foo.com')
29-Jun-2013 16:36:31.893 database: error: mysql driver unable to return
result set for findzone query

I think it has something to do with how DLZ-MySQL is not setting
CLIENT_MULTI_RESULTS in mysql_real_connect(), and then parsing the result
set using mysql_next_result() in a loop.

Has anyone else run into this type of problem?  I was hoping to just have
the simple CALL statements in my named.conf, and push the raw SQL queries
into procedures on my DB itself to keep things (relatively) maintainable,
but that might not be possible?


--Kyle

--bcaec5395f24a2109904e0b2c810
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div><div><div>I&#39;ve configured my =
named.conf with some simple stored procedures, which do the heavy lifting o=
f performing the SQL queries and returning a result set:<br></div>CALL Find=
Zone(&#39;<a href=3D"http://foo.com">foo.com</a>&#39;);<br>

</div>CALL Authority(&#39;<a href=3D"http://foo.com">foo.com</a>&#39;);<br>=
</div>[... etc ...]<br><br></div>However, when I put those CALL statements =
in my named.conf and restart BIND, any name resolution requests appear to i=
mmediately bail out:<br>

29-Jun-2013 16:36:31.893 database: debug 1: Query String: CALL FindZone(&#3=
9;<a href=3D"http://foo.com">foo.com</a>&#39;)<br>29-Jun-2013 16:36:31.893 =
database: error: mysql driver unable to return result set for findzone quer=
y<br>

<br></div>I think it has something to do with how DLZ-MySQL is not setting =
CLIENT_MULTI_RESULTS in mysql_real_connect(), and then parsing the result s=
et using mysql_next_result() in a loop.<br><br></div>Has anyone else run in=
to this type of problem?=A0 I was hoping to just have the simple CALL state=
ments in my named.conf, and push the raw SQL queries into procedures on my =
DB itself to keep things (relatively) maintainable, but that might not be p=
ossible?<br>

<br><br></div>--Kyle<br></div>

--bcaec5395f24a2109904e0b2c810--


--===============4950893011011259199==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
--===============4950893011011259199==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Bind-dlz-testers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers

--===============4950893011011259199==--