diff options
Diffstat (limited to 'meta-oe/recipes-support/mysql/mysql5')
9 files changed, 312 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch b/meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch new file mode 100644 index 0000000000..33fd17acd4 --- /dev/null +++ b/meta-oe/recipes-support/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/meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch b/meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch new file mode 100644 index 0000000000..3b5b3fd063 --- /dev/null +++ b/meta-oe/recipes-support/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/meta-oe/recipes-support/mysql/mysql5/configure.in.patch b/meta-oe/recipes-support/mysql/mysql5/configure.in.patch new file mode 100644 index 0000000000..3edc5f3c21 --- /dev/null +++ b/meta-oe/recipes-support/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/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch b/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch new file mode 100644 index 0000000000..58812c1f1a --- /dev/null +++ b/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch @@ -0,0 +1,77 @@ +From: Date: July 20 2010 7:44pm +Subject: bzr commit into mysql-5.1-bugteam branch (davi:3493) Bug#52514 +List-Archive: http://lists.mysql.com/commits/113968 +X-Bug: 52514 +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="===============9147207462624717749==" + +--===============9147207462624717749== +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +# At a local mysql-5.1-bugteam repository of davi + + 3493 Davi Arnaut 2010-07-20 + Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5 + due to GCC preprocessor change + + The problem is that newer GCC versions treats missing headers + as fatal errors. The solution is to use a guard macro to prevent + the inclusion of system headers when checking the ABI with the + C Preprocessor. + + Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638 + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836 + @ Makefile.am + Define guard macro. + @ configure.in + Remove workaround. + @ include/mysql.h + Guard the header inclusion. + @ include/mysql.h.pp + Header is not included anymore. + + modified: + Makefile.am + configure.in + include/mysql.h + include/mysql.h.pp +=== modified file 'Makefile.am' +Index: mysql-5.1.40/Makefile.am +=================================================================== +--- mysql-5.1.40.orig/Makefile.am 2009-10-07 01:46:13.000000000 +0800 ++++ mysql-5.1.40/Makefile.am 2010-08-17 20:07:24.843148001 +0800 +@@ -312,7 +312,7 @@ + do_abi_check: + set -ex; \ + for file in $(abi_headers); do \ +- @CC@ -E -nostdinc -dI \ ++ @CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/include/mysql \ + -I$(top_srcdir)/sql \ +Index: mysql-5.1.40/include/mysql.h +=================================================================== +--- mysql-5.1.40.orig/include/mysql.h 2009-10-07 01:46:50.000000000 +0800 ++++ mysql-5.1.40/include/mysql.h 2010-08-17 20:07:24.843148001 +0800 +@@ -44,7 +44,9 @@ + #endif + + #ifndef _global_h /* If not standard header */ ++#ifndef MYSQL_ABI_CHECK + #include <sys/types.h> ++#endif + #ifdef __LCC__ + #include <winsock2.h> /* For windows */ + #endif +Index: mysql-5.1.40/include/mysql.h.pp +=================================================================== +--- mysql-5.1.40.orig/include/mysql.h.pp 2009-10-07 01:46:50.000000000 +0800 ++++ mysql-5.1.40/include/mysql.h.pp 2010-08-17 20:07:24.843148001 +0800 +@@ -1,4 +1,3 @@ +-#include <sys/types.h> + typedef char my_bool; + typedef int my_socket; + #include "mysql_version.h" diff --git a/meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch b/meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch new file mode 100644 index 0000000000..4f69cd5198 --- /dev/null +++ b/meta-oe/recipes-support/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/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch b/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch new file mode 100644 index 0000000000..7b0acff21c --- /dev/null +++ b/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch @@ -0,0 +1,13 @@ +Index: mysql-5.1.40/config/ac-macros/misc.m4 +=================================================================== +--- mysql-5.1.40.orig/config/ac-macros/misc.m4 ++++ mysql-5.1.40/config/ac-macros/misc.m4 +@@ -476,7 +476,7 @@ AC_DEFUN([MYSQL_STACK_DIRECTION], + { + exit (find_stack_direction() < 0); + }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, +- ac_cv_c_stack_direction=)]) ++ ac_cv_c_stack_direction=0)]) + AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) + ])dnl + diff --git a/meta-oe/recipes-support/mysql/mysql5/my.cnf b/meta-oe/recipes-support/mysql/mysql5/my.cnf new file mode 100644 index 0000000000..7f557e4250 --- /dev/null +++ b/meta-oe/recipes-support/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/meta-oe/recipes-support/mysql/mysql5/mysqld.sh b/meta-oe/recipes-support/mysql/mysql5/mysqld.sh new file mode 100644 index 0000000000..479ebdb257 --- /dev/null +++ b/meta-oe/recipes-support/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/meta-oe/recipes-support/mysql/mysql5/plug.in.patch b/meta-oe/recipes-support/mysql/mysql5/plug.in.patch new file mode 100644 index 0000000000..70c39fa7a3 --- /dev/null +++ b/meta-oe/recipes-support/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( |