Re: Frustrating mysql problem.
Erol <[email protected]> Tue, 21 Jul 2009 14:54:08 -0400
| Newsgroups | gmane.network.dns.bind9.dlz |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the patch.
This looks to have done the trick.
/erol
On Mon, Jul 20, 2009 at 10:29:12PM +0100, Chris Hastie wrote:
> On 20/07/09 20:16, Erol wrote:
> > Im having the oddest and most frustrating problem with mysql.
> >
> > Currently when I fire up bind-dlz and mysql all works as it
> > should. When I query for zones in the mysql database I get the
> > results I should. A dig against the nameserver returns the proper
> > results.
> >
> > However after an hour or two I start getting the error below when
> > I try and run the same query.
> >
> > mysql driver unable to return result set for findzone query
>
> This might be old and out of date information, but bind-dlz does not
> cope with reconnecting if the MySQL disappears for any reason.
>
> This is the patch I used against 9.5.0
>
> --- contrib/dlz/drivers/dlz_mysql_driver.c.orig 2007-11-15
> 09:08:05.000000000 +0000
> +++ contrib/dlz/drivers/dlz_mysql_driver.c 2007-11-15
> 09:10:49.000000000 +0000
> @@ -923,6 +923,13 @@
> pass = getParameterValue(argv[1], "pass=");
> socket = getParameterValue(argv[1], "socket=");
>
> + if(mysql_options((MYSQL *) dbi->dbconn, MYSQL_OPT_RECONNECT,
> "1")) {
> + isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
> + DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
> + "Could not set database reconnect option");
> + }
> +
> +
> for (j=0; dbc == NULL && j < 4; j++)
> dbc = mysql_real_connect((MYSQL *) dbi->dbconn, host,
> user, pass, dbname, port, socket,
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> Bind-dlz-testers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
>
--
[email protected]
Systems Administrator
easyDNS Technologies Inc.
------------------------------------------------------------------------------