Re: Frustrating mysql problem.

Todd Lyons <[email protected]> Tue, 21 Jul 2009 17:56:42 -0700
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <[email protected]>
On Tue, Jul 21, 2009 at 11:54 AM, Erol<[email protected]> wrote:
> Thanks for the patch.
> This looks to have done the trick.
>> 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,

I only ever glanced at it before, never seriously considered using it
because we just haven't needed to.  Your feedback though is prompting
me to add it in to handle those situations which will undoubtedly
occur with the addition of load.  Maybe we can lobby Adam to add it in
as part of his standard dlz patch set.  I'll look through RH's
bugzilla and see if there is anything related to this patch already,
and it would be good for others to do the same.

-- 
Regards...      Todd

------------------------------------------------------------------------------