summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tim@threads.polyesthetic.msg>2001-03-07 16:35:44 -0500
committerunknown <tim@threads.polyesthetic.msg>2001-03-07 16:35:44 -0500
commit9e114f040e0d3335a6d52440232115375e1d0fa6 (patch)
tree06eda97108be5ba8a25a7cac5ae2327647f8f343
parentc60c6f3a369b54d77aa4622197bef1da6b805b97 (diff)
parentb0089e699a4ed1c9287726185835d701a297cfd6 (diff)
downloadmariadb-git-9e114f040e0d3335a6d52440232115375e1d0fa6.tar.gz
Merge work.mysql.com:/home/bk/mysql
into threads.polyesthetic.msg:/usr/local/src/my/work Docs/manual.texi: Auto merged
-rwxr-xr-xBuild-tools/Do-all-build-steps17
-rw-r--r--Docs/manual.texi14
-rw-r--r--acinclude.m434
-rw-r--r--bdb/Makefile.in3
-rw-r--r--configure.in28
5 files changed, 69 insertions, 27 deletions
diff --git a/Build-tools/Do-all-build-steps b/Build-tools/Do-all-build-steps
index 2938edf2b01..d42db28fe2c 100755
--- a/Build-tools/Do-all-build-steps
+++ b/Build-tools/Do-all-build-steps
@@ -49,20 +49,12 @@ rm -f NEW-RPMS/*
# Stop on error
set -e
-# Make everything readable for user and group
-# chmod -R u+rw,g+rw .
-
/bin/rm -f */.deps/*.P
/bin/rm -f config.cache
-aclocal; autoheader; aclocal; automake; autoconf
-cd innobase
-aclocal; autoheader; aclocal; automake; autoconf
-cd ..
-
-# Since we have moved the configure.in stuff from readline to the
-# toplevel why do this? David 990630
-# (cd readline; aclocal; autoheader; aclocal; automake; autoconf)
+aclocal && autoheader && aclocal && automake && autoconf
+(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
+(cd bdb/dist && sh s_all)
# A normal user starts here. We must use mit-threads. Otherwise it
# does not end up in the distribution.
@@ -71,7 +63,7 @@ cd ..
--with-low-memory \
--with-mit-threads=yes $EXTRA_CONFIG \
--enable-thread-safe-client \
- --without-berkeley-db \
+ --with-berkeley-db \
--with-innobase-db
gmake -j 2
@@ -89,6 +81,7 @@ set -e
log=$WD/Logs/Log-distcheck-`date +%y%m%d-%H%M`
echo "Logging script $TMP_SCRIPT into $log"
+
if test $to_host = "mysql-work"
then
# Try to get the right user for MySQL builds on work so that all
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 154353b2063..f315bd3652f 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -17919,6 +17919,7 @@ Returns the bitwise @code{AND} of all bits in @code{expr}. The calculation is
performed with 64-bit (@code{BIGINT}) precision.
@end table
+@cindex @code{GROUP BY}, extensions to ANSI SQL
@strong{MySQL} has extended the use of @code{GROUP BY}. You can use columns or
calculations in the @code{SELECT} expressions that don't appear in
the @code{GROUP BY} part. This stands for @emph{any possible value for this
@@ -17937,8 +17938,9 @@ In ANSI SQL, you would have to add @code{customer.name} to the @code{GROUP
BY} clause. In @strong{MySQL}, the name is redundant if you don't run in
ANSI mode.
-Don't use this feature if the columns you omit from the @code{GROUP BY} part
-aren't unique in the group!
+@strong{Don't use this feature} if the columns you omit from the
+@code{GROUP BY} part aren't unique in the group! You will get
+unpredictable results.
In some cases, you can use @code{MIN()} and @code{MAX()} to obtain a specific
column value even if it isn't unique. The following gives the value of
@@ -19292,6 +19294,7 @@ to tell the optimizer that the result set will have many rows. In this case,
temporary table with a key on the @code{GROUP BY} elements.
@item
+@cindex @code{GROUP BY}, extensions to ANSI SQL
If you use @code{GROUP BY}, the output rows will be sorted according to the
@code{GROUP BY} as if you would have had an @code{ORDER BY} over all the fields
in the @code{GROUP BY}. @strong{MySQL} has extended the @code{GROUP BY} so that
@@ -19302,6 +19305,13 @@ SELECT a,COUNT(b) FROM test_table GROUP BY a DESC
@end example
@item
+@strong{MySQL} has extended the use of @code{GROUP BY} to allow you to
+select fields which are not mentioned in the @code{GROUP BY} clause.
+If you are not getting the results you expect from your query, please
+read the @code{GROUP BY} description.
+@xref{Group by functions}.
+
+@item
@code{SQL_BUFFER_RESULT} will force the result to be put into a temporary
table. This will help @strong{MySQL} free the table locks early and will help
in cases where it takes a long time to send the result set to the client.
diff --git a/acinclude.m4 b/acinclude.m4
index 1c01126385d..633b2345a72 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -608,8 +608,8 @@ AC_MSG_RESULT($ac_cv_conv_longlong_to_float)
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_BDB
dnl Sets HAVE_BERKELEY_DB if inst library is found
-dnl Makes sure db version is >= 3.2.3
-dnl Looks in $srcdir for Berkeley distribution not told otherwise
+dnl Makes sure db version is correct.
+dnl Looks in $srcdir for Berkeley distribution if not told otherwise
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_BDB], [
@@ -618,7 +618,7 @@ AC_DEFUN([MYSQL_CHECK_BDB], [
--with-berkeley-db[=DIR]
Use BerkeleyDB located in DIR],
[bdb="$withval"],
- [bdb=default])
+ [bdb=no])
AC_ARG_WITH([berkeley-db-includes],
[\
@@ -719,8 +719,6 @@ dnl echo "DBG3: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'"
;;
compile )
have_berkeley_db="$bdb"
-dnl Is added to @sql_server_dirs@ in configure.in
- MYSQL_TOP_BUILDDIR([have_berkeley_db])
AC_MSG_RESULT([Compiling Berekeley DB in '$have_berkeley_db'])
;;
* )
@@ -791,9 +789,18 @@ AC_DEFUN([MYSQL_SEARCH_FOR_BDB], [
dnl echo ["MYSQL_SEARCH_FOR_BDB"]
bdb_dir_ok="no BerkeleyDB found"
- for test_dir in bdb db-*.*.* ../db-*.*.* /usr/local/BerkeleyDB*; do
+ for test_dir in $srcdir/bdb $srcdir/db-*.*.* /usr/local/BerkeleyDB*; do
+dnl echo "-----------> Looking at ($test_dir; `cd $test_dir && pwd`)"
MYSQL_CHECK_BDB_DIR([$test_dir])
if test X"$bdb_dir_ok" = Xsource || test X"$bdb_dir_ok" = Xinstalled; then
+dnl echo "-----------> Found it ($bdb), ($srcdir)"
+dnl This is needed so that 'make distcheck' works properly (VPATH build).
+dnl VPATH build won't work if bdb is not under the source tree; but in
+dnl that case, hopefully people will just make and install inside the
+dnl tree, or install BDB first, and then use the installed version.
+ case "$bdb" in
+ "$srcdir/"* ) bdb=`echo "$bdb" | sed -e "s,^$srcdir/,,"` ;;
+ esac
break
fi
done
@@ -834,9 +841,18 @@ AC_DEFUN([MYSQL_CHECK_BDB_VERSION], [
])
AC_DEFUN([MYSQL_TOP_BUILDDIR], [
- case $[$1] in
- /* ) ;; # already an absolute path
- * ) [$1]="'\$(top_builddir)/'$[$1]" ;;
+ case "$[$1]" in
+ /* ) ;; # don't do anything with an absolute path
+ "$srcdir"/* )
+ # If BDB is under the source directory, we need to look under the
+ # build directory for bdb/build_unix.
+ # NOTE: I'm being lazy, and assuming the user did not specify
+ # something like --with-berkeley-db=bdb (it would be missing "./").
+ [$1]="\$(top_builddir)/"`echo "$[$1]" | sed -e "s,^$srcdir/,,"`
+ ;;
+ * )
+ AC_MSG_ERROR([The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$[$1]')])
+ ;;
esac
if test X"$[$1]" != "/"
then
diff --git a/bdb/Makefile.in b/bdb/Makefile.in
index 20140ac39c6..b86eaefb5c1 100644
--- a/bdb/Makefile.in
+++ b/bdb/Makefile.in
@@ -37,7 +37,7 @@ all:
cd $(bdb_build) && $(MAKE) all
# May want to fix this, and MYSQL/configure, to install things
-install:
+install dvi check installcheck:
distdir:
for s in $(subdirs); do \
@@ -47,3 +47,4 @@ distdir:
test -f $(distdir)/$$f || cp -p $(srcdir)/$$f $(distdir)/$$f; \
done
mkdir $(distdir)/$(bdb_build)
+ cp -p $(srcdir)/$(bdb_build)/.IGNORE_ME $(distdir)/$(bdb_build)
diff --git a/configure.in b/configure.in
index 1bac02c3591..1939f6191d1 100644
--- a/configure.in
+++ b/configure.in
@@ -1877,9 +1877,31 @@ then
then
bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
fi
- (cd $bdb && cd build_unix && sh ../dist/configure $bdb_conf_flags) \
- || AC_MSG_ERROR([could not configure Berkeley DB])
-
+ # 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
+ (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