List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:May 12 2010 2:03pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3531) WL#5381
View as plain text  
#At file:///home/msvensson/mysql/7.0-wl5381/ based on revid:magnus.blaudd@stripped-vj4ucflmdo2qkapb

 3531 Magnus Blåudd	2010-05-12
      Test commit of WL#5381

    modified:
      Makefile.am
      configure.in
      storage/ndb/ndb_configure.m4
=== modified file 'Makefile.am'
--- a/Makefile.am	2010-03-12 11:56:09 +0000
+++ b/Makefile.am	2010-05-12 14:03:49 +0000
@@ -34,7 +34,7 @@ SUBDIRS =		. include @docs_dirs@ @zlib_d
 DIST_SUBDIRS =		. include Docs zlib \
 			cmd-line-utils sql-common scripts \
 			pstack \
-			strings mysys dbug mysys/tests extra regex libmysql libmysql_r client unittest storage plugin \
+			strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
 			vio sql man tests \
 			netware libmysqld \
 			mysql-test support-files sql-bench server-tools \

=== modified file 'configure.in'
--- a/configure.in	2010-03-26 05:41:26 +0000
+++ b/configure.in	2010-05-12 14:03:49 +0000
@@ -371,7 +371,6 @@ case "$target_os" in
     fi
   ;;
 esac
-
 AC_SUBST(CC)
 AC_SUBST(CFLAGS)
 AC_SUBST(CXX)
@@ -845,7 +844,7 @@ AC_CHECK_HEADERS(fcntl.h fenv.h float.h 
  unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
  sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
  sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h \
- execinfo.h atomic.h)
+ execinfo.h)
 
 AC_CHECK_HEADERS([xfs/xfs.h])
 
@@ -2127,7 +2126,7 @@ AC_FUNC_UTIME_NULL
 AC_FUNC_VPRINTF
 
 AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
-  chsize cuserid epoll_create fchmod fcntl \
+  chsize cuserid fchmod fcntl \
   fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
   getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
   getpwuid getrlimit getrusage getwd index initgroups isnan \
@@ -2137,22 +2136,17 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bs
   pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
   pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
   pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
-  pthread_setschedprio \
-  pthread_self sched_get_priority_min sched_get_priority_max \
-  sched_setaffinity processor_bind sched_setscheduler \
   pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
   realpath rename rint rwlock_init setupterm \
   shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
   sighold sigset sigthreadmask port_create sleep \
   snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
   strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
-  backtrace backtrace_symbols backtrace_symbols_fd \
-  posix_fallocate posix_memalign memalign sysconf directio atomic_swap_32 printstack)
+  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack)
 
 #
 #
 #
-AC_CHECK_LIB(rt, clock_gettime)
 case "$target" in
  *-*-aix4* | *-*-sco*)
 	# (grr) aix 4.3 has a stub for clock_gettime, (returning ENOSYS)
@@ -2163,41 +2157,6 @@ case "$target" in
  *) AC_CHECK_FUNCS(clock_gettime)
     ;;
 esac
-AC_CHECK_FUNCS(pthread_condattr_setclock)
-
-#checking for Linux Scheduling and Locking Support
-AC_MSG_CHECKING(for Linux scheduling and locking support)
-AC_TRY_LINK(
-  [#ifndef _GNU_SOURCE
-   #define _GNU_SOURCE
-   #endif
-   #include <sys/types.h>
-   #include <unistd.h>
-   #include <sched.h>
-   #include <sys/syscall.h>],
-  [const cpu_set_t *p= (const cpu_set_t*)0;
-   struct sched_param loc_sched_param;
-   int policy = 0;
-   pid_t tid = (unsigned)syscall(SYS_gettid);
-   tid = getpid();
-   int ret = sched_setaffinity(tid, sizeof(* p), p);
-   ret = sched_setscheduler(tid, policy, &loc_sched_param);],
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_LINUX_SCHEDULING, [1], [Linux scheduling/locking function]),
-  AC_MSG_RESULT(no))
-
-AC_MSG_CHECKING(for Solaris affinity support)
-AC_TRY_LINK(
-  [#include <sys/types.h>
-   #include <sys/lwp.h>
-   #include <sys/processor.h>
-   #include <sys/procset.h>],
-  [processorid_t cpu_id = (processorid_t)0;
-   id_t tid = _lwp_self();
-   int ret = processor_bind(P_LWPID, tid, cpu_id, 0);],
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_SOLARIS_AFFINITY, [1], [Solaris affinity function]),
-  AC_MSG_RESULT(no))
 
 case "$mysql_cv_sys_os" in
  OS400) # i5/OS (OS/400) emits a SIGILL (Function not implemented) when
@@ -2522,64 +2481,6 @@ then
 fi
 AC_MSG_RESULT("$netinet_inc")
 
-#checking for Linux futex support
-AC_MSG_CHECKING(for Linux futex support)
-AC_TRY_LINK(
-  [#ifndef _GNU_SOURCE
-   #define _GNU_SOURCE
-   #endif
-   #include <sys/types.h>
-   #include <unistd.h>
-   #include <errno.h>
-   #include <sys/syscall.h>],
-   #define FUTEX_WAIT        0
-   #define FUTEX_WAKE        1
-   #define FUTEX_FD          2
-   #define FUTEX_REQUEUE     3
-   #define FUTEX_CMP_REQUEUE 4
-   #define FUTEX_WAKE_OP     5
-  [
-   int a = 0; int * addr = &a;
-   return syscall(SYS_futex, addr, FUTEX_WAKE, 1, 0, 0, 0) == 0 ? 0 : errno;
-  ],
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_LINUX_FUTEX, [1], [Linux futex support]),
-  AC_MSG_RESULT(no))
-
-#checking for asm needed for ndbmtd
-SAVE_CFLAGS="$CFLAGS"
-if test "x${ac_cv_header_atomic_h}" = xyes; then
-   CFLAGS="$CFLAGS -DHAVE_ATOMIC_H"
-fi
-AC_CACHE_CHECK([assembler needed for ndbmtd],
-               [have_ndbmtd_asm], [AC_TRY_RUN([
-    #include "storage/ndb/src/kernel/vm/mt-asm.h"
-    int main()
-    {
-      unsigned int a = 0;
-      volatile unsigned int *ap = (volatile unsigned int*)&a;
-      #ifdef NDB_HAVE_XCNG
-      a = xcng(ap, 1);
-      cpu_pause();
-      #endif
-      mb();
-      * ap = 2;
-      rmb();
-      * ap = 1;
-      wmb();
-      * ap = 0;
-      read_barrier_depends();
-      return a;
-   }
-], [have_ndbmtd_asm=yes],
-   [have_ndbmtd_asm=no],
-   [have_ndbmtd_asm=no])])
-if test "x$have_ndbmtd_asm" = xyes; then
-  AC_DEFINE(HAVE_NDBMTD_ASM, 1,
-            [Define to 1 if assmbler needed to run ndbmtd is present.])
-fi
-CFLAGS="$SAVE_CFLAGS"
-
 AC_CACHE_CHECK([support for weak symbols], mysql_cv_weak_symbol,
 [AC_TRY_LINK([],[
   extern void __attribute__((weak)) foo(void);
@@ -3025,7 +2926,7 @@ if test -d "$srcdir/cmd-line-utils/readl
   AC_CONFIG_FILES(cmd-line-utils/readline/Makefile)
 fi
 
-AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile mysys/tests/Makefile dnl
+AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
  unittest/Makefile unittest/mytap/Makefile unittest/mytap/t/Makefile dnl
  unittest/mysys/Makefile unittest/examples/Makefile dnl
  strings/Makefile regex/Makefile storage/Makefile dnl
@@ -3048,8 +2949,6 @@ AC_CONFIG_COMMANDS([default], , test -z 
 # Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
 AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'")
 
-AM_CONDITIONAL([BUILD_NDBMTD], [ test X"$build_ndbmtd" = Xyes ])
-
 AC_OUTPUT
 
 # The first line "Thank you ..." is checked in ./Do-compile to verify that configure

=== modified file 'storage/ndb/ndb_configure.m4'
--- a/storage/ndb/ndb_configure.m4	2009-12-22 15:02:41 +0000
+++ b/storage/ndb/ndb_configure.m4	2010-05-12 14:03:49 +0000
@@ -1,16 +1,10 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_NDBCLUSTER
-dnl ---------------------------------------------------------------------------
 
 NDB_MYSQL_VERSION_MAJOR=`echo $VERSION | cut -d. -f1`
 NDB_MYSQL_VERSION_MINOR=`echo $VERSION | cut -d. -f2`
 NDB_MYSQL_VERSION_BUILD=`echo $VERSION | cut -d. -f3 | cut -d- -f1`
 
-TEST_NDBCLUSTER=""
-
 dnl for build ndb docs
 
-build_ndbmtd=
 AC_PATH_PROG(DOXYGEN, doxygen, no)
 AC_PATH_PROG(PDFLATEX, pdflatex, no)
 AC_PATH_PROG(MAKEINDEX, makeindex, no)
@@ -19,6 +13,73 @@ AC_SUBST(DOXYGEN)
 AC_SUBST(PDFLATEX)
 AC_SUBST(MAKEINDEX)
 
+dnl ---------------------------------------------------------------------------
+dnl Check if ndbmtd should/can be built
+dnl - skipped if with --without-ndbmtd specified
+dnl - skipped if the ndbmtd assembler can't be compiled
+dnl
+dnl NOTE! the checks are only run if ndbcluster plugin is configured
+dnl but the AM_CODITIONAL is always enabled
+dnl ---------------------------------------------------------------------------
+build_ndbmtd=
+AM_CONDITIONAL([BUILD_NDBMTD], [ test X"$build_ndbmtd" = Xyes ])
+AC_DEFUN([NDB_CHECK_NDBMTD], [
+
+  AC_ARG_WITH([ndbmtd],
+              [AC_HELP_STRING([--without-ndbmtd],
+                              [Dont build ndbmtd])],
+              [ndb_ndbmtd="$withval"],
+              [ndb_ndbmtd=yes])
+
+  if test X"$ndb_ndbmtd" = Xyes
+  then
+    # checking atomic.h needed for spinlock's on sparc and Sun Studio
+    AC_CHECK_HEADERS(atomic.h)
+
+    # checking assembler needed for ndbmtd
+    SAVE_CFLAGS="$CFLAGS"
+    if test "x${ac_cv_header_atomic_h}" = xyes; then
+      CFLAGS="$CFLAGS -DHAVE_ATOMIC_H"
+    fi
+    AC_CACHE_CHECK([assembler needed for ndbmtd],
+                   [ndb_cv_ndbmtd_asm],[
+      AC_TRY_RUN(
+        [
+        #include "storage/ndb/src/kernel/vm/mt-asm.h"
+        int main()
+        {
+          unsigned int a = 0;
+          volatile unsigned int *ap = (volatile unsigned int*)&a;
+        #ifdef NDB_HAVE_XCNG
+          a = xcng(ap, 1);
+          cpu_pause();
+        #endif
+          mb();
+          * ap = 2;
+          rmb();
+          * ap = 1;
+          wmb();
+          * ap = 0;
+          read_barrier_depends();
+          return a;
+        }
+        ],
+        [ndb_cv_ndbmtd_asm=yes],
+        [ndb_cv_ndbmtd_asm=no],
+        [ndb_cv_ndbmtd_asm=no]
+      )]
+    )
+    CFLAGS="$SAVE_CFLAGS"
+
+    if test X"$ndb_cv_ndbmtd_asm" = Xyes
+    then
+      build_ndbmtd=yes
+      AC_MSG_RESULT([Including ndbmtd])
+    fi
+  fi
+])
+
+
 AC_DEFUN([MYSQL_CHECK_NDB_JTIE], [
 
 case "$host_os" in
@@ -175,12 +236,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
               [ndb_jtie="$withval"],
               [ndb_jtie="no"])
 
-  AC_ARG_WITH([ndbmtd],
-              [AC_HELP_STRING([--without-ndbmtd],
-                              [Dont build ndbmtd])],
-              [ndb_mtd="$withval"],
-              [ndb_mtd=yes])
-
   case "$ndb_ccflags" in
     "yes")
         AC_MSG_RESULT([The --ndb-ccflags option requires a parameter (passed to CC for ndb compilation)])
@@ -303,14 +358,79 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
   AC_MSG_RESULT([Using NDB Cluster])
   with_partition="yes"
   ndb_cxxflags_fix=""
-  TEST_NDBCLUSTER="--ndbcluster"
-
   ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_srcdir)/storage/ndb/include -I\$(top_srcdir)/storage/ndb/include/ndbapi -I\$(top_srcdir)/storage/ndb/include/mgmapi"
   ndbcluster_libs="\$(top_builddir)/storage/ndb/src/.libs/libndbclient.a"
   ndbcluster_system_libs=""
-  ndb_mgmclient_libs="\$(top_builddir)/storage/ndb/src/mgmclient/libndbmgmclient.la"
 
   MYSQL_CHECK_NDB_OPTIONS
+  NDB_CHECK_NDBMTD
+
+  # checking CLOCK_MONOTONIC support
+  AC_CHECK_LIB(rt, clock_gettime)
+  AC_CHECK_FUNCS(clock_gettime pthread_condattr_setclock)
+
+  # checking various functions
+  AC_CHECK_FUNCS(pthread_self \
+    sched_get_priority_min sched_get_priority_max sched_setaffinity \
+    sched_setscheduler processor_bind epoll_create \
+    posix_memalign memalign sysconf directio atomic_swap_32)
+
+  AC_MSG_CHECKING(for Linux scheduling and locking support)
+  AC_TRY_LINK(
+    [#ifndef _GNU_SOURCE
+     #define _GNU_SOURCE
+     #endif
+     #include <sys/types.h>
+     #include <unistd.h>
+     #include <sched.h>
+     #include <sys/syscall.h>],
+    [const cpu_set_t *p= (const cpu_set_t*)0;
+     struct sched_param loc_sched_param;
+     int policy = 0;
+     pid_t tid = (unsigned)syscall(SYS_gettid);
+     tid = getpid();
+     int ret = sched_setaffinity(tid, sizeof(* p), p);
+     ret = sched_setscheduler(tid, policy, &loc_sched_param);],
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_LINUX_SCHEDULING, [1], [Linux scheduling/locking function]),
+    AC_MSG_RESULT(no))
+
+  AC_MSG_CHECKING(for Solaris affinity support)
+  AC_TRY_LINK(
+    [#include <sys/types.h>
+     #include <sys/lwp.h>
+     #include <sys/processor.h>
+     #include <sys/procset.h>],
+    [processorid_t cpu_id = (processorid_t)0;
+     id_t tid = _lwp_self();
+     int ret = processor_bind(P_LWPID, tid, cpu_id, 0);],
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_SOLARIS_AFFINITY, [1], [Solaris affinity function]),
+    AC_MSG_RESULT(no))
+
+  AC_MSG_CHECKING(for Linux futex support)
+  AC_TRY_LINK(
+    [#ifndef _GNU_SOURCE
+     #define _GNU_SOURCE
+     #endif
+     #include <sys/types.h>
+     #include <unistd.h>
+     #include <errno.h>
+     #include <sys/syscall.h>],
+     #define FUTEX_WAIT        0
+     #define FUTEX_WAKE        1
+     #define FUTEX_FD          2
+     #define FUTEX_REQUEUE     3
+     #define FUTEX_CMP_REQUEUE 4
+     #define FUTEX_WAKE_OP     5
+    [
+     int a = 0; int * addr = &a;
+     return syscall(SYS_futex, addr, FUTEX_WAKE, 1, 0, 0, 0) == 0 ? 0 : errno;
+    ],
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_LINUX_FUTEX, [1], [Linux futex support]),
+    AC_MSG_RESULT(no))
+
   NDBCLUSTER_WORKAROUNDS
 
   MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster"
@@ -375,16 +495,6 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
   then
     ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo"
   fi
-  
-  if test X"$ndb_mtd" = Xyes
-  then
-    if test X"$have_ndbmtd_asm" = Xyes
-    then
-      build_ndbmtd=yes
-      AC_MSG_RESULT([Including ndbmtd])
-    fi
-  fi
-  export build_ndbmtd
 
   ndb_opt_subdirs=
   ndb_bin_am_ldflags="-static"
@@ -450,7 +560,6 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
   AC_SUBST(ndbcluster_includes)
   AC_SUBST(ndbcluster_libs)
   AC_SUBST(ndbcluster_system_libs)
-  AC_SUBST(ndb_mgmclient_libs)
   AC_SUBST(NDB_SCI_LIBS)
 
   AC_SUBST(ndb_transporter_opt_objs)
@@ -479,9 +588,3 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
   ])
 ])
 
-AC_SUBST(TEST_NDBCLUSTER)
-
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_NDBCLUSTER SECTION

-dnl ---------------------------------------------------------------------------
-

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20100512140349-z210v7pz41oykj9o.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3531) WL#5381Magnus Blåudd12 May