mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
merge
This commit is contained in:
commit
8a9d6072fa
42 changed files with 733 additions and 174 deletions
|
@ -6,6 +6,8 @@ aclocal && autoheader && aclocal && automake && autoconf
|
|||
(cd bdb/dist && sh s_all)
|
||||
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
|
||||
|
||||
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -O2" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_PURIFY -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug=full
|
||||
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug=full --with-berkeley-db --with-innodb
|
||||
|
||||
gmake -j 4
|
||||
|
||||
cd sql ; rm mysqld ; make CXXLD="purify -best-effort g++" mysqld
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
davida@isil.mysql.com
|
||||
heikki@donna.mysql.fi
|
||||
jani@hynda.mysql.fi
|
||||
jani@janikt.pp.saunalahti.fi
|
||||
jcole@tetra.spaceapes.com
|
||||
tim@work.mysql.com
|
||||
miguel@light.local
|
||||
monty@bitch.mysql.fi
|
||||
monty@hundin.mysql.fi
|
||||
monty@tik.mysql.fi
|
||||
monty@work.mysql.com
|
||||
mwagner@evoq.mwagner.org
|
||||
paul@central.snake.net
|
||||
paul@teton.kitebird.com
|
||||
sasha@mysql.sashanet.com
|
||||
serg@serg.mysql.com
|
||||
tim@bitch.mysql.fi
|
||||
tim@threads.polyesthetic.msg
|
||||
tim@white.box
|
||||
tim@work.mysql.com
|
||||
tonu@x153.internalnet
|
||||
|
|
432
acinclude.m4
432
acinclude.m4
|
@ -1154,3 +1154,435 @@ AC_DEFUN(AC_SYS_LARGEFILE,
|
|||
esac])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful, but
|
||||
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## As a special exception to the GNU General Public License, if you
|
||||
## distribute this file as part of a program that contains a
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 40 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
case "$target" in
|
||||
NONE) lt_target="$host" ;;
|
||||
*) lt_target="$target" ;;
|
||||
esac
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$lt_target" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
])
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$lt_target" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
|
|
@ -218,17 +218,19 @@ my_bool check_scramble(const char *, const char *message,
|
|||
unsigned long *salt,my_bool old_ver);
|
||||
char *get_tty_password(char *opt_message);
|
||||
void hash_password(unsigned long *result, const char *password);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Some other useful functions */
|
||||
|
||||
void my_init(void);
|
||||
void load_defaults(const char *conf_file, const char **groups,
|
||||
int *argc, char ***argv);
|
||||
my_bool my_thread_init(void);
|
||||
void my_thread_end(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
|
||||
|
||||
#ifdef __WIN__
|
||||
|
|
|
@ -211,4 +211,5 @@
|
|||
#define ER_DROP_DB_WITH_READ_LOCK 1208
|
||||
#define ER_CREATE_DB_WITH_READ_LOCK 1209
|
||||
#define ER_WRONG_ARGUMENTS 1210
|
||||
#define ER_ERROR_MESSAGES 211
|
||||
#define ER_NO_PERMISSON_TO_CREATE_USER 1211
|
||||
#define ER_ERROR_MESSAGES 212
|
||||
|
|
|
@ -10,6 +10,7 @@ Created 11/11/1995 Heikki Tuuri
|
|||
|
||||
#ifdef UNIV_NONINL
|
||||
#include "buf0flu.ic"
|
||||
#include "trx0sys.h"
|
||||
#endif
|
||||
|
||||
#include "ut0byte.h"
|
||||
|
|
|
@ -9,12 +9,10 @@ Created 1/20/1994 Heikki Tuuri
|
|||
#ifndef univ_i
|
||||
#define univ_i
|
||||
|
||||
#if (defined(_WIN32) || defined(_WIN64))
|
||||
#if (defined(_WIN32) || defined(_WIN64)) && !defined(MYSQL_SERVER)
|
||||
#define __WIN__
|
||||
|
||||
#ifndef MYSQL_SERVER
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/* If you want to check for errors with compiler level -W4,
|
||||
comment out the above include of windows.h and let the following defines
|
||||
|
|
|
@ -59,7 +59,7 @@ else
|
|||
basedir=.
|
||||
rm -rf share
|
||||
mkdir share
|
||||
ln -sf ../../sql/share share/mysql
|
||||
ln -f -s ../../sql/share share/mysql
|
||||
fi
|
||||
|
||||
# Initialize variables
|
||||
|
|
|
@ -198,3 +198,12 @@ insert into t2 values (1,1),(2,2),(3,3);
|
|||
select t1.a,sec_to_time(sum(time_to_sec(t))) from t1 left join t2 on (t1.b=t2.a) group by t1.a,t2.b;
|
||||
select distinct t1.a,sec_to_time(sum(time_to_sec(t))) from t1 left join t2 on (t1.b=t2.a) group by t1.a,t2.b;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Test problem with DISTINCT and HAVING
|
||||
#
|
||||
create table t1 (a int not null,b char(5), c text);
|
||||
insert into t1 (a) values (1),(2),(3),(4),(1),(2),(3),(4);
|
||||
select distinct a from t1 group by b,a having a > 2 order by a desc;
|
||||
select distinct a,c from t1 group by b,c,a having a > 2 order by a desc;
|
||||
drop table t1;
|
||||
|
|
|
@ -229,6 +229,7 @@ void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info)
|
|||
MYRG_TABLE *table;
|
||||
THD *thd=current_thd;
|
||||
create_info->merge_list.next= &create_info->merge_list.first;
|
||||
create_info->merge_list.elements=0;
|
||||
|
||||
for (table=file->open_tables ; table != file->end_table ; table++)
|
||||
{
|
||||
|
@ -240,6 +241,7 @@ void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info)
|
|||
fn_format(buff,name,"","",3);
|
||||
if (!(ptr->real_name=thd->strdup(buff)))
|
||||
goto err;
|
||||
create_info->merge_list.elements++;
|
||||
(*create_info->merge_list.next) = (byte*) ptr;
|
||||
create_info->merge_list.next= (byte**) &ptr->next;
|
||||
}
|
||||
|
|
|
@ -258,6 +258,7 @@ void kill_mysql(void);
|
|||
void close_connection(NET *net,uint errcode=0,bool lock=1);
|
||||
bool check_access(THD *thd,uint access,const char *db=0,uint *save_priv=0,
|
||||
bool no_grant=0);
|
||||
bool check_table_access(THD *thd,uint want_access,TABLE_LIST *tables);
|
||||
bool check_process_priv(THD *thd=0);
|
||||
|
||||
int generate_table(THD *thd, TABLE_LIST *table_list,
|
||||
|
@ -534,13 +535,13 @@ extern ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
|
|||
max_insert_delayed_threads, max_user_connections,
|
||||
long_query_count,net_wait_timeout,net_interactive_timeout,
|
||||
net_read_timeout,net_write_timeout,
|
||||
what_to_log,flush_time,
|
||||
what_to_log,flush_time, opt_sql_mode,
|
||||
max_tmp_tables,max_heap_table_size,query_buff_size,
|
||||
lower_case_table_names,thread_stack,thread_stack_min,
|
||||
binlog_cache_size, max_binlog_cache_size, opt_sql_mode;
|
||||
binlog_cache_size, max_binlog_cache_size, record_rnd_cache_size;
|
||||
extern ulong specialflag, current_pid;
|
||||
extern bool low_priority_updates, using_update_log;
|
||||
extern bool opt_sql_bin_update, opt_safe_show_db, opt_warnings;
|
||||
extern bool low_priority_updates, using_update_log,opt_warnings;
|
||||
extern bool opt_sql_bin_update, opt_safe_show_db, opt_safe_user_create;
|
||||
extern char language[LIBLEN],reg_ext[FN_EXTLEN],blob_newline;
|
||||
extern const char **errmesg; /* Error messages */
|
||||
extern const char *default_tx_isolation_name;
|
||||
|
|
|
@ -213,7 +213,8 @@ static bool opt_log,opt_update_log,opt_bin_log,opt_slow_log,opt_noacl,
|
|||
opt_disable_networking=0, opt_bootstrap=0,opt_skip_show_db=0,
|
||||
opt_myisam_log=0,
|
||||
opt_large_files=sizeof(my_off_t) > 4;
|
||||
bool opt_sql_bin_update = 0, opt_log_slave_updates = 0, opt_safe_show_db=0;
|
||||
bool opt_sql_bin_update = 0, opt_log_slave_updates = 0, opt_safe_show_db=0,
|
||||
opt_safe_user_create=0;
|
||||
FILE *bootstrap_file=0;
|
||||
int segfaulted = 0; // ensure we do not enter SIGSEGV handler twice
|
||||
extern MASTER_INFO glob_mi;
|
||||
|
@ -261,7 +262,7 @@ ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
|
|||
query_buff_size, lower_case_table_names, mysqld_net_retry_count,
|
||||
net_interactive_timeout, slow_launch_time = 2L,
|
||||
net_read_timeout,net_write_timeout,slave_open_temp_tables=0,
|
||||
open_files_limit=0, max_binlog_size;
|
||||
open_files_limit=0, max_binlog_size, record_rnd_cache_size;
|
||||
ulong slave_net_timeout;
|
||||
ulong thread_cache_size=0, binlog_cache_size=0, max_binlog_cache_size=0;
|
||||
volatile ulong cached_thread_count=0;
|
||||
|
@ -1488,9 +1489,13 @@ static void open_log(MYSQL_LOG *log, const char *hostname,
|
|||
// get rid of extention if the log is binary to avoid problems
|
||||
if (type == LOG_BIN)
|
||||
{
|
||||
char* p = strrchr((char*) opt_name, FN_EXTCHAR);
|
||||
char *p = fn_ext(opt_name);
|
||||
if (p)
|
||||
*p = 0;
|
||||
{
|
||||
uint length=(uint) (p-opt_name);
|
||||
strmake(tmp,opt_name,min(length,FN_REFLEN));
|
||||
opt_name=tmp;
|
||||
}
|
||||
}
|
||||
log->open(opt_name,type);
|
||||
}
|
||||
|
@ -2479,7 +2484,7 @@ enum options {
|
|||
OPT_GEMINI_UNBUFFERED_IO, OPT_SKIP_SAFEMALLOC,
|
||||
OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS,
|
||||
OPT_MAX_BINLOG_DUMP_EVENTS, OPT_SPORADIC_BINLOG_DUMP_FAIL,
|
||||
OPT_SQL_MODE
|
||||
OPT_SAFE_USER_CREATE, OPT_SQL_MODE
|
||||
};
|
||||
|
||||
static struct option long_options[] = {
|
||||
|
@ -2591,7 +2596,7 @@ static struct option long_options[] = {
|
|||
(int) OPT_REPLICATE_REWRITE_DB},
|
||||
{"safe-mode", no_argument, 0, (int) OPT_SAFE},
|
||||
{"safe-show-database", no_argument, 0, (int) OPT_SAFE_SHOW_DB},
|
||||
{"socket", required_argument, 0, (int) OPT_SOCKET},
|
||||
{"safe-user-create", no_argument, 0, (int) OPT_SAFE_USER_CREATE},
|
||||
{"server-id", required_argument, 0, (int) OPT_SERVER_ID},
|
||||
{"set-variable", required_argument, 0, 'O'},
|
||||
{"skip-bdb", no_argument, 0, (int) OPT_BDB_SKIP},
|
||||
|
@ -2611,6 +2616,7 @@ static struct option long_options[] = {
|
|||
{"skip-stack-trace", no_argument, 0, (int) OPT_SKIP_STACK_TRACE},
|
||||
{"skip-symlink", no_argument, 0, (int) OPT_SKIP_SYMLINKS},
|
||||
{"skip-thread-priority", no_argument, 0, (int) OPT_SKIP_PRIOR},
|
||||
{"socket", required_argument, 0, (int) OPT_SOCKET},
|
||||
{"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME},
|
||||
{"sql-mode", required_argument, 0, (int) OPT_SQL_MODE},
|
||||
#include "sslopt-longopts.h"
|
||||
|
@ -2750,6 +2756,8 @@ CHANGEABLE_VAR changeable_vars[] = {
|
|||
0, MALLOC_OVERHEAD, (long) ~0, MALLOC_OVERHEAD, IO_SIZE },
|
||||
{ "record_buffer", (long*) &my_default_record_cache_size,
|
||||
128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE },
|
||||
{ "record_rnd_buffer", (long*) &record_rnd_cache_size,
|
||||
0, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE },
|
||||
{ "slave_net_timeout", (long*) &slave_net_timeout,
|
||||
SLAVE_NET_TIMEOUT, 1, 65535, 0, 1 },
|
||||
{ "slow_launch_time", (long*) &slow_launch_time,
|
||||
|
@ -2865,6 +2873,7 @@ struct show_var_st init_vars[]= {
|
|||
{"port", (char*) &mysql_port, SHOW_INT},
|
||||
{"protocol_version", (char*) &protocol_version, SHOW_INT},
|
||||
{"record_buffer", (char*) &my_default_record_cache_size,SHOW_LONG},
|
||||
{"record_rnd_buffer", (char*) &record_rnd_cache_size, SHOW_LONG},
|
||||
{"query_buffer_size", (char*) &query_buff_size, SHOW_LONG},
|
||||
{"safe_show_database", (char*) &opt_safe_show_db, SHOW_BOOL},
|
||||
{"server_id", (char*) &server_id, SHOW_LONG},
|
||||
|
@ -3040,6 +3049,8 @@ static void usage(void)
|
|||
--safe-mode Skip some optimize stages (for testing)\n\
|
||||
--safe-show-database Don't show databases for which the user has no\n\
|
||||
privileges\n\
|
||||
--safe-user-create Don't new users cretaion without privileges to the\n\
|
||||
mysql.user table\n\
|
||||
--skip-concurrent-insert\n\
|
||||
Don't use concurrent insert with MyISAM\n\
|
||||
--skip-delay-key-write\n\
|
||||
|
@ -3774,6 +3785,9 @@ static void get_options(int argc,char **argv)
|
|||
case OPT_SAFE_SHOW_DB:
|
||||
opt_safe_show_db=1;
|
||||
break;
|
||||
case OPT_SAFE_USER_CREATE:
|
||||
opt_safe_user_create=1;
|
||||
break;
|
||||
case OPT_SKIP_SAFEMALLOC:
|
||||
#ifdef SAFEMALLOC
|
||||
sf_malloc_quick=1;
|
||||
|
@ -3797,6 +3811,9 @@ static void get_options(int argc,char **argv)
|
|||
fix_paths();
|
||||
default_table_type_name=ha_table_typelib.type_names[default_table_type-1];
|
||||
default_tx_isolation_name=tx_isolation_typelib.type_names[default_tx_isolation];
|
||||
/* To be deleted in MySQL 4.0 */
|
||||
if (!record_rnd_cache_size)
|
||||
record_rnd_cache_size=my_default_record_cache_size;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
|
|||
table->file->rnd_init(0);
|
||||
|
||||
if (! (specialflag & SPECIAL_SAFE_MODE) &&
|
||||
my_default_record_cache_size &&
|
||||
record_rnd_cache_size &&
|
||||
!table->file->fast_key_read() &&
|
||||
(table->db_stat & HA_READ_ONLY ||
|
||||
table->reginfo.lock_type <= TL_READ_NO_INSERT) &&
|
||||
|
@ -216,7 +216,7 @@ static int init_rr_cache(READ_RECORD *info)
|
|||
info->reclength=ALIGN_SIZE(info->struct_length);
|
||||
|
||||
info->error_offset=info->table->reclength;
|
||||
info->cache_records=my_default_record_cache_size/
|
||||
info->cache_records=record_rnd_cache_size/
|
||||
(info->reclength+info->struct_length);
|
||||
rec_cache_size=info->cache_records*info->reclength;
|
||||
info->rec_cache_size=info->cache_records*info->ref_length;
|
||||
|
|
|
@ -221,3 +221,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -2,29 +2,29 @@
|
|||
This file is public domain and comes with NO WARRANTY of any kind */
|
||||
|
||||
/* Knud Riishøjgård knudriis@post.tele.dk 99 &&
|
||||
Carsten H. Pedersen, carsten.pedersen@bitbybit.dk oct. 1999 */
|
||||
Carsten H. Pedersen, carsten.pedersen@bitbybit.dk oct. 1999 / aug. 2001. */
|
||||
|
||||
"hashchk",
|
||||
"isamchk",
|
||||
"NEJ",
|
||||
"JA",
|
||||
"Kan ikke oprette filen '%-.64s' (Fejlkode: %d)",
|
||||
"Kan ikke opprette tabellen '%-.64s' (Fejlkode: %d)",
|
||||
"Kan ikke oprette tabellen '%-.64s' (Fejlkode: %d)",
|
||||
"Kan ikke oprette databasen '%-.64s'. Fejl %d",
|
||||
"Kan ikke oprette databasen '%-.64s'. Databasen eksisterer",
|
||||
"Kan ikke slette (droppe) '%-.64s'. Databasen eksisterer ikke",
|
||||
"Fejl ved sletning (drop) af databasen (kan ikke slette '%-.64s', Fejl %d)",
|
||||
"Fejl ved sletting af database (kan ikke slette biblioteket '%-.64s', Fejl %d)",
|
||||
"Fejl ved sletting af database (kan ikke slette folderen '%-.64s', Fejl %d)",
|
||||
"Fejl ved sletning af '%-.64s' (Fejlkode: %d)",
|
||||
"Kan ikke læse posten i systembiblioteket",
|
||||
"Kan ikke læse posten i systemfolderen",
|
||||
"Kan ikke læse status af '%-.64s' (Fejlkode: %d)",
|
||||
"Kan ikke læse aktive bibliotek (Fejlkode: %d)",
|
||||
"Kan ikke læse aktive folder (Fejlkode: %d)",
|
||||
"Kan ikke låse fil (Fejlkode: %d)",
|
||||
"Kan ikke åbne fil: '%-.64s'. (Fejlkode: %d)",
|
||||
"Kan ikke finde fila: '%-.64s' (Fejlkode: %d)",
|
||||
"Kan ikke læse bibliotek '%-.64s' (Fejlkode: %d)",
|
||||
"Kan ikke skifte bibliotek til '%-.64s' (Fejlkode: %d)",
|
||||
"Posten erændret siden sidst læst '%-.64s'",
|
||||
"Kan ikke læse folder '%-.64s' (Fejlkode: %d)",
|
||||
"Kan ikke skifte folder til '%-.64s' (Fejlkode: %d)",
|
||||
"Posten er ændret siden sidste læsning '%-.64s'",
|
||||
"Ikke mere diskplads (%s). Venter på at få frigjort plads....",
|
||||
"Kan ikke skrive, flere ens nøgler i tabellen '%-.64s'",
|
||||
"Fejl ved lukning af '%-.64s' (Fejlkode: %d)",
|
||||
|
@ -32,10 +32,10 @@
|
|||
"Fejl ved omdøbning af '%-.64s' til '%-.64s' (Fejlkode: %d)",
|
||||
"Fejl ved skriving av filen '%-.64s' (Fejlkode: %d)",
|
||||
"'%-.64s' er låst mod opdateringer",
|
||||
"Sortering afbrutt",
|
||||
"Sortering afbrudt",
|
||||
"View '%-.64s' eksisterer ikke for '%-.64s'",
|
||||
"Modtog fejl %d fra tabel håndterer",
|
||||
"Tabel håndtereren for '%-.64s' har ikke denne mulighed",
|
||||
"Modtog fejl %d fra tabel håndteringen",
|
||||
"Denne mulighed eksisterer ikke for tabeltypen '%-.64s'",
|
||||
"Kan ikke finde posten i '%-.64s'",
|
||||
"Forkert indhold i: '%-.64s'",
|
||||
"Fejl i indeksfilen til tabellen '%-.64s', prøv at reparere den",
|
||||
|
@ -43,95 +43,95 @@
|
|||
"'%-.64s' er skrivebeskyttet",
|
||||
"Ikke mere hukommelse. Genstart serveren og prøv igen (mangler %d bytes)",
|
||||
"Ikke mere sorteringshukommelse. Øg sorteringshukommelse (sort buffer size) for serveren",
|
||||
"Uventet sluttning af fil (eof) ved læsning af filen '%-.64s' (Fejlkode: %d)",
|
||||
"For mange tilkoblinger (connections)",
|
||||
"Uventet afslutning på fil (eof) ved læsning af filen '%-.64s' (Fejlkode: %d)",
|
||||
"For mange forbindelser (connections)",
|
||||
"Udgået for tråde/hukommelse",
|
||||
"Kan ikke få værtsnavn for din adresse",
|
||||
"Forkert håndtryk (handshake)",
|
||||
"Adgang nægtet bruger: '%-.32s@%-.64s' til databasen '%-.64s'",
|
||||
"Adgang nægtet bruger: '%-.32s@%-.64s' (Bruger password: %s)",
|
||||
"Adgang nægtet bruger: '%-.32s@%-.64s' (Bruger adgangskode: %s)",
|
||||
"Ingen database valgt",
|
||||
"Ukendt kommando",
|
||||
"Kolonne '%-.64s' kan ikke være nul",
|
||||
"Kolonne '%-.64s' kan ikke være NULL",
|
||||
"Ukendt database '%-.64s'",
|
||||
"Tabellen '%-.64s' eksisterer allerede",
|
||||
"Tabellen '%-.64s' findes allerede",
|
||||
"Ukendt tabel '%-.64s'",
|
||||
"Felt: '%-.64s' i tabel %s er ikke entydigt",
|
||||
"Database nedkobling er i gang",
|
||||
"Database nedlukning er i gang",
|
||||
"Ukendt kolonne '%-.64s' i tabel %s",
|
||||
"Grugte '%-.64s' som ikke var i group by",
|
||||
"Brugte '%-.64s' som ikke var i group by",
|
||||
"Kan ikke gruppere på '%-.64s'",
|
||||
"Udtrykket har summer (sum) funktioner og kolonner i samme udtryk",
|
||||
"Kolonne tæller stemmer ikke med værditæller",
|
||||
"Identifikationen '%-.64s' er for lang",
|
||||
"Feltnavnet '%-.64s' eksisterer allerede",
|
||||
"Indeksnavnet '%-.64s' eksisterer allerede",
|
||||
"Kolonne tæller stemmer ikke med antallet af værdier",
|
||||
"Navnet '%-.64s' er for langt",
|
||||
"Feltnavnet '%-.64s' findes allerede",
|
||||
"Indeksnavnet '%-.64s' findes allerede",
|
||||
"Ens værdier '%-.64s' for indeks %d",
|
||||
"Forkert kolonnespecifikaton for felt '%-.64s'",
|
||||
"%s nær '%-.64s' på linje %d",
|
||||
"Forespørgsel var tom",
|
||||
"Ikke unikt tabel/alias: '%-.64s'",
|
||||
"Tabellen/aliaset: '%-.64s' er ikke unikt",
|
||||
"Ugyldig standardværdi for '%-.64s'",
|
||||
"Flere primærindekser specificeret",
|
||||
"For mange indekser specificeret. Maks %d indekser tillatt",
|
||||
"For mange indeksdele specificeret. Maks %d dele tillatt",
|
||||
"Specificeret indeks var for langt. Maks indekslængde er %d",
|
||||
"Indeks felt '%-.64s' eksiterer ikke i tabellen",
|
||||
"Blob felt '%-.64s' kan ikke bruges ved specifikation af indeks",
|
||||
"Flere primærnøgler specificeret",
|
||||
"For mange nøgler specificeret. Kun %d nøgler må bruges",
|
||||
"For mange nøgledele specificeret. Kun %d dele må bruges",
|
||||
"Specificeret nøgle var for lang. Maksimal nøglelængde er %d",
|
||||
"Nøglefeltet '%-.64s' eksisterer ikke i tabellen",
|
||||
"BLOB feltet '%-.64s' kan ikke bruges ved specifikation af indeks",
|
||||
"For stor feltlængde for kolonne '%-.64s' (maks = %d). Brug BLOB i stedet",
|
||||
"Der kan kun bruges eet AUTO-felt og det skal være indekseret",
|
||||
"%s: klar for tilslutninger\n",
|
||||
"Der kan kun specificeres eet AUTO_INCREMENT-felt, og det skal være indekseret",
|
||||
"%s: klar til tilslutninger\n",
|
||||
"%s: Normal nedlukning\n",
|
||||
"%s: Opdaget signal %d. Afslutter!!\n",
|
||||
"%s: Fangede signal %d. Afslutter!!\n",
|
||||
"%s: Server lukket\n",
|
||||
"%s: Forceret nedlukning af tråd: %ld bruger: '%-.64s'\n",
|
||||
"Kan ikke oprette IP socket",
|
||||
"Tabellen '%-.64s' har intet indeks som det der er brugt i CREATE INDEX. Genopret tabellen",
|
||||
"Tabellen '%-.64s' har ikke den nøgle, som blev brugt i CREATE INDEX. Genopret tabellen",
|
||||
"Felt adskiller er ikke som forventet, se dokumentationen",
|
||||
"Man kan ikke bruge faste feltlængder med BLOB. Brug i stedet 'fields terminated by'.",
|
||||
"Filen '%-.64s' skal være i database-biblioteket for at kunne læses af alle",
|
||||
"Filen '%-.64s' skal være i database-folderen og kunne læses af alle",
|
||||
"Filen '%-.64s' eksisterer allerede",
|
||||
"Poster: %ld Fjernet: %ld Sprunget over: %ld Advarsler: %ld",
|
||||
"Poster: %ld Ens: %ld",
|
||||
"Forkert indeksdel. Den anvendte indeksdel er ikke en streng eller den længden er større end indekslængden",
|
||||
"Forkert indeksdel. Den anvendte nøgledel er ikke en streng eller længden er større end nøglelængden",
|
||||
"Man kan ikke slette alle felter med ALTER TABLE. Brug DROP TABLE i stedet.",
|
||||
"Kan ikke DROP '%-.64s'. Undersøg om felt/indeks eksisterer.",
|
||||
"Kan ikke udføre DROP '%-.64s'. Undersøg om feltet/nøglen eksisterer.",
|
||||
"Poster: %ld Ens: %ld Advarsler: %ld",
|
||||
"INSERT TABLE '%-.64s' er ikke tilladt i FROM tabel liste",
|
||||
"Ukendt tråd id: %lu",
|
||||
"Du er ikke ejer av tråden %lu",
|
||||
"Du er ikke ejer af tråden %lu",
|
||||
"Ingen tabeller i brug",
|
||||
"For mange tekststrenge kolonne %s og SET",
|
||||
"Kan ikke lave unikt loggfilnavn %s.(1-999)\n",
|
||||
"For mange tekststrenge til specifikationen af SET i kolonne %-.64s",
|
||||
"Kan ikke lave unikt log-filnavn %s.(1-999)\n",
|
||||
"Tabellen '%-.64s' var låst med READ lås og kan ikke opdateres",
|
||||
"Tabellen '%-.64s' var ikke låst med LOCK TABLES",
|
||||
"Blob feltet '%-.64s' kan ikke have en standard værdi",
|
||||
"BLOB feltet '%-.64s' kan ikke have en standard værdi",
|
||||
"Ugyldigt database navn '%-.64s'",
|
||||
"Ugyldigt tabel navn '%-.64s'",
|
||||
"SELECT ville undersøge for mange poster og ville sannsynligvis tage meget lang tid. Undersøg WHERE delen og brug SET OPTION SQL_BIG_SELECTS=1 hvis SELECTen er korrekt"
|
||||
"SELECT ville undersøge for mange poster og ville sandsynligvis tage meget lang tid. Undersøg WHERE delen og brug SET OPTION SQL_BIG_SELECTS=1 hvis udtrykket er korrekt"
|
||||
"Ukendt fejl",
|
||||
"Ukendt procedure %s",
|
||||
"Forkert antal parametre til proceduren %s",
|
||||
"Forkert(e) parametre til proceduren %s",
|
||||
"Ukendt tabel '%-.64s' i %s",
|
||||
"Feltet '%-.64s' er anvendt to ganger",
|
||||
"Forkert brug af gruppe-funktion",
|
||||
"Tabellen '%-.64s' bruger et efternavn som ikke findes i denne MySQL version",
|
||||
"Feltet '%-.64s' er anvendt to gange",
|
||||
"Forkert brug af grupperings-funktion",
|
||||
"Tabellen '%-.64s' bruger et filtypenavn som ikke findes i denne MySQL version",
|
||||
"En tabel skal have mindst een kolonne",
|
||||
"Tabellen '%-.64s' er fuld",
|
||||
"Ukendt karaktersæt: '%-.64s'",
|
||||
"Ukendt tegnsæt: '%-.64s'",
|
||||
"For mange tabeller. MySQL kan kun bruge %d tabeller i et join",
|
||||
"For mange felter",
|
||||
"For store poster. Max post størrelse, unde BOLB's, er %d. Du må lave nogle felter til BLOB's",
|
||||
"For store poster. Max post størrelse, uden BLOB's, er %d. Du må lave nogle felter til BLOB's",
|
||||
"Thread stack brugt: Brugt: %ld af en %ld stak. Brug 'mysqld -O thread_stack=#' for at allokere en større stak om nødvendigt",
|
||||
"Krydsreferencer fundet i OUTER JOIN. Check dine ON conditions",
|
||||
"Kolonne '%-.32s' bruges som UNIQUE eller INDEX men er ikke defineret som NOT NULL",
|
||||
"Kan ikke læse funktionen '%-.64s'",
|
||||
"Kan ikke starte funktionen '%-.64s'; %-.80s",
|
||||
"Ingen sti tilladte for delt bibliotek",
|
||||
"Angivelse af sti ikke tilladt for delt bibliotek",
|
||||
"Funktionen '%-.64s' findes allerede",
|
||||
"Kan ikke åbne delt bibliotek '%-.64s' (errno: %d %s)",
|
||||
"Kan ikke finde funktionen '%-.64s' in bibliotek'",
|
||||
"Kan ikke finde funktionen '%-.64s' i bibliotek'",
|
||||
"Funktionen '%-.64s' er ikke defineret",
|
||||
"Værten er blokeret på grund af mange fejlforespørgsler. Lås op med 'mysqladmin flush-hosts'",
|
||||
"Værten '%-.64s' kan ikke tilkoble denne MySQL-server",
|
||||
|
@ -139,7 +139,7 @@
|
|||
"Du skal have tilladelse til at opdatere tabeller i MySQL databasen for at ændre andres adgangskoder",
|
||||
"Kan ikke finde nogen tilsvarende poster i bruger tabellen",
|
||||
"Poster fundet: %ld Ændret: %ld Advarsler: %ld",
|
||||
"Kan ikke danne en ny tråd (thread) (errno %d). Hvis computeren ikke er løbet tør for hukommelse, kan du se i brugervejledningen for en mulig operativ-system - afhængig fejl",
|
||||
"Kan ikke danne en ny tråd (fejl nr. %d). Hvis computeren ikke er løbet tør for hukommelse, kan du se i brugervejledningen for en mulig operativ-system - afhængig fejl",
|
||||
"Kolonne antallet stemmer ikke overens med antallet af værdier i post %ld",
|
||||
"Kan ikke genåbne tabel '%-.64s',
|
||||
"Forkert brug af nulværdi (NULL)",
|
||||
|
@ -171,47 +171,48 @@
|
|||
"Denne tabeltype understøtter ikke brug af AUTO_INCREMENT kolonner",
|
||||
"INSERT DELAYED kan ikke bruges med tabellen '%-.64s', fordi tabellen er låst med LOCK TABLES",
|
||||
"Forkert kolonnenavn '%-.100s'",
|
||||
"Den brugte tabel styrer kan ikke indeksere kolonnen '%-.64s'",
|
||||
"Den brugte tabeltype kan ikke indeksere kolonnen '%-.64s'",
|
||||
"Tabellerne i MERGE er ikke defineret ens",
|
||||
"Kan ikke skrive til tabellen '%-.64s' fordi det vil bryde CONSTRAINT regler",
|
||||
"BLOB column '%-.64s' used in key specification without a key length",
|
||||
"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead",
|
||||
"Result consisted of more than one row",
|
||||
"This table type requires a primary key",
|
||||
"This version of MySQL is not compiled with RAID support",
|
||||
"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
|
||||
"Key '%-.64s' doesn't exist in table '%-.64s'",
|
||||
"Can't open table",
|
||||
"The handler for the table doesn't support check/repair",
|
||||
"You are not allowed to execute this command in a transaction",
|
||||
"Got error %d during COMMIT",
|
||||
"Got error %d during ROLLBACK",
|
||||
"Got error %d during FLUSH_LOGS",
|
||||
"Got error %d during CHECKPOINT",
|
||||
"Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)",
|
||||
"The handler for the table does not support binary table dump",
|
||||
"Binlog closed while trying to FLUSH MASTER",
|
||||
"Failed rebuilding the index of dumped table '%-.64s'",
|
||||
"Error from master: '%-.64s'",
|
||||
"Net error reading from master",
|
||||
"Net error writing to master",
|
||||
"Can't find FULLTEXT index matching the column list",
|
||||
"Can't execute the given command because you have active locked tables or an active transaction",
|
||||
"Unknown system variable '%-.64'",
|
||||
"Table '%-.64s' is marked as crashed and should be repaired",
|
||||
"Table '%-.64s' is marked as crashed and last (automatic?) repair failed",
|
||||
"Warning: Some non-transactional changed tables couldn't be rolled back",
|
||||
"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again',
|
||||
"This operation cannot be performed with a running slave, run SLAVE STOP first",
|
||||
"This operation requires a running slave, configure slave and do SLAVE START",
|
||||
"The server is not configured as slave, fix in config file or with CHANGE MASTER TO",
|
||||
"Could not initialize master info structure, check permisions on master.info",
|
||||
"Could not create slave thread, check system resources",
|
||||
"User %-.64s has already more than 'max_user_connections' active connections",
|
||||
"You may only use constant expressions with SET",
|
||||
"Lock wait timeout exceeded",
|
||||
"The total number of locks exceeds the lock table size",
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"BLOB kolonnen '%-.64s' brugt i nøglespecifikation uden nøglelængde",
|
||||
"Alle dele af en PRIMARY KEY skal være NOT NULL; Hvis du skal bruge NULL i nøglen, brug UNIQUE istedet",
|
||||
"Resultatet bestod af mere end een række",
|
||||
"Denne tabeltype kræver en primærnøgle",
|
||||
"Denne udgave af MySQL er ikke oversat med understøttelse af RAID",
|
||||
"Du bruger sikker opdaterings modus ('safe update mode') og du forsøgte at opdatere en tabel uden en WHERE klausul, der gør brug af et KEY felt",
|
||||
"Nøglen '%-.64s' eksisterer ikke i tabellen '%-.64s'",
|
||||
"Kan ikke åbne tabellen",
|
||||
"Denne tabeltype understøtter ikke CHECK/REPAIR",
|
||||
"Du må ikke bruge denne kommando i en transaktion",
|
||||
"Modtog fejl %d mens kommandoen COMMIT blev udført",
|
||||
"Modtog fejl %d mens kommandoen ROLLBACK blev udført",
|
||||
"Modtog fejl %d mens kommandoen FLUSH_LOGS blev udført",
|
||||
"Modtog fejl %d mens kommandoen CHECKPOINT blev udført",
|
||||
"Afbrød forbindelsen %ld til databasen '%-.64s' bruger: '%-.32s' vært: `%-.64s' (%-.64s)",
|
||||
"Denne tabeltype unserstøtter ikke binært tabeldump",
|
||||
"Binlog blev lukket mens kommandoen FLUSH MASTER blev udført",
|
||||
"Kunne ikke genopbygge indekset for den dumpede tabel '%-.64s'",
|
||||
"Fejl fra master: '%-.64s'",
|
||||
"Netværksfejl ved læsning fra master",
|
||||
"Netværksfejl ved skrivning til master",
|
||||
"Kan ikke finde en FULLTEXT nøgle som svarer til kolonne listen",
|
||||
"Kan ikke udføre den givne kommando fordi der findes aktive, låste tabeller eller fordi der udføres en transaktion",
|
||||
"Ukendt systemvariabel '%-.64'",
|
||||
"Tabellen '%-.64s' er markeret med fejl og bør repareres",
|
||||
"Tabellen '%-.64s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede",
|
||||
"Advarsel: Visse data i tabeller der ikke understøtter transaktioner kunne ikke tilbagestilles",
|
||||
"Fler-udtryks transaktion krævede mere plads en 'max_binlog_cache_size' bytes. Forhøj værdien af denne variabel og prøv igen',
|
||||
"Denne handling kunne ikke udføres med kørende slave, brug først kommandoen SLAVE STOP",
|
||||
"Denne handling kræver en kørende slave. Konfigurer en slave og brug kommandoen SLAVE START",
|
||||
"Denne server er ikke konfigureret som slave. Ret in config-filen eller brug kommandoen CHANGE MASTER TO",
|
||||
"Kunne ikke initialisere master info-struktur. Check om rettigheder i master.info",
|
||||
"Kunne ikke danne en slave-tråd. Check systemressourcerne",
|
||||
"Brugeren %-.64s har allerede mere end 'max_user_connections' aktive forbindelser",
|
||||
"Du må kun bruge konstantudtryk med SET",
|
||||
"Lock wait timeout overskredet",
|
||||
"Det totale antal låse overstiger størrelsen på låse-tabellen",
|
||||
"Update lås kan ikke opnås under en READ UNCOMMITTED transaktion",
|
||||
"DROP DATABASE er ikke tilladt mens en tråd holder på globalt read lock",
|
||||
"CREATE DATABASE er ikke tilladt mens en tråd holder på globalt read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -215,4 +215,5 @@
|
|||
"Update locks kunnen niet worden verkregen tijdens een READ UNCOMMITTED transactie",
|
||||
"DROP DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit",
|
||||
"CREATE DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit",
|
||||
"Foutieve parameters voor %s"
|
||||
"Foutieve parameters voor %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -212,3 +212,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -216,3 +216,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -212,3 +212,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -215,3 +215,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -212,3 +212,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -214,3 +214,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -212,3 +212,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -214,3 +214,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -212,3 +212,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -214,3 +214,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -214,3 +214,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -216,3 +216,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -212,3 +212,4 @@
|
|||
"DROP DATABASE não permitido enquanto uma 'thread' está assegurando um travamento global de leitura",
|
||||
"CREATE DATABASE não permitido enquanto uma 'thread' está assegurando um travamento global de leitura",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -216,3 +216,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -215,3 +215,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -220,3 +220,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -213,3 +213,4 @@
|
|||
"DROP DATABASE no permitido mientras un thread está ejerciendo un bloqueo de lectura global",
|
||||
"CREATE DATABASE no permitido mientras un thread está ejerciendo un bloqueo de lectura global",
|
||||
"Wrong arguments to %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
|
@ -212,3 +212,4 @@
|
|||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Felaktiga argument till %s",
|
||||
"%-.32s@%-.64s is not allowed to create new users",
|
||||
|
|
103
sql/sql_acl.cc
103
sql/sql_acl.cc
|
@ -943,16 +943,41 @@ end:
|
|||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
/* Return 1 if we are allowed to create new users */
|
||||
|
||||
static bool test_if_create_new_users(THD *thd)
|
||||
{
|
||||
bool create_new_users=1; // Assume that we are allowed to create new users
|
||||
if (opt_safe_user_create && !(thd->master_access & INSERT_ACL))
|
||||
{
|
||||
TABLE_LIST tl;
|
||||
uint db_access;
|
||||
bzero((char*) &tl,sizeof(tl));
|
||||
tl.db= (char*) "mysql";
|
||||
tl.real_name= (char*) "user";
|
||||
db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr,
|
||||
thd->priv_user, tl.db);
|
||||
if (!(db_access & INSERT_ACL))
|
||||
{
|
||||
if (check_grant(thd,INSERT_ACL,&tl,0,1))
|
||||
create_new_users=0;
|
||||
}
|
||||
}
|
||||
return create_new_users;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
** Handle GRANT commands
|
||||
****************************************************************************/
|
||||
|
||||
static int replace_user_table(TABLE *table, const LEX_USER &combo,
|
||||
uint rights, char what)
|
||||
uint rights, char what, bool create_user)
|
||||
{
|
||||
int error = -1;
|
||||
uint i,j;
|
||||
bool ima=0;
|
||||
bool old_row_exists=0;
|
||||
char *password,empty_string[1];
|
||||
DBUG_ENTER("replace_user_table");
|
||||
|
||||
|
@ -971,14 +996,21 @@ static int replace_user_table(TABLE *table, const LEX_USER &combo,
|
|||
(byte*) table->field[0]->ptr,0,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
if (what == 'N')
|
||||
if (!create_user)
|
||||
{
|
||||
my_printf_error(ER_NONEXISTING_GRANT,ER(ER_NONEXISTING_GRANT),
|
||||
MYF(0),combo.user.str,combo.host.str);
|
||||
THD *thd=current_thd;
|
||||
if (what == 'N')
|
||||
my_printf_error(ER_NONEXISTING_GRANT,ER(ER_NONEXISTING_GRANT),
|
||||
MYF(0),combo.user.str,combo.host.str);
|
||||
else
|
||||
my_printf_error(ER_NO_PERMISSON_TO_CREATE_USER,
|
||||
ER(ER_NO_PERMISSON_TO_CREATE_USER),
|
||||
MYF(0),thd->user,
|
||||
thd->host ? thd->host : thd->ip ? thd->ip: "");
|
||||
error= -1;
|
||||
goto end;
|
||||
}
|
||||
ima = 0; // no row; ima on Serbian means 'there is something'
|
||||
old_row_exists = 0;
|
||||
restore_record(table,2); // cp empty row from record[2]
|
||||
table->field[0]->store(combo.host.str,combo.host.length);
|
||||
table->field[1]->store(combo.user.str,combo.user.length);
|
||||
|
@ -986,7 +1018,7 @@ static int replace_user_table(TABLE *table, const LEX_USER &combo,
|
|||
}
|
||||
else
|
||||
{
|
||||
ima = 1;
|
||||
old_row_exists = 1;
|
||||
store_record(table,1); // Save copy for update
|
||||
if (combo.password.str) // If password given
|
||||
table->field[2]->store(password,(uint) strlen(password));
|
||||
|
@ -1001,7 +1033,7 @@ static int replace_user_table(TABLE *table, const LEX_USER &combo,
|
|||
}
|
||||
rights=get_access(table,3);
|
||||
|
||||
if (ima) // there is a row, therefore go to update, instead of insert
|
||||
if (old_row_exists)
|
||||
{
|
||||
/*
|
||||
We should NEVER delete from the user table, as a uses can still
|
||||
|
@ -1033,7 +1065,7 @@ static int replace_user_table(TABLE *table, const LEX_USER &combo,
|
|||
acl_cache->clear(1); // Clear privilege cache
|
||||
if (!combo.password.str)
|
||||
password=0; // No password given on command
|
||||
if (ima)
|
||||
if (old_row_exists)
|
||||
acl_update_user(combo.user.str,combo.host.str,password,rights);
|
||||
else
|
||||
acl_insert_user(combo.user.str,combo.host.str,password,rights);
|
||||
|
@ -1052,7 +1084,7 @@ static int replace_db_table(TABLE *table, const char *db,
|
|||
uint rights, char what)
|
||||
{
|
||||
uint i,j,store_rights;
|
||||
bool ima=0;
|
||||
bool old_row_exists=0;
|
||||
int error;
|
||||
DBUG_ENTER("replace_db_table");
|
||||
|
||||
|
@ -1076,7 +1108,7 @@ static int replace_db_table(TABLE *table, const char *db,
|
|||
combo.user.str,combo.host.str);
|
||||
goto abort;
|
||||
}
|
||||
ima = 0; // no row
|
||||
old_row_exists = 0;
|
||||
restore_record(table,2); // cp empty row from record[2]
|
||||
table->field[0]->store(combo.host.str,combo.host.length);
|
||||
table->field[1]->store(db,(uint) strlen(db));
|
||||
|
@ -1084,7 +1116,7 @@ static int replace_db_table(TABLE *table, const char *db,
|
|||
}
|
||||
else
|
||||
{
|
||||
ima = 1;
|
||||
old_row_exists = 1;
|
||||
store_record(table,1);
|
||||
}
|
||||
|
||||
|
@ -1097,8 +1129,9 @@ static int replace_db_table(TABLE *table, const char *db,
|
|||
rights=get_access(table,3);
|
||||
rights=fix_rights_for_db(rights);
|
||||
|
||||
if (ima) // there is a row, therefore go update, else insert
|
||||
if (old_row_exists)
|
||||
{
|
||||
// update old existing row
|
||||
if (rights)
|
||||
{
|
||||
if ((error=table->file->update_row(table->record[1],table->record[0])))
|
||||
|
@ -1117,7 +1150,7 @@ static int replace_db_table(TABLE *table, const char *db,
|
|||
}
|
||||
|
||||
acl_cache->clear(1); // Clear privilege cache
|
||||
if (ima)
|
||||
if (old_row_exists)
|
||||
acl_update_db(combo.user.str,combo.host.str,db,rights);
|
||||
else
|
||||
acl_insert_db(combo.user.str,combo.host.str,db,rights);
|
||||
|
@ -1324,7 +1357,7 @@ static int replace_column_table(GRANT_TABLE *g_t,
|
|||
while ((xx=iter++))
|
||||
{
|
||||
uint privileges = xx->rights;
|
||||
bool ima=0;
|
||||
bool old_row_exists=0;
|
||||
key_restore(table,key,0,key_length);
|
||||
table->field[4]->store(xx->column.ptr(),xx->column.length());
|
||||
|
||||
|
@ -1339,7 +1372,7 @@ static int replace_column_table(GRANT_TABLE *g_t,
|
|||
result= -1; /* purecov: inspected */
|
||||
continue; /* purecov: inspected */
|
||||
}
|
||||
ima = 0;
|
||||
old_row_exists = 0;
|
||||
restore_record(table,2); // Get empty record
|
||||
key_restore(table,key,0,key_length);
|
||||
table->field[4]->store(xx->column.ptr(),xx->column.length());
|
||||
|
@ -1353,13 +1386,13 @@ static int replace_column_table(GRANT_TABLE *g_t,
|
|||
privileges = tmp & ~(privileges | rights);
|
||||
else
|
||||
privileges |= tmp;
|
||||
ima = 1;
|
||||
old_row_exists = 1;
|
||||
store_record(table,1); // copy original row
|
||||
}
|
||||
|
||||
table->field[6]->store((longlong) get_rights_for_column(privileges));
|
||||
|
||||
if (ima) // there is a row, therefore go update, else insert
|
||||
if (old_row_exists)
|
||||
{
|
||||
if (privileges)
|
||||
error=table->file->update_row(table->record[1],table->record[0]);
|
||||
|
@ -1465,7 +1498,7 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
|
|||
uint rights, uint kolone, bool revoke_grant)
|
||||
{
|
||||
char grantor[HOSTNAME_LENGTH+1+USERNAME_LENGTH];
|
||||
int ima = 1;
|
||||
int old_row_exists = 1;
|
||||
int error=0;
|
||||
uint store_table_rights,store_col_rights;
|
||||
DBUG_ENTER("replace_table_table");
|
||||
|
@ -1505,13 +1538,13 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
|
|||
table_name); /* purecov: deadcode */
|
||||
DBUG_RETURN(-1); /* purecov: deadcode */
|
||||
}
|
||||
ima = 0; // no row
|
||||
old_row_exists = 0;
|
||||
restore_record(table,1); // Get saved record
|
||||
}
|
||||
|
||||
store_table_rights=get_rights_for_table(rights);
|
||||
store_col_rights=get_rights_for_column(kolone);
|
||||
if (ima)
|
||||
if (old_row_exists)
|
||||
{
|
||||
uint j,k;
|
||||
store_record(table,1);
|
||||
|
@ -1536,7 +1569,7 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
|
|||
rights=fix_rights_for_table(store_table_rights);
|
||||
kolone=fix_rights_for_column(store_col_rights);
|
||||
|
||||
if (ima) // there is a row, therefore go update, else insert
|
||||
if (old_row_exists)
|
||||
{
|
||||
if (store_table_rights || store_col_rights)
|
||||
{
|
||||
|
@ -1668,10 +1701,12 @@ int mysql_table_grant (THD *thd, TABLE_LIST *table_list,
|
|||
continue;
|
||||
}
|
||||
/* Create user if needed */
|
||||
if ((replace_user_table(tables[0].table,
|
||||
if (replace_user_table(tables[0].table,
|
||||
*Str,
|
||||
0,
|
||||
revoke_grant ? 'N' : 'Y')))
|
||||
revoke_grant ? 'N' : 'Y',
|
||||
(revoke_grant ? 0 :
|
||||
test_if_create_new_users(thd))))
|
||||
{
|
||||
result= -1; // Remember error
|
||||
continue; // Add next user
|
||||
|
@ -1773,6 +1808,7 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list, uint rights,
|
|||
List_iterator <LEX_USER> str_list (list);
|
||||
LEX_USER *Str;
|
||||
char what;
|
||||
bool create_new_users=0;
|
||||
TABLE_LIST tables[2];
|
||||
DBUG_ENTER("mysql_grant");
|
||||
|
||||
|
@ -1799,8 +1835,10 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list, uint rights,
|
|||
DBUG_RETURN(-1); /* purecov: deadcode */
|
||||
}
|
||||
|
||||
// go through users in user_list
|
||||
if (!revoke_grant)
|
||||
create_new_users= test_if_create_new_users(thd);
|
||||
|
||||
// go through users in user_list
|
||||
pthread_mutex_lock(&LOCK_grant);
|
||||
VOID(pthread_mutex_lock(&acl_cache->lock));
|
||||
grant_version++;
|
||||
|
@ -1822,11 +1860,14 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list, uint rights,
|
|||
}
|
||||
if ((replace_user_table(tables[0].table,
|
||||
*Str,
|
||||
(!db ? rights : 0), what)))
|
||||
result= -1;
|
||||
if (db && replace_db_table(tables[1].table, db, *Str, rights & DB_ACLS,
|
||||
what))
|
||||
(!db ? rights : 0), what, create_new_users)))
|
||||
result= -1;
|
||||
else
|
||||
{
|
||||
if (db && replace_db_table(tables[1].table, db, *Str, rights & DB_ACLS,
|
||||
what))
|
||||
result= -1;
|
||||
}
|
||||
}
|
||||
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
||||
pthread_mutex_unlock(&LOCK_grant);
|
||||
|
@ -1978,7 +2019,7 @@ void grant_reload(void)
|
|||
****************************************************************************/
|
||||
|
||||
bool check_grant(THD *thd, uint want_access, TABLE_LIST *tables,
|
||||
uint show_table)
|
||||
uint show_table, bool no_errors)
|
||||
{
|
||||
TABLE_LIST *table;
|
||||
char *user = thd->priv_user;
|
||||
|
@ -2026,7 +2067,7 @@ bool check_grant(THD *thd, uint want_access, TABLE_LIST *tables,
|
|||
|
||||
err:
|
||||
pthread_mutex_unlock(&LOCK_grant);
|
||||
if (show_table != 1) // Not a silent skip of table
|
||||
if (!no_errors) // Not a silent skip of table
|
||||
{
|
||||
const char *command="";
|
||||
if (want_access & SELECT_ACL)
|
||||
|
|
|
@ -74,7 +74,7 @@ int grant_init(void);
|
|||
void grant_free(void);
|
||||
void grant_reload(void);
|
||||
bool check_grant(THD *thd, uint want_access, TABLE_LIST *tables,
|
||||
uint show_command=0);
|
||||
uint show_command=0, bool dont_print_error=0);
|
||||
bool check_grant_column (THD *thd,TABLE *table, const char *name,uint length,
|
||||
uint show_command=0);
|
||||
bool check_grant_all_columns(THD *thd, uint want_access, TABLE *table);
|
||||
|
|
|
@ -133,7 +133,7 @@ int list_open_tables(THD *thd,List<char> *tables, const char *db,
|
|||
table_list.db= (char*) db;
|
||||
table_list.real_name= entry->real_name;/*real name*/
|
||||
table_list.grant.privilege=col_access;
|
||||
if (check_grant(thd,TABLE_ACLS,&table_list,1))
|
||||
if (check_grant(thd,TABLE_ACLS,&table_list,1,1))
|
||||
continue;
|
||||
}
|
||||
/* need to check if he have't already listed it */
|
||||
|
|
|
@ -27,8 +27,15 @@ class Sql_alloc
|
|||
public:
|
||||
static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); }
|
||||
static void operator delete(void *ptr, size_t size) {} /*lint -e715 */
|
||||
inline Sql_alloc() {};
|
||||
inline ~Sql_alloc() {};
|
||||
#ifdef HAVE_purify
|
||||
bool dummy;
|
||||
inline Sql_alloc() :dummy(0) {}
|
||||
inline ~Sql_alloc() {}
|
||||
#else
|
||||
inline Sql_alloc() {}
|
||||
inline ~Sql_alloc() {}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -36,7 +36,6 @@ extern "C" int gethostname(char *name, int namelen);
|
|||
static int check_for_max_user_connections(const char *user, int u_length,
|
||||
const char *host);
|
||||
static void decrease_user_connections(const char *user, const char *host);
|
||||
static bool check_table_access(THD *thd,uint want_access, TABLE_LIST *tables);
|
||||
static bool check_db_used(THD *thd,TABLE_LIST *tables);
|
||||
static bool check_merge_table_access(THD *thd, char *db, TABLE_LIST *tables);
|
||||
static bool check_dup(THD *thd,const char *db,const char *name,
|
||||
|
@ -1956,7 +1955,7 @@ mysql_execute_command(void)
|
|||
else
|
||||
res = mysql_grant(thd, lex->db, lex->users_list, lex->grant,
|
||||
lex->sql_command == SQLCOM_REVOKE);
|
||||
if(!res)
|
||||
if (!res)
|
||||
{
|
||||
mysql_update_log.write(thd, thd->query,thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
|
@ -2116,7 +2115,7 @@ bool check_process_priv(THD *thd)
|
|||
** in the table list for GRANT checking
|
||||
*/
|
||||
|
||||
static bool
|
||||
bool
|
||||
check_table_access(THD *thd,uint want_access,TABLE_LIST *tables)
|
||||
{
|
||||
uint found=0,found_access=0;
|
||||
|
|
|
@ -1368,24 +1368,27 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
|||
|
||||
if (cond->type() == Item::FUNC_ITEM)
|
||||
{
|
||||
Item_func *func=(Item_func *)cond,
|
||||
*arg0=(Item_func *)(func->arguments()[0]),
|
||||
*arg1=(Item_func *)(func->arguments()[1]);
|
||||
|
||||
if (func->functype() == Item_func::FT_FUNC)
|
||||
Item_func *func=(Item_func *)cond;
|
||||
Item_func::Functype functype= func->functype();
|
||||
if (functype == Item_func::FT_FUNC)
|
||||
cond_func=(Item_func_match *)cond;
|
||||
else if ((func->functype() == Item_func::GE_FUNC ||
|
||||
func->functype() == Item_func::GT_FUNC) &&
|
||||
arg0->type() == Item::FUNC_ITEM &&
|
||||
arg0->functype() == Item_func::FT_FUNC &&
|
||||
arg1->const_item() && arg1->val()>=0)
|
||||
cond_func=(Item_func_match *)arg0;
|
||||
else if ((func->functype() == Item_func::LE_FUNC ||
|
||||
func->functype() == Item_func::LT_FUNC) &&
|
||||
arg1->type() == Item::FUNC_ITEM &&
|
||||
arg1->functype() == Item_func::FT_FUNC &&
|
||||
arg0->const_item() && arg0->val()>=0)
|
||||
cond_func=(Item_func_match *)arg1;
|
||||
else if (func->arg_count == 2)
|
||||
{
|
||||
Item_func *arg0=(Item_func *)(func->arguments()[0]),
|
||||
*arg1=(Item_func *)(func->arguments()[1]);
|
||||
if ((functype == Item_func::GE_FUNC ||
|
||||
functype == Item_func::GT_FUNC) &&
|
||||
arg0->type() == Item::FUNC_ITEM &&
|
||||
arg0->functype() == Item_func::FT_FUNC &&
|
||||
arg1->const_item() && arg1->val()>=0)
|
||||
cond_func=(Item_func_match *) arg0;
|
||||
else if ((functype == Item_func::LE_FUNC ||
|
||||
functype == Item_func::LT_FUNC) &&
|
||||
arg1->type() == Item::FUNC_ITEM &&
|
||||
arg1->functype() == Item_func::FT_FUNC &&
|
||||
arg0->const_item() && arg0->val()>=0)
|
||||
cond_func=(Item_func_match *) arg1;
|
||||
}
|
||||
}
|
||||
else if (cond->type() == Item::COND_ITEM)
|
||||
{
|
||||
|
@ -1394,18 +1397,21 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
|||
if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
|
||||
{
|
||||
Item *item;
|
||||
/* I'm too lazy to implement proper recursive descent here,
|
||||
/*
|
||||
I', (Sergei) too lazy to implement proper recursive descent here,
|
||||
and anyway, nobody will use such a stupid queries
|
||||
that will require it :-)
|
||||
May be later...
|
||||
*/
|
||||
*/
|
||||
while ((item=li++))
|
||||
{
|
||||
if (item->type() == Item::FUNC_ITEM &&
|
||||
((Item_func *)item)->functype() == Item_func::FT_FUNC)
|
||||
{
|
||||
cond_func=(Item_func_match *)item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
|
|||
table_list.db= (char*) db;
|
||||
table_list.real_name=file->name;
|
||||
table_list.grant.privilege=col_access;
|
||||
if (check_grant(thd,TABLE_ACLS,&table_list,1))
|
||||
if (check_grant(thd,TABLE_ACLS,&table_list,1,1))
|
||||
continue;
|
||||
}
|
||||
if (files->push_back(thd->strdup(file->name)))
|
||||
|
|
|
@ -59,9 +59,9 @@ int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists)
|
|||
VOID(pthread_mutex_lock(&LOCK_open));
|
||||
pthread_mutex_unlock(&thd->mysys_var->mutex);
|
||||
|
||||
if(global_read_lock)
|
||||
if (global_read_lock)
|
||||
{
|
||||
if(thd->global_read_lock)
|
||||
if (thd->global_read_lock)
|
||||
{
|
||||
my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE,MYF(0),
|
||||
tables->real_name);
|
||||
|
@ -1126,7 +1126,12 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||
strmov(new_name_buff,new_name);
|
||||
fn_same(new_name_buff,table_name,3);
|
||||
#ifdef FN_LOWER_CASE
|
||||
if (!my_strcasecmp(new_name_buff,table_name))// Check if name changed
|
||||
if (lower_case_table_names)
|
||||
casedn_str(new_name);
|
||||
if ((lower_case_table_names &&
|
||||
!my_strcasecmp(new_name_buff,table_name)) ||
|
||||
(!lower_case_table_names &&
|
||||
!strcmp(new_name_buff,table_name)))
|
||||
#else
|
||||
if (!strcmp(new_name_buff,table_name)) // Check if name changed
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue