summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Docs/manual.texi28
-rw-r--r--configure.in2
-rw-r--r--innobase/configure.in44
-rw-r--r--innobase/ib_config.h6
-rw-r--r--innobase/ib_config.h.in6
-rw-r--r--innobase/include/que0que.h2
-rw-r--r--innobase/include/que0que.ic46
-rw-r--r--innobase/include/sync0sync.h1
-rw-r--r--innobase/que/que0que.c45
9 files changed, 131 insertions, 49 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index c008b49bb3c..eac0045e489 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -31600,6 +31600,34 @@ the following configure options:
@item CFLAGS=-DUSE_SYMDIR @tab Symbolic links support for Windows.
@end multitable
+Note that as Berkeley DB and InnoDB are not available for all platforms,
+some of the @code{Max} binaries may not have support for both of these.
+You can check which table types are supported by doing the following
+query:
+
+@example
+mysql> show variables like "have_%";
++---------------+-------+
+| Variable_name | Value |
++---------------+-------+
+| have_bdb | YES |
+| have_gemini | NO |
+| have_innodb | NO |
+| have_isam | YES |
+| have_raid | YES |
+| have_ssl | NO |
++---------------+-------+
+@end example
+
+The meaning of the values are:
+
+@multitable @columnfractions .3 .7
+@item @strong{Value} @tab @strong{Meaning}.
+@item YES @tab The option is activated and usable.
+@item NO @tab @strong{MySQL} is not compiled with support for this option.
+@item DISABLED @tab The xxxx option is disabled because one started @code{mysqld} with @code{--skip-xxxx} or because one didn't start @code{mysqld} with all needed options to enable the option. In this case the @code{hostname.err} file should contain a reason for why the option is disabled.
+@end multitable
+
@code{safe_mysqld} will automaticly try to start any @code{mysqld} binary
with the @code{-max} prefix. This makes it very easy to test out a
another @code{mysqld} binary in an existing installation. Just
diff --git a/configure.in b/configure.in
index 8b2152d3067..c22014eaa19 100644
--- a/configure.in
+++ b/configure.in
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
-AM_INIT_AUTOMAKE(mysql, 3.23.37)
+AM_INIT_AUTOMAKE(mysql, 3.23.38)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
diff --git a/innobase/configure.in b/innobase/configure.in
index 0bcc53cc05b..15f45a5d49d 100644
--- a/innobase/configure.in
+++ b/innobase/configure.in
@@ -13,9 +13,53 @@ AC_CHECK_FUNCS(sched_yield)
AC_C_INLINE
AC_C_BIGENDIAN
+# Build optimized or debug version ?
+# First check for gcc and g++
+if test "$ac_cv_prog_gcc" = "yes"
+then
+ DEBUG_CFLAGS="-g"
+ DEBUG_OPTIMIZE_CC="-O"
+ OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
+else
+ DEBUG_CFLAGS="-g"
+ DEBUG_OPTIMIZE_CC=""
+ OPTIMIZE_CFLAGS="-O"
+fi
+if test "$ac_cv_prog_cxx_g" = "yes"
+then
+ DEBUG_CXXFLAGS="-g"
+ DEBUG_OPTIMIZE_CXX="-O"
+ OPTIMIZE_CXXFLAGS="-O3"
+else
+ DEBUG_CXXFLAGS="-g"
+ DEBUG_OPTIMIZE_CXX=""
+ OPTIMIZE_CXXFLAGS="-O"
+fi
+AC_ARG_WITH(debug,
+ [ --without-debug Build a production version without debugging code],
+ [with_debug=$withval],
+ [with_debug=no])
+if test "$with_debug" = "yes"
+then
+ # Medium debug.
+ CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS"
+ CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS"
+elif test "$with_debug" = "full"
+then
+ # Full debug. Very slow in some cases
+ CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
+ CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
+else
+ # Optimized version. No debug
+ CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
+ CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS"
+fi
+
case "$target_os" in
hp*) AC_DEFINE(UNIV_MUST_NOT_INLINE, 1,
No inlining because gcc broken on HP-UX);;
+ *sgi-irix*) AC_DEFINE(UNIV_MUST_NOT_INLINE, 1,
+ No inlining because cc broken on irix);;
esac
AC_OUTPUT(Makefile os/Makefile ut/Makefile btr/Makefile
diff --git a/innobase/ib_config.h b/innobase/ib_config.h
index a2276199abd..972d85e6eb9 100644
--- a/innobase/ib_config.h
+++ b/innobase/ib_config.h
@@ -11,9 +11,15 @@
/* The number of bytes in a int. */
#define SIZEOF_INT 4
+/* Define if you have the sched_yield function. */
+#define HAVE_SCHED_YIELD 1
+
/* Define if you have the <aio.h> header file. */
#define HAVE_AIO_H 1
+/* Define if you have the <sched.h> header file. */
+#define HAVE_SCHED_H 1
+
/* Name of package */
#define PACKAGE "ib"
diff --git a/innobase/ib_config.h.in b/innobase/ib_config.h.in
index 1ea07f5c0c3..967b422fb29 100644
--- a/innobase/ib_config.h.in
+++ b/innobase/ib_config.h.in
@@ -10,9 +10,15 @@
/* The number of bytes in a int. */
#undef SIZEOF_INT
+/* Define if you have the sched_yield function. */
+#undef HAVE_SCHED_YIELD
+
/* Define if you have the <aio.h> header file. */
#undef HAVE_AIO_H
+/* Define if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
/* Name of package */
#undef PACKAGE
diff --git a/innobase/include/que0que.h b/innobase/include/que0que.h
index bd21a9801aa..4cbd888ba1d 100644
--- a/innobase/include/que0que.h
+++ b/innobase/include/que0que.h
@@ -117,7 +117,6 @@ que_thr_stop(
/**************************************************************************
Moves a thread from another state to the QUE_THR_RUNNING state. Increments
the n_active_thrs counters of the query graph and transaction. */
-UNIV_INLINE
void
que_thr_move_to_run_state_for_mysql(
/*================================*/
@@ -126,7 +125,6 @@ que_thr_move_to_run_state_for_mysql(
/**************************************************************************
A patch for MySQL used to 'stop' a dummy query thread used in MySQL
select, when there is no error or lock wait. */
-UNIV_INLINE
void
que_thr_stop_for_mysql_no_error(
/*============================*/
diff --git a/innobase/include/que0que.ic b/innobase/include/que0que.ic
index e19198aad0e..ae4ed10560f 100644
--- a/innobase/include/que0que.ic
+++ b/innobase/include/que0que.ic
@@ -256,49 +256,3 @@ que_graph_is_select(
return(FALSE);
}
-
-/**************************************************************************
-Moves a thread from another state to the QUE_THR_RUNNING state. Increments
-the n_active_thrs counters of the query graph and transaction if thr was
-not active. */
-UNIV_INLINE
-void
-que_thr_move_to_run_state_for_mysql(
-/*================================*/
- que_thr_t* thr, /* in: an query thread */
- trx_t* trx) /* in: transaction */
-{
- if (!thr->is_active) {
-
- (thr->graph)->n_active_thrs++;
-
- trx->n_active_thrs++;
-
- thr->is_active = TRUE;
-
- ut_ad((thr->graph)->n_active_thrs == 1);
- ut_ad(trx->n_active_thrs == 1);
- }
-
- thr->state = QUE_THR_RUNNING;
-}
-
-/**************************************************************************
-A patch for MySQL used to 'stop' a dummy query thread used in MySQL
-select, when there is no error or lock wait. */
-UNIV_INLINE
-void
-que_thr_stop_for_mysql_no_error(
-/*============================*/
- que_thr_t* thr, /* in: query thread */
- trx_t* trx) /* in: transaction */
-{
- ut_ad(thr->state == QUE_THR_RUNNING);
-
- thr->state = QUE_THR_COMPLETED;
-
- thr->is_active = FALSE;
- (thr->graph)->n_active_thrs--;
-
- trx->n_active_thrs--;
-}
diff --git a/innobase/include/sync0sync.h b/innobase/include/sync0sync.h
index f22cce17a1a..03dd45816aa 100644
--- a/innobase/include/sync0sync.h
+++ b/innobase/include/sync0sync.h
@@ -55,6 +55,7 @@ Calling this function is obligatory only if the memory buffer containing
the mutex is freed. Removes a mutex object from the mutex list. The mutex
is checked to be in the reset state. */
+#undef mutex_free /* Fix for MacOS X */
void
mutex_free(
/*=======*/
diff --git a/innobase/que/que0que.c b/innobase/que/que0que.c
index b2c7e3ceea8..ddf8c8ebc43 100644
--- a/innobase/que/que0que.c
+++ b/innobase/que/que0que.c
@@ -1068,6 +1068,51 @@ que_thr_stop_for_mysql(
mutex_exit(&kernel_mutex);
}
+
+/**************************************************************************
+Moves a thread from another state to the QUE_THR_RUNNING state. Increments
+the n_active_thrs counters of the query graph and transaction if thr was
+not active. */
+void
+que_thr_move_to_run_state_for_mysql(
+/*================================*/
+ que_thr_t* thr, /* in: an query thread */
+ trx_t* trx) /* in: transaction */
+{
+ if (!thr->is_active) {
+
+ (thr->graph)->n_active_thrs++;
+
+ trx->n_active_thrs++;
+
+ thr->is_active = TRUE;
+
+ ut_ad((thr->graph)->n_active_thrs == 1);
+ ut_ad(trx->n_active_thrs == 1);
+ }
+
+ thr->state = QUE_THR_RUNNING;
+}
+
+/**************************************************************************
+A patch for MySQL used to 'stop' a dummy query thread used in MySQL
+select, when there is no error or lock wait. */
+void
+que_thr_stop_for_mysql_no_error(
+/*============================*/
+ que_thr_t* thr, /* in: query thread */
+ trx_t* trx) /* in: transaction */
+{
+ ut_ad(thr->state == QUE_THR_RUNNING);
+
+ thr->state = QUE_THR_COMPLETED;
+
+ thr->is_active = FALSE;
+ (thr->graph)->n_active_thrs--;
+
+ trx->n_active_thrs--;
+}
+
/**************************************************************************
Prints info of an SQL query graph node. */