Upon upgrading to MySQL version 5.1.23 scripts which rely on settings from the ~/.my.cnf file stopped working. The problem is that mysys/default.c has the following: #define MAX_DEFAULT_DIRS 6 const char *default_directories[MAX_DEFAULT_DIRS + 1]; while this currently broken patch to mysys/default.c not only puts /usr/local/etc/my.cnf into the search path twice, but also pushes ~/.my.cnf beyond the MAX_DEFAULT_DIRS limit: @@ -1102,6 +1102,8 @@ bzero((char *) default_directories, sizeof(default_directories)); ADD_DIRECTORY("/etc/"); ADD_DIRECTORY("/etc/mysql/"); + ADD_DIRECTORY("%%PREFIX%%/etc/"); + ADD_DIRECTORY("%%PREFIX%%/etc/mysql/"); #ifdef DEFAULT_SYSCONFDIR if (DEFAULT_SYSCONFDIR != "") ADD_DIRECTORY(DEFAULT_SYSCONFDIR); The fix is to replace the above patch with the following: @@ -1105,6 +1105,7 @@ #ifdef DEFAULT_SYSCONFDIR if (DEFAULT_SYSCONFDIR != "") ADD_DIRECTORY(DEFAULT_SYSCONFDIR); + ADD_DIRECTORY(DEFAULT_SYSCONFDIR "/mysql/"); #endif ADD_COMMON_DIRECTORIES(); ADD_DIRECTORY("~/"); and get rid of the following from the port's Makefile: @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/mysys/default.c How-To-Repeat: Run mysql --help and look of the line following this: Default options are read from the following files in the given order: before the fixed mysql51-server/files/patch-mysys_default.c the output was: /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf /usr/local/etc/mysql/my.cnf /usr/local/etc/my.cnf after the fix the output is: /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf /usr/local/etc/mysql/my.cnf ~/.my.cnf and of course now ~/.my.cnf settings work once again!
Responsible Changed From-To: freebsd-ports-bugs->ale Over to maintainer (via the GNATS Auto Assign Tool)
ale 2008-04-21 20:34:32 UTC FreeBSD ports repository Modified files: databases/mysql51-server Makefile distinfo pkg-plist databases/mysql51-server/files patch-mysys_default.c Log: - Update to 5.1.24 release - Fix my.cnf search path [1] PR: ports/121900 [1] Submitted by: Yarema <yds@CoolRat.org> [1] Revision Changes Path 1.230 +1 -3 ports/databases/mysql51-server/Makefile 1.102 +3 -3 ports/databases/mysql51-server/distinfo 1.5 +7 -8 ports/databases/mysql51-server/files/patch-mysys_default.c 1.83 +8 -4 ports/databases/mysql51-server/pkg-plist _______________________________________________ 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"
State Changed From-To: open->closed Fixed, thanks!