Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 230693 Details for
Bug 302361
net-dns/bind-9.7 version bump request
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
net-dns/bind/files/bind-dlzmysql5-reconnect.patch
bind-dlzmysql5-reconnect.patch (text/plain), 1.80 KB, created by
Stevan Bajić
on 2010-05-07 15:18:37 UTC
(
hide
)
Description:
net-dns/bind/files/bind-dlzmysql5-reconnect.patch
Filename:
MIME Type:
Creator:
Stevan Bajić
Created:
2010-05-07 15:18:37 UTC
Size:
1.80 KB
patch
obsolete
>--- bind-9.5.0a6.orig/contrib/dlz/drivers/dlz_mysql_driver.c 2007-02-06 06:44:26.000000000 +0100 >+++ bind-9.5.0a6/contrib/dlz/drivers/dlz_mysql_driver.c 2007-09-04 23:57:57.000000000 +0200 >@@ -92,6 +92,25 @@ > */ > > /*% >+ * Factorize the mysql_ping for adding a log error message >+ */ >+static isc_result_t >+mysqldrv_ping(dbinstance_t *dbi) { >+ int pres = 0; >+ >+ pres = mysql_ping(dbi->dbconn); >+ if ( pres != 0 ) { >+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, >+ DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1), >+ "\nMySQL Ping Error : %s (%i)\n", >+ mysql_error(dbi->dbconn), >+ mysql_errno(dbi->dbconn)); >+ return (ISC_R_FAILURE); >+ } >+ return (ISC_R_SUCCESS); >+} >+ >+/*% > * Allocates memory for a new string, and then constructs the new > * string by "escaping" the input string. The new string is > * safe to be used in queries. This is necessary because we cannot >@@ -225,6 +244,8 @@ > } > > >+ mysqldrv_ping(dbi); >+ > /* > * was a zone string passed? If so, make it safe for use in > * queries. >@@ -324,7 +345,7 @@ > qres = mysql_query((MYSQL *) dbi->dbconn, querystring); > if (qres == 0) > break; >- for (j=0; mysql_ping((MYSQL *) dbi->dbconn) != 0 && j < 4; j++) >+ for (j=0; mysqldrv_ping(dbi) != 0 && j < 4; j++) > ; > } > >@@ -923,6 +944,12 @@ > 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,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 302361
:
218457
|
218459
|
220783
|
230685
|
230687
|
230689
|
230691
| 230693 |
230695
|
230697
|
230699
|
230701
|
230703
|
230705
|
230707