Bug 44784 - mysqld looses track of its working directory
Summary: mysqld looses track of its working directory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: dirk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-31 15:20 UTC by adrian
Modified: 2002-11-10 22:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 2002-11-07 17:28:17 UTC
Responsible Changed
From-To: freebsd-ports->dirk

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

Fixed. Thanks!