Bug 151927 - databases/mysql55-server: crash on startup as MAX_DEFAULT_DIRS too small
Summary: databases/mysql55-server: crash on startup as MAX_DEFAULT_DIRS too small
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: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-03 22:40 UTC by freebsd
Modified: 2010-11-10 17:00 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 freebsd 2010-11-03 22:40:08 UTC
The file mysys/default.c contains a method init_default_directories() that populates a list of directories to search for options. The maximal list size is given by MAX_DEFAULT_DIRS, set in the same file to 6.

A patch included in the FreeBSD port adds an extra directory but does not bump MAX_DEFAULT_DIRS from 6 to 7.

Since this issue is created by the FreeBSD port in the first place, it is not an upstream bug.

Fix: 

Add a patch in the port that increases MAX_DEFAULT_DIRS by one.
How-To-Repeat: I spotted this with an embedded MySQL server. I expect it will happen with the non-embedded server as well: Set DEFAULT_HOME_ENV in the environment, then launch the server. It will attempt to add seven directories to the list and abort.
Comment 1 Edwin Groothuis freebsd_committer 2010-11-03 22:40:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2010-11-10 16:55:17 UTC
ale         2010-11-10 16:55:08 UTC

  FreeBSD ports repository

  Modified files:
    .                    UPDATING 
    databases/mysql55-server Makefile distinfo pkg-plist 
                             pkg-plist.client 
    databases/mysql55-server/files patch-Makefile.in 
                                   patch-configure.am 
                                   patch-mysys_default.c 
  Log:
  Update to 5.5.7-rc release.
  Fix crash caused by MAX_DEFAULT_DIRS too small [1]
  
  PR:             ports/151927
  Submitted by:   Bartosz Fabianowski <freebsd@chillt.de>
  
  Revision  Changes    Path
  1.987     +14 -1     ports/UPDATING
  1.265     +2 -2      ports/databases/mysql55-server/Makefile
  1.125     +2 -3      ports/databases/mysql55-server/distinfo
  1.31      +1 -1      ports/databases/mysql55-server/files/patch-Makefile.in
  1.4       +4 -22     ports/databases/mysql55-server/files/patch-configure.am
  1.12      +13 -4     ports/databases/mysql55-server/files/patch-mysys_default.c
  1.93      +9 -1      ports/databases/mysql55-server/pkg-plist
  1.42      +5 -0      ports/databases/mysql55-server/pkg-plist.client
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Alex Dupre freebsd_committer 2010-11-10 16:55:30 UTC
State Changed
From-To: open->closed

Fixed, thanks!