Re: BIND with DLZ doesn't reconnect to the MySQL 5.x server after?disconnect

2009-12-13 Thread Emil Smolenski

On Sat, 26 Sep 2009 05:20:33 +0200, Mark Andrews ma...@isc.org wrote:


In message 20090925184532.cf9cc...@raisa.eu.org, Emil Smolenski writes:



 BTW, why there are only #ifdefs without #define in 9.7.0a3? Is user
forced to set this option himself to make it work?



No.  MYSQL_OPT_RECONNECT is only in some versions of mysql.  If you have
a version which supports MYSQL_OPT_RECONNECT then MYSQL_OPT_RECONNECT  
will be defined.


 So why has it recently changed? I was confused previously, because I  
didn't find it defined anywhere.


$ diff bind-9.7.0a3/contrib/dlz/drivers/dlz_mysql_driver.c \
   bind-9.7.0rc1/contrib/dlz/drivers/dlz_mysql_driver.c
795c795
 #ifdef MYSQL_OPT_RECONNECT
---

#if MYSQL_VERSION_ID = 5

929c929
 #ifdef MYSQL_OPT_RECONNECT
---

#if MYSQL_VERSION_ID = 5


--
am
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: BIND with DLZ doesn't reconnect to the MySQL 5.x server after?disconnect

2009-09-26 Thread Emil Smolenski

On Sat, 26 Sep 2009 05:20:33 +0200, Mark Andrews ma...@isc.org wrote:


 Reconnect is already being set.
 Hello. Indeed, I found following message in release notes of BIND
9.6.1-P1 ( http://oldwww.isc.org/sw/bind/view/?release=9.6.1-P1 ):



Which you should have seen came *after* 9.6.1 was released.
The CHANGES file is in reverse chronological order.


 I see now. Thank you for explanation. Is there a correct patch for 9.6.1?  
If not, could you help to prepare such patch?


--
am
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: BIND with DLZ doesn't reconnect to the MySQL 5.x server after?disconnect

2009-09-25 Thread Mark Andrews

In message 20090925184532.cf9cc...@raisa.eu.org, Emil Smolenski writes:
 Mark Andrews wrote:
 
  Reconnect is already being set.
 
  Hello. Indeed, I found following message in release notes of BIND
 9.6.1-P1 ( http://oldwww.isc.org/sw/bind/view/?release=9.6.1-P1 ):

Which you should have seen came *after* 9.6.1 was released.
The CHANGES file is in reverse chronological order.

2581.   [contrib]   dlz/mysql set MYSQL_OPT_RECONNECT option on connection.
Requires MySQL 5.0.19 or later. [RT #19084]

2580.   [bug]   UpdateRej statistics counter could be incremented twice
for one rejection. [RT #19476]

--- 9.6.1 released ---

 dlz/mysql set MYSQL_OPT_RECONNECT option on connection. Requires MySQL
 5.0.19 or later. [RT #19084]
 
  But there is no output from the second command:
 
 $ tar xf bind-9.6.1-P1.tar.gz
 $ grep -r MYSQL_OPT_RECONNECT bind-9.6.1-P1
 $
 
  I've tested it. BIND still doesn't reconnect. After applying patch
 mentioned earlier, BIND starts to work properly.
 
 I believe this patch should be commited (as is committed in 9.7.0a3):
 
 $ diff bind-9.7.0a3/contrib/dlz/drivers/dlz_mysql_driver.c \
bind-9.6.1-P1/contrib/dlz/drivers/dlz_mysql_driver.c
 795,797d794
  #ifdef MYSQL_OPT_RECONNECT
  my_bool auto_reconnect = 1;
  #endif
 929,939d925
  #ifdef MYSQL_OPT_RECONNECT
/* enable automatic reconnection. */
  if (mysql_options((MYSQL *) dbi-dbconn, MYSQL_OPT_RECONNECT,
  auto_reconnect) != 0) {
   isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
  DNS_LOGMODULE_DLZ, ISC_LOG_WARNING,
  mysql driver failed to set 
  MYSQL_OPT_RECONNECT option, continuing);
}
  #endif
 
  BTW, why there are only #ifdefs without #define in 9.7.0a3? Is user
 forced to set this option himself to make it work?

No.  MYSQL_OPT_RECONNECT is only in some versions of mysql.  If you have
a version which supports MYSQL_OPT_RECONNECT then MYSQL_OPT_RECONNECT will
be defined.

Mark
 
 -- 
 am
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: BIND with DLZ doesn't reconnect to the MySQL 5.x server after disconnect

2009-09-23 Thread Mark Andrews

In message 4ab9c360.7090...@dougbarton.us, Doug Barton writes:
 I recently added DLZ options to the BIND ports on FreeBSD, and a user
 has filed the following problem report:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=139051
 
 Does anyone have any comment on the patch suggested at the URL in the
 PR?
 http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-recon
 nect/
 
 Is this something that is likely to be included in a BIND distribution
 any time soon?

Reconnect is already being set.

B.T.W. the patch passes a pointer to the wrong type to mysql_options()
see http://dev.mysql.com/doc/refman/5.1/en/mysql-options.html
 
 Thanks,
 
 Doug
 ___
 bind-users mailing list
 bind-users@lists.isc.org
 https://lists.isc.org/mailman/listinfo/bind-users
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: BIND with DLZ doesn't reconnect to the MySQL 5.x server after disconnect

2009-09-23 Thread Doug Barton
Mark Andrews wrote:
 In message 4ab9c360.7090...@dougbarton.us, Doug Barton writes:
 I recently added DLZ options to the BIND ports on FreeBSD, and a user
 has filed the following problem report:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=139051

 Does anyone have any comment on the patch suggested at the URL in the
 PR?
 http://www.shell-tips.com/2007/09/04/bind-950-patch-dlz-mysql-5-for-auto-recon
 nect/

 Is this something that is likely to be included in a BIND distribution
 any time soon?
 
 Reconnect is already being set.
 
 B.T.W. the patch passes a pointer to the wrong type to mysql_options()
 see http://dev.mysql.com/doc/refman/5.1/en/mysql-options.html

Thanks Mark. I've asked the user to follow up on this list so that
hopefully we can reach a conclusion on the right solution.


Doug
___
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users