Bug 44784

Summary: mysqld looses track of its working directory
Product: Ports & Packages Reporter: adrian <adrian>
Component: Individual Port(s)Assignee: dirk
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description adrian 2002-10-31 15:20:01 UTC
	realpath(3) is not thread-safe.  As a result one thread in
	mysqld can cause another to get "lost" in a directory other
	than the top level directory of the DB.  mysqld often gets
	stuck with its current working directory in /var/tmp with
	"vi.recover" as the only "valid" database.  This causes the
	server to believe that it has no other databases and become
	useless until it is restarted.

Fix: 

realpath(3) is similarly broken on other platforms.  MySQL
	has a build option HAVE_BROKEN_REALPATH that works around
	this problem.  Building the port as follows is enough to
	correct the problem.

	make CFLAGS=-DHAVE_BROKEN_REALPATH
How-To-Repeat: 
	This scenario is not easy to trigger.  Log lived
	transactions/threads, such as are present when using MySQL's
	replication facilities, seem to be more susceptible to this
	problem.

	If USENET or Goole are searched, more examples of users
	experincing this problem can be found.
Comment 1 Ying-Chieh Liao freebsd_committer freebsd_triage 2002-11-07 17:28:17 UTC
Responsible Changed
From-To: freebsd-ports->dirk

over to maintainer
Comment 2 dirk freebsd_committer freebsd_triage 2002-11-10 22:25:02 UTC
State Changed
From-To: open->closed

Fixed. Thanks!