Date: Friday, February 4, 2011 @ 15:45:53 Author: andrea Revision: 108902
Add two patches to fix MYSQL_HOME env variable and a crash during startup of embedded mysqld library Added: mysql/trunk/fix-embedded-crash.patch mysql/trunk/fix-mysql-home.patch Modified: mysql/trunk/PKGBUILD --------------------------+ PKGBUILD | 12 +++++++++--- fix-embedded-crash.patch | 19 +++++++++++++++++++ fix-mysql-home.patch | 16 ++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2011-02-04 19:22:39 UTC (rev 108901) +++ PKGBUILD 2011-02-04 20:45:53 UTC (rev 108902) @@ -6,7 +6,7 @@ pkgbase=mysql pkgname=('libmysqlclient' 'mysql-clients' 'mysql') pkgver=5.5.8 -pkgrel=7 +pkgrel=8 arch=('i686' 'x86_64') license=('GPL') url="http://www.mysql.com/" @@ -15,15 +15,21 @@ source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.5/${pkgbase}-${pkgver}.tar.gz" 'mysqld' 'my.cnf' - 'fix-set-default-charset.patch') + 'fix-set-default-charset.patch' + 'fix-mysql-home.patch' + 'fix-embedded-crash.patch') md5sums=('42e866302b61f5e213afd33e04677017' '2234207625baa29b2ff7d7b4f088abce' '1c949c0dbea5206af0db14942d9927b6' - '6f72b482580d020933ea9a7a4f638051') + '6f72b482580d020933ea9a7a4f638051' + '56fe8b724ca7ae73b9f96cdf4cca1220' + 'b2b7ed0289a6d8cce17a68512c0286cc') build() { cd "${srcdir}"/${pkgbase}-${pkgver} patch -Np1 -i ${srcdir}/fix-set-default-charset.patch + patch -Np1 -i ${srcdir}/fix-mysql-home.patch + patch -Np1 -i ${srcdir}/fix-embedded-crash.patch cd "${srcdir}" mkdir build Added: fix-embedded-crash.patch =================================================================== --- fix-embedded-crash.patch (rev 0) +++ fix-embedded-crash.patch 2011-02-04 20:45:53 UTC (rev 108902) @@ -0,0 +1,19 @@ +Fix crash in embedded mysql library when mysql_library_init() is invoked +with argc = 0, as is supposed to be a supported thing to do. +Patch from upstream bug #57931. + + +diff -Naur mysql-5.5.8.orig/libmysqld/lib_sql.cc mysql-5.5.8/libmysqld/lib_sql.cc +--- mysql-5.5.8.orig/libmysqld/lib_sql.cc 2010-12-03 12:58:26.000000000 -0500 ++++ mysql-5.5.8/libmysqld/lib_sql.cc 2011-01-12 23:10:55.837471629 -0500 +@@ -510,8 +510,8 @@ + return 1; + defaults_argc= *argcp; + defaults_argv= *argvp; +- remaining_argc= argc; +- remaining_argv= argv; ++ remaining_argc= *argcp; ++ remaining_argv= *argvp; + + /* Must be initialized early for comparison of options name */ + system_charset_info= &my_charset_utf8_general_ci; Added: fix-mysql-home.patch =================================================================== --- fix-mysql-home.patch (rev 0) +++ fix-mysql-home.patch 2011-02-04 20:45:53 UTC (rev 108902) @@ -0,0 +1,16 @@ +mysql 5.5's new cmake-based build scripts forgot about defining +DEFAULT_HOME_ENV. Upstream at http://bugs.mysql.com/bug.php?id=59280 + + +diff -Naur mysql-5.5.8.orig/mysys/CMakeLists.txt mysql-5.5.8/mysys/CMakeLists.txt +--- mysql-5.5.8.orig/mysys/CMakeLists.txt 2010-12-03 12:58:26.000000000 -0500 ++++ mysql-5.5.8/mysys/CMakeLists.txt 2011-01-13 11:58:42.583471734 -0500 +@@ -69,6 +69,8 @@ + SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_port.c) + ENDIF() + ++ADD_DEFINITIONS( -DDEFAULT_HOME_ENV=MYSQL_HOME) ++ + ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES}) + TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} + ${LIBNSL} ${LIBM} ${LIBRT})