Commit 5abb9f0c authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new

into serg.mylan:/usr/home/serg/Abk/mysql-5.1


include/mysql/plugin.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
parents 0de72ae9 8b458177
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1771,3 +1771,4 @@ vio/viotest.cpp
zlib/*.ds?
zlib/*.vcproj
libmysqld/event_scheduler.cc
mysys/test_atomic
+7 −7
Original line number Diff line number Diff line
@@ -83,12 +83,12 @@ link_sources:
	for f in $(sql_src) ; do \
	  rm -f $$f; \
	  @LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
        done; \
	done;
	for f in $(strings_src) ; do \
	  rm -f $(srcdir)/$$f; \
	  @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
        done; \
        rm -f $(srcdir)/my_user.c; \
	done;
	-rm -f $(srcdir)/my_user.c;
	@LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c


client/client_priv.h.rej

deleted100644 → 0
+0 −15
Original line number Diff line number Diff line
***************
*** 50,55 ****
    OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
  #endif
    OPT_TRIGGERS,
    OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
!   OPT_TZ_UTC, OPT_AUTO_CLOSE
  };
--- 50,55 ----
    OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
  #endif
    OPT_TRIGGERS,
    OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
!   OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_SSL_VERIFY_SERVER_CERT
  };
+14 −42
Original line number Diff line number Diff line
@@ -778,48 +778,6 @@ struct request_info *req;
AC_SUBST(WRAPLIBS)

if test "$TARGET_LINUX" = "true"; then
  AC_MSG_CHECKING([for atomic operations])

  AC_LANG_SAVE
  AC_LANG_CPLUSPLUS

  atom_ops=
  AC_TRY_RUN([
#include <asm/atomic.h>
int main()
{
  atomic_t v;

  atomic_set(&v, 23);
  atomic_add(5, &v);
  return atomic_read(&v) == 28 ? 0 : -1;
}
  ],
  [AC_DEFINE([HAVE_ATOMIC_ADD], [1],
             [atomic_add() from <asm/atomic.h> (Linux only)])
   atom_ops="${atom_ops}atomic_add "],
  )
  AC_TRY_RUN([
#include <asm/atomic.h>
int main()
{
  atomic_t v;

  atomic_set(&v, 23);
  atomic_sub(5, &v);
  return atomic_read(&v) == 18 ? 0 : -1;
}
  ],
  [AC_DEFINE([HAVE_ATOMIC_SUB], [1],
             [atomic_sub() from <asm/atomic.h> (Linux only)])
   atom_ops="${atom_ops}atomic_sub "],
  )

  if test -z "$atom_ops"; then atom_ops="no"; fi
  AC_MSG_RESULT($atom_ops)

  AC_LANG_RESTORE

  AC_ARG_WITH(pstack,
    [  --with-pstack           Use the pstack backtrace library],
    [ USE_PSTACK=$withval ],
@@ -1631,6 +1589,20 @@ then
  fi
fi

AC_ARG_WITH([atomic-ops],
	    AC_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
	    [Implement atomic operations using pthread rwlocks or atomic CPU
             instructions for multi-processor (default) or uniprocessor
             configuration]), , [with_atomic_ops=smp])
case "$with_atomic_ops" in
  "up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1],
                  [Assume single-CPU mode, no concurrency]) ;;
  "rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1],
                  [Use pthread rwlocks for atomic ops]) ;;
  "smp") ;;
   *) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;;
esac

# Force static compilation to avoid linking problems/get more speed
AC_ARG_WITH(mysqld-ldflags,
    [  --with-mysqld-ldflags   Extra linking arguments for mysqld],
+169 −0
Original line number Diff line number Diff line
/* Copyright (C) 2006 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#if defined(__i386__) || defined(_M_IX86)
#ifdef MY_ATOMIC_MODE_DUMMY
#  define LOCK ""
#else
#  define LOCK "lock "
#endif
#ifdef __GNUC__
#include "x86-gcc.h"
#elif defined(_MSC_VER)
#include "x86-msvc.h"
#endif
#endif

#ifdef make_atomic_add_body8

#ifdef HAVE_INLINE

#define make_atomic_add(S)					\
static inline uint ## S _my_atomic_add ## S(			\
        my_atomic_ ## S ## _t *a, uint ## S v)			\
{								\
  make_atomic_add_body ## S;					\
  return v;							\
}

#define make_atomic_swap(S)					\
static inline uint ## S _my_atomic_swap ## S(			\
        my_atomic_ ## S ## _t *a, uint ## S v)			\
{								\
  make_atomic_swap_body ## S;					\
  return v;							\
}

#define make_atomic_cas(S)					\
static inline uint _my_atomic_cas ## S(my_atomic_ ## S ## _t *a,\
        uint ## S *cmp, uint ## S set)				\
{								\
  uint8 ret;							\
  make_atomic_cas_body ## S;					\
  return ret;							\
}

#define make_atomic_load(S)					\
static inline uint ## S _my_atomic_load ## S(			\
        my_atomic_ ## S ## _t *a)				\
{								\
  uint ## S ret;						\
  make_atomic_load_body ## S;					\
  return ret;							\
}

#define make_atomic_store(S)					\
static inline void _my_atomic_store ## S(			\
        my_atomic_ ## S ## _t *a, uint ## S v)			\
{								\
  make_atomic_store_body ## S;					\
}

#else /* no inline functions */

#define make_atomic_add(S)					\
extern uint ## S _my_atomic_add ## S(				\
        my_atomic_ ## S ## _t *a, uint ## S v);

#define make_atomic_swap(S)					\
extern uint ## S _my_atomic_swap ## S(				\
        my_atomic_ ## S ## _t *a, uint ## S v);

#define make_atomic_cas(S)					\
extern uint _my_atomic_cas ## S(my_atomic_ ## S ## _t *a,	\
        uint ## S *cmp, uint ## S set);

#define make_atomic_load(S)					\
extern uint ## S _my_atomic_load ## S(				\
        my_atomic_ ## S ## _t *a);

#define make_atomic_store(S)					\
extern void _my_atomic_store ## S(				\
        my_atomic_ ## S ## _t *a, uint ## S v);

#endif

make_atomic_add( 8)
make_atomic_add(16)
make_atomic_add(32)

make_atomic_cas( 8)
make_atomic_cas(16)
make_atomic_cas(32)

make_atomic_load( 8)
make_atomic_load(16)
make_atomic_load(32)

make_atomic_store( 8)
make_atomic_store(16)
make_atomic_store(32)

make_atomic_swap( 8)
make_atomic_swap(16)
make_atomic_swap(32)

#undef make_atomic_add_body8
#undef make_atomic_cas_body8
#undef make_atomic_load_body8
#undef make_atomic_store_body8
#undef make_atomic_swap_body8
#undef make_atomic_add_body16
#undef make_atomic_cas_body16
#undef make_atomic_load_body16
#undef make_atomic_store_body16
#undef make_atomic_swap_body16
#undef make_atomic_add_body32
#undef make_atomic_cas_body32
#undef make_atomic_load_body32
#undef make_atomic_store_body32
#undef make_atomic_swap_body32
#undef make_atomic_add
#undef make_atomic_cas
#undef make_atomic_load
#undef make_atomic_store
#undef make_atomic_swap

#define my_atomic_add8(a,v,L)  _my_atomic_add8(a,v)
#define my_atomic_add16(a,v,L) _my_atomic_add16(a,v)
#define my_atomic_add32(a,v,L) _my_atomic_add32(a,v)

#define my_atomic_cas8(a,c,v,L)  _my_atomic_cas8(a,c,v)
#define my_atomic_cas16(a,c,v,L) _my_atomic_cas16(a,c,v)
#define my_atomic_cas32(a,c,v,L) _my_atomic_cas32(a,c,v)

#define my_atomic_load8(a,L)  _my_atomic_load8(a)
#define my_atomic_load16(a,L) _my_atomic_load16(a)
#define my_atomic_load32(a,L) _my_atomic_load32(a)

#define my_atomic_store8(a,v,L)  _my_atomic_store8(a,v)
#define my_atomic_store16(a,v,L) _my_atomic_store16(a,v)
#define my_atomic_store32(a,v,L) _my_atomic_store32(a,v)

#define my_atomic_swap8(a,v,L)  _my_atomic_swap8(a,v)
#define my_atomic_swap16(a,v,L) _my_atomic_swap16(a,v)
#define my_atomic_swap32(a,v,L) _my_atomic_swap32(a,v)

#define my_atomic_rwlock_t typedef int
#define my_atomic_rwlock_destroy(name)
#define my_atomic_rwlock_init(name)
#define my_atomic_rwlock_rdlock(name)
#define my_atomic_rwlock_wrlock(name)
#define my_atomic_rwlock_rdunlock(name)
#define my_atomic_rwlock_wrunlock(name)

#endif
Loading