From: Dan Nelson Date: January 16 2005 6:24am Subject: Re: vi.recover in show databases output? List-Archive: http://lists.mysql.com/mysql/178555 Message-Id: <20050116062412.GA82799@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Jan 15), Justin Lundy said: > When I open over nine connections to mysql I see vi.recover in my show > databases output. The existing connections stay open and continue to > operate. No new database connections can be made at this point. I should > be seeing the mysql, phpdig and test databases when performing the query > but I only see vi.recover? Any ideas why this happens or how to prevent it? > > [jbl@subterrain jbl]$ uname -a > NetBSD subterrain.net 2.0 NetBSD 2.0 (SUBTERRAIN) #1: Tue Dec 28 22:34:54 EST 2004 On FreeBSD, this was due to realpath not being thread-safe. It called chdir() internally and didn't prevent other threads from calling chdir() or getcwd() at the same time. NetBSD's realpath looks almost identical to the old FreeBSD code, so it should be easy to fix by just merging the fix from FreeBSD. http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/gen/getcwd.c http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/realpath.c The FreeBSD fix is in rev 1.14. -- Dan Nelson dnelson@stripped