summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tim@donna.mysql.com>2001-02-20 23:28:56 +0200
committerunknown <tim@donna.mysql.com>2001-02-20 23:28:56 +0200
commitb53d7383798665d58da31b8184ad8ead2ea3f892 (patch)
tree8cd9522bc8ae0ca1cb6ddd27ab948773f5e4cc72
parenteedae8056df97110bda3d56fe30fa17120e34504 (diff)
parentfc58b42fbfa0f0381efc68e5dd0f5e83f75500c1 (diff)
downloadmariadb-git-b53d7383798665d58da31b8184ad8ead2ea3f892.tar.gz
Merge donna.mysql.com:/home/my/bk/mysql
into donna.mysql.com:/home/tim/my/work innobase/configure.in: Auto merged innobase/include/lock0types.h: Auto merged innobase/include/os0sync.h: Auto merged innobase/include/sync0types.h: Auto merged sql/ha_innobase.cc: Auto merged BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--acconfig.h3
-rw-r--r--acinclude.m477
-rw-r--r--configure.in11
-rw-r--r--innobase/include/os0file.h6
-rw-r--r--innobase/os/os0sync.c27
-rw-r--r--sql/Makefile.am8
7 files changed, 124 insertions, 9 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index c2b6edfd4a9..125d5ca0f03 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -12,3 +12,4 @@ tfr@coyote.emotion.ee
tim@cane.mysql.fi
tim@threads.polyesthetic.msg
tim@work.mysql.com
+tim@donna.mysql.com
diff --git a/acconfig.h b/acconfig.h
index f56627efdc9..967127d22cb 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -78,6 +78,9 @@
/* Define if int8, int16 and int32 types exist */
#undef HAVE_INT_8_16_32
+/* Using Innobase DB */
+#undef HAVE_INNOBASE_DB
+
/* Define if we have GNU readline */
#undef HAVE_LIBREADLINE
diff --git a/acinclude.m4 b/acinclude.m4
index dedcdce3cc8..1806b1fc418 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -849,6 +849,83 @@ dnl END OF MYSQL_CHECK_BDB SECTION
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_CHECK_INNOBASE
+dnl Sets HAVE_INNOBASE_DB if --with-innobase-db is used
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_CHECK_INNOBASE], [
+ AC_ARG_WITH([innobase-db],
+ [\
+ --with-innobase-db Use Innobase DB],
+ [innobase="$withval"],
+ [innobase=no])
+
+ AC_MSG_CHECKING([for Innobase DB])
+
+ have_innobase_db=no
+ innobase_includes=
+ innobase_libs=
+ case "$innobase" in
+ yes )
+ AC_MSG_RESULT([Using Innobase DB])
+ AC_DEFINE(HAVE_INNOBASE_DB)
+ have_innobase_db="yes"
+ innobase_includes="-I../innobase/include"
+dnl Some libs are listed several times, in order for gcc to sort out
+dnl circular references.
+ innobase_libs="\
+ ../innobase/usr/libusr.a\
+ ../innobase/odbc/libodbc.a\
+ ../innobase/srv/libsrv.a\
+ ../innobase/que/libque.a\
+ ../innobase/dict/libdict.a\
+ ../innobase/ibuf/libibuf.a\
+ ../innobase/row/librow.a\
+ ../innobase/pars/libpars.a\
+ ../innobase/btr/libbtr.a\
+ ../innobase/trx/libtrx.a\
+ ../innobase/read/libread.a\
+ ../innobase/usr/libusr.a\
+ ../innobase/buf/libbuf.a\
+ ../innobase/ibuf/libibuf.a\
+ ../innobase/eval/libeval.a\
+ ../innobase/log/liblog.a\
+ ../innobase/fsp/libfsp.a\
+ ../innobase/fut/libfut.a\
+ ../innobase/fil/libfil.a\
+ ../innobase/lock/liblock.a\
+ ../innobase/mtr/libmtr.a\
+ ../innobase/page/libpage.a\
+ ../innobase/rem/librem.a\
+ ../innobase/thr/libthr.a\
+ ../innobase/com/libcom.a\
+ ../innobase/sync/libsync.a\
+ ../innobase/data/libdata.a\
+ ../innobase/mach/libmach.a\
+ ../innobase/ha/libha.a\
+ ../innobase/dyn/libdyn.a\
+ ../innobase/mem/libmem.a\
+ ../innobase/sync/libsync.a\
+ ../innobase/ut/libut.a\
+ ../innobase/os/libos.a\
+ ../innobase/ut/libut.a"
+
+ AC_CHECK_LIB(rt, aio_read, [innobase_libs="$innobase_libs -lrt"])
+ ;;
+ * )
+ AC_MSG_RESULT([Not using Innobase DB])
+ ;;
+ esac
+
+ AC_SUBST(innobase_includes)
+ AC_SUBST(innobase_libs)
+])
+
+dnl ---------------------------------------------------------------------------
+dnl END OF MYSQL_CHECK_INNOBASE SECTION
+dnl ---------------------------------------------------------------------------
+
+dnl ---------------------------------------------------------------------------
dnl Got this from the GNU tar 1.13.11 distribution
dnl by Paul Eggert <eggert@twinsun.com>
dnl ---------------------------------------------------------------------------
diff --git a/configure.in b/configure.in
index 64524fd20d8..56027305bdf 100644
--- a/configure.in
+++ b/configure.in
@@ -1833,6 +1833,7 @@ AC_MSG_RESULT([default: $default_charset; compiled in: $CHARSETS])
MYSQL_CHECK_BDB
+MYSQL_CHECK_INNOBASE
# If we have threads generate some library functions and test programs
@@ -1898,6 +1899,16 @@ mysql-noinstall-hack:' \
AC_DEFINE(HAVE_BERKELEY_DB)
fi
+ if test X"$have_innobase_db" = Xyes
+ then
+ sql_server_dirs="innobase $sql_server_dirs"
+ echo "CONFIGURING FOR INNOBASE DB"
+ (cd innobase && sh ./configure) \
+ || AC_MSG_ERROR([could not configure Innobase DB])
+
+ echo "END OF INNOBASE DB CONFIGURATION"
+ fi
+
if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
then
# MIT user level threads
diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h
index 5b90f24f12e..a02cd947c28 100644
--- a/innobase/include/os0file.h
+++ b/innobase/include/os0file.h
@@ -28,6 +28,12 @@ Created 10/21/1995 Heikki Tuuri
#define POSIX_ASYNC_IO
#endif
+#ifndef S_IRWXU
+#define S_IRWXU 00700
+#define S_IRWXG 00070
+#define S_IRWXO 00007
+#endif
+
#endif
#ifdef __WIN__
diff --git a/innobase/os/os0sync.c b/innobase/os/os0sync.c
index 1647dd982f3..4c283431575 100644
--- a/innobase/os/os0sync.c
+++ b/innobase/os/os0sync.c
@@ -60,9 +60,9 @@ os_event_create(
event = ut_malloc(sizeof(struct os_event_struct));
os_fast_mutex_init(&(event->os_mutex));
- os_fast_mutex_init(&(event->wait_mutex));
+ pthread_cond_init(&(event->cond_var), NULL);
- event->is_set = TRUE;
+ event->is_set = FALSE;
return(event);
#endif
@@ -119,8 +119,8 @@ os_event_set(
if (event->is_set) {
/* Do nothing */
} else {
- os_fast_mutex_unlock(&(event->wait_mutex));
event->is_set = TRUE;
+ pthread_cond_broadcast(&(event->cond_var));
}
os_fast_mutex_unlock(&(event->os_mutex));
@@ -148,7 +148,6 @@ os_event_reset(
if (!event->is_set) {
/* Do nothing */
} else {
- os_fast_mutex_lock(&(event->wait_mutex));
event->is_set = FALSE;
}
@@ -173,7 +172,7 @@ os_event_free(
ut_a(event);
os_fast_mutex_free(&(event->os_mutex));
- os_fast_mutex_free(&(event->wait_mutex));
+ pthread_cond_destroy(&(event->cond_var));
ut_free(event);
#endif
@@ -197,8 +196,22 @@ os_event_wait(
ut_a(err == WAIT_OBJECT_0);
#else
- os_fast_mutex_lock(&(event->wait_mutex));
- os_fast_mutex_unlock(&(event->wait_mutex));
+ os_fast_mutex_lock(&(event->os_mutex));
+loop:
+ if (event->is_set == TRUE) {
+ os_fast_mutex_unlock(&(event->os_mutex));
+
+ /* Ok, we may return */
+
+ return;
+ }
+
+ pthread_cond_wait(&(event->cond_var), &(event->os_mutex));
+
+ /* Solaris manual said that spurious wakeups may occur: we have
+ to check the 'is_set' variable again */
+
+ goto loop;
#endif
}
diff --git a/sql/Makefile.am b/sql/Makefile.am
index a8fe9fc233f..7d4fd86878a 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -20,7 +20,9 @@
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
-INCLUDES = @MT_INCLUDES@ @bdb_includes@ -I$(srcdir)/../include \
+INCLUDES = @MT_INCLUDES@ \
+ @bdb_includes@ @innobase_includes@ \
+ -I$(srcdir)/../include \
-I$(srcdir)/../regex \
-I$(srcdir) -I../include -I.. -I.
WRAPLIBS= @WRAPLIBS@
@@ -37,7 +39,9 @@ LDADD = ../isam/libnisam.a \
../dbug/libdbug.a \
../regex/libregex.a \
../strings/libmystrings.a
-mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ @bdb_libs@ $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS)
+mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
+ @bdb_libs@ @innobase_libs@ \
+ $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS)
noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
item_strfunc.h item_timefunc.h item_uniq.h \
item_create.h mysql_priv.h \