diff options
Diffstat (limited to 'recipes/mysql/mysql5')
-rw-r--r-- | recipes/mysql/mysql5/Makefile.am.patch | 19 | ||||
-rw-r--r-- | recipes/mysql/mysql5/configure-ps-cache-check.patch | 27 | ||||
-rw-r--r-- | recipes/mysql/mysql5/configure.in.patch | 54 | ||||
-rw-r--r-- | recipes/mysql/mysql5/fix_host_path.patch | 37 | ||||
-rw-r--r-- | recipes/mysql/mysql5/my.cnf | 21 | ||||
-rw-r--r-- | recipes/mysql/mysql5/mysqld.sh | 24 | ||||
-rw-r--r-- | recipes/mysql/mysql5/plug.in.patch | 40 |
7 files changed, 222 insertions, 0 deletions
diff --git a/recipes/mysql/mysql5/Makefile.am.patch b/recipes/mysql/mysql5/Makefile.am.patch new file mode 100644 index 0000000000..33fd17acd4 --- /dev/null +++ b/recipes/mysql/mysql5/Makefile.am.patch @@ -0,0 +1,19 @@ +Index: mysql-5.1.40/sql/Makefile.am +=================================================================== +--- mysql-5.1.40.orig/sql/Makefile.am ++++ mysql-5.1.40/sql/Makefile.am +@@ -174,10 +174,10 @@ link_sources: + # This generates lex_hash.h + # NOTE Built sources should depend on their sources not the tool + # this avoid the rebuild of the built files in a source dist +-lex_hash.h: gen_lex_hash.cc lex.h +- $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) +- ./gen_lex_hash$(EXEEXT) > $@-t +- $(MV) $@-t $@ ++GEN_LEX_HASH = ./gen_lex_hash$(EXEEXT) ++ ++lex_hash.h: gen_lex_hash$(EXEEXT) ++ $(GEN_LEX_HASH) > $@ + + # For testing of udf_example.so + udf_example_la_SOURCES= udf_example.c diff --git a/recipes/mysql/mysql5/configure-ps-cache-check.patch b/recipes/mysql/mysql5/configure-ps-cache-check.patch new file mode 100644 index 0000000000..3b5b3fd063 --- /dev/null +++ b/recipes/mysql/mysql5/configure-ps-cache-check.patch @@ -0,0 +1,27 @@ +Index: mysql-4.1.22/configure.in +=================================================================== +--- mysql-4.1.22.orig/configure.in 2009-01-28 16:33:28.000000000 +0000 ++++ mysql-4.1.22/configure.in 2009-01-28 16:43:26.000000000 +0000 +@@ -471,8 +471,8 @@ + + # Lock for PS + AC_PATH_PROG(PS, ps, ps) +-AC_MSG_CHECKING("how to check if pid exists") +-PS=$ac_cv_path_PS ++AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC], ++[ + # Linux style + if $PS p $$ 2> /dev/null | grep $0 > /dev/null + then +@@ -511,8 +511,9 @@ + AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.]) + esac + fi +-AC_SUBST(FIND_PROC) +-AC_MSG_RESULT("$FIND_PROC") ++ac_cv_FIND_PROC="$FIND_PROC" ++]) ++AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC]) + + # Check if a pid is valid + AC_PATH_PROG(KILL, kill, kill) diff --git a/recipes/mysql/mysql5/configure.in.patch b/recipes/mysql/mysql5/configure.in.patch new file mode 100644 index 0000000000..3edc5f3c21 --- /dev/null +++ b/recipes/mysql/mysql5/configure.in.patch @@ -0,0 +1,54 @@ +Index: mysql-5.1.40/configure.in +=================================================================== +--- mysql-5.1.40.orig/configure.in ++++ mysql-5.1.40/configure.in +@@ -226,8 +226,6 @@ else + AC_PATH_PROG(AS, as, as) + fi + +-# Still need ranlib for readline; local static use only so no libtool. +-AC_PROG_RANLIB + # We use libtool + #AC_LIBTOOL_WIN32_DLL + AC_PROG_LIBTOOL +@@ -255,39 +253,7 @@ AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL + AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf) + AC_CHECK_PROG(DVIS, tex, manual.dvi) + +-#check the return type of sprintf +-AC_MSG_CHECKING("return type of sprintf") +-AC_TRY_RUN([ +- int main() +- { +- char* s = "hello"; +- char buf[6]; +- if((int)sprintf(buf, s) == strlen(s)) +- return 0; +- +- return -1; +- } +- ], +- [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) +- AC_MSG_RESULT("int")], +- [AC_TRY_RUN([ +- int main() +- { +- char* s = "hello"; +- char buf[6]; +- if((char*)sprintf(buf,s) == buf + strlen(s)) +- return 0; +- return -1; +- } ], +- [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf]) +- AC_MSG_RESULT("ptr")], +- [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf]) +- AC_MSG_RESULT("garbage")] +- )], +- # Cross compile, assume POSIX +- [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) +- AC_MSG_RESULT("int (we assume)")] +-) ++MYSQL_SPRINTF_RET + + AC_PATH_PROG(uname_prog, uname, no) + diff --git a/recipes/mysql/mysql5/fix_host_path.patch b/recipes/mysql/mysql5/fix_host_path.patch new file mode 100644 index 0000000000..4f69cd5198 --- /dev/null +++ b/recipes/mysql/mysql5/fix_host_path.patch @@ -0,0 +1,37 @@ +--- mysql-4.1.22/configure.in.old 2008-09-18 20:11:15.000000000 -0500 ++++ mysql-4.1.22/configure.in 2008-09-18 20:12:28.000000000 -0500 +@@ -456,9 +456,9 @@ else + fi + fi + +-AC_SUBST(HOSTNAME) +-AC_SUBST(PERL) +-AC_SUBST(PERL5) ++AC_SUBST(HOSTNAME,/bin/hostname) ++AC_SUBST(PERL,$(bindir)/perl) ++AC_SUBST(PERL5,$(bindir)/perl) + + # for build ndb docs + +@@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC") + + # Check if a pid is valid + AC_PATH_PROG(KILL, kill, kill) ++AC_SUBST(KILL,/bin/kill) + AC_MSG_CHECKING("for kill switches") +-if $ac_cv_path_KILL -0 $$ ++if $KILL -0 $$ + then +- CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null" ++ CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null" + elif kill -s 0 $$ + then +- CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null" ++ CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null" + else + AC_MSG_WARN([kill -0 to check for pid seems to fail]) +- CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" ++ CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" + fi + AC_SUBST(CHECK_PID) + AC_MSG_RESULT("$CHECK_PID") diff --git a/recipes/mysql/mysql5/my.cnf b/recipes/mysql/mysql5/my.cnf new file mode 100644 index 0000000000..7f557e4250 --- /dev/null +++ b/recipes/mysql/mysql5/my.cnf @@ -0,0 +1,21 @@ +[client] +#password = password +port = 3306 +socket = /tmp/mysql.sock + +[mysqld_safe] +err-log = /var/log/mysql.err + +[mysqld] +user = mysql +port = 3306 +socket = /tmp/mysql.sock +pid-file = /var/lib/mysql/mysqld.pid +log-error = /var/log/mysqld.err +basedir = /usr +datadir = /var/mysql +skip-locking +loose-skip-innodb +skip-networking +bind-address = localhost + diff --git a/recipes/mysql/mysql5/mysqld.sh b/recipes/mysql/mysql5/mysqld.sh new file mode 100644 index 0000000000..479ebdb257 --- /dev/null +++ b/recipes/mysql/mysql5/mysqld.sh @@ -0,0 +1,24 @@ +# MySQL init script + +. /etc/default/rcS + +case "$1" in + start) + /usr/bin/mysqld_safe & + ;; + stop) + if test -f /var/lib/mysql/mysqld.pid ; then + PID=`cat /var/lib/mysql/mysqld.pid` + kill $PID + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/mysqld {start|stop|restart}" + ;; +esac + +exit 0 diff --git a/recipes/mysql/mysql5/plug.in.patch b/recipes/mysql/mysql5/plug.in.patch new file mode 100644 index 0000000000..70c39fa7a3 --- /dev/null +++ b/recipes/mysql/mysql5/plug.in.patch @@ -0,0 +1,40 @@ +Index: mysql-5.1.40/storage/innodb_plugin/plug.in +=================================================================== +--- mysql-5.1.40.orig/storage/innodb_plugin/plug.in ++++ mysql-5.1.40/storage/innodb_plugin/plug.in +@@ -63,35 +63,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ + ;; + esac + AC_SUBST(INNODB_DYNAMIC_CFLAGS) +- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) +- AC_TRY_RUN( +- [ +- #include <pthread.h> +- #include <string.h> +- +- int main(int argc, char** argv) { +- pthread_t x1; +- pthread_t x2; +- pthread_t x3; +- +- memset(&x1, 0x0, sizeof(x1)); +- memset(&x2, 0x0, sizeof(x2)); +- memset(&x3, 0x0, sizeof(x3)); +- +- __sync_bool_compare_and_swap(&x1, x2, x3); +- +- return(0); +- } +- ], +- [ +- AC_DEFINE([HAVE_ATOMIC_PTHREAD_T], [1], +- [pthread_t can be used by GCC atomic builtins]) +- AC_MSG_RESULT(yes) +- ], +- [ +- AC_MSG_RESULT(no) +- ] +- ) + + # Try using solaris atomics on SunOS if GCC atomics are not available + AC_CHECK_DECLS( |