Commit dcedfad3 authored by unknown's avatar unknown

Portability fixes


Docs/manual.texi:
  Updated mysqld-max section
configure.in:
  Version change
innobase/configure.in:
  Don't compile with -g when not using debugging (No optimization on Linux-Alpha)
innobase/ib_config.h.in:
  config file
innobase/ib_config.h:
  config file
innobase/include/que0que.h:
  Can't inline this on SCO
innobase/include/que0que.ic:
  Can't inline this on SCO
innobase/include/sync0sync.h:
  Fix for Mac OS X
innobase/que/que0que.c:
  Added functions that can't be inlined on SCO
parent eecdc32b
......@@ -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
......@@ -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
......
......@@ -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
......
......@@ -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"
......
......@@ -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
......
......@@ -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(
/*============================*/
......
......@@ -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--;
}
......@@ -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(
/*=======*/
......
......@@ -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. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment