Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2059 05/10/25 09:43:02 jonas@stripped +46 -0
Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-ndb-dd
sql/ha_ndbcluster.cc
1.158 05/10/25 09:42:59 jonas@stripped +36 -59
merge
sql/Makefile.am
1.115 05/10/25 09:42:59 jonas@stripped +1 -1
merge
libmysqld/Makefile.am
1.67 05/10/25 09:42:59 jonas@stripped +2 -2
merge
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
1.111 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbDictionary.cpp
1.53 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp
1.29 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/Ndb.cpp
1.49 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/vm/SuperPool.cpp
1.4 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.cpp
1.23 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/vm/SafeCounter.cpp
1.5 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp
1.38 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/trix/Trix.cpp
1.14 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/suma/Suma.cpp
1.28 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
1.31 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
1.21 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp
1.19 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
1.24 05/10/25 09:38:51 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
1.21 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
1.89 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
1.115 05/10/25 09:38:50 jonas@stripped +2 -0
Auto merged
storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
1.21 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp
1.56 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/SimBlockList.cpp
1.18 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp
1.8 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
storage/ndb/include/kernel/kernel_types.h
1.10 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
sql/sql_yacc.yy
1.382 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
sql/sql_table.cc
1.238 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
sql/sql_parse.cc
1.445 05/10/25 09:38:50 jonas@stripped +0 -0
Auto merged
sql/sql_lex.h
1.190 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/sql_class.h
1.242 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/sql_class.cc
1.186 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/mysqld.cc
1.463 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/mysql_priv.h
1.306 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/log.cc
1.165 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/lex.h
1.146 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/item.cc
1.128 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/handler.h
1.150 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/handler.cc
1.160 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/ha_ndbcluster.h
1.83 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/ha_myisammrg.cc
1.69 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
sql/ha_myisam.cc
1.156 05/10/25 09:38:49 jonas@stripped +0 -0
Auto merged
BitKeeper/deleted/.del-MetaData.cpp~146ae9865dd35829
1.5 05/10/25 09:38:48 jonas@stripped +0 -0
Auto merged
sql/ha_innodb.cc
1.220 05/10/25 09:38:48 jonas@stripped +0 -0
Auto merged
sql/ha_federated.cc
1.35 05/10/25 09:38:48 jonas@stripped +0 -0
Auto merged
mysql-test/Makefile.am
1.57 05/10/25 09:38:48 jonas@stripped +0 -0
Auto merged
configure.in
1.280 05/10/25 09:38:48 jonas@stripped +0 -0
Auto merged
BitKeeper/deleted/.del-MetaData.cpp~146ae9865dd35829
1.1.3.3 05/10/25 09:38:48 jonas@stripped +0 -0
Merge rename: storage/ndb/src/kernel/vm/MetaData.cpp -> BitKeeper/deleted/.del-MetaData.cpp~146ae9865dd35829
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.1-ndb-dd/RESYNC
--- 1.279/configure.in 2005-10-21 12:04:02 +02:00
+++ 1.280/configure.in 2005-10-25 09:38:48 +02:00
@@ -15,12 +15,6 @@
# See the libtool docs for information on how to do shared lib versions.
SHARED_LIB_VERSION=15:0:0
-# ndb version
-NDB_VERSION_MAJOR=5
-NDB_VERSION_MINOR=1
-NDB_VERSION_BUILD=2
-NDB_VERSION_STATUS="alpha"
-
# Set all version vars based on $VERSION. How do we do this more elegant ?
# Remember that regexps needs to quote [ and ] since this is run through m4
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
@@ -36,15 +30,9 @@
sinclude(config/ac-macros/check_cpu.m4)
sinclude(config/ac-macros/character_sets.m4)
sinclude(config/ac-macros/compiler_flag.m4)
-sinclude(config/ac-macros/ha_archive.m4)
+sinclude(config/ac-macros/storage.m4)
sinclude(config/ac-macros/ha_berkeley.m4)
-sinclude(config/ac-macros/ha_blackhole.m4)
-sinclude(config/ac-macros/ha_example.m4)
-sinclude(config/ac-macros/ha_federated.m4)
-sinclude(config/ac-macros/ha_innodb.m4)
sinclude(config/ac-macros/ha_ndbcluster.m4)
-sinclude(config/ac-macros/ha_partition.m4)
-sinclude(config/ac-macros/ha_tina.m4)
sinclude(config/ac-macros/large_file.m4)
sinclude(config/ac-macros/misc.m4)
sinclude(config/ac-macros/openssl.m4)
@@ -61,6 +49,7 @@
#####
#####
+
AC_SUBST(MYSQL_NO_DASH_VERSION)
AC_SUBST(MYSQL_BASE_VERSION)
AC_SUBST(MYSQL_VERSION_ID)
@@ -74,19 +63,6 @@
AC_SUBST(AVAILABLE_LANGUAGES)
AC_SUBST(AVAILABLE_LANGUAGES_ERRORS)
-AC_SUBST([NDB_VERSION_MAJOR])
-AC_SUBST([NDB_VERSION_MINOR])
-AC_SUBST([NDB_VERSION_BUILD])
-AC_SUBST([NDB_VERSION_STATUS])
-AC_DEFINE_UNQUOTED([NDB_VERSION_MAJOR], [$NDB_VERSION_MAJOR],
- [NDB major version])
-AC_DEFINE_UNQUOTED([NDB_VERSION_MINOR], [$NDB_VERSION_MINOR],
- [NDB minor version])
-AC_DEFINE_UNQUOTED([NDB_VERSION_BUILD], [$NDB_VERSION_BUILD],
- [NDB build version])
-AC_DEFINE_UNQUOTED([NDB_VERSION_STATUS], ["$NDB_VERSION_STATUS"],
- [NDB status version])
-
# Canonicalize the configuration name.
SYSTEM_TYPE="$host_vendor-$host_os"
@@ -418,15 +394,6 @@
AC_SUBST(PERL)
AC_SUBST(PERL5)
-# for build ndb docs
-
-AC_PATH_PROG(DOXYGEN, doxygen, no)
-AC_PATH_PROG(PDFLATEX, pdflatex, no)
-AC_PATH_PROG(MAKEINDEX, makeindex, no)
-AC_SUBST(DOXYGEN)
-AC_SUBST(PDFLATEX)
-AC_SUBST(MAKEINDEX)
-
# Lock for PS
AC_PATH_PROG(PS, ps, ps)
AC_MSG_CHECKING("how to check if pid exists")
@@ -917,24 +884,6 @@
MAX_C_OPTIMIZE="-O3"
MAX_CXX_OPTIMIZE="-O3"
-ndb_cxxflags_fix=
-case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc in
-# workaround for Sun Forte/x86 see BUG#4681
- *solaris*-i?86-no)
- CFLAGS="$CFLAGS -DBIG_TABLES"
- CXXFLAGS="$CXXFLAGS -DBIG_TABLES"
- ;;
- *) ;;
-esac
-case $SYSTEM_TYPE-$ac_cv_prog_gcc in
-# workaround for Sun Forte compile problem for ndb
- *solaris*-no)
- ndb_cxxflags_fix="$ndb_cxxflags_fix -instances=static"
- ;;
- *) ;;
-esac
-
-
case $SYSTEM_TYPE in
*solaris2.7*)
# Solaris 2.7 has a broken /usr/include/widec.h
@@ -1130,7 +1079,7 @@
sql/Makefile.in)
# Use gen_lex_hash.linux instead of gen_lex_hash
# Add library dependencies to mysqld_DEPENDENCIES
- lib_DEPENDENCIES="\$(bdb_libs_with_path) \$(innodb_libs) \$(ndbcluster_libs) \$(pstack_libs) \$(innodb_system_libs) \$(openssl_libs)"
+ lib_DEPENDENCIES="\$(pstack_libs) \$(openssl_libs)"
cat > $filesed << EOF
s,\(^.*\$(MAKE) gen_lex_hash\)\$(EXEEXT),#\1,
s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux,
@@ -2336,7 +2285,8 @@
readline_h_ln_cmd=""
readline_link=""
-if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then
+if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
+then
# For NetWare, do not need readline
echo "Skipping readline"
else
@@ -2372,7 +2322,8 @@
then
# Use the new readline interface
readline_link="-lreadline"
- elif [test "$mysql_cv_libedit_interface" = "yes"]; then
+ elif [test "$mysql_cv_libedit_interface" = "yes"]
+ then
# Use libedit
readline_link="-ledit"
else
@@ -2390,18 +2341,65 @@
AC_SUBST(readline_h_ln_cmd)
MYSQL_CHECK_BIG_TABLES
-MYSQL_CHECK_BDB
-MYSQL_CHECK_INNODB
-MYSQL_CHECK_EXAMPLEDB
-MYSQL_CHECK_ARCHIVEDB
-MYSQL_CHECK_CSVDB
-MYSQL_CHECK_BLACKHOLEDB
-MYSQL_CHECK_NDBCLUSTER
-MYSQL_CHECK_FEDERATED
-MYSQL_CHECK_PARTITIONDB
+
+MYSQL_STORAGE_ENGINE(innobase,,innodb,,,,storage/innobase,ha_innodb.o,[ dnl
+ \$(top_builddir)/storage/innobase/usr/libusr.a dnl
+ \$(top_builddir)/storage/innobase/srv/libsrv.a dnl
+ \$(top_builddir)/storage/innobase/dict/libdict.a dnl
+ \$(top_builddir)/storage/innobase/que/libque.a dnl
+ \$(top_builddir)/storage/innobase/srv/libsrv.a dnl
+ \$(top_builddir)/storage/innobase/ibuf/libibuf.a dnl
+ \$(top_builddir)/storage/innobase/row/librow.a dnl
+ \$(top_builddir)/storage/innobase/pars/libpars.a dnl
+ \$(top_builddir)/storage/innobase/btr/libbtr.a dnl
+ \$(top_builddir)/storage/innobase/trx/libtrx.a dnl
+ \$(top_builddir)/storage/innobase/read/libread.a dnl
+ \$(top_builddir)/storage/innobase/usr/libusr.a dnl
+ \$(top_builddir)/storage/innobase/buf/libbuf.a dnl
+ \$(top_builddir)/storage/innobase/ibuf/libibuf.a dnl
+ \$(top_builddir)/storage/innobase/eval/libeval.a dnl
+ \$(top_builddir)/storage/innobase/log/liblog.a dnl
+ \$(top_builddir)/storage/innobase/fsp/libfsp.a dnl
+ \$(top_builddir)/storage/innobase/fut/libfut.a dnl
+ \$(top_builddir)/storage/innobase/fil/libfil.a dnl
+ \$(top_builddir)/storage/innobase/lock/liblock.a dnl
+ \$(top_builddir)/storage/innobase/mtr/libmtr.a dnl
+ \$(top_builddir)/storage/innobase/page/libpage.a dnl
+ \$(top_builddir)/storage/innobase/rem/librem.a dnl
+ \$(top_builddir)/storage/innobase/thr/libthr.a dnl
+ \$(top_builddir)/storage/innobase/sync/libsync.a dnl
+ \$(top_builddir)/storage/innobase/data/libdata.a dnl
+ \$(top_builddir)/storage/innobase/mach/libmach.a dnl
+ \$(top_builddir)/storage/innobase/ha/libha.a dnl
+ \$(top_builddir)/storage/innobase/dyn/libdyn.a dnl
+ \$(top_builddir)/storage/innobase/mem/libmem.a dnl
+ \$(top_builddir)/storage/innobase/sync/libsync.a dnl
+ \$(top_builddir)/storage/innobase/ut/libut.a dnl
+ \$(top_builddir)/storage/innobase/os/libos.a dnl
+ \$(top_builddir)/storage/innobase/ut/libut.a],[
+ AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
+ AC_SUBST(innodb_includes)
+ AC_SUBST(innodb_libs)
+ AC_SUBST(innodb_system_libs)
+ other_configures="$other_configures storage/innobase/configure"
+])
+
+MYSQL_STORAGE_ENGINE(berkeley,,berkeley-db,,,,storage/bdb,,,[
+ MYSQL_SETUP_BERKELEY_DB
+])
+MYSQL_STORAGE_ENGINE(example)
+MYSQL_STORAGE_ENGINE(archive)
+MYSQL_STORAGE_ENGINE(csv,,,,,tina_hton,,ha_tina.o)
+MYSQL_STORAGE_ENGINE(blackhole)
+MYSQL_STORAGE_ENGINE(federated)
+MYSQL_STORAGE_ENGINE(ndbcluster,,ndbcluster,,,,storage/ndb,,,[
+ MYSQL_SETUP_NDBCLUSTER
+])
+MYSQL_STORAGE_ENGINE(partition,,partition)
# If we have threads generate some library functions and test programs
sql_server_dirs=
+sql_server=
server_scripts=
thread_dirs=
@@ -2428,7 +2426,8 @@
# If configuring for NetWare, set up to link sources from and build the netware directory
netware_dir=
linked_netware_sources=
-if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then
+if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
+then
netware_dir="netware"
linked_netware_sources="linked_netware_sources"
fi
@@ -2449,115 +2448,8 @@
AC_SUBST(THREAD_LOBJECTS)
server_scripts="mysqld_safe mysql_install_db"
sql_server_dirs="strings mysys dbug extra regex"
-
-
- #
- # Configuration for optional table handlers
- #
-
- if test X"$have_berkeley_db" != Xno; then
- if test X"$have_berkeley_db" != Xyes; then
- # we must build berkeley db from source
- sql_server_dirs="$sql_server_dirs $have_berkeley_db"
- AC_CONFIG_FILES(storage/bdb/Makefile)
-
- echo "CONFIGURING FOR BERKELEY DB"
- bdb_conf_flags="--disable-shared --build=$build_alias"
- if test $with_debug = "yes"
- then
- bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
- fi
- # NOTICE: if you're compiling BDB, it needs to be a SUBDIR
- # of $srcdir (i.e., you can 'cd $srcdir/$bdb'). It won't
- # work otherwise.
- if test -d "$bdb"; then :
- else
- # This should only happen when doing a VPATH build
- echo "NOTICE: I have to make the BDB directory: `pwd`:$bdb"
- mkdir "$bdb" || exit 1
- fi
- if test -d "$bdb"/build_unix; then :
- else
- # This should only happen when doing a VPATH build
- echo "NOTICE: I have to make the build_unix directory: `pwd`:$bdb/build_unix"
- mkdir "$bdb/build_unix" || exit 1
- fi
- rel_srcdir=
- case "$srcdir" in
- /* ) rel_srcdir="$srcdir" ;;
- * ) rel_srcdir="../../../$srcdir" ;;
- esac
- echo $bdb/build_unix
- echo $rel_srcdir/$bdb/dist/configure
- (cd $bdb/build_unix && \
- sh $rel_srcdir/$bdb/dist/configure $bdb_conf_flags) || \
- AC_MSG_ERROR([could not configure Berkeley DB])
-
-dnl echo "bdb = '$bdb'; inc = '$bdb_includes', lib = '$bdb_libs'"
- echo "END OF BERKELEY DB CONFIGURATION"
- fi
-
- AC_DEFINE([HAVE_BERKELEY_DB], [1], [Have berkeley db installed])
- else
- if test -d bdb; then :
- else
- mkdir storage/bdb && mkdir storage/bdb/build_unix
- fi
-
- if test -r storage/bdb/build_unix/db.h; then :
- else
- cat <<EOF > storage/bdb/build_unix/db.h
-
-This file is a placeholder to fool make. The way that automake
-and GNU make work together causes some files to depend on this
-header, even if we're not building with Berkeley DB.
-
-Obviously, if this file *is* used, it'll break and hopefully we can find
-out why this file was generated by ${top_srcdir}/configure instead of
-the real db.h.
-
-If you run into some problems because of this file, please use mysql_bug
-to generate a bug report, and give the exact output of make and any
-details you can think of. Send the message to bugs@stripped.
-
-Thank you!
-
-EOF
- fi
- fi
-
- if test X"$have_innodb" = Xyes
- then
- innodb_conf_flags=""
- sql_server_dirs="$sql_server_dirs storage/innobase"
- AC_CONFIG_SUBDIRS(storage/innobase)
- fi
-
-case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc-$have_ndbcluster in
- *solaris*-i?86-no-yes)
- # ndb fail for whatever strange reason to link Sun Forte/x86
- # unless using incremental linker
- CXXFLAGS="$CXXFLAGS -xildon"
- ;;
- *) ;;
-esac
-
- if test X"$have_ndbcluster" = Xyes
- then
- if test X"$mysql_cv_compress" != Xyes
- then
- echo
- echo "MySQL Cluster table handler ndbcluster requires compress/uncompress."
- echo "Commonly available in libzlib.a. Please install and rerun configure."
- echo
- exit 1
- fi
- sql_server_dirs="$sql_server_dirs storage/ndb"
- fi
- #
- # END of configuration for optional table handlers
- #
- sql_server_dirs="$sql_server_dirs storage/myisam storage/myisammrg storage/heap vio sql"
+ mysql_se_dirs="storage/myisam storage/myisammrg storage/heap $mysql_se_dirs"
+ sql_server="$sql_server vio sql"
fi
# IMPORTANT - do not modify LIBS past this line - this hack is the only way
@@ -2568,9 +2460,17 @@
LIBS="$LIBS $STATIC_NSS_FLAGS"
AC_SUBST(sql_server_dirs)
+AC_SUBST(sql_server)
AC_SUBST(thread_dirs)
AC_SUBST(server_scripts)
+AC_SUBST(mysql_se_dirs)
+AC_SUBST(mysql_se_libs)
+AC_SUBST(mysql_se_objs)
+AC_SUBST(mysql_se_htons)
+AC_SUBST(mysql_se_decls)
+
+
# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
# Start with the (longer) server list, add each client item not yet present.
sql_union_dirs=" $sql_server_dirs "
@@ -2599,142 +2499,9 @@
;;
esac
-
-if test X"$have_ndbcluster" = Xyes
-then
- MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster"
-
- CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)"
- if test "$have_ndb_debug" = "default"
- then
- have_ndb_debug=$with_debug
- fi
-
- if test "$have_ndb_debug" = "yes"
- then
- # Medium debug.
- NDB_DEFS="-DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
- elif test "$have_ndb_debug" = "full"
- then
- NDB_DEFS="-DNDB_DEBUG_FULL -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
- else
- # no extra ndb debug but still do asserts if debug version
- if test "$with_debug" = "yes" -o "$with_debug" = "full"
- then
- NDB_DEFS=""
- else
- NDB_DEFS="-DNDEBUG"
- fi
- fi
-
-AC_SUBST([NDB_DEFS])
-AC_SUBST([ndb_cxxflags_fix])
-
-
-if test X"$ndb_port" = Xdefault
-then
- ndb_port="1186"
-fi
-AC_SUBST([ndb_port])
-
-ndb_transporter_opt_objs=""
-if test "$ac_cv_func_shmget" = "yes" &&
- test "$ac_cv_func_shmat" = "yes" &&
- test "$ac_cv_func_shmdt" = "yes" &&
- test "$ac_cv_func_shmctl" = "yes" &&
- test "$ac_cv_func_sigaction" = "yes" &&
- test "$ac_cv_func_sigemptyset" = "yes" &&
- test "$ac_cv_func_sigaddset" = "yes" &&
- test "$ac_cv_func_pthread_sigmask" = "yes"
-then
- AC_DEFINE([NDB_SHM_TRANSPORTER], [1],
- [Including Ndb Cluster DB shared memory transporter])
- AC_MSG_RESULT([Including ndb shared memory transporter])
- ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo"
-else
- AC_MSG_RESULT([Not including ndb shared memory transporter])
-fi
-
-if test X"$have_ndb_sci" = Xyes
-then
- ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo"
-fi
-AC_SUBST([ndb_transporter_opt_objs])
-
-ndb_opt_subdirs=
-ndb_bin_am_ldflags="-static"
-if test X"$have_ndb_test" = Xyes
-then
- ndb_opt_subdirs="test"
- ndb_bin_am_ldflags=""
-fi
-if test X"$have_ndb_docs" = Xyes
-then
- ndb_opt_subdirs="$ndb_opt_subdirs docs"
- ndb_bin_am_ldflags=""
-fi
-AC_SUBST([ndb_bin_am_ldflags])
-AC_SUBST([ndb_opt_subdirs])
-
-NDB_SIZEOF_CHARP="$ac_cv_sizeof_charp"
-NDB_SIZEOF_CHAR="$ac_cv_sizeof_char"
-NDB_SIZEOF_SHORT="$ac_cv_sizeof_short"
-NDB_SIZEOF_INT="$ac_cv_sizeof_int"
-NDB_SIZEOF_LONG="$ac_cv_sizeof_long"
-NDB_SIZEOF_LONG_LONG="$ac_cv_sizeof_long_long"
-AC_SUBST([NDB_SIZEOF_CHARP])
-AC_SUBST([NDB_SIZEOF_CHAR])
-AC_SUBST([NDB_SIZEOF_SHORT])
-AC_SUBST([NDB_SIZEOF_INT])
-AC_SUBST([NDB_SIZEOF_LONG])
-AC_SUBST([NDB_SIZEOF_LONG_LONG])
-
-AC_CONFIG_FILES(storage/ndb/Makefile storage/ndb/include/Makefile dnl
- storage/ndb/src/Makefile storage/ndb/src/common/Makefile dnl
- storage/ndb/docs/Makefile dnl
- storage/ndb/tools/Makefile dnl
- storage/ndb/src/common/debugger/Makefile dnl
- storage/ndb/src/common/debugger/signaldata/Makefile dnl
- storage/ndb/src/common/portlib/Makefile dnl
- storage/ndb/src/common/util/Makefile dnl
- storage/ndb/src/common/logger/Makefile dnl
- storage/ndb/src/common/transporter/Makefile dnl
- storage/ndb/src/common/mgmcommon/Makefile dnl
- storage/ndb/src/kernel/Makefile dnl
- storage/ndb/src/kernel/error/Makefile dnl
- storage/ndb/src/kernel/blocks/Makefile dnl
- storage/ndb/src/kernel/blocks/cmvmi/Makefile dnl
- storage/ndb/src/kernel/blocks/dbacc/Makefile dnl
- storage/ndb/src/kernel/blocks/dbdict/Makefile dnl
- storage/ndb/src/kernel/blocks/dbdih/Makefile dnl
- storage/ndb/src/kernel/blocks/dblqh/Makefile dnl
- storage/ndb/src/kernel/blocks/dbtc/Makefile dnl
- storage/ndb/src/kernel/blocks/dbtup/Makefile dnl
- storage/ndb/src/kernel/blocks/ndbfs/Makefile dnl
- storage/ndb/src/kernel/blocks/ndbcntr/Makefile dnl
- storage/ndb/src/kernel/blocks/qmgr/Makefile dnl
- storage/ndb/src/kernel/blocks/trix/Makefile dnl
- storage/ndb/src/kernel/blocks/backup/Makefile dnl
- storage/ndb/src/kernel/blocks/dbutil/Makefile dnl
- storage/ndb/src/kernel/blocks/suma/Makefile dnl
- storage/ndb/src/kernel/blocks/dbtux/Makefile dnl
- storage/ndb/src/kernel/vm/Makefile dnl
- storage/ndb/src/mgmapi/Makefile dnl
- storage/ndb/src/ndbapi/Makefile dnl
- storage/ndb/src/mgmsrv/Makefile dnl
- storage/ndb/src/mgmclient/Makefile dnl
- storage/ndb/src/cw/Makefile dnl
- storage/ndb/src/cw/cpcd/Makefile dnl
- storage/ndb/test/Makefile dnl
- storage/ndb/test/src/Makefile dnl
- storage/ndb/test/ndbapi/Makefile dnl
- storage/ndb/test/ndbapi/bank/Makefile dnl
- storage/ndb/test/tools/Makefile dnl
- storage/ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl
- storage/ndb/include/ndb_version.h storage/ndb/include/ndb_global.h dnl
- storage/ndb/include/ndb_types.h dnl
- )
-fi
+for CONF in $other_configures; do
+ (cd `dirname $CONF`; ./`basename $CONF`)
+done
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
@@ -2747,7 +2514,7 @@
libmysql_r/Makefile libmysqld/Makefile libmysqld/examples/Makefile dnl
libmysql/Makefile client/Makefile dnl
pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile dnl
- sql-common/Makefile SSL/Makefile dnl
+ sql/handlerton.cc sql-common/Makefile SSL/Makefile dnl
dbug/Makefile scripts/Makefile dnl
include/Makefile sql-bench/Makefile tools/Makefile dnl
server-tools/Makefile server-tools/instance-manager/Makefile dnl
--- 1.114/sql/Makefile.am 2005-10-21 09:31:51 +02:00
+++ 1.115/sql/Makefile.am 2005-10-25 09:42:59 +02:00
@@ -21,7 +21,6 @@
MYSQLBASEdir= $(prefix)
MYSQLLIBdir= $(pkglibdir)
INCLUDES = @ZLIB_INCLUDES@ \
- @bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \
-I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/regex -I$(srcdir) $(openssl_includes)
WRAPLIBS= @WRAPLIBS@
@@ -37,12 +36,11 @@
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/regex/libregex.a \
- $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ @NDB_SCI_LIBS@
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
- @bdb_libs@ @innodb_libs@ @pstack_libs@ \
- @innodb_system_libs@ \
- @ndbcluster_libs@ @ndbcluster_system_libs@ \
+ @pstack_libs@ \
+ @mysql_se_objs@ @mysql_se_libs@ \
$(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ @openssl_libs@
noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
item_strfunc.h item_timefunc.h item_uniq.h \
@@ -51,9 +49,8 @@
procedure.h sql_class.h sql_lex.h sql_list.h \
sql_manager.h sql_map.h sql_string.h unireg.h \
sql_error.h field.h handler.h mysqld_suffix.h \
- ha_myisammrg.h\
- ha_heap.h ha_myisam.h ha_berkeley.h ha_innodb.h \
- ha_ndbcluster.h opt_range.h protocol.h \
+ ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \
+ opt_range.h protocol.h \
sql_select.h structs.h table.h sql_udf.h hash_filo.h\
lex.h lex_symbol.h sql_plugin.h sql_acl.h sql_crypt.h \
log_event.h sql_repl.h slave.h rpl_filter.h \
@@ -62,11 +59,8 @@
tztime.h my_decimal.h\
sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \
parse_file.h sql_view.h sql_trigger.h \
- sql_array.h sql_cursor.h \
- examples/ha_example.h ha_archive.h \
- examples/ha_tina.h ha_blackhole.h \
- ha_federated.h ha_partition.h
-mysqld_SOURCES = sql_lex.cc sql_handler.cc \
+ sql_array.h sql_cursor.h
+mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
item.cc item_sum.cc item_buff.cc item_func.cc \
item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
thr_malloc.cc item_create.cc item_subselect.cc \
@@ -85,9 +79,7 @@
unireg.cc des_key_file.cc \
discover.cc time.cc opt_range.cc opt_sum.cc \
records.cc filesort.cc handler.cc \
- ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
- ha_berkeley.cc ha_innodb.cc \
- ha_ndbcluster.cc sql_plugin.cc \
+ ha_heap.cc ha_myisam.cc ha_myisammrg.cc sql_plugin.cc \
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \
@@ -100,12 +92,12 @@
tztime.cc my_time.c my_decimal.cc\
sp_head.cc sp_pcontext.cc sp_rcontext.cc sp.cc \
sp_cache.cc parse_file.cc sql_trigger.cc \
- sql_tablespace.cc \
- examples/ha_example.cc ha_archive.cc \
- examples/ha_tina.cc ha_blackhole.cc \
- ha_partition.cc sql_partition.cc \
- ha_federated.cc
-
+ handlerton.cc sql_tablespace.cc
+EXTRA_mysqld_SOURCES = ha_innodb.cc ha_berkeley.cc ha_archive.cc \
+ ha_blackhole.cc ha_federated.cc ha_ndbcluster.cc \
+ ha_partition.cc \
+ examples/ha_tina.cc examples/ha_example.cc
+mysqld_DEPENDENCIES = @mysql_se_objs@
gen_lex_hash_SOURCES = gen_lex_hash.cc
gen_lex_hash_LDADD = $(LDADD) $(CXXLDFLAGS)
mysql_tzinfo_to_sql_SOURCES = mysql_tzinfo_to_sql.cc
@@ -153,6 +145,16 @@
lex_hash.h: gen_lex_hash$(EXEEXT)
./gen_lex_hash$(EXEEXT) > $@
+
+ha_berkeley.o: ha_berkeley.cc ha_berkeley.h
+ $(CXXCOMPILE) @bdb_includes@ $(LM_CFLAGS) -c $<
+
+ha_ndbcluster.o:ha_ndbcluster.cc ha_ndbcluster.h
+ $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
+
+#Until we can get rid of dependencies on ha_ndbcluster.h
+handler.o: handler.cc ha_ndbcluster.h
+ $(CXXCOMPILE) @ndbcluster_includes@ $(CXXFLAGS) -c $<
# For testing of udf_example.so; Works on platforms with gcc
# (This is not part of our build process but only provided as an example)
--- 1.155/sql/ha_myisam.cc 2005-10-21 09:31:51 +02:00
+++ 1.156/sql/ha_myisam.cc 2005-10-25 09:38:49 +02:00
@@ -50,6 +50,8 @@
** MyISAM tables
*****************************************************************************/
+static handler *myisam_create_handler(TABLE *table);
+
/* MyISAM handlerton */
handlerton myisam_hton= {
@@ -77,8 +79,24 @@
MyISAM doesn't support transactions and doesn't have
transaction-dependent context: cursors can survive a commit.
*/
+ myisam_create_handler, /* Create a new handler */
+ NULL, /* Drop a database */
+ mi_panic,/* Panic call */
+ NULL, /* Release temporary latches */
+ NULL, /* Update Statistics */
+ NULL, /* Start Consistent Snapshot */
+ NULL, /* Flush logs */
+ NULL, /* Show status */
+ NULL, /* Replication Report Sent Binlog */
HTON_CAN_RECREATE
};
+
+
+static handler *myisam_create_handler(TABLE *table)
+{
+ return new ha_myisam(table);
+}
+
// collect errors printed by mi_check routines
--- 1.68/sql/ha_myisammrg.cc 2005-10-10 14:35:16 +02:00
+++ 1.69/sql/ha_myisammrg.cc 2005-10-25 09:38:49 +02:00
@@ -32,6 +32,8 @@
** MyISAM MERGE tables
*****************************************************************************/
+static handler *myisammrg_create_handler(TABLE *table);
+
/* MyISAM MERGE handlerton */
handlerton myisammrg_hton= {
@@ -55,8 +57,22 @@
NULL, /* create_cursor_read_view */
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
+ myisammrg_create_handler, /* Create a new handler */
+ NULL, /* Drop a database */
+ myrg_panic, /* Panic call */
+ NULL, /* Release temporary latches */
+ NULL, /* Update Statistics */
+ NULL, /* Start Consistent Snapshot */
+ NULL, /* Flush logs */
+ NULL, /* Show status */
+ NULL, /* Replication Report Sent Binlog */
HTON_CAN_RECREATE
};
+
+static handler *myisammrg_create_handler(TABLE *table)
+{
+ return new ha_myisammrg(table);
+}
ha_myisammrg::ha_myisammrg(TABLE *table_arg)
--- 1.159/sql/handler.cc 2005-10-21 12:04:03 +02:00
+++ 1.160/sql/handler.cc 2005-10-25 09:38:49 +02:00
@@ -26,104 +26,19 @@
#include "ha_myisam.h"
#include "ha_myisammrg.h"
+#include <myisampack.h>
+#include <errno.h>
-/*
- We have dummy hanldertons in case the handler has not been compiled
- in. This will be removed in 5.1.
-*/
-#ifdef HAVE_BERKELEY_DB
-#include "ha_berkeley.h"
-extern handlerton berkeley_hton;
-#else
-handlerton berkeley_hton = { "BerkeleyDB", SHOW_OPTION_NO,
- "Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB, NULL,
- 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, HTON_NO_FLAGS };
-#endif
-#ifdef HAVE_BLACKHOLE_DB
-#include "ha_blackhole.h"
-extern handlerton blackhole_hton;
-#else
-handlerton blackhole_hton = { "BLACKHOLE", SHOW_OPTION_NO,
- "/dev/null storage engine (anything you write to it disappears)",
- DB_TYPE_BLACKHOLE_DB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- HTON_NO_FLAGS };
-#endif
-#ifdef HAVE_EXAMPLE_DB
-#include "examples/ha_example.h"
-extern handlerton example_hton;
-#else
-handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO,
- "Example storage engine",
- DB_TYPE_EXAMPLE_DB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- HTON_NO_FLAGS };
-#endif
-#ifdef HAVE_PARTITION_DB
-#include "ha_partition.h"
-#endif
-#ifdef HAVE_ARCHIVE_DB
-#include "ha_archive.h"
-extern handlerton archive_hton;
-#else
-handlerton archive_hton = { "ARCHIVE", SHOW_OPTION_NO,
- "Archive storage engine", DB_TYPE_ARCHIVE_DB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- HTON_NO_FLAGS };
-#endif
-#ifdef HAVE_CSV_DB
-#include "examples/ha_tina.h"
-extern handlerton tina_hton;
-#else
-handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine",
- DB_TYPE_CSV_DB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- HTON_NO_FLAGS };
-#endif
-#ifdef HAVE_INNOBASE_DB
-#include "ha_innodb.h"
-extern handlerton innobase_hton;
-#else
-handlerton innobase_hton = { "InnoDB", SHOW_OPTION_NO,
- "Supports transactions, row-level locking, and foreign keys",
- DB_TYPE_INNODB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- HTON_NO_FLAGS };
-#endif
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
+#define NDB_MAX_ATTRIBUTES_IN_TABLE 128
#include "ha_ndbcluster.h"
-extern handlerton ndbcluster_hton;
-#else
-handlerton ndbcluster_hton = { "ndbcluster", SHOW_OPTION_NO,
- "Clustered, fault-tolerant, memory-based tables",
- DB_TYPE_NDBCLUSTER, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- HTON_NO_FLAGS };
#endif
-#ifdef HAVE_FEDERATED_DB
-#include "ha_federated.h"
-extern handlerton federated_hton;
-#else
-handlerton federated_hton = { "FEDERATED", SHOW_OPTION_NO,
- "Federated MySQL storage engine", DB_TYPE_FEDERATED_DB, NULL, 0, 0, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- HTON_NO_FLAGS };
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+#include "ha_partition.h"
#endif
-#include <myisampack.h>
-#include <errno.h>
-extern handlerton myisam_hton;
-extern handlerton myisammrg_hton;
-extern handlerton heap_hton;
-extern handlerton binlog_hton;
-/*
- Obsolete
-*/
-handlerton isam_hton = { "ISAM", SHOW_OPTION_NO, "Obsolete storage engine",
- DB_TYPE_ISAM, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, HTON_NO_FLAGS };
+extern handlerton *sys_table_types[];
/* static functions defined in this file */
@@ -137,27 +52,6 @@
/* size of savepoint storage area (see ha_init) */
ulong savepoint_alloc_size;
-/*
- This array is used for processing compiled in engines.
-*/
-handlerton *sys_table_types[]=
-{
- &myisam_hton,
- &heap_hton,
- &innobase_hton,
- &berkeley_hton,
- &blackhole_hton,
- &example_hton,
- &archive_hton,
- &tina_hton,
- &ndbcluster_hton,
- &federated_hton,
- &myisammrg_hton,
- &binlog_hton,
- &isam_hton,
- NULL
-};
-
struct show_table_alias_st sys_table_aliases[]=
{
{"INNOBASE", "InnoDB"},
@@ -254,9 +148,8 @@
handlerton **types;
for (types= sys_table_types; *types; types++)
{
- if ((database_type == (*types)->db_type) &&
- ((*types)->state == SHOW_OPTION_YES))
- return TRUE;
+ if (database_type == (*types)->db_type)
+ return ((*types)->state == SHOW_OPTION_YES) ? TRUE : FALSE;
}
return FALSE;
}
@@ -269,7 +162,7 @@
{
if (ha_storage_engine_is_enabled(database_type))
return database_type;
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
/*
Partition handler is not in the list of handlers shown since it is an internal handler
*/
@@ -308,81 +201,25 @@
handler *get_new_handler(TABLE *table, enum db_type db_type)
{
- handler *file;
- switch (db_type) {
-#ifndef NO_HASH
- case DB_TYPE_HASH:
- file= new ha_hash(table);
- break;
-#endif
- case DB_TYPE_MRG_ISAM:
- file= new ha_myisammrg(table);
- break;
-#ifdef HAVE_BERKELEY_DB
- case DB_TYPE_BERKELEY_DB:
- file= new ha_berkeley(table);
- break;
-#endif
-#ifdef HAVE_INNOBASE_DB
- case DB_TYPE_INNODB:
- file= new ha_innobase(table);
- break;
-#endif
-#ifdef HAVE_EXAMPLE_DB
- case DB_TYPE_EXAMPLE_DB:
- file= new ha_example(table);
- break;
-#endif
-#ifdef HAVE_PARTITION_DB
- case DB_TYPE_PARTITION_DB:
+ handler *file= NULL;
+ handlerton **types;
+
+ for (types= sys_table_types; *types; types++)
{
- file= new ha_partition(table);
- break;
+ if (db_type == (*types)->db_type && (*types)->create)
+ {
+ file= ((*types)->state == SHOW_OPTION_YES) ?
+ (*types)->create(table) : NULL;
+ break;
+ }
}
-#endif
-#ifdef HAVE_ARCHIVE_DB
- case DB_TYPE_ARCHIVE_DB:
- file= new ha_archive(table);
- break;
-#endif
-#ifdef HAVE_BLACKHOLE_DB
- case DB_TYPE_BLACKHOLE_DB:
- file= new ha_blackhole(table);
- break;
-#endif
-#ifdef HAVE_FEDERATED_DB
- case DB_TYPE_FEDERATED_DB:
- file= new ha_federated(table);
- break;
-#endif
-#ifdef HAVE_CSV_DB
- case DB_TYPE_CSV_DB:
- file= new ha_tina(table);
- break;
-#endif
-#ifdef HAVE_NDBCLUSTER_DB
- case DB_TYPE_NDBCLUSTER:
- file= new ha_ndbcluster(table);
- break;
-#endif
- case DB_TYPE_HEAP:
- file= new ha_heap(table);
- break;
- default: // should never happen
+ if (!file)
{
enum db_type def=(enum db_type) current_thd->variables.table_type;
/* Try first with 'default table type' */
if (db_type != def)
return get_new_handler(table, def);
}
- /* Fall back to MyISAM */
- case DB_TYPE_MYISAM:
- file= new ha_myisam(table);
- break;
- case DB_TYPE_MRG_MYISAM:
- file= new ha_myisammrg(table);
- break;
- }
if (file)
{
if (file->ha_initialise())
@@ -395,7 +232,7 @@
}
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
handler *get_ha_partition(partition_info *part_info)
{
ha_partition *partition;
@@ -553,40 +390,13 @@
int ha_panic(enum ha_panic_function flag)
{
int error=0;
-#ifndef NO_HASH
- error|=h_panic(flag); /* fix hash */
-#endif
-#ifdef HAVE_ISAM
- error|=mrg_panic(flag);
- error|=nisam_panic(flag);
-#endif
- error|=heap_panic(flag);
- error|=mi_panic(flag);
- error|=myrg_panic(flag);
-#ifdef HAVE_BERKELEY_DB
- if (have_berkeley_db == SHOW_OPTION_YES)
- error|=berkeley_end();
-#endif
-#ifdef HAVE_INNOBASE_DB
- if (have_innodb == SHOW_OPTION_YES)
- error|=innobase_end();
-#endif
-#ifdef HAVE_NDBCLUSTER_DB
- if (have_ndbcluster == SHOW_OPTION_YES)
- error|=ndbcluster_end();
-#endif
-#ifdef HAVE_FEDERATED_DB
- if (have_federated_db == SHOW_OPTION_YES)
- error|= federated_db_end();
-#endif
-#ifdef HAVE_ARCHIVE_DB
- if (have_archive_db == SHOW_OPTION_YES)
- error|= archive_db_end();
-#endif
-#ifdef HAVE_CSV_DB
- if (have_csv_db == SHOW_OPTION_YES)
- error|= tina_end();
-#endif
+ handlerton **types;
+
+ for (types= sys_table_types; *types; types++)
+ {
+ if ((*types)->state == SHOW_OPTION_YES && (*types)->panic)
+ error|= (*types)->panic(flag);
+ }
if (ha_finish_errors())
error= 1;
return error;
@@ -594,14 +404,13 @@
void ha_drop_database(char* path)
{
-#ifdef HAVE_INNOBASE_DB
- if (have_innodb == SHOW_OPTION_YES)
- innobase_drop_database(path);
-#endif
-#ifdef HAVE_NDBCLUSTER_DB
- if (have_ndbcluster == SHOW_OPTION_YES)
- ndbcluster_drop_database(path);
-#endif
+ handlerton **types;
+
+ for (types= sys_table_types; *types; types++)
+ {
+ if ((*types)->state == SHOW_OPTION_YES && (*types)->drop_database)
+ (*types)->drop_database(path);
+ }
}
/* don't bother to rollback here, it's done already */
@@ -609,7 +418,8 @@
{
handlerton **types;
for (types= sys_table_types; *types; types++)
- if (thd->ha_data[(*types)->slot])
+ /* XXX Maybe do a rollback if close_connection == NULL ? */
+ if (thd->ha_data[(*types)->slot] && (*types)->close_connection)
(*types)->close_connection(thd);
}
@@ -1179,10 +989,14 @@
int ha_release_temporary_latches(THD *thd)
{
-#ifdef HAVE_INNOBASE_DB
- if (opt_innodb)
- innobase_release_temporary_latches(thd);
-#endif
+ handlerton **types;
+
+ for (types= sys_table_types; *types; types++)
+ {
+ if ((*types)->state == SHOW_OPTION_YES &&
+ (*types)->release_temporary_latches)
+ (*types)->release_temporary_latches(thd);
+ }
return 0;
}
@@ -1194,10 +1008,13 @@
int ha_update_statistics()
{
-#ifdef HAVE_INNOBASE_DB
- if (opt_innodb)
- innodb_export_status();
-#endif
+ handlerton **types;
+
+ for (types= sys_table_types; *types; types++)
+ {
+ if ((*types)->state == SHOW_OPTION_YES && (*types)->update_statistics)
+ (*types)->update_statistics();
+ }
return 0;
}
@@ -1306,35 +1123,45 @@
int ha_start_consistent_snapshot(THD *thd)
{
-#ifdef HAVE_INNOBASE_DB
- if ((have_innodb == SHOW_OPTION_YES) &&
- !innobase_start_trx_and_assign_read_view(thd))
- return 0;
-#endif
+ bool warn= true;
+ handlerton **types;
+
+ for (types= sys_table_types; *types; types++)
+ {
+ if ((*types)->state == SHOW_OPTION_YES &&
+ (*types)->start_consistent_snapshot)
+ {
+ (*types)->start_consistent_snapshot(thd);
+ warn= false; /* hope user is using engine */
+ }
+ }
/*
Same idea as when one wants to CREATE TABLE in one engine which does not
exist:
*/
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
- "This MySQL server does not support any "
- "consistent-read capable storage engine");
+ if (warn)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
+ "This MySQL server does not support any "
+ "consistent-read capable storage engine");
return 0;
}
-bool ha_flush_logs()
+bool ha_flush_logs(enum db_type db_type)
{
bool result=0;
-#ifdef HAVE_BERKELEY_DB
- if ((have_berkeley_db == SHOW_OPTION_YES) &&
- berkeley_flush_logs())
- result=1;
-#endif
-#ifdef HAVE_INNOBASE_DB
- if ((have_innodb == SHOW_OPTION_YES) &&
- innobase_flush_logs())
- result=1;
-#endif
+ handlerton **types;
+
+ for (types= sys_table_types; *types; types++)
+ {
+ if ((*types)->state == SHOW_OPTION_YES &&
+ (db_type == DB_TYPE_DEFAULT || db_type == (*types)->db_type) &&
+ (*types)->flush_logs)
+ {
+ if ((*types)->flush_logs())
+ result= 1;
+ }
+ }
return result;
}
@@ -2307,7 +2134,7 @@
DBUG_PRINT("enter", ("db: %s, name: %s", db, name));
if (is_prefix(name,tmp_file_prefix)) /* skip temporary tables */
DBUG_RETURN(error);
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
if (have_ndbcluster == SHOW_OPTION_YES)
error= ndbcluster_discover(thd, db, name, frmblob, frmlen);
#endif
@@ -2331,7 +2158,7 @@
DBUG_ENTER("ha_find_files");
DBUG_PRINT("enter", ("db: %s, path: %s, wild: %s, dir: %d",
db, path, wild, dir));
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
if (have_ndbcluster == SHOW_OPTION_YES)
error= ndbcluster_find_files(thd, db, path, wild, dir, files);
#endif
@@ -2353,7 +2180,7 @@
int error= 0;
DBUG_ENTER("ha_table_exists_in_engine");
DBUG_PRINT("enter", ("db: %s, name: %s", db, name));
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
if (have_ndbcluster == SHOW_OPTION_YES)
error= ndbcluster_table_exists_in_engine(thd, db, name);
#endif
@@ -2678,6 +2505,54 @@
return &known_extensions;
}
+static bool stat_print(THD *thd, const char *type, const char *file,
+ const char *status)
+{
+ Protocol *protocol= thd->protocol;
+ protocol->prepare_for_resend();
+ protocol->store(type, system_charset_info);
+ protocol->store(file, system_charset_info);
+ protocol->store(status, system_charset_info);
+ if (protocol->write())
+ return TRUE;
+ return FALSE;
+}
+
+bool ha_show_status(THD *thd, enum db_type db_type, enum ha_stat_type stat)
+{
+ handlerton **types;
+ List<Item> field_list;
+ Protocol *protocol= thd->protocol;
+
+ field_list.push_back(new Item_empty_string("Type",10));
+ field_list.push_back(new Item_empty_string("Name",FN_REFLEN));
+ field_list.push_back(new Item_empty_string("Status",10));
+
+ if (protocol->send_fields(&field_list,
+ Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
+ return TRUE;
+
+ for (types= sys_table_types; *types; types++)
+ {
+ if ((*types)->state == SHOW_OPTION_YES &&
+ (db_type == DB_TYPE_DEFAULT || db_type == (*types)->db_type) &&
+ (*types)->show_status)
+ {
+ if ((*types)->show_status(thd, stat_print, stat))
+ return TRUE;
+ }
+ else if (db_type == (*types)->db_type &&
+ (*types)->state != SHOW_OPTION_YES)
+ {
+ if (stat_print(thd, (*types)->name, "", "DISABLED"))
+ return TRUE;
+ }
+ }
+
+ send_eof(thd);
+ return FALSE;
+}
+
#ifdef HAVE_REPLICATION
/*
@@ -2701,11 +2576,19 @@
int ha_repl_report_sent_binlog(THD *thd, char *log_file_name,
my_off_t end_offset)
{
-#ifdef HAVE_INNOBASE_DB
- return innobase_repl_report_sent_binlog(thd,log_file_name,end_offset);
-#else
- return 0;
-#endif
+ int result= 0;
+ handlerton **types;
+
+ for (types= sys_table_types; *types; types++)
+ {
+ if ((*types)->state == SHOW_OPTION_YES &&
+ (*types)->repl_report_sent_binlog)
+ {
+ (*types)->repl_report_sent_binlog(thd,log_file_name,end_offset);
+ result= 0;
+ }
+ }
+ return result;
}
--- 1.149/sql/handler.h 2005-10-14 14:37:12 +02:00
+++ 1.150/sql/handler.h 2005-10-25 09:38:49 +02:00
@@ -28,10 +28,7 @@
#define NO_HASH /* Not yet implemented */
#endif
-#if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB) || \
- defined(HAVE_NDBCLUSTER_DB)
#define USING_TRANSACTIONS
-#endif
// the following is for checking tables
@@ -308,6 +305,16 @@
#define MAX_XID_LIST_SIZE (1024*128)
#endif
+/* The handler for a table type. Will be included in the TABLE structure */
+
+struct st_table;
+typedef struct st_table TABLE;
+struct st_foreign_key_info;
+typedef struct st_foreign_key_info FOREIGN_KEY_INFO;
+typedef bool (stat_print_fn)(THD *thd, const char *type, const char *file,
+ const char *status);
+enum ha_stat_type { HA_ENGINE_STATUS, HA_ENGINE_LOGS, HA_ENGINE_MUTEX };
+
/*
handlerton is a singleton structure - one instance per storage engine -
to provide access to storage engine functionality that works on the
@@ -402,6 +409,16 @@
void *(*create_cursor_read_view)();
void (*set_cursor_read_view)(void *);
void (*close_cursor_read_view)(void *);
+ handler *(*create)(TABLE *table);
+ void (*drop_database)(char* path);
+ int (*panic)(enum ha_panic_function flag);
+ int (*release_temporary_latches)(THD *thd);
+ int (*update_statistics)();
+ int (*start_consistent_snapshot)(THD *thd);
+ bool (*flush_logs)();
+ bool (*show_status)(THD *thd, stat_print_fn *print, enum ha_stat_type stat);
+ int (*repl_report_sent_binlog)(THD *thd, char *log_file_name,
+ my_off_t end_offset);
uint32 flags; /* global handler flags */
} handlerton;
@@ -415,6 +432,7 @@
#define HTON_CLOSE_CURSORS_AT_COMMIT (1 << 0)
#define HTON_ALTER_NOT_SUPPORTED (1 << 1)
#define HTON_CAN_RECREATE (1 << 2)
+#define HTON_FLUSH_AFTER_RENAME (1 << 3)
typedef struct st_thd_trans
{
@@ -430,6 +448,8 @@
ISO_REPEATABLE_READ, ISO_SERIALIZABLE};
+enum ndb_distribution { ND_KEYHASH= 0, ND_LINHASH= 1 };
+
typedef struct {
uint32 start_part;
uint32 end_part;
@@ -609,7 +629,7 @@
};
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
/*
Answers the question if subpartitioning is used for a certain table
SYNOPSIS
@@ -672,12 +692,6 @@
} HA_CREATE_INFO;
-/* The handler for a table type. Will be included in the TABLE structure */
-
-struct st_table;
-typedef struct st_table TABLE;
-struct st_foreign_key_info;
-typedef struct st_foreign_key_info FOREIGN_KEY_INFO;
typedef struct st_savepoint SAVEPOINT;
extern ulong savepoint_alloc_size;
@@ -695,7 +709,7 @@
} HA_CHECK_OPT;
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
bool is_partition_in_list(char *part_name, List<char> list_part_names);
bool is_partitions_in_table(partition_info *new_part_info,
partition_info *old_part_info);
@@ -820,7 +834,7 @@
class handler :public Sql_alloc
{
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
friend class ha_partition;
#endif
protected:
@@ -1325,7 +1339,7 @@
virtual const char **bas_ext() const =0;
virtual ulong table_flags(void) const =0;
virtual ulong alter_table_flags(void) const { return 0; }
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
virtual ulong partition_flags(void) const { return 0;}
virtual int get_default_no_partitions(ulonglong max_rows) { return 1;}
#endif
@@ -1480,12 +1494,15 @@
int ha_update_statistics();
void ha_close_connection(THD* thd);
my_bool ha_storage_engine_is_enabled(enum db_type database_type);
-bool ha_flush_logs(void);
+bool ha_flush_logs(enum db_type db_type=DB_TYPE_DEFAULT);
void ha_drop_database(char* path);
int ha_create_table(const char *name, HA_CREATE_INFO *create_info,
bool update_create_info);
int ha_delete_table(THD *thd, enum db_type db_type, const char *path,
const char *alias, bool generate_warning);
+
+/* statistics and info */
+bool ha_show_status(THD *thd, enum db_type db_type, enum ha_stat_type stat);
/* discovery */
int ha_create_table_from_engine(THD* thd, const char *db, const char *name);
--- 1.127/sql/item.cc 2005-10-21 12:04:03 +02:00
+++ 1.128/sql/item.cc 2005-10-25 09:38:49 +02:00
@@ -696,6 +696,32 @@
}
+Item *Item_param::safe_charset_converter(CHARSET_INFO *tocs)
+{
+ if (const_item())
+ {
+ Item_string *conv;
+ uint cnv_errors;
+ char buf[MAX_FIELD_WIDTH];
+ String tmp(buf, sizeof(buf), &my_charset_bin);
+ String cstr, *ostr= val_str(&tmp);
+ /*
+ As safe_charset_converter is not executed for
+ a parameter bound to NULL, ostr should never be 0.
+ */
+ cstr.copy(ostr->ptr(), ostr->length(), ostr->charset(), tocs, &cnv_errors);
+ if (cnv_errors || !(conv= new Item_string(cstr.ptr(), cstr.length(),
+ cstr.charset(),
+ collation.derivation)))
+ return NULL;
+ conv->str_value.copy();
+ conv->str_value.mark_as_const();
+ return conv;
+ }
+ return NULL;
+}
+
+
Item *Item_static_string_func::safe_charset_converter(CHARSET_INFO *tocs)
{
Item_string *conv;
@@ -1356,7 +1382,7 @@
been created in prepare. In this case register the change for
rollback.
*/
- if (arena)
+ if (arena && arena->is_conventional())
*arg= conv;
else
thd->change_item_tree(arg, conv);
--- 1.145/sql/lex.h 2005-10-21 09:31:52 +02:00
+++ 1.146/sql/lex.h 2005-10-25 09:38:49 +02:00
@@ -383,9 +383,7 @@
{ "PACK_KEYS", SYM(PACK_KEYS_SYM)},
{ "PARSER", SYM(PARSER_SYM)},
{ "PARTIAL", SYM(PARTIAL)},
-#ifdef HAVE_PARTITION_DB
{ "PARTITION", SYM(PARTITION_SYM)},
-#endif
{ "PARTITIONS", SYM(PARTITIONS_SYM)},
{ "PASSWORD", SYM(PASSWORD)},
{ "PHASE", SYM(PHASE_SYM)},
--- 1.164/sql/log.cc 2005-10-21 12:04:03 +02:00
+++ 1.165/sql/log.cc 2005-10-25 09:38:49 +02:00
@@ -68,8 +68,17 @@
NULL, /* create_cursor_read_view */
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
+ NULL, /* Create a new handler */
+ NULL, /* Drop a database */
+ NULL, /* Panic call */
+ NULL, /* Release temporary latches */
+ NULL, /* Update Statistics */
+ NULL, /* Start Consistent Snapshot */
+ NULL, /* Flush logs */
+ NULL, /* Replication Report Sent Binlog */
HTON_NO_FLAGS
};
+
/*
this function is mostly a placeholder.
--- 1.305/sql/mysql_priv.h 2005-10-21 12:04:03 +02:00
+++ 1.306/sql/mysql_priv.h 2005-10-25 09:38:49 +02:00
@@ -179,11 +179,6 @@
#define FLUSH_TIME 0 /* Don't flush tables */
#define MAX_CONNECT_ERRORS 10 // errors before disabling host
-#ifdef HAVE_INNOBASE_DB
-#define IF_INNOBASE_DB(A, B) (A)
-#else
-#define IF_INNOBASE_DB(A, B) (B)
-#endif
#ifdef __NETWARE__
#define IF_NETWARE(A,B) (A)
#else
@@ -1065,6 +1060,8 @@
extern bool volatile manager_thread_in_use, mqh_used;
extern pthread_t manager_thread;
pthread_handler_t handle_manager(void *arg);
+bool mysql_manager_submit(void (*action)());
+
/* sql_test.cc */
#ifndef DBUG_OFF
@@ -1254,17 +1251,67 @@
/* optional things, have_* variables */
-extern SHOW_COMP_OPTION have_isam, have_innodb, have_berkeley_db;
-extern SHOW_COMP_OPTION have_example_db, have_archive_db, have_csv_db;
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
+extern handlerton innobase_hton;
+#define have_innodb innobase_hton.state
+#else
+extern SHOW_COMP_OPTION have_innodb;
+#endif
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
+extern handlerton berkeley_hton;
+#define have_berkeley_db berkeley_hton.state
+#else
+extern SHOW_COMP_OPTION have_berkeley_db;
+#endif
+#ifdef WITH_EXAMPLE_STORAGE_ENGINE
+extern handlerton example_hton;
+#define have_example_db example_hton.state
+#else
+extern SHOW_COMP_OPTION have_example_db;
+#endif
+#ifdef WITH_ARCHIVE_STORAGE_ENGINE
+extern handlerton archive_hton;
+#define have_archive_db archive_hton.state
+#else
+extern SHOW_COMP_OPTION have_archive_db;
+#endif
+#ifdef WITH_CSV_STORAGE_ENGINE
+extern handlerton tina_hton;
+#define have_csv_db tina_hton.state
+#else
+extern SHOW_COMP_OPTION have_csv_db;
+#endif
+#ifdef WITH_FEDERATED_STORAGE_ENGINE
+extern handlerton federated_hton;
+#define have_federated_db federated_hton.state
+#else
extern SHOW_COMP_OPTION have_federated_db;
+#endif
+#ifdef WITH_BLACKHOLE_STORAGE_ENGINE
+extern handlerton blackhole_hton;
+#define have_blackhole_db blackhole_hton.state
+#else
extern SHOW_COMP_OPTION have_blackhole_db;
+#endif
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
+extern handlerton ndbcluster_hton;
+#define have_ndbcluster ndbcluster_hton.state
+#else
extern SHOW_COMP_OPTION have_ndbcluster;
+#endif
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+extern handlerton partition_hton;
+#define have_partition_db partition_hton.state
+#else
+extern SHOW_COMP_OPTION have_partition_db;
+#endif
+
+extern SHOW_COMP_OPTION have_isam;
extern SHOW_COMP_OPTION have_raid, have_openssl, have_symlink;
extern SHOW_COMP_OPTION have_query_cache;
extern SHOW_COMP_OPTION have_geometry, have_rtree_keys;
extern SHOW_COMP_OPTION have_crypt;
extern SHOW_COMP_OPTION have_compress;
-extern SHOW_COMP_OPTION have_partition_db;
#ifndef __WIN__
extern pthread_t signal_thread;
--- 1.462/sql/mysqld.cc 2005-10-21 12:04:03 +02:00
+++ 1.463/sql/mysqld.cc 2005-10-25 09:38:49 +02:00
@@ -24,24 +24,16 @@
#include "stacktrace.h"
#include "mysqld_suffix.h"
#include "mysys_err.h"
-#ifdef HAVE_BERKELEY_DB
-#include "ha_berkeley.h"
-#endif
-#ifdef HAVE_INNOBASE_DB
-#include "ha_innodb.h"
-#endif
+
#include "ha_myisam.h"
-#ifdef HAVE_NDBCLUSTER_DB
-#include "ha_ndbcluster.h"
-#endif
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
#define OPT_INNODB_DEFAULT 1
#else
#define OPT_INNODB_DEFAULT 0
#endif
#define OPT_BDB_DEFAULT 0
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
#define OPT_NDBCLUSTER_DEFAULT 0
#if defined(NOT_ENOUGH_TESTED) \
&& defined(NDB_SHM_TRANSPORTER) && MYSQL_VERSION_ID >= 50000
@@ -330,7 +322,7 @@
static pthread_cond_t COND_thread_cache, COND_flush_thread_cache;
-#ifdef HAVE_BERKELEY_DB
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
static my_bool opt_sync_bdb_logs;
#endif
@@ -355,7 +347,59 @@
my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
my_bool opt_log_slave_updates= 0;
my_bool opt_innodb;
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
+extern struct show_var_st innodb_status_variables[];
+extern uint innobase_init_flags, innobase_lock_type;
+extern uint innobase_flush_log_at_trx_commit;
+extern ulong innobase_cache_size, innobase_fast_shutdown;
+extern ulong innobase_large_page_size;
+extern char *innobase_home, *innobase_tmpdir, *innobase_logdir;
+extern long innobase_lock_scan_time;
+extern long innobase_mirrored_log_groups, innobase_log_files_in_group;
+extern long innobase_log_file_size, innobase_log_buffer_size;
+extern long innobase_buffer_pool_size, innobase_additional_mem_pool_size;
+extern long innobase_buffer_pool_awe_mem_mb;
+extern long innobase_file_io_threads, innobase_lock_wait_timeout;
+extern long innobase_force_recovery;
+extern long innobase_open_files;
+extern char *innobase_data_home_dir, *innobase_data_file_path;
+extern char *innobase_log_group_home_dir, *innobase_log_arch_dir;
+extern char *innobase_unix_file_flush_method;
+/* The following variables have to be my_bool for SHOW VARIABLES to work */
+extern my_bool innobase_log_archive,
+ innobase_use_doublewrite,
+ innobase_use_checksums,
+ innobase_use_large_pages,
+ innobase_use_native_aio,
+ innobase_file_per_table, innobase_locks_unsafe_for_binlog,
+ innobase_create_status_file;
+extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before
+ calling innobase_end() if you want
+ InnoDB to shut down without
+ flushing the buffer pool: this
+ is equivalent to a 'crash' */
+extern "C" {
+extern ulong srv_max_buf_pool_modified_pct;
+extern ulong srv_max_purge_lag;
+extern ulong srv_auto_extend_increment;
+extern ulong srv_n_spin_wait_rounds;
+extern ulong srv_n_free_tickets_to_enter;
+extern ulong srv_thread_sleep_delay;
+extern ulong srv_thread_concurrency;
+extern ulong srv_commit_concurrency;
+}
+#endif
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
+extern const u_int32_t bdb_DB_TXN_NOSYNC, bdb_DB_RECOVER, bdb_DB_PRIVATE;
+extern bool berkeley_shared_data;
+extern u_int32_t berkeley_init_flags,berkeley_env_flags, berkeley_lock_type,
+ berkeley_lock_types[];
+extern ulong berkeley_cache_size, berkeley_max_lock, berkeley_log_buffer_size;
+extern char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
+extern long berkeley_lock_scan_time;
+extern TYPELIB berkeley_lock_typelib;
+#endif
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
const char *opt_ndbcluster_connectstring= 0;
const char *opt_ndb_connectstring= 0;
char opt_ndb_constrbuf[1024];
@@ -365,11 +409,11 @@
const char *opt_ndb_mgmd;
ulong opt_ndb_nodeid;
-const char *ndb_distribution_names[]= {"KEYHASH", "LINHASH", NullS};
-TYPELIB ndb_distribution_typelib= { array_elements(ndb_distribution_names)-1,
- "", ndb_distribution_names, NULL };
-const char *opt_ndb_distribution= ndb_distribution_names[ND_KEYHASH];
-enum ndb_distribution opt_ndb_distribution_id= ND_KEYHASH;
+extern struct show_var_st ndb_status_variables[];
+extern const char *ndb_distribution_names[];
+extern TYPELIB ndb_distribution_typelib;
+extern const char *opt_ndb_distribution;
+extern enum ndb_distribution opt_ndb_distribution_id;
#endif
my_bool opt_readonly, use_temp_pool, relay_log_purge;
my_bool opt_sync_frm, opt_allow_suspicious_udfs;
@@ -474,14 +518,9 @@
CHARSET_INFO *system_charset_info, *files_charset_info ;
CHARSET_INFO *national_charset_info, *table_alias_charset;
-SHOW_COMP_OPTION have_berkeley_db, have_innodb, have_isam, have_ndbcluster,
- have_example_db, have_archive_db, have_csv_db;
-SHOW_COMP_OPTION have_federated_db;
-SHOW_COMP_OPTION have_partition_db;
SHOW_COMP_OPTION have_raid, have_openssl, have_symlink, have_query_cache;
SHOW_COMP_OPTION have_geometry, have_rtree_keys;
SHOW_COMP_OPTION have_crypt, have_compress;
-SHOW_COMP_OPTION have_blackhole_db;
/* Thread specific variables */
@@ -2445,7 +2484,7 @@
static const char *load_default_groups[]= {
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
"mysql_cluster",
#endif
"mysqld","server", MYSQL_BASE_VERSION, 0, 0};
@@ -2565,7 +2604,7 @@
{
my_use_large_pages= 1;
my_large_page_size= opt_large_page_size;
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
innobase_use_large_pages= 1;
innobase_large_page_size= opt_large_page_size;
#endif
@@ -3006,7 +3045,7 @@
static void create_maintenance_thread()
{
if (
-#ifdef HAVE_BERKELEY_DB
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
(have_berkeley_db == SHOW_OPTION_YES) ||
#endif
(flush_time && flush_time != ~(ulong) 0L))
@@ -4505,7 +4544,7 @@
Disable with --skip-bdb (will save memory).",
(gptr*) &opt_bdb, (gptr*) &opt_bdb, 0, GET_BOOL, NO_ARG, OPT_BDB_DEFAULT, 0, 0,
0, 0, 0},
-#ifdef HAVE_BERKELEY_DB
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
{"bdb-home", OPT_BDB_HOME, "Berkeley home directory.", (gptr*) &berkeley_home,
(gptr*) &berkeley_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"bdb-lock-detect", OPT_BDB_LOCK,
@@ -4526,7 +4565,7 @@
{"bdb-tmpdir", OPT_BDB_TMP, "Berkeley DB tempfile name.",
(gptr*) &berkeley_tmpdir, (gptr*) &berkeley_tmpdir, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif /* HAVE_BERKELEY_DB */
+#endif /* WITH_BERKELEY_STORAGE_ENGINE */
{"big-tables", OPT_BIG_TABLES,
"Allow big result sets by saving all temporary sets on file (Solves most 'table full' errors).",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -4662,7 +4701,7 @@
Disable with --skip-innodb (will save memory).",
(gptr*) &opt_innodb, (gptr*) &opt_innodb, 0, GET_BOOL, NO_ARG, OPT_INNODB_DEFAULT, 0, 0,
0, 0, 0},
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
{"innodb_checksums", OPT_INNODB_CHECKSUMS, "Enable InnoDB checksums validation (enabled by default). \
Disable with --skip-innodb-checksums.", (gptr*) &innobase_use_checksums,
(gptr*) &innobase_use_checksums, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
@@ -4670,7 +4709,7 @@
{"innodb_data_file_path", OPT_INNODB_DATA_FILE_PATH,
"Path to individual files and their sizes.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
{"innodb_data_home_dir", OPT_INNODB_DATA_HOME_DIR,
"The common part for InnoDB table spaces.", (gptr*) &innobase_data_home_dir,
(gptr*) &innobase_data_home_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0,
@@ -4741,7 +4780,7 @@
(gptr*) &global_system_variables.innodb_support_xa,
(gptr*) &global_system_variables.innodb_support_xa,
0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
-#endif /* End HAVE_INNOBASE_DB */
+#endif /* End WITH_INNOBASE_STORAGE_ENGINE */
{"isam", OPT_ISAM, "Obsolete. ISAM storage engine is no longer supported.",
(gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
@@ -4901,7 +4940,7 @@
Disable with --skip-ndbcluster (will save memory).",
(gptr*) &opt_ndbcluster, (gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG,
OPT_NDBCLUSTER_DEFAULT, 0, 0, 0, 0, 0},
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
{"ndb-connectstring", OPT_NDB_CONNECTSTRING,
"Connect string for ndbcluster.",
(gptr*) &opt_ndb_connectstring,
@@ -5232,7 +5271,7 @@
"The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time.",
(gptr*) &back_log, (gptr*) &back_log, 0, GET_ULONG,
REQUIRED_ARG, 50, 1, 65535, 0, 1, 0 },
-#ifdef HAVE_BERKELEY_DB
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
{ "bdb_cache_size", OPT_BDB_CACHE_SIZE,
"The buffer that is allocated to cache index and rows for BDB tables.",
(gptr*) &berkeley_cache_size, (gptr*) &berkeley_cache_size, 0, GET_ULONG,
@@ -5249,7 +5288,7 @@
"The maximum number of locks you can have active on a BDB table.",
(gptr*) &berkeley_max_lock, (gptr*) &berkeley_max_lock, 0, GET_ULONG,
REQUIRED_ARG, 10000, 0, (long) ~0, 0, 1, 0},
-#endif /* HAVE_BERKELEY_DB */
+#endif /* WITH_BERKELEY_STORAGE_ENGINE */
{"binlog_cache_size", OPT_BINLOG_CACHE_SIZE,
"The size of the cache to hold the SQL statements for the binary log during a transaction. If you often use big, multi-statement transactions you can increase this to get more performance.",
(gptr*) &binlog_cache_size, (gptr*) &binlog_cache_size, 0, GET_ULONG,
@@ -5325,7 +5364,7 @@
(gptr*) &global_system_variables.group_concat_max_len,
(gptr*) &max_system_variables.group_concat_max_len, 0, GET_ULONG,
REQUIRED_ARG, 1024, 4, (long) ~0, 0, 1, 0},
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
{"innodb_additional_mem_pool_size", OPT_INNODB_ADDITIONAL_MEM_POOL_SIZE,
"Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.",
(gptr*) &innobase_additional_mem_pool_size,
@@ -5402,7 +5441,7 @@
(gptr*) &srv_thread_sleep_delay,
(gptr*) &srv_thread_sleep_delay,
0, GET_LONG, REQUIRED_ARG, 10000L, 0L, ~0L, 0, 1L, 0},
-#endif /* HAVE_INNOBASE_DB */
+#endif /* WITH_INNOBASE_STORAGE_ENGINE */
{"interactive_timeout", OPT_INTERACTIVE_TIMEOUT,
"The number of seconds the server waits for activity on an interactive connection before closing it.",
(gptr*) &global_system_variables.net_interactive_timeout,
@@ -5721,12 +5760,12 @@
(gptr*) &max_system_variables.sortbuff_size, 0, GET_ULONG, REQUIRED_ARG,
MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ~0L, MALLOC_OVERHEAD,
1, 0},
-#ifdef HAVE_BERKELEY_DB
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
{"sync-bdb-logs", OPT_BDB_SYNC,
"Synchronously flush Berkeley DB logs. Enabled by default",
(gptr*) &opt_sync_bdb_logs, (gptr*) &opt_sync_bdb_logs, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0},
-#endif /* HAVE_BERKELEY_DB */
+#endif /* WITH_BERKELEY_STORAGE_ENGINE */
{"sync-binlog", OPT_SYNC_BINLOG,
"Synchronously flush binary log to disk after every #th event. "
"Use 0 (default) to disable synchronous flushing.",
@@ -5878,14 +5917,14 @@
{"Com_show_create_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_DB]), SHOW_LONG_STATUS},
{"Com_show_create_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE]), SHOW_LONG_STATUS},
{"Com_show_databases", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_DATABASES]), SHOW_LONG_STATUS},
+ {"Com_show_engine_logs", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_LOGS]), SHOW_LONG_STATUS},
+ {"Com_show_engine_mutex", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_MUTEX]), SHOW_LONG_STATUS},
+ {"Com_show_engine_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_STATUS]), SHOW_LONG_STATUS},
{"Com_show_errors", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ERRORS]), SHOW_LONG_STATUS},
{"Com_show_fields", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_FIELDS]), SHOW_LONG_STATUS},
{"Com_show_grants", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GRANTS]), SHOW_LONG_STATUS},
- {"Com_show_innodb_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_INNODB_STATUS]), SHOW_LONG_STATUS},
{"Com_show_keys", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_KEYS]), SHOW_LONG_STATUS},
- {"Com_show_logs", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_LOGS]), SHOW_LONG_STATUS},
{"Com_show_master_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_MASTER_STAT]), SHOW_LONG_STATUS},
- {"Com_show_ndb_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_NDBCLUSTER_STATUS]), SHOW_LONG_STATUS},
{"Com_show_new_master", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_NEW_MASTER]), SHOW_LONG_STATUS},
{"Com_show_open_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_OPEN_TABLES]), SHOW_LONG_STATUS},
{"Com_show_privileges", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_PRIVILEGES]), SHOW_LONG_STATUS},
@@ -5939,9 +5978,9 @@
{"Handler_savepoint_rollback",(char*) offsetof(STATUS_VAR, ha_savepoint_rollback_count), SHOW_LONG_STATUS},
{"Handler_update", (char*) offsetof(STATUS_VAR, ha_update_count), SHOW_LONG_STATUS},
{"Handler_write", (char*) offsetof(STATUS_VAR, ha_write_count), SHOW_LONG_STATUS},
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
{"Innodb_", (char*) &innodb_status_variables, SHOW_VARS},
-#endif /*HAVE_INNOBASE_DB*/
+#endif /* WITH_INNOBASE_STORAGE_ENGINE */
{"Key_blocks_not_flushed", (char*) &dflt_key_cache_var.global_blocks_changed, SHOW_KEY_CACHE_LONG},
{"Key_blocks_unused", (char*) &dflt_key_cache_var.blocks_unused, SHOW_KEY_CACHE_CONST_LONG},
{"Key_blocks_used", (char*) &dflt_key_cache_var.blocks_used, SHOW_KEY_CACHE_CONST_LONG},
@@ -5951,9 +5990,9 @@
{"Key_writes", (char*) &dflt_key_cache_var.global_cache_write, SHOW_KEY_CACHE_LONGLONG},
{"Last_query_cost", (char*) offsetof(STATUS_VAR, last_query_cost), SHOW_DOUBLE_STATUS},
{"Max_used_connections", (char*) &max_used_connections, SHOW_LONG},
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
{"Ndb_", (char*) &ndb_status_variables, SHOW_VARS},
-#endif /*HAVE_NDBCLUSTER_DB*/
+#endif /* WITH_NDBCLUSTER_STORAGE_ENGINE */
{"Not_flushed_delayed_rows", (char*) &delayed_rows_in_use, SHOW_LONG_CONST},
{"Open_files", (char*) &my_file_opened, SHOW_LONG_CONST},
{"Open_streams", (char*) &my_stream_opened, SHOW_LONG_CONST},
@@ -6218,48 +6257,7 @@
"d:t:i:o,/tmp/mysqld.trace");
#endif
opt_error_log= IF_WIN(1,0);
-#ifdef HAVE_BERKELEY_DB
- have_berkeley_db= SHOW_OPTION_YES;
-#else
- have_berkeley_db= SHOW_OPTION_NO;
-#endif
-#ifdef HAVE_INNOBASE_DB
- have_innodb=SHOW_OPTION_YES;
-#else
- have_innodb=SHOW_OPTION_NO;
-#endif
- have_isam=SHOW_OPTION_NO;
-#ifdef HAVE_EXAMPLE_DB
- have_example_db= SHOW_OPTION_YES;
-#else
- have_example_db= SHOW_OPTION_NO;
-#endif
-#ifdef HAVE_PARTITION_DB
- have_partition_db= SHOW_OPTION_YES;
-#else
- have_partition_db= SHOW_OPTION_NO;
-#endif
-#ifdef HAVE_ARCHIVE_DB
- have_archive_db= SHOW_OPTION_YES;
-#else
- have_archive_db= SHOW_OPTION_NO;
-#endif
-#ifdef HAVE_BLACKHOLE_DB
- have_blackhole_db= SHOW_OPTION_YES;
-#else
- have_blackhole_db= SHOW_OPTION_NO;
-#endif
-#ifdef HAVE_FEDERATED_DB
- have_federated_db= SHOW_OPTION_YES;
-#else
- have_federated_db= SHOW_OPTION_NO;
-#endif
-#ifdef HAVE_CSV_DB
- have_csv_db= SHOW_OPTION_YES;
-#else
- have_csv_db= SHOW_OPTION_NO;
-#endif
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
have_ndbcluster=SHOW_OPTION_DISABLED;
global_system_variables.ndb_index_stat_enable=TRUE;
max_system_variables.ndb_index_stat_enable=TRUE;
@@ -6678,19 +6676,19 @@
global_system_variables.tx_isolation= (type-1);
break;
}
-#ifdef HAVE_BERKELEY_DB
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
case OPT_BDB_NOSYNC:
/* Deprecated option */
opt_sync_bdb_logs= 0;
/* Fall through */
case OPT_BDB_SYNC:
if (!opt_sync_bdb_logs)
- berkeley_env_flags|= DB_TXN_NOSYNC;
+ berkeley_env_flags|= bdb_DB_TXN_NOSYNC;
else
- berkeley_env_flags&= ~DB_TXN_NOSYNC;
+ berkeley_env_flags&= ~bdb_DB_TXN_NOSYNC;
break;
case OPT_BDB_NO_RECOVER:
- berkeley_init_flags&= ~(DB_RECOVER);
+ berkeley_init_flags&= ~(bdb_DB_RECOVER);
break;
case OPT_BDB_LOCK:
{
@@ -6714,12 +6712,12 @@
break;
}
case OPT_BDB_SHARED:
- berkeley_init_flags&= ~(DB_PRIVATE);
+ berkeley_init_flags&= ~(bdb_DB_PRIVATE);
berkeley_shared_data= 1;
break;
-#endif /* HAVE_BERKELEY_DB */
+#endif /* WITH_BERKELEY_STORAGE_ENGINE */
case OPT_BDB:
-#ifdef HAVE_BERKELEY_DB
+#ifdef WITH_BERKELEY_STORAGE_ENGINE
if (opt_bdb)
have_berkeley_db= SHOW_OPTION_YES;
else
@@ -6727,14 +6725,14 @@
#endif
break;
case OPT_NDBCLUSTER:
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
if (opt_ndbcluster)
have_ndbcluster= SHOW_OPTION_YES;
else
have_ndbcluster= SHOW_OPTION_DISABLED;
#endif
break;
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
case OPT_NDB_MGMD:
case OPT_NDB_NODEID:
{
@@ -6774,7 +6772,7 @@
break;
#endif
case OPT_INNODB:
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
if (opt_innodb)
have_innodb= SHOW_OPTION_YES;
else
@@ -6782,15 +6780,15 @@
#endif
break;
case OPT_INNODB_DATA_FILE_PATH:
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
innobase_data_file_path= argument;
#endif
break;
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
case OPT_INNODB_LOG_ARCHIVE:
innobase_log_archive= argument ? test(atoi(argument)) : 1;
break;
-#endif /* HAVE_INNOBASE_DB */
+#endif /* WITH_INNOBASE_STORAGE_ENGINE */
case OPT_MYISAM_RECOVER:
{
if (!argument || !argument[0])
@@ -6924,19 +6922,19 @@
get_one_option)))
exit(ho_error);
-#ifndef HAVE_NDBCLUSTER_DB
+#ifndef WITH_NDBCLUSTER_STORAGE_ENGINE
if (opt_ndbcluster)
sql_print_warning("this binary does not contain NDBCLUSTER storage engine");
#endif
-#ifndef HAVE_INNOBASE_DB
+#ifndef WITH_INNOBASE_STORAGE_ENGINE
if (opt_innodb)
sql_print_warning("this binary does not contain INNODB storage engine");
#endif
-#ifndef HAVE_ISAM
+#ifndef WITH_ISAM_STORAGE_ENGINE
if (opt_isam)
sql_print_warning("this binary does not contain ISAM storage engine");
#endif
-#ifndef HAVE_BERKELEY_DB
+#ifndef WITH_BERKELEY_STORAGE_ENGINE
if (opt_bdb)
sql_print_warning("this binary does not contain BDB storage engine");
#endif
@@ -7260,6 +7258,70 @@
/*****************************************************************************
+ Instantiate have_xyx for missing storage engines
+*****************************************************************************/
+#undef have_isam
+#undef have_berkeley_db
+#undef have_innodb
+#undef have_ndbcluster
+#undef have_example_db
+#undef have_archive_db
+#undef have_csv_db
+#undef have_federated_db
+#undef have_partition_db
+#undef have_blackhole_db
+
+SHOW_COMP_OPTION have_berkeley_db= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_innodb= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_isam= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_ndbcluster= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO;
+SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO;
+
+#ifndef WITH_BERKELEY_STORAGE_ENGINE
+bool berkeley_shared_data;
+ulong berkeley_cache_size, berkeley_max_lock, berkeley_log_buffer_size;
+char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
+#endif
+
+#ifndef WITH_INNOBASE_STORAGE_ENGINE
+uint innobase_flush_log_at_trx_commit;
+ulong innobase_fast_shutdown;
+long innobase_mirrored_log_groups, innobase_log_files_in_group;
+long innobase_log_file_size, innobase_log_buffer_size;
+long innobase_buffer_pool_size, innobase_additional_mem_pool_size;
+long innobase_buffer_pool_awe_mem_mb;
+long innobase_file_io_threads, innobase_lock_wait_timeout;
+long innobase_force_recovery;
+long innobase_open_files;
+char *innobase_data_home_dir, *innobase_data_file_path;
+char *innobase_log_group_home_dir, *innobase_log_arch_dir;
+char *innobase_unix_file_flush_method;
+my_bool innobase_log_archive,
+ innobase_use_doublewrite,
+ innobase_use_checksums,
+ innobase_file_per_table,
+ innobase_locks_unsafe_for_binlog;
+
+ulong srv_max_buf_pool_modified_pct;
+ulong srv_max_purge_lag;
+ulong srv_auto_extend_increment;
+ulong srv_n_spin_wait_rounds;
+ulong srv_n_free_tickets_to_enter;
+ulong srv_thread_sleep_delay;
+ulong srv_thread_concurrency;
+ulong srv_commit_concurrency;
+#endif
+
+#ifndef WITH_NDBCLUSTER_STORAGE_ENGINE
+ulong ndb_cache_check_time;
+#endif
+
+/*****************************************************************************
Instantiate templates
*****************************************************************************/
@@ -7273,3 +7335,5 @@
template class I_List<Statement>;
template class I_List_iterator<Statement>;
#endif
+
+
--- 1.185/sql/sql_class.cc 2005-10-21 12:04:03 +02:00
+++ 1.186/sql/sql_class.cc 2005-10-25 09:38:49 +02:00
@@ -285,7 +285,7 @@
variables.date_format);
variables.datetime_format= date_time_format_copy((THD*) 0,
variables.datetime_format);
-#ifdef HAVE_NDBCLUSTER_DB
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
variables.ndb_use_transactions= 1;
#endif
pthread_mutex_unlock(&LOCK_global_system_variables);
@@ -898,7 +898,7 @@
return 0;
}
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
/*
We may be passing the control from mysqld to the client: release the
InnoDB adaptive hash S-latch to avoid thread deadlocks if it was reserved
@@ -934,7 +934,7 @@
bool select_send::send_eof()
{
-#ifdef HAVE_INNOBASE_DB
+#ifdef WITH_INNOBASE_STORAGE_ENGINE
/* We may be passing the control from mysqld to the client: release the
InnoDB adaptive hash S-latch to avoid thread deadlocks if it was reserved
by thd */
--- 1.241/sql/sql_class.h 2005-10-21 12:04:04 +02:00
+++ 1.242/sql/sql_class.h 2005-10-25 09:38:49 +02:00
@@ -565,11 +565,8 @@
ulong sync_replication_slave_id;
ulong sync_replication_timeout;
#endif /* HAVE_REPLICATION */
-#ifdef HAVE_INNOBASE_DB
my_bool innodb_table_locks;
my_bool innodb_support_xa;
-#endif /* HAVE_INNOBASE_DB */
-#ifdef HAVE_NDBCLUSTER_DB
ulong ndb_autoincrement_prefetch_sz;
my_bool ndb_force_send;
my_bool ndb_use_exact_count;
@@ -577,7 +574,6 @@
my_bool ndb_index_stat_enable;
ulong ndb_index_stat_cache_entries;
ulong ndb_index_stat_update_freq;
-#endif /* HAVE_NDBCLUSTER_DB */
my_bool old_alter_table;
my_bool old_passwords;
--- 1.189/sql/sql_lex.h 2005-10-21 12:08:19 +02:00
+++ 1.190/sql/sql_lex.h 2005-10-25 09:38:49 +02:00
@@ -54,8 +54,8 @@
SQLCOM_DELETE, SQLCOM_TRUNCATE, SQLCOM_DROP_TABLE, SQLCOM_DROP_INDEX,
SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS,
- SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS,
- SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS,
+ SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_STATUS,
+ SQLCOM_SHOW_ENGINE_LOGS, SQLCOM_SHOW_ENGINE_STATUS, SQLCOM_SHOW_ENGINE_MUTEX,
SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT,
SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS,
SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS,
--- 1.444/sql/sql_parse.cc 2005-10-21 12:04:04 +02:00
+++ 1.445/sql/sql_parse.cc 2005-10-25 09:38:50 +02:00
@@ -22,14 +22,6 @@
#include <myisam.h>
#include <my_dir.h>
-#ifdef HAVE_INNOBASE_DB
-#include "ha_innodb.h"
-#endif
-
-#ifdef HAVE_NDBCLUSTER_DB
-#include "ha_ndbcluster.h"
-#endif
-
#include "sp_head.h"
#include "sp.h"
#include "sp_cache.h"
@@ -1767,8 +1759,7 @@
TABLE_LIST table_list;
LEX_STRING conv_name;
/* Saved variable value */
- my_bool old_innodb_table_locks=
- IF_INNOBASE_DB(thd->variables.innodb_table_locks, FALSE);
+ my_bool old_innodb_table_locks= thd->variables.innodb_table_locks;
statistic_increment(thd->status_var.com_stat[SQLCOM_SHOW_FIELDS],
@@ -2698,29 +2689,20 @@
res = load_master_data(thd);
break;
#endif /* HAVE_REPLICATION */
-#ifdef HAVE_NDBCLUSTER_DB
- case SQLCOM_SHOW_NDBCLUSTER_STATUS:
- {
- res = ndbcluster_show_status(thd);
- break;
- }
-#endif
-#ifdef HAVE_INNOBASE_DB
- case SQLCOM_SHOW_INNODB_STATUS:
+ case SQLCOM_SHOW_ENGINE_STATUS:
{
if (check_global_access(thd, SUPER_ACL))
- goto error;
- res = innodb_show_status(thd);
+ goto error;
+ res = ha_show_status(thd, lex->create_info.db_type, HA_ENGINE_STATUS);
break;
}
- case SQLCOM_SHOW_MUTEX_STATUS:
+ case SQLCOM_SHOW_ENGINE_MUTEX:
{
if (check_global_access(thd, SUPER_ACL))
goto error;
- res = innodb_mutex_show_status(thd);
+ res = ha_show_status(thd, lex->create_info.db_type, HA_ENGINE_MUTEX);
break;
}
-#endif
#ifdef HAVE_REPLICATION
case SQLCOM_LOAD_MASTER_TABLE:
{
@@ -3431,7 +3413,7 @@
case SQLCOM_SHOW_COLUMN_TYPES:
res= mysqld_show_column_types(thd);
break;
- case SQLCOM_SHOW_LOGS:
+ case SQLCOM_SHOW_ENGINE_LOGS:
#ifdef DONT_ALLOW_SHOW_COMMANDS
my_message(ER_NOT_ALLOWED_COMMAND, ER(ER_NOT_ALLOWED_COMMAND),
MYF(0)); /* purecov: inspected */
@@ -3440,7 +3422,7 @@
{
if (grant_option && check_access(thd, FILE_ACL, any_db,0,0,0,0))
goto error;
- res= mysqld_show_logs(thd);
+ res= ha_show_status(thd, lex->create_info.db_type, HA_ENGINE_LOGS);
break;
}
#endif
@@ -6220,8 +6202,8 @@
ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX);
ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES);
ptr->derived= table->sel;
- if (!my_strcasecmp(system_charset_info, ptr->db,
- information_schema_name.str))
+ if (!ptr->derived && !my_strcasecmp(system_charset_info, ptr->db,
+ information_schema_name.str))
{
ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->table_name);
if (!schema_table ||
--- 1.237/sql/sql_table.cc 2005-10-21 12:04:04 +02:00
+++ 1.238/sql/sql_table.cc 2005-10-25 09:38:50 +02:00
@@ -17,9 +17,6 @@
/* drop and alter of tables */
#include "mysql_priv.h"
-#ifdef HAVE_BERKELEY_DB
-#include "ha_berkeley.h"
-#endif
#include <hash.h>
#include <myisam.h>
#include <my_dir.h>
@@ -1597,7 +1594,7 @@
my_error(ER_OUTOFMEMORY, MYF(0), 128);//128 bytes invented
DBUG_RETURN(TRUE);
}
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info *part_info= thd->lex->part_info;
if (part_info)
{
@@ -3380,7 +3377,7 @@
uint db_create_options, used_fields;
enum db_type old_db_type,new_db_type;
uint need_copy_table= 0;
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
bool online_add_empty_partition= FALSE;
bool online_drop_partition= FALSE;
bool partition_changed= FALSE;
@@ -3462,7 +3459,7 @@
if (create_info->db_type == DB_TYPE_DEFAULT)
create_info->db_type= old_db_type;
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
/*
We need to handle both partition management command such as Add Partition
and others here as well as an ALTER TABLE that completely changes the
@@ -4240,7 +4237,7 @@
set_table_default_charset(thd, create_info, db);
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
if (thd->variables.old_alter_table || partition_changed)
#else
if (thd->variables.old_alter_table)
@@ -4259,7 +4256,7 @@
if (!need_copy_table)
create_info->frm_only= 1;
-#ifdef HAVE_PARTITION_DB
+#ifdef WITH_PARTITION_STORAGE_ENGINE
if (partition_changed)
{
if (online_drop_partition)
@@ -4615,12 +4612,11 @@
write_bin_log(thd, TRUE);
VOID(pthread_cond_broadcast(&COND_refresh));
VOID(pthread_mutex_unlock(&LOCK_open));
-#ifdef HAVE_BERKELEY_DB
/*
TODO RONM: This problem needs to handled for Berkeley DB partitions
as well
*/
- if (old_db_type == DB_TYPE_BERKELEY_DB)
+ if (ha_check_storage_engine_flag(old_db_type,HTON_FLUSH_AFTER_RENAME))
{
/*
For the alter table to be properly flushed to the logs, we
@@ -4636,11 +4632,10 @@
my_free((char*) table, MYF(0));
}
else
- sql_print_warning("Could not open BDB table %s.%s after rename\n",
+ sql_print_warning("Could not open table %s.%s after rename\n",
new_db,table_name);
- (void) berkeley_flush_logs();
+ ha_flush_logs(old_db_type);
}
-#endif
table_list->table=0; // For query cache
query_cache_invalidate3(thd, table_list, 0);
--- 1.381/sql/sql_yacc.yy 2005-10-21 12:04:04 +02:00
+++ 1.382/sql/sql_yacc.yy 2005-10-25 09:38:50 +02:00
@@ -7520,6 +7520,9 @@
| ENGINE_SYM storage_engines
{ Lex->create_info.db_type= $2; }
show_engine_param
+ | ENGINE_SYM ALL
+ { Lex->create_info.db_type= DB_TYPE_DEFAULT; }
+ show_engine_param
| opt_full COLUMNS from_or_in table_ident opt_db wild_and_where
{
LEX *lex= Lex;
@@ -7602,9 +7605,19 @@
YYABORT;
}
| INNOBASE_SYM STATUS_SYM
- { Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; WARN_DEPRECATED("SHOW INNODB STATUS", "SHOW ENGINE INNODB STATUS"); }
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_ENGINE_STATUS;
+ lex->create_info.db_type= DB_TYPE_INNODB;
+ WARN_DEPRECATED("SHOW INNODB STATUS", "SHOW ENGINE INNODB STATUS");
+ }
| MUTEX_SYM STATUS_SYM
- { Lex->sql_command = SQLCOM_SHOW_MUTEX_STATUS; }
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_ENGINE_MUTEX;
+ lex->create_info.db_type= DB_TYPE_INNODB;
+ WARN_DEPRECATED("SHOW MUTEX STATUS", "SHOW ENGINE INNODB MUTEX");
+ }
| opt_full PROCESSLIST_SYM
{ Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
| opt_var_type VARIABLES wild_and_where
@@ -7633,9 +7646,19 @@
YYABORT;
}
| BERKELEY_DB_SYM LOGS_SYM
- { Lex->sql_command= SQLCOM_SHOW_LOGS; WARN_DEPRECATED("SHOW BDB LOGS", "SHOW ENGINE BDB LOGS"); }
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS;
+ lex->create_info.db_type= DB_TYPE_BERKELEY_DB;
+ WARN_DEPRECATED("SHOW BDB LOGS", "SHOW ENGINE BDB LOGS");
+ }
| LOGS_SYM
- { Lex->sql_command= SQLCOM_SHOW_LOGS; WARN_DEPRECATED("SHOW LOGS", "SHOW ENGINE BDB LOGS"); }
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS;
+ lex->create_info.db_type= DB_TYPE_BERKELEY_DB;
+ WARN_DEPRECATED("SHOW LOGS", "SHOW ENGINE BDB LOGS");
+ }
| GRANTS
{
LEX *lex=Lex;
@@ -7734,30 +7757,11 @@
show_engine_param:
STATUS_SYM
- {
- switch (Lex->create_info.db_type) {
- case DB_TYPE_NDBCLUSTER:
- Lex->sql_command = SQLCOM_SHOW_NDBCLUSTER_STATUS;
- break;
- case DB_TYPE_INNODB:
- Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS;
- break;
- default:
- my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS");
- YYABORT;
- }
- }
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
+ | MUTEX_SYM
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
| LOGS_SYM
- {
- switch (Lex->create_info.db_type) {
- case DB_TYPE_BERKELEY_DB:
- Lex->sql_command = SQLCOM_SHOW_LOGS;
- break;
- default:
- my_error(ER_NOT_SUPPORTED_YET, MYF(0), "LOGS");
- YYABORT;
- }
- };
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; };
master_or_binary:
MASTER_SYM
--- 1.9/storage/ndb/include/kernel/kernel_types.h 2005-08-27 08:12:18 +02:00
+++ 1.10/storage/ndb/include/kernel/kernel_types.h 2005-10-25 09:38:50 +02:00
@@ -17,6 +17,7 @@
#ifndef NDB_KERNEL_TYPES_H
#define NDB_KERNEL_TYPES_H
+#include <my_config.h>
#include <ndb_types.h>
#include "ndb_limits.h"
--- 1.7/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp 2005-04-29 16:30:20 +02:00
+++ 1.8/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp 2005-10-25 09:38:50 +02:00
@@ -98,6 +98,8 @@
StartTcTimer = 2509,
StopTcTimer = 2510,
StartPeriodicTcTimer = 2511,
+ TcStartDumpIndexOpCount = 2512,
+ TcDumpIndexOpCount = 2513,
CmvmiDumpConnections = 2600,
CmvmiDumpLongSignalMemory = 2601,
CmvmiSetRestartOnErrorInsert = 2602,
--- 1.55/storage/ndb/src/kernel/blocks/backup/Backup.cpp 2005-10-11 09:04:55 +02:00
+++ 1.56/storage/ndb/src/kernel/blocks/backup/Backup.cpp 2005-10-25 09:38:50 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include "Backup.hpp"
#include <ndb_version.h>
--- 1.20/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp 2005-10-10 16:48:22 +02:00
+++ 1.21/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp 2005-10-25 09:38:50 +02:00
@@ -20,6 +20,7 @@
// Backup - Database backup / restore
//
//===========================================================================
+#include <my_config.h>
#include "Backup.hpp"
#include <Properties.hpp>
--- 1.88/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2005-10-10 14:35:19 +02:00
+++ 1.89/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2005-10-25 09:38:50 +02:00
@@ -4666,6 +4666,7 @@
regTmpApiPtr->commitAckMarker = RNIL;
regTmpApiPtr->firstTcConnect = RNIL;
regTmpApiPtr->lastTcConnect = RNIL;
+ releaseAllSeizedIndexOperations(regTmpApiPtr);
}//Dbtc::copyApi()
void Dbtc::unlinkApiConnect(Signal* signal)
@@ -10262,7 +10263,7 @@
// apiConnectptr.p->apiConnectstate = CS_CONNECTED;
apiConnectptr.p->apiConnectstate = CS_ABORTING;
apiConnectptr.p->abortState = AS_IDLE;
-
+ releaseAllSeizedIndexOperations(apiConnectptr.p);
if(apiConnectptr.p->m_exec_flag || apiConnectptr.p->apiFailState == ZTRUE){
jam();
bool ok = false;
@@ -10834,6 +10835,33 @@
c_counters.reset();
signal->theData[0] = TcContinueB::ZTRANS_EVENT_REP;
sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 5000, 1);
+ }
+
+ if (dumpState->args[0] == DumpStateOrd::TcStartDumpIndexOpCount)
+ {
+ static int frequency = 1;
+ if (signal->getLength() > 1)
+ frequency = signal->theData[1];
+ else
+ if (refToBlock(signal->getSendersBlockRef()) != DBTC)
+ frequency = 1;
+
+ if (frequency)
+ {
+ dumpState->args[0] = DumpStateOrd::TcDumpIndexOpCount;
+ execDUMP_STATE_ORD(signal);
+ dumpState->args[0] = DumpStateOrd::TcStartDumpIndexOpCount;
+
+ Uint32 delay = 1000 * (frequency > 25 ? 25 : frequency);
+ sendSignalWithDelay(cownref, GSN_DUMP_STATE_ORD, signal, delay, 1);
+ }
+ }
+
+ if (dumpState->args[0] == DumpStateOrd::TcDumpIndexOpCount)
+ {
+ infoEvent("IndexOpCount: pool: %d free: %d",
+ c_theIndexOperationPool.getSize(),
+ c_theIndexOperationPool.getNoOfFree());
}
}//Dbtc::execDUMP_STATE_ORD()
--- 1.20/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp 2005-06-20 13:02:54 +02:00
+++ 1.21/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp 2005-10-25 09:38:50 +02:00
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define DBTUX_DEBUG_CPP
+#include <my_config.h>
#include "Dbtux.hpp"
/*
--- 1.23/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp 2005-09-16 17:06:46 +02:00
+++ 1.24/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#define DBTUX_GEN_CPP
#include "Dbtux.hpp"
--- 1.18/storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp 2005-04-29 16:30:27 +02:00
+++ 1.19/storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp 2005-10-25 09:38:51 +02:00
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define DBTUX_MAINT_CPP
+#include <my_config.h>
#include "Dbtux.hpp"
/*
--- 1.20/storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp 2005-04-29 16:30:27 +02:00
+++ 1.21/storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp 2005-10-25 09:38:51 +02:00
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define DBTUX_META_CPP
+#include <my_config.h>
#include "Dbtux.hpp"
#include <my_sys.h>
--- 1.30/storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp 2005-06-19 18:37:07 +02:00
+++ 1.31/storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp 2005-10-25 09:38:51 +02:00
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define DBTUX_SCAN_CPP
+#include <my_config.h>
#include "Dbtux.hpp"
#include <my_sys.h>
--- 1.27/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2005-10-14 14:28:46 +02:00
+++ 1.28/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include "Suma.hpp"
#include <ndb_version.h>
--- 1.13/storage/ndb/src/kernel/blocks/trix/Trix.cpp 2005-10-10 14:35:20 +02:00
+++ 1.14/storage/ndb/src/kernel/blocks/trix/Trix.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include "Trix.hpp"
#include <string.h>
--- 1.17/storage/ndb/src/kernel/SimBlockList.cpp 2005-09-16 17:44:30 +02:00
+++ 1.18/storage/ndb/src/kernel/SimBlockList.cpp 2005-10-25 09:38:50 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include "SimBlockList.hpp"
#include <SimulatedBlock.hpp>
#include <Cmvmi.hpp>
--- 1.37/storage/ndb/src/kernel/vm/Configuration.cpp 2005-10-10 14:35:20 +02:00
+++ 1.38/storage/ndb/src/kernel/vm/Configuration.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include <ndb_global.h>
#include <ndb_opts.h>
--- 1.4/storage/ndb/src/kernel/vm/SafeCounter.cpp 2005-10-10 16:48:22 +02:00
+++ 1.5/storage/ndb/src/kernel/vm/SafeCounter.cpp 2005-10-25 09:38:51 +02:00
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
+#include <my_config.h>
#include "SimulatedBlock.hpp"
#include "SafeCounter.hpp"
#include <signaldata/NodeFailRep.hpp>
--- 1.22/storage/ndb/src/kernel/vm/SimulatedBlock.cpp 2005-10-10 14:35:20 +02:00
+++ 1.23/storage/ndb/src/kernel/vm/SimulatedBlock.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include <ndb_global.h>
#include "SimulatedBlock.hpp"
--- 1.48/storage/ndb/src/ndbapi/Ndb.cpp 2005-09-16 17:06:46 +02:00
+++ 1.49/storage/ndb/src/ndbapi/Ndb.cpp 2005-10-25 09:38:51 +02:00
@@ -21,6 +21,7 @@
Name: Ndb.cpp
******************************************************************************/
+#include <my_config.h>
#include <ndb_global.h>
--- 1.52/storage/ndb/src/ndbapi/NdbDictionary.cpp 2005-09-28 15:01:38 +02:00
+++ 1.53/storage/ndb/src/ndbapi/NdbDictionary.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include <NdbDictionary.hpp>
#include "NdbDictionaryImpl.hpp"
#include <NdbOut.hpp>
--- 1.110/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2005-10-10 14:31:35 +02:00
+++ 1.111/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include "NdbDictionaryImpl.hpp"
#include "API.hpp"
#include <NdbOut.hpp>
--- 1.157/sql/ha_ndbcluster.cc 2005-10-21 12:04:03 +02:00
+++ 1.158/sql/ha_ndbcluster.cc 2005-10-25 09:42:59 +02:00
@@ -26,7 +26,6 @@
#include "mysql_priv.h"
-#ifdef HAVE_NDBCLUSTER_DB
#include <my_dir.h>
#include "ha_ndbcluster.h"
#include <ndbapi/NdbApi.hpp>
@@ -36,9 +35,14 @@
// options from from mysqld.cc
extern my_bool opt_ndb_optimized_node_selection;
-extern enum ndb_distribution opt_ndb_distribution_id;
extern const char *opt_ndbcluster_connectstring;
+const char *ndb_distribution_names[]= {"KEYHASH", "LINHASH", NullS};
+TYPELIB ndb_distribution_typelib= { array_elements(ndb_distribution_names)-1,
+ "", ndb_distribution_names, NULL };
+const char *opt_ndb_distribution= ndb_distribution_names[ND_KEYHASH];
+enum ndb_distribution opt_ndb_distribution_id= ND_KEYHASH;
+
// Default value for parallelism
static const int parallelism= 0;
@@ -52,6 +56,7 @@
static int ndbcluster_close_connection(THD *thd);
static int ndbcluster_commit(THD *thd, bool all);
static int ndbcluster_rollback(THD *thd, bool all);
+static handler* ndbcluster_create_handler(TABLE *table);
handlerton ndbcluster_hton = {
"ndbcluster",
@@ -74,9 +79,23 @@
NULL, /* create_cursor_read_view */
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
+ ndbcluster_create_handler, /* Create a new handler */
+ ndbcluster_drop_database, /* Drop a database */
+ ndbcluster_end, /* Panic call */
+ NULL, /* Release temporary latches */
+ NULL, /* Update Statistics */
+ NULL, /* Start Consistent Snapshot */
+ NULL, /* Flush logs */
+ ndbcluster_show_status, /* Show status */
+ NULL, /* Replication Report Sent Binlog */
HTON_NO_FLAGS
};
+static handler *ndbcluster_create_handler(TABLE *table)
+{
+ return new ha_ndbcluster(table);
+}
+
#define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8
#define NDB_FAILED_AUTO_INCREMENT ~(Uint64)0
@@ -4642,9 +4661,10 @@
/*
Drop a database in NDB Cluster
- */
+ NOTE add a dummy void function, since stupid handlerton is returning void instead of int...
+*/
-int ndbcluster_drop_database(const char *path)
+int ndbcluster_drop_database_impl(const char *path)
{
DBUG_ENTER("ndbcluster_drop_database");
THD *thd= current_thd;
@@ -4659,13 +4679,13 @@
DBUG_PRINT("enter", ("db: %s", dbname));
if (!(ndb= check_ndb_in_thd(thd)))
- DBUG_RETURN(HA_ERR_NO_CONNECTION);
+ DBUG_RETURN(-1);
// List tables in NDB
NDBDICT *dict= ndb->getDictionary();
if (dict->listObjects(list,
NdbDictionary::Object::UserTable) != 0)
- ERR_RETURN(dict->getNdbError());
+ DBUG_RETURN(-1);
for (i= 0 ; i < list.count ; i++)
{
NdbDictionary::Dictionary::List::Element& elmt= list.elements[i];
@@ -4698,6 +4718,10 @@
DBUG_RETURN(ret);
}
+void ndbcluster_drop_database(char *path)
+{
+ ndbcluster_drop_database_impl(path);
+}
/*
find all tables in ndb and discover those needed
*/
@@ -5069,7 +5093,7 @@
ndbcluster_init()
*/
-bool ndbcluster_end()
+int ndbcluster_end(ha_panic_function type)
{
DBUG_ENTER("ndbcluster_end");
@@ -8168,51 +8192,6 @@
DBUG_RETURN(FALSE);
}
-int
-ndbcluster_show_status(THD* thd)
-{
- Protocol *protocol= thd->protocol;
-
- DBUG_ENTER("ndbcluster_show_status");
-
- if (have_ndbcluster != SHOW_OPTION_YES)
- {
- my_message(ER_NOT_SUPPORTED_YET,
- "Cannot call SHOW NDBCLUSTER STATUS because skip-ndbcluster is defined",
- MYF(0));
- DBUG_RETURN(TRUE);
- }
-
- List<Item> field_list;
- field_list.push_back(new Item_empty_string("free_list", 255));
- field_list.push_back(new Item_return_int("created", 10,MYSQL_TYPE_LONG));
- field_list.push_back(new Item_return_int("free", 10,MYSQL_TYPE_LONG));
- field_list.push_back(new Item_return_int("sizeof", 10,MYSQL_TYPE_LONG));
-
- if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
- DBUG_RETURN(TRUE);
-
- if (get_thd_ndb(thd) && get_thd_ndb(thd)->ndb)
- {
- Ndb* ndb= (get_thd_ndb(thd))->ndb;
- Ndb::Free_list_usage tmp; tmp.m_name= 0;
- while (ndb->get_free_list_usage(&tmp))
- {
- protocol->prepare_for_resend();
-
- protocol->store(tmp.m_name, &my_charset_bin);
- protocol->store((uint)tmp.m_created);
- protocol->store((uint)tmp.m_free);
- protocol->store((uint)tmp.m_sizeof);
- if (protocol->write())
- DBUG_RETURN(TRUE);
- }
- }
- send_eof(thd);
-
- DBUG_RETURN(FALSE);
-}
-
/*
Create a table in NDB Cluster
*/
@@ -8418,4 +8397,39 @@
return COMPATIBLE_DATA_YES;
}
-#endif /* HAVE_NDBCLUSTER_DB */
+/*
+ Implements the SHOW NDB STATUS command.
+*/
+bool
+ndbcluster_show_status(THD* thd, stat_print_fn *stat_print,
+ enum ha_stat_type stat_type)
+{
+ char buf[IO_SIZE];
+ DBUG_ENTER("ndbcluster_show_status");
+
+ if (have_ndbcluster != SHOW_OPTION_YES)
+ {
+ DBUG_RETURN(FALSE);
+ }
+ if (stat_type != HA_ENGINE_STATUS)
+ {
+ DBUG_RETURN(FALSE);
+ }
+ if (get_thd_ndb(thd) && get_thd_ndb(thd)->ndb)
+ {
+ Ndb* ndb= (get_thd_ndb(thd))->ndb;
+ Ndb::Free_list_usage tmp; tmp.m_name= 0;
+ while (ndb->get_free_list_usage(&tmp))
+ {
+ my_snprintf(buf, sizeof(buf),
+ "created=%u, free=%u, sizeof=%u",
+ tmp.m_created, tmp.m_free, tmp.m_sizeof);
+ if (stat_print(thd, ndbcluster_hton.name, tmp.m_name, buf))
+ DBUG_RETURN(TRUE);
+ }
+ }
+ send_eof(thd);
+
+ DBUG_RETURN(FALSE);
+}
+
--- 1.82/sql/ha_ndbcluster.h 2005-10-21 09:31:51 +02:00
+++ 1.83/sql/ha_ndbcluster.h 2005-10-25 09:38:49 +02:00
@@ -136,7 +136,6 @@
NDB_FUNC_TYPE neg_fun;
};
-enum ndb_distribution { ND_KEYHASH= 0, ND_LINHASH= 1 };
/*
Define what functions can be negated in condition pushdown.
@@ -616,7 +615,7 @@
const char *tabname, bool global);
private:
- friend int ndbcluster_drop_database(const char *path);
+ friend int ndbcluster_drop_database_impl(const char *path);
int alter_table_name(const char *to);
static int delete_table(ha_ndbcluster *h, Ndb *ndb,
const char *path,
@@ -773,7 +772,7 @@
extern struct show_var_st ndb_status_variables[];
bool ndbcluster_init(void);
-bool ndbcluster_end(void);
+int ndbcluster_end(ha_panic_function flag);
int ndbcluster_discover(THD* thd, const char* dbname, const char* name,
const void** frmblob, uint* frmlen);
@@ -781,9 +780,9 @@
const char *wild, bool dir, List<char> *files);
int ndbcluster_table_exists_in_engine(THD* thd,
const char *db, const char *name);
-int ndbcluster_drop_database(const char* path);
+void ndbcluster_drop_database(char* path);
void ndbcluster_print_error(int error, const NdbOperation *error_op);
-int ndbcluster_show_status(THD*);
+bool ndbcluster_show_status(THD*,stat_print_fn *,enum ha_stat_type);
--- 1.219/sql/ha_innodb.cc 2005-10-21 12:04:03 +02:00
+++ 1.220/sql/ha_innodb.cc 2005-10-25 09:38:48 +02:00
@@ -34,7 +34,6 @@
#include "mysql_priv.h"
#include "slave.h"
-#ifdef HAVE_INNOBASE_DB
#include <m_ctype.h>
#include <hash.h>
#include <myisampack.h>
@@ -205,6 +204,7 @@
static int innobase_rollback_to_savepoint(THD* thd, void *savepoint);
static int innobase_savepoint(THD* thd, void *savepoint);
static int innobase_release_savepoint(THD* thd, void *savepoint);
+static handler *innobase_create_handler(TABLE *table);
handlerton innobase_hton = {
"InnoDB",
@@ -227,9 +227,29 @@
innobase_create_cursor_view,
innobase_set_cursor_view,
innobase_close_cursor_view,
+ innobase_create_handler, /* Create a new handler */
+ innobase_drop_database, /* Drop a database */
+ innobase_end, /* Panic call */
+ innobase_release_temporary_latches, /* Release temporary latches */
+ innodb_export_status, /* Update Statistics */
+ innobase_start_trx_and_assign_read_view, /* Start Consistent Snapshot */
+ innobase_flush_logs, /* Flush logs */
+ innobase_show_status, /* Show status */
+#ifdef HAVE_REPLICATION
+ innobase_repl_report_sent_binlog, /* Replication Report Sent Binlog */
+#else
+ NULL,
+#endif
HTON_NO_FLAGS
};
+
+static handler *innobase_create_handler(TABLE *table)
+{
+ return new ha_innobase(table);
+}
+
+
/*********************************************************************
Commits a transaction in an InnoDB database. */
@@ -390,7 +410,7 @@
avoid deadlocks on the adaptive hash S-latch possibly held by thd. For more
documentation, see handler.cc. */
-void
+int
innobase_release_temporary_latches(
/*===============================*/
THD *thd)
@@ -399,7 +419,7 @@
if (!innodb_inited) {
- return;
+ return 0;
}
trx = (trx_t*) thd->ha_data[innobase_hton.slot];
@@ -407,6 +427,7 @@
if (trx) {
innobase_release_stat_resources(trx);
}
+ return 0;
}
/************************************************************************
@@ -1429,8 +1450,8 @@
/***********************************************************************
Closes an InnoDB database. */
-bool
-innobase_end(void)
+int
+innobase_end(ha_panic_function type)
/*==============*/
/* out: TRUE if error */
{
@@ -5049,7 +5070,7 @@
/*********************************************************************
Removes all tables in the named database inside InnoDB. */
-int
+void
innobase_drop_database(
/*===================*/
/* out: error number */
@@ -5115,10 +5136,13 @@
innobase_commit_low(trx);
trx_free_for_mysql(trx);
-
+#ifdef NO_LONGER_INTERESTED_IN_DROP_DB_ERROR
error = convert_error_code_to_mysql(error, NULL);
return(error);
+#else
+ return;
+#endif
}
/*************************************************************************
@@ -6423,11 +6447,12 @@
/****************************************************************************
Here we export InnoDB status variables to MySQL. */
-void
+int
innodb_export_status(void)
/*======================*/
{
srv_export_innodb_status();
+ return 0;
}
/****************************************************************************
@@ -6437,9 +6462,9 @@
bool
innodb_show_status(
/*===============*/
- THD* thd) /* in: the MySQL query thread of the caller */
+ THD* thd, /* in: the MySQL query thread of the caller */
+ stat_print_fn *stat_print)
{
- Protocol* protocol = thd->protocol;
trx_t* trx;
static const char truncated_msg[] = "... truncated...\n";
const long MAX_STATUS_SIZE = 64000;
@@ -6449,10 +6474,7 @@
DBUG_ENTER("innodb_show_status");
if (have_innodb != SHOW_OPTION_YES) {
- my_message(ER_NOT_SUPPORTED_YET,
- "Cannot call SHOW INNODB STATUS because skip-innodb is defined",
- MYF(0));
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(FALSE);
}
trx = check_trx_exists(thd);
@@ -6514,28 +6536,14 @@
mutex_exit_noninline(&srv_monitor_file_mutex);
- List<Item> field_list;
-
- field_list.push_back(new Item_empty_string("Status", flen));
-
- if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS |
- Protocol::SEND_EOF)) {
- my_free(str, MYF(0));
-
- DBUG_RETURN(TRUE);
- }
-
- protocol->prepare_for_resend();
- protocol->store(str, flen, system_charset_info);
- my_free(str, MYF(0));
-
- if (protocol->write()) {
+ bool result = FALSE;
- DBUG_RETURN(TRUE);
+ if (stat_print(thd, innobase_hton.name, "", str)) {
+ result= TRUE;
}
- send_eof(thd);
+ my_free(str, MYF(0));
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(FALSE);
}
/****************************************************************************
@@ -6544,10 +6552,10 @@
bool
innodb_mutex_show_status(
/*===============*/
- THD* thd) /* in: the MySQL query thread of the caller */
+ THD* thd, /* in: the MySQL query thread of the caller */
+ stat_print_fn *stat_print)
{
- Protocol *protocol= thd->protocol;
- List<Item> field_list;
+ char buf1[IO_SIZE], buf2[IO_SIZE];
mutex_t* mutex;
ulint rw_lock_count= 0;
ulint rw_lock_count_spin_loop= 0;
@@ -6557,19 +6565,6 @@
ulonglong rw_lock_wait_time= 0;
DBUG_ENTER("innodb_mutex_show_status");
- field_list.push_back(new Item_empty_string("Mutex", FN_REFLEN));
- field_list.push_back(new Item_empty_string("Module", FN_REFLEN));
- field_list.push_back(new Item_uint("Count", 21));
- field_list.push_back(new Item_uint("Spin_waits", 21));
- field_list.push_back(new Item_uint("Spin_rounds", 21));
- field_list.push_back(new Item_uint("OS_waits", 21));
- field_list.push_back(new Item_uint("OS_yields", 21));
- field_list.push_back(new Item_uint("OS_waits_time", 21));
-
- if (protocol->send_fields(&field_list,
- Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
- DBUG_RETURN(TRUE);
-
#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
mutex_enter(&mutex_list_mutex);
#endif
@@ -6582,17 +6577,16 @@
{
if (mutex->count_using > 0)
{
- protocol->prepare_for_resend();
- protocol->store(mutex->cmutex_name, system_charset_info);
- protocol->store(mutex->cfile_name, system_charset_info);
- protocol->store((ulonglong)mutex->count_using);
- protocol->store((ulonglong)mutex->count_spin_loop);
- protocol->store((ulonglong)mutex->count_spin_rounds);
- protocol->store((ulonglong)mutex->count_os_wait);
- protocol->store((ulonglong)mutex->count_os_yield);
- protocol->store((ulonglong)mutex->lspent_time/1000);
-
- if (protocol->write())
+ my_snprintf(buf1, sizeof(buf1), "%s:%s",
+ mutex->cmutex_name, mutex->cfile_name);
+ my_snprintf(buf2, sizeof(buf2),
+ "count=%lu, spin_waits=%lu, spin_rounds=%lu, "
+ "os_waits=%lu, os_yields=%lu, os_wait_times=%lu",
+ mutex->count_using, mutex->count_spin_loop,
+ mutex->count_spin_rounds,
+ mutex->count_os_wait, mutex->count_os_yield,
+ mutex->lspent_time/1000);
+ if (stat_print(thd, innobase_hton.name, buf1, buf2))
{
#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
mutex_exit(&mutex_list_mutex);
@@ -6614,17 +6608,15 @@
mutex = UT_LIST_GET_NEXT(list, mutex);
}
- protocol->prepare_for_resend();
- protocol->store("rw_lock_mutexes", system_charset_info);
- protocol->store("", system_charset_info);
- protocol->store((ulonglong)rw_lock_count);
- protocol->store((ulonglong)rw_lock_count_spin_loop);
- protocol->store((ulonglong)rw_lock_count_spin_rounds);
- protocol->store((ulonglong)rw_lock_count_os_wait);
- protocol->store((ulonglong)rw_lock_count_os_yield);
- protocol->store((ulonglong)rw_lock_wait_time/1000);
+ my_snprintf(buf2, sizeof(buf2),
+ "count=%lu, spin_waits=%lu, spin_rounds=%lu, "
+ "os_waits=%lu, os_yields=%lu, os_wait_times=%lu",
+ rw_lock_count, rw_lock_count_spin_loop,
+ rw_lock_count_spin_rounds,
+ rw_lock_count_os_wait, rw_lock_count_os_yield,
+ rw_lock_wait_time/1000);
- if (protocol->write())
+ if (stat_print(thd, innobase_hton.name, "rw_lock_mutexes", buf2))
{
DBUG_RETURN(1);
}
@@ -6632,10 +6624,23 @@
#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
mutex_exit(&mutex_list_mutex);
#endif
- send_eof(thd);
DBUG_RETURN(FALSE);
}
+bool innobase_show_status(THD* thd, stat_print_fn* stat_print,
+ enum ha_stat_type stat_type)
+{
+ switch (stat_type) {
+ case HA_ENGINE_STATUS:
+ return innodb_show_status(thd, stat_print);
+ case HA_ENGINE_MUTEX:
+ return innodb_mutex_show_status(thd, stat_print);
+ default:
+ return FALSE;
+ }
+}
+
+
/****************************************************************************
Handling the shared INNOBASE_SHARE structure that is needed to provide table
locking.
@@ -7467,4 +7472,3 @@
return COMPATIBLE_DATA_YES;
}
-#endif /* HAVE_INNOBASE_DB */
--- 1.66/libmysqld/Makefile.am 2005-10-21 09:31:51 +02:00
+++ 1.67/libmysqld/Makefile.am 2005-10-25 09:42:59 +02:00
@@ -27,8 +27,7 @@
-DDATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-DLIBDIR="\"$(MYSQLLIBdir)\""
-INCLUDES= @bdb_includes@ \
- -I$(top_builddir)/include -I$(top_srcdir)/include \
+INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \
-I$(top_srcdir)/regex \
$(openssl_includes) @ZLIB_INCLUDES@
@@ -39,13 +38,11 @@
libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
my_time.c
-sqlexamplessources = ha_example.cc ha_tina.cc
noinst_HEADERS = embedded_priv.h emb_qcache.h
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
- ha_innodb.cc ha_berkeley.cc ha_heap.cc ha_federated.cc \
- ha_myisam.cc ha_myisammrg.cc handler.cc sql_handler.cc \
+ ha_heap.cc ha_myisam.cc ha_myisammrg.cc handler.cc sql_handler.cc \
hostname.cc init.cc password.c \
item.cc item_buff.cc item_cmpfunc.cc item_create.cc \
item_func.cc item_strfunc.cc item_sum.cc item_timefunc.cc \
@@ -65,12 +62,18 @@
spatial.cc gstream.cc sql_help.cc tztime.cc sql_cursor.cc \
sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \
parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
- rpl_filter.cc sql_plugin.cc \
- ha_blackhole.cc ha_archive.cc sql_partition.cc ha_partition.cc sql_tablespace.cc
+ rpl_filter.cc sql_partition.cc handlerton.cc sql_plugin.cc \
+ sql_tablespace.cc
-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources)
+libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
+EXTRA_libmysqld_a_SOURCES = ha_innodb.cc ha_berkeley.cc ha_archive.cc \
+ ha_blackhole.cc ha_federated.cc ha_ndbcluster.cc \
+ ha_tina.cc ha_example.cc ha_partition.cc
+libmysqld_a_DEPENDENCIES= @mysql_se_objs@
libmysqld_a_SOURCES=
+sqlstoragesources = $(EXTRA_libmysqld_a_SOURCES)
+
# automake misses these
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
@@ -79,11 +82,24 @@
$(top_builddir)/storage/myisam/libmyisam.a \
$(top_builddir)/storage/myisammrg/libmyisammrg.a \
$(top_builddir)/storage/heap/libheap.a \
- @innodb_libs@ @bdb_libs_with_path@ \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a \
$(top_builddir)/dbug/libdbug.a \
- $(top_builddir)/vio/libvio.a
+ $(top_builddir)/vio/libvio.a \
+ @mysql_se_libs@
+
+
+# Storage engine specific compilation options
+
+ha_berkeley.o: ha_berkeley.cc
+ $(CXXCOMPILE) @bdb_includes@ $(LM_CFLAGS) -c $<
+
+ha_ndbcluster.o:ha_ndbcluster.cc
+ $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
+
+# Until we can remove dependency on ha_ndbcluster.h
+handler.o: handler.cc
+ $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
#
# To make it easy for the end user to use the embedded library we
@@ -95,7 +111,7 @@
# need to add the same file twice to the library, so 'sort -u' save us
# some time and spares unnecessary work.
-libmysqld.a: libmysqld_int.a $(INC_LIB)
+libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES)
if DARWIN_MWCC
mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u`
else
@@ -104,10 +120,11 @@
then \
$(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \
else \
- for arc in ./libmysqld_int.a $(INC_LIB); do \
+ (for arc in ./libmysqld_int.a $(INC_LIB); do \
arpath=`echo $$arc|sed 's|[^/]*$$||'`; \
- $(AR) t $$arc|sed "s|^|$$arpath|"; \
- done | sort -u | xargs $(AR) cq libmysqld.a ; \
+ $(AR) t $$arc|xargs -n 1 find $$arpath -name; \
+ $(AR) t $$arc|xargs -n 1 find `dirname $$arpath` -path \*/`basename $$arpath`/\* -name; \
+ done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \
$(RANLIB) libmysqld.a ; \
fi
endif
@@ -131,16 +148,16 @@
rm -f $(srcdir)/$$f; \
@LN_CP_F@ $(srcdir)/../libmysql/$$f $(srcdir)/$$f; \
done; \
- for f in $(sqlexamplessources); do \
+ for f in $(sqlstoragesources); do \
rm -f $(srcdir)/$$f; \
- @LN_CP_F@ $(srcdir)/../sql/examples/$$f $(srcdir)/$$f; \
+ @LN_CP_F@ `find $(srcdir)/../sql -name $$f` $(srcdir)/$$f; \
done; \
rm -f $(srcdir)/client_settings.h; \
@LN_CP_F@ $(srcdir)/../libmysql/client_settings.h $(srcdir)/client_settings.h;
clean-local:
- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \
+ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) | sed "s;\.lo;.c;g"` \
$(top_srcdir)/linked_libmysqld_sources; \
rm -f client_settings.h
--- 1.34/sql/ha_federated.cc 2005-10-21 12:04:02 +02:00
+++ 1.35/sql/ha_federated.cc 2005-10-25 09:38:48 +02:00
@@ -351,7 +351,6 @@
#pragma implementation // gcc: Class implementation
#endif
-#ifdef HAVE_FEDERATED_DB
#include "ha_federated.h"
#include "m_string.h"
@@ -363,6 +362,11 @@
static int federated_init= FALSE; // Variable for checking the
// init state of hash
+/* Static declaration for handerton */
+
+static handler *federated_create_handler(TABLE *table);
+
+
/* Federated storage engine handlerton */
handlerton federated_hton= {
@@ -386,10 +390,25 @@
NULL, /* create_cursor_read_view */
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
+ federated_create_handler, /* Create a new handler */
+ NULL, /* Drop a database */
+ federated_db_end, /* Panic call */
+ NULL, /* Release temporary latches */
+ NULL, /* Update Statistics */
+ NULL, /* Start Consistent Snapshot */
+ NULL, /* Flush logs */
+ NULL, /* Show status */
+ NULL, /* Replication Report Sent Binlog */
HTON_ALTER_NOT_SUPPORTED
};
+static handler *federated_create_handler(TABLE *table)
+{
+ return new ha_federated(table);
+}
+
+
/* Function we use in the creation of our hash to get key. */
static byte *federated_get_key(FEDERATED_SHARE *share, uint *length,
@@ -443,7 +462,7 @@
FALSE OK
*/
-bool federated_db_end()
+int federated_db_end(ha_panic_function type)
{
if (federated_init)
{
@@ -451,7 +470,7 @@
VOID(pthread_mutex_destroy(&federated_mutex));
}
federated_init= 0;
- return FALSE;
+ return 0;
}
/*
@@ -2646,4 +2665,3 @@
DBUG_RETURN(FALSE);
}
-#endif /* HAVE_FEDERATED_DB */
--- 1.3/storage/ndb/src/kernel/vm/SuperPool.cpp 2005-05-24 17:31:00 +02:00
+++ 1.4/storage/ndb/src/kernel/vm/SuperPool.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include <ndb_global.h>
#include "SuperPool.hpp"
--- 1.28/storage/ndb/src/ndbapi/NdbBlob.cpp 2005-10-10 14:35:20 +02:00
+++ 1.29/storage/ndb/src/ndbapi/NdbBlob.cpp 2005-10-25 09:38:51 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <my_config.h>
#include <Ndb.hpp>
#include <NdbDictionaryImpl.hpp>
#include <NdbTransaction.hpp>
--- 1.56/mysql-test/Makefile.am 2005-10-21 12:04:02 +02:00
+++ 1.57/mysql-test/Makefile.am 2005-10-25 09:38:48 +02:00
@@ -17,18 +17,19 @@
## Process this file with automake to create Makefile.in
-if HAVE_NDBCLUSTER_DB
+# XXX until this can be fixed properly
+#if WITH_NDBCLUSTER_STORAGE_ENGINE
SUBDIRS = ndb
DIST_SUBDIRS=ndb
-USE_NDBCLUSTER=\"--ndbcluster\"
-else
-# If one uses automake conditionals, automake will automatically
-# include all possible branches to DIST_SUBDIRS goal.
-# Reset DIST_SUBDIRS if we don't use NDB
-SUBDIRS=
-DIST_SUBDIRS=
+#USE_NDBCLUSTER=\"--ndbcluster\"
+#else
+## If one uses automake conditionals, automake will automatically
+## include all possible branches to DIST_SUBDIRS goal.
+## Reset DIST_SUBDIRS if we don't use NDB
+#SUBDIRS=
+#DIST_SUBDIRS=
USE_NDBCLUSTER=\"\"
-endif
+#endif
benchdir_root= $(prefix)
testdir = $(benchdir_root)/mysql-test
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2059) | jonas | 25 Oct |