summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-04-06 20:37:31 +0300
committerunknown <heikki@donna.mysql.fi>2001-04-06 20:37:31 +0300
commita9c32293404dfa5daafe69f1c2b6745825eff5a5 (patch)
tree2ea76af015747f83b5e9eba769ceccd905e2f9cc
parentefc74d1b22b4ba54fedcd10cad21c6bf67340d3c (diff)
downloadmariadb-git-a9c32293404dfa5daafe69f1c2b6745825eff5a5.tar.gz
univ.i Prevent inlining of functions on HP-UX because GCC is broken there
configure.in Prevent inlining of functions on HP-UX because GCC is broken there trx0trx.h Fix trx->error_info in MySQL debug version: Innobase and ha_innobase.cc saw a different size for pthread_mutex_t trx0trx.c Fix trx->error_info in MySQL debug version: Innobase and ha_innobase.cc saw a different size for pthread_mutex_t ha_innobase.cc Fix trx->error_info in MySQL debug version: Innobase and ha_innobase.cc saw a different size for pthread_mutex_t sql/ha_innobase.cc: Fix trx->error_info in MySQL debug version: Innobase and ha_innobase.cc saw a different size for pthread_mutex_t innobase/trx/trx0trx.c: Fix trx->error_info in MySQL debug version: Innobase and ha_innobase.cc saw a different size for pthread_mutex_t innobase/include/trx0trx.h: Fix trx->error_info in MySQL debug version: Innobase and ha_innobase.cc saw a different size for pthread_mutex_t innobase/configure.in: Prevent inlining of functions on HP-UX because GCC is broken there innobase/include/univ.i: Prevent inlining of functions on HP-UX because GCC is broken there BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--innobase/configure.in6
-rw-r--r--innobase/include/trx0trx.h8
-rw-r--r--innobase/include/univ.i2
-rw-r--r--innobase/trx/trx0trx.c11
-rw-r--r--sql/ha_innobase.cc10
6 files changed, 35 insertions, 3 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index fb534622f9b..139241f6b88 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -1 +1,2 @@
jani@janikt.pp.saunalahti.fi
+heikki@donna.mysql.fi
diff --git a/innobase/configure.in b/innobase/configure.in
index f9e94d58682..645ac58483b 100644
--- a/innobase/configure.in
+++ b/innobase/configure.in
@@ -1,15 +1,21 @@
# Process this file with autoconf to produce a configure script
AC_INIT
+AC_CANONICAL_SYSTEM
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(ib_config.h)
AM_INIT_AUTOMAKE(ib, 0.90)
AC_PROG_CC
AC_PROG_RANLIB
+AC_PROG_INSTALL
AC_CHECK_HEADERS(aio.h)
AC_CHECK_SIZEOF(int, 4)
AC_C_INLINE
AC_C_BIGENDIAN
+case "$target_os" in
+ hp*) AC_DEFINE(UNIV_MUST_NOT_INLINE, 1,
+ No inlining because gcc broken on HP-UX);;
+esac
AC_OUTPUT(Makefile os/Makefile ut/Makefile btr/Makefile
buf/Makefile com/Makefile data/Makefile
diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h
index b74dea2319e..049dbc1476c 100644
--- a/innobase/include/trx0trx.h
+++ b/innobase/include/trx0trx.h
@@ -25,6 +25,14 @@ saving CPU time. The kernel mutex contention is increased, however. */
extern ulint trx_n_mysql_transactions;
/********************************************************************
+Retrieves the error_info field from a trx. */
+
+void*
+trx_get_error_info(
+/*===============*/
+ /* out: the error info */
+ trx_t* trx); /* in: trx object */
+/********************************************************************
Creates and initializes a transaction object. */
trx_t*
diff --git a/innobase/include/univ.i b/innobase/include/univ.i
index ce3390649ff..f24937ea0c8 100644
--- a/innobase/include/univ.i
+++ b/innobase/include/univ.i
@@ -76,7 +76,7 @@ subdirectory of 'mysql'. */
/* the above option enables basic recovery debugging:
new allocated file pages are reset */
-#if (!defined(UNIV_DEBUG) && !defined(INSIDE_HA_INNOBASE_CC))
+#if (!defined(UNIV_DEBUG) && !defined(INSIDE_HA_INNOBASE_CC) && !defined(UNIV_MUST_NOT_INLINE))
/* Definition for inline version */
#ifdef __WIN__
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index 4676606d4de..b365341d3b8 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -30,6 +30,17 @@ sess_t* trx_dummy_sess = NULL;
the kernel mutex */
ulint trx_n_mysql_transactions = 0;
+/********************************************************************
+Retrieves the error_info field from a trx. */
+
+void*
+trx_get_error_info(
+/*===============*/
+ /* out: the error info */
+ trx_t* trx) /* in: trx object */
+{
+ return(trx->error_info);
+}
/********************************************************************
Creates and initializes a transaction object. */
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index 0debae9a797..62fa6627ae8 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -2575,10 +2575,16 @@ ha_innobase::info(
}
}
+ /* The trx struct in Innobase contains a pthread mutex embedded:
+ in the debug version of MySQL that it replaced by a 'safe mutex'
+ which is of a different size. We have to use a function to access
+ trx fields. Otherwise trx->error_info will be a random
+ pointer and cause a seg fault. */
+
if (flag & HA_STATUS_ERRKEY) {
errkey = (unsigned int) row_get_mysql_key_number_for_index(
- (dict_index_t*)
- prebuilt->trx->error_info);
+ (dict_index_t*)
+ trx_get_error_info(prebuilt->trx));
}
DBUG_VOID_RETURN;