Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Feb 2003 10:42:28 +0100 (CET)
From:      Martin Blapp <mb@imp.ch>
To:        dirk@freebsd.org
Cc:        ports@freebsd.org
Subject:   Important mysql-server patch
Message-ID:  <20030221171712.D38012@levais.imp.ch>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1289033196-1045844447=:38012
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <20030222104135.F55282@levais.imp.ch>


Hi Dirk,

I think this is something we should commit ... I'm testing it
since 1 day and it solves my mysql problem with fd leakage.

See:

http://groups.google.com/groups?q=wait_timeout+freebsd+mysql+linuxthreads&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=arcpk2%242jom%241%40FreeBSD.csie.NCTU.edu.tw&rnum=1

Same applies to Mysql 4.x

Martin

--- sql/violite.c.orig	Fri Feb 21 17:02:16 2003
+++ sql/violite.c	Fri Feb 21 17:03:38 2003
@@ -110,6 +110,9 @@
 	    vio->sd);
 #if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
 #if !defined(NO_FCNTL_NONBLOCK)
+#if defined(__FreeBSD__)
+	fcntl(sd, F_SETFL, vio->fcntl_mode); /* Yahoo! FreeBSD patch */
+#endif
     vio->fcntl_mode = fcntl(sd, F_GETFL);
 #elif defined(HAVE_SYS_IOCTL_H)			/* hpux */
     /* Non blocking sockets doesn't work good on HPUX 11.0 */
--- libmysql/violite.c.orig	Fri Feb 21 17:02:31 2003
+++ libmysql/violite.c	Fri Feb 21 17:04:09 2003
@@ -110,6 +110,9 @@
 	    vio->sd);
 #if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
 #if !defined(NO_FCNTL_NONBLOCK)
+#if defined(__FreeBSD__)
+        fcntl(sd, F_SETFL, vio->fcntl_mode); /* Yahoo! FreeBSD patch */
+#endif
     vio->fcntl_mode = fcntl(sd, F_GETFL);
 #elif defined(HAVE_SYS_IOCTL_H)			/* hpux */
     /* Non blocking sockets doesn't work good on HPUX 11.0 */

Martin

Martin Blapp, <mb@imp.ch> <mbr@FreeBSD.org>
------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: <finger -l mbr@freebsd.org>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------
--0-1289033196-1045844447=:38012
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="patch-sql+violite.c"
Content-Transfer-Encoding: BASE64
Content-ID: <20030221172047.M38012@levais.imp.ch>
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME="patch-sql+violite.c"

LS0tIHNxbC92aW9saXRlLmMub3JpZwlGcmkgRmViIDIxIDE3OjAyOjE2IDIw
MDMNCisrKyBzcWwvdmlvbGl0ZS5jCUZyaSBGZWIgMjEgMTc6MDM6MzggMjAw
Mw0KQEAgLTExMCw2ICsxMTAsOSBAQA0KIAkgICAgdmlvLT5zZCk7DQogI2lm
ICFkZWZpbmVkKF9fX1dJTl9fKSAmJiAhZGVmaW5lZChfX0VNWF9fKSAmJiAh
ZGVmaW5lZChPUzIpDQogI2lmICFkZWZpbmVkKE5PX0ZDTlRMX05PTkJMT0NL
KQ0KKyNpZiBkZWZpbmVkKF9fRnJlZUJTRF9fKQ0KKwlmY250bChzZCwgRl9T
RVRGTCwgdmlvLT5mY250bF9tb2RlKTsgLyogWWFob28hIEZyZWVCU0QgcGF0
Y2ggKi8NCisjZW5kaWYNCiAgICAgdmlvLT5mY250bF9tb2RlID0gZmNudGwo
c2QsIEZfR0VURkwpOw0KICNlbGlmIGRlZmluZWQoSEFWRV9TWVNfSU9DVExf
SCkJCQkvKiBocHV4ICovDQogICAgIC8qIE5vbiBibG9ja2luZyBzb2NrZXRz
IGRvZXNuJ3Qgd29yayBnb29kIG9uIEhQVVggMTEuMCAqLw0KLS0tIGxpYm15
c3FsL3Zpb2xpdGUuYy5vcmlnCUZyaSBGZWIgMjEgMTc6MDI6MzEgMjAwMw0K
KysrIGxpYm15c3FsL3Zpb2xpdGUuYwlGcmkgRmViIDIxIDE3OjA0OjA5IDIw
MDMNCkBAIC0xMTAsNiArMTEwLDkgQEANCiAJICAgIHZpby0+c2QpOw0KICNp
ZiAhZGVmaW5lZChfX19XSU5fXykgJiYgIWRlZmluZWQoX19FTVhfXykgJiYg
IWRlZmluZWQoT1MyKQ0KICNpZiAhZGVmaW5lZChOT19GQ05UTF9OT05CTE9D
SykNCisjaWYgZGVmaW5lZChfX0ZyZWVCU0RfXykNCisgICAgICAgIGZjbnRs
KHNkLCBGX1NFVEZMLCB2aW8tPmZjbnRsX21vZGUpOyAvKiBZYWhvbyEgRnJl
ZUJTRCBwYXRjaCAqLw0KKyNlbmRpZg0KICAgICB2aW8tPmZjbnRsX21vZGUg
PSBmY250bChzZCwgRl9HRVRGTCk7DQogI2VsaWYgZGVmaW5lZChIQVZFX1NZ
U19JT0NUTF9IKQkJCS8qIGhwdXggKi8NCiAgICAgLyogTm9uIGJsb2NraW5n
IHNvY2tldHMgZG9lc24ndCB3b3JrIGdvb2Qgb24gSFBVWCAxMS4wICovDQo=

--0-1289033196-1045844447=:38012--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030221171712.D38012>