merge
This commit is contained in:
commit
24a40d0b77
@ -3115,3 +3115,4 @@ libmysqld/mysqlserver_depends.c
|
|||||||
libmysqld/examples/mysql_embedded
|
libmysqld/examples/mysql_embedded
|
||||||
sql/.empty
|
sql/.empty
|
||||||
mysys/thr_lock
|
mysys/thr_lock
|
||||||
|
VERSION.dep
|
||||||
|
@ -42,9 +42,7 @@ cat <<EOF
|
|||||||
Options used with this script always override any default behaviour.
|
Options used with this script always override any default behaviour.
|
||||||
The default package is MySQL Cluster Carrier Grade (standard) Edition.
|
The default package is MySQL Cluster Carrier Grade (standard) Edition.
|
||||||
For developers, the default package is MySQL Cluster Carrier Grade
|
For developers, the default package is MySQL Cluster Carrier Grade
|
||||||
Extended Edition, and the default build behaviour is to build with
|
Extended Edition.
|
||||||
autotools. If you want to skip autotools and start from a source code
|
|
||||||
release you can use the --no-autotools flag.
|
|
||||||
|
|
||||||
More information for developers can be found in --help,
|
More information for developers can be found in --help,
|
||||||
--sysadmin-help, and --extended-help.
|
--sysadmin-help, and --extended-help.
|
||||||
@ -102,7 +100,8 @@ cat <<EOF
|
|||||||
If your building on a Solaris SPARC machine and you want to compile
|
If your building on a Solaris SPARC machine and you want to compile
|
||||||
using SunStudio you must set
|
using SunStudio you must set
|
||||||
--compiler=forte; if you want to build using the Intel compiler on
|
--compiler=forte; if you want to build using the Intel compiler on
|
||||||
Linux, you need to set --compiler=icc.
|
Linux, you need to set --compiler=icc. If you want to use the AMD
|
||||||
|
compiler Open64 set --compiler=open64.
|
||||||
|
|
||||||
A synonym for forte is SunStudio, so one can also use
|
A synonym for forte is SunStudio, so one can also use
|
||||||
--compiler=SunStudio.
|
--compiler=SunStudio.
|
||||||
@ -150,14 +149,32 @@ Usage: $0 [options]
|
|||||||
--without-debug Build non-debug version
|
--without-debug Build non-debug version
|
||||||
--use-comment Set the comment in the build
|
--use-comment Set the comment in the build
|
||||||
--with-fast-mutexes Use try/retry method of acquiring mutex
|
--with-fast-mutexes Use try/retry method of acquiring mutex
|
||||||
|
--without-fast-mutexes Don't use try/retry method of acquiring mutex
|
||||||
|
--without-perfschema Don't build with performance schema
|
||||||
|
--generate-feedback path Compile with feedback using the specified directory
|
||||||
|
to store the feedback files
|
||||||
|
--use-feedback path Compile using feedback information from the specified
|
||||||
|
directory
|
||||||
--with-debug Build debug version
|
--with-debug Build debug version
|
||||||
|
--extra-debug-flag flag Add -Dflag to compiler flags
|
||||||
|
InnoDB supports the following debug flags,
|
||||||
|
UNIV_DEBUG, UNIV_SYNC_DEBUG, UNIV_MEM_DEBUG,
|
||||||
|
UNIV_DEBUG_THREAD_CREATION, UNIV_DEBUG_LOCK_VALIDATE,
|
||||||
|
UNIV_DEBUG_PRINT, UNIV_DEBUG_FILE_ACCESS,
|
||||||
|
UNIV_LIGHT_MEM_DEBUG, UNIV_LOG_DEBUG,
|
||||||
|
UNIV_IBUF_COUNT_DEBUG, UNIV_SEARCH_DEBUG,
|
||||||
|
UNIV_LOG_LSN_DEBUG, UNIV_ZIP_DEBUG, UNIV_AHI_DEBUG,
|
||||||
|
UNIV_DEBUG_VALGRIND, UNIV_SQL_DEBUG, UNIV_AIO_DEBUG,
|
||||||
|
UNIV_BTR_DEBUG, UNIV_LRU_DEBUG, UNIV_BUF_DEBUG,
|
||||||
|
UNIV_HASH_DEBUG, UNIV_LIST_DEBUG, UNIV_IBUF_DEBUG
|
||||||
--with-link-time-optimizer
|
--with-link-time-optimizer
|
||||||
Link time optimizations enabled (Requires GCC 4.5
|
Link time optimizations enabled (Requires GCC 4.5
|
||||||
if GCC used), available for icc as well. This flag
|
if GCC used), available for icc as well. This flag
|
||||||
is only considered if also fast is set.
|
is only considered if also fast is set.
|
||||||
|
--with-mso Special flag used by Open64 compiler (requres at
|
||||||
|
least version 4.2.3) that enables optimisations
|
||||||
|
for multi-core scalability.
|
||||||
--configure-only Stop after running configure.
|
--configure-only Stop after running configure.
|
||||||
--use-autotools Start by running autoconf, automake,.. tools
|
|
||||||
--no-autotools Start from configure
|
|
||||||
--print-only Print commands that the script will execute,
|
--print-only Print commands that the script will execute,
|
||||||
but do not actually execute
|
but do not actually execute
|
||||||
--prefix=path Build with prefix 'path'
|
--prefix=path Build with prefix 'path'
|
||||||
@ -170,7 +187,7 @@ Usage: $0 [options]
|
|||||||
MySQL use
|
MySQL use
|
||||||
--commercial Use commercial libraries
|
--commercial Use commercial libraries
|
||||||
--gpl Use gpl libraries
|
--gpl Use gpl libraries
|
||||||
--compiler=[gcc|icc|forte|SunStudio] Select compiler
|
--compiler=[gcc|icc|forte|SunStudio|open64] Select compiler
|
||||||
--cpu=[x86|x86_64|sparc|itanium] Select CPU type
|
--cpu=[x86|x86_64|sparc|itanium] Select CPU type
|
||||||
x86 => x86 and 32-bit binary
|
x86 => x86 and 32-bit binary
|
||||||
x86_64 => x86 and 64 bit binary
|
x86_64 => x86 and 64 bit binary
|
||||||
@ -389,7 +406,8 @@ extended_usage()
|
|||||||
platforms supported by this script.
|
platforms supported by this script.
|
||||||
|
|
||||||
The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
|
The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
|
||||||
support for Nocona, K8, and other processors).
|
support for Nocona, K8, and other processors), this option is valid
|
||||||
|
when gcc is the compiler.
|
||||||
|
|
||||||
Use of the --debug option adds -g to the C/C++ flags.
|
Use of the --debug option adds -g to the C/C++ flags.
|
||||||
|
|
||||||
@ -397,10 +415,35 @@ extended_usage()
|
|||||||
by calling the script as follows:
|
by calling the script as follows:
|
||||||
CC="/usr/local/bin/gcc" CXX="/usr/local/bin/gcc" BUILD/build_mccge.sh
|
CC="/usr/local/bin/gcc" CXX="/usr/local/bin/gcc" BUILD/build_mccge.sh
|
||||||
|
|
||||||
FreeBSD/x86/gcc
|
Feedback profiler on gcc
|
||||||
---------------
|
------------------------
|
||||||
No flags are used. Instead, configure determines the proper flags to
|
Using gcc --generate-feedback=path causes the following flags to be added
|
||||||
use.
|
to the compiler flags.
|
||||||
|
|
||||||
|
--fprofile-generate
|
||||||
|
--fprofile-dir=path
|
||||||
|
|
||||||
|
Using gcc with --use-feedback=path causes the following flags to be added
|
||||||
|
to the compiler flags. --fprofile-correction indicates MySQL is a multi-
|
||||||
|
threaded application and thus counters can be inconsistent with each other
|
||||||
|
and the compiler should take this into account.
|
||||||
|
|
||||||
|
--fprofile-use
|
||||||
|
--fprofile-dir=path
|
||||||
|
--fprofile-correction
|
||||||
|
|
||||||
|
Feedback compilation using Open64
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
Using Open64 with --generate-feedback=path causes the following flags to
|
||||||
|
be added to the compiler flags.
|
||||||
|
|
||||||
|
-fb-create path/feedback
|
||||||
|
|
||||||
|
Using Open64 with --use-feedback=path causes the following flags to be
|
||||||
|
added to the compiler flags.
|
||||||
|
|
||||||
|
--fb-opt path/feedback
|
||||||
|
|
||||||
Linux/x86+Itanium/gcc
|
Linux/x86+Itanium/gcc
|
||||||
-------------
|
-------------
|
||||||
@ -410,6 +453,9 @@ extended_usage()
|
|||||||
added to the C/C++ flags. (To build a 32-bit binary on a 64-bit CPU,
|
added to the C/C++ flags. (To build a 32-bit binary on a 64-bit CPU,
|
||||||
use the --32 option as described previously.)
|
use the --32 option as described previously.)
|
||||||
|
|
||||||
|
When gcc 4.5 is used and the user set --with-link-time-optimizer then
|
||||||
|
also --flto is added to compiler flags and linker flags.
|
||||||
|
|
||||||
Linux/x86+Itanium/icc
|
Linux/x86+Itanium/icc
|
||||||
-------------
|
-------------
|
||||||
Flags used:
|
Flags used:
|
||||||
@ -433,6 +479,19 @@ extended_usage()
|
|||||||
added to the C/C++ flags; this provides optimisations specific to Core
|
added to the C/C++ flags; this provides optimisations specific to Core
|
||||||
2 Duo. This is added only when the --fast flag is set.
|
2 Duo. This is added only when the --fast flag is set.
|
||||||
|
|
||||||
|
Linux/x86/Open64
|
||||||
|
----------------
|
||||||
|
For normal builds use -O3, when fast flag is set one also adds
|
||||||
|
--march=auto to generate optimized builds for the CPU used. If
|
||||||
|
--with-link-time-optimizer is set also -ipa is set. There is also
|
||||||
|
a special flag --with-mso which can be set to get --mso set which
|
||||||
|
activates optimisation for multi-core scalability.
|
||||||
|
|
||||||
|
FreeBSD/x86/gcc
|
||||||
|
---------------
|
||||||
|
No flags are used. Instead, configure determines the proper flags to
|
||||||
|
use.
|
||||||
|
|
||||||
Solaris/x86/gcc
|
Solaris/x86/gcc
|
||||||
---------------
|
---------------
|
||||||
All builds on Solaris are by default 64-bit, so -m64 is always used in
|
All builds on Solaris are by default 64-bit, so -m64 is always used in
|
||||||
@ -653,6 +712,9 @@ parse_compiler()
|
|||||||
forte | SunStudio | sunstudio )
|
forte | SunStudio | sunstudio )
|
||||||
compiler="forte"
|
compiler="forte"
|
||||||
;;
|
;;
|
||||||
|
open64 | Open64 )
|
||||||
|
compiler="open64"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown compiler '$compiler'"
|
echo "Unknown compiler '$compiler'"
|
||||||
exit 1
|
exit 1
|
||||||
@ -686,6 +748,15 @@ parse_options()
|
|||||||
--with-fast-mutexes)
|
--with-fast-mutexes)
|
||||||
with_fast_mutexes="yes"
|
with_fast_mutexes="yes"
|
||||||
;;
|
;;
|
||||||
|
--without-fast-mutexes)
|
||||||
|
with_fast_mutexes="no"
|
||||||
|
;;
|
||||||
|
--without-perfschema)
|
||||||
|
with_perfschema="no"
|
||||||
|
;;
|
||||||
|
--with-mso)
|
||||||
|
with_mso="yes"
|
||||||
|
;;
|
||||||
--use-tcmalloc)
|
--use-tcmalloc)
|
||||||
use_tcmalloc="yes"
|
use_tcmalloc="yes"
|
||||||
;;
|
;;
|
||||||
@ -693,6 +764,10 @@ parse_options()
|
|||||||
with_debug_flag="yes"
|
with_debug_flag="yes"
|
||||||
fast_flag="no"
|
fast_flag="no"
|
||||||
;;
|
;;
|
||||||
|
--extra-debug-flag)
|
||||||
|
shift
|
||||||
|
extra_debug_flags="$extra_debug_flags -D$1"
|
||||||
|
;;
|
||||||
--debug)
|
--debug)
|
||||||
compile_debug_flag="yes"
|
compile_debug_flag="yes"
|
||||||
;;
|
;;
|
||||||
@ -712,6 +787,14 @@ parse_options()
|
|||||||
compiler=`get_key_value "$1"`
|
compiler=`get_key_value "$1"`
|
||||||
parse_compiler
|
parse_compiler
|
||||||
;;
|
;;
|
||||||
|
--generate-feedback)
|
||||||
|
shift
|
||||||
|
GENERATE_FEEDBACK_PATH="$1"
|
||||||
|
;;
|
||||||
|
--use-feedback)
|
||||||
|
shift
|
||||||
|
USE_FEEDBACK_PATH="$1"
|
||||||
|
;;
|
||||||
--cpu=*)
|
--cpu=*)
|
||||||
cpu_type=`get_key_value "$1"`
|
cpu_type=`get_key_value "$1"`
|
||||||
parse_cpu_type
|
parse_cpu_type
|
||||||
@ -746,12 +829,6 @@ parse_options()
|
|||||||
--parallelism=*)
|
--parallelism=*)
|
||||||
parallelism=`get_key_value "$1"`
|
parallelism=`get_key_value "$1"`
|
||||||
;;
|
;;
|
||||||
--use-autotools)
|
|
||||||
use_autotools="yes"
|
|
||||||
;;
|
|
||||||
--no-autotools)
|
|
||||||
use_autotools="no"
|
|
||||||
;;
|
|
||||||
--configure-only)
|
--configure-only)
|
||||||
just_configure="yes"
|
just_configure="yes"
|
||||||
;;
|
;;
|
||||||
@ -896,6 +973,9 @@ set_cpu_base()
|
|||||||
#
|
#
|
||||||
init_configure_commands()
|
init_configure_commands()
|
||||||
{
|
{
|
||||||
|
path=`dirname $0`
|
||||||
|
cp $path/cmake_configure.sh $path/../configure
|
||||||
|
chmod +x $path/../configure
|
||||||
cflags="$c_warnings $base_cflags $compiler_flags"
|
cflags="$c_warnings $base_cflags $compiler_flags"
|
||||||
cxxflags="$cxx_warnings $base_cxxflags $compiler_flags"
|
cxxflags="$cxx_warnings $base_cxxflags $compiler_flags"
|
||||||
configure="./configure $base_configs $with_flags"
|
configure="./configure $base_configs $with_flags"
|
||||||
@ -1084,6 +1164,7 @@ set_with_debug_flags()
|
|||||||
loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
|
loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
|
||||||
compiler_flags="$compiler_flags $loc_debug_flags"
|
compiler_flags="$compiler_flags $loc_debug_flags"
|
||||||
fi
|
fi
|
||||||
|
compiler_flags="$compiler_flags $extra_debug_flags"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1105,7 +1186,7 @@ set_no_omit_frame_pointer_for_developers()
|
|||||||
#
|
#
|
||||||
set_debug_flag()
|
set_debug_flag()
|
||||||
{
|
{
|
||||||
if test "x$compile_debug_flags" = "xyes" ; then
|
if test "x$compile_debug_flag" = "xyes" ; then
|
||||||
compiler_flags="$compiler_flags -g"
|
compiler_flags="$compiler_flags -g"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -1152,7 +1233,9 @@ set_base_configs()
|
|||||||
fi
|
fi
|
||||||
base_configs="$base_configs --with-pic"
|
base_configs="$base_configs --with-pic"
|
||||||
base_configs="$base_configs --with-csv-storage-engine"
|
base_configs="$base_configs --with-csv-storage-engine"
|
||||||
base_configs="$base_configs --with-perfschema"
|
if test "x$with_perfschema" != "xno" ; then
|
||||||
|
base_configs="$base_configs --with-perfschema"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1251,6 +1334,19 @@ set_gcc_special_options()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# If we discover a Core 2 Duo architecture and we have enabled the fast
|
||||||
|
# flag, we enable a compile especially optimised for Core 2 Duo. This
|
||||||
|
# feature is currently available on Intel's icc compiler only.
|
||||||
|
#
|
||||||
|
set_icc_special_options()
|
||||||
|
{
|
||||||
|
if test "x$fast_flag" = "xyes" && test "x$cpu_arg" = "xcore2" && \
|
||||||
|
test "x$compiler" = "xicc" ; then
|
||||||
|
compiler_flags="$compiler_flags -xT"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
set_cc_and_cxx_for_gcc()
|
set_cc_and_cxx_for_gcc()
|
||||||
{
|
{
|
||||||
if test "x$CC" = "x" ; then
|
if test "x$CC" = "x" ; then
|
||||||
@ -1271,6 +1367,16 @@ set_cc_and_cxx_for_icc()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_cc_and_cxx_for_open64()
|
||||||
|
{
|
||||||
|
if test "x$CC" = "x" ; then
|
||||||
|
CC="opencc -static-libgcc -fno-exceptions"
|
||||||
|
fi
|
||||||
|
if test "x$CXX" = "x" ; then
|
||||||
|
CXX="openCC -static-libgcc -fno-exceptions"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
set_cc_and_cxx_for_forte()
|
set_cc_and_cxx_for_forte()
|
||||||
{
|
{
|
||||||
if test "x$CC" = "x" ; then
|
if test "x$CC" = "x" ; then
|
||||||
@ -1281,19 +1387,6 @@ set_cc_and_cxx_for_forte()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# If we discover a Core 2 Duo architecture and we have enabled the fast
|
|
||||||
# flag, we enable a compile especially optimised for Core 2 Duo. This
|
|
||||||
# feature is currently available on Intel's icc compiler only.
|
|
||||||
#
|
|
||||||
set_icc_special_options()
|
|
||||||
{
|
|
||||||
if test "x$fast_flag" = "xyes" && test "x$cpu_arg" = "xcore2" && \
|
|
||||||
test "x$compiler" = "xicc" ; then
|
|
||||||
compiler_flags="$compiler_flags -xT"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# FreeBSD Section
|
# FreeBSD Section
|
||||||
#
|
#
|
||||||
@ -1357,12 +1450,45 @@ get_gcc_version()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Link time optimizer (interprocedural optimizations) for Open64
|
||||||
|
#
|
||||||
|
check_for_open64_link_time_optimizer()
|
||||||
|
{
|
||||||
|
if test "x$with_link_time_optimizer" = "xyes" ; then
|
||||||
|
compiler_flags="$compiler_flags -ipa"
|
||||||
|
LDFLAGS="$LDFLAGS -ipa"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Link time optimizer (interprocedural optimizations) for icc
|
||||||
|
#
|
||||||
|
check_for_icc_link_time_optimizer()
|
||||||
|
{
|
||||||
|
if test "x$with_link_time_optimizer" = "xyes" ; then
|
||||||
|
compiler_flags="$compiler_flags -ipo"
|
||||||
|
LDFLAGS="$LDFLAGS -ipo"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Link time optimizer (interprocedural optimizations) for forte
|
||||||
|
#
|
||||||
|
check_for_forte_link_time_optimizer()
|
||||||
|
{
|
||||||
|
if test "x$with_link_time_optimizer" = "xyes" ; then
|
||||||
|
compiler_flags="$compiler_flags -ipo"
|
||||||
|
LDFLAGS="$LDFLAGS -ipo"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Link Time Optimizer in GCC (LTO) uses a parameter -flto
|
# Link Time Optimizer in GCC (LTO) uses a parameter -flto
|
||||||
# which was added to GCC 4.5, if --with-link-time-optimizer
|
# which was added to GCC 4.5, if --with-link-time-optimizer
|
||||||
# is set then use this feature
|
# is set then use this feature
|
||||||
#
|
#
|
||||||
check_for_link_time_optimizer()
|
check_for_gcc_link_time_optimizer()
|
||||||
{
|
{
|
||||||
get_gcc_version
|
get_gcc_version
|
||||||
if test "$gcc_version" -ge 405 && \
|
if test "$gcc_version" -ge 405 && \
|
||||||
@ -1371,11 +1497,37 @@ check_for_link_time_optimizer()
|
|||||||
LDFLAGS="$LDFLAGS -flto"
|
LDFLAGS="$LDFLAGS -flto"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_feedback_for_gcc()
|
||||||
|
{
|
||||||
|
if test "x$GENERATE_FEEDBACK_PATH" != "x" ; then
|
||||||
|
compiler_flags="$compiler_flags -fprofile-generate"
|
||||||
|
compiler_flags="$compiler_flags -fprofile-dir=$GENERATE_FEEDBACK_PATH"
|
||||||
|
elif test "x$USE_FEEDBACK_PATH" != "x" ; then
|
||||||
|
compiler_flags="$compiler_flags -fprofile-use"
|
||||||
|
compiler_flags="$compiler_flags -fprofile-correction"
|
||||||
|
compiler_flags="$compiler_flags -fprofile-dir=$USE_FEEDBACK_PATH"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
set_feedback_for_open64()
|
||||||
|
{
|
||||||
|
if test "x$GENERATE_FEEDBACK_PATH" != "x" ; then
|
||||||
|
compiler_flags="$compiler_flags --fb-create=$GENERATE_FEEDBACK_PATH/feedback"
|
||||||
|
elif test "x$USE_FEEDBACK_PATH" != "x" ; then
|
||||||
|
compiler_flags="$compiler_flags --fb-opt=$USE_FEEDBACK_PATH/feedback"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Linux Section
|
# Linux Section
|
||||||
#
|
#
|
||||||
set_linux_configs()
|
set_linux_configs()
|
||||||
{
|
{
|
||||||
|
# Default to use --with-fast-mutexes on Linux
|
||||||
|
if test "x$with_fast_mutexes" = "x" ; then
|
||||||
|
base_configs="$base_configs --with-fast-mutexes"
|
||||||
|
fi
|
||||||
if test "x$cpu_base_type" != "xx86" && \
|
if test "x$cpu_base_type" != "xx86" && \
|
||||||
test "x$cpu_base_type" != "xitanium" ; then
|
test "x$cpu_base_type" != "xitanium" ; then
|
||||||
usage "Only x86 and Itanium CPUs supported for Linux"
|
usage "Only x86 and Itanium CPUs supported for Linux"
|
||||||
@ -1392,19 +1544,14 @@ set_linux_configs()
|
|||||||
if test "x$fast_flag" != "xno" ; then
|
if test "x$fast_flag" != "xno" ; then
|
||||||
if test "x$fast_flag" = "xyes" ; then
|
if test "x$fast_flag" = "xyes" ; then
|
||||||
compiler_flags="$compiler_flags -O3"
|
compiler_flags="$compiler_flags -O3"
|
||||||
check_for_link_time_optimizer
|
check_for_gcc_link_time_optimizer
|
||||||
else
|
else
|
||||||
compiler_flags="$compiler_flags -O2"
|
compiler_flags="$compiler_flags -O3"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
compiler_flags="$compiler_flags -O0"
|
compiler_flags="$compiler_flags -O0"
|
||||||
fi
|
fi
|
||||||
check_64_bits
|
set_feedback_for_gcc
|
||||||
if test "x$m64" = "xyes" ; then
|
|
||||||
compiler_flags="$compiler_flags -m64"
|
|
||||||
else
|
|
||||||
compiler_flags="$compiler_flags -m32"
|
|
||||||
fi
|
|
||||||
# configure will set proper compiler flags for gcc on Linux
|
# configure will set proper compiler flags for gcc on Linux
|
||||||
elif test "x$compiler" = "xicc" ; then
|
elif test "x$compiler" = "xicc" ; then
|
||||||
compiler_flags="$compiler_flags -mp -restrict"
|
compiler_flags="$compiler_flags -mp -restrict"
|
||||||
@ -1414,16 +1561,36 @@ set_linux_configs()
|
|||||||
fi
|
fi
|
||||||
if test "x$fast_flag" != "xno" ; then
|
if test "x$fast_flag" != "xno" ; then
|
||||||
compiler_flags="$compiler_flags -O3 -unroll2 -ip"
|
compiler_flags="$compiler_flags -O3 -unroll2 -ip"
|
||||||
if test "x$fast_flag" = "xyes" && \
|
if test "x$fast_flag" = "xyes" ; then
|
||||||
test "x$with_link_time_optimizer" = "xyes" ; then
|
check_for_icc_link_time_optimizer
|
||||||
compiler_flags="$compiler_flags -ipo"
|
|
||||||
LDFLAGS="$LDFLAGS -ipo"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
elif test "x$compiler" = "xopen64" ; then
|
||||||
|
set_cc_and_cxx_for_open64
|
||||||
|
if test "x$fast_flag" != "xno" ; then
|
||||||
|
if test "x$fast_flag" = "xyes" ; then
|
||||||
|
compiler_flags="$compiler_flags -O3"
|
||||||
|
# Generate code specific for the machine you run on
|
||||||
|
compiler_flags="$compiler_flags -march=auto"
|
||||||
|
check_for_open64_link_time_optimizer
|
||||||
|
if test "x$with_mso" = "xyes" ; then
|
||||||
|
compiler_flags="$compiler_flags -mso"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
compiler_flags="$compiler_flags -O3"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
set_feedback_for_open64
|
||||||
else
|
else
|
||||||
usage "Only gcc and icc compilers supported for Linux"
|
usage "Only gcc,icc and Open64 compilers supported for Linux"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
check_64_bits
|
||||||
|
if test "x$m64" = "xyes" ; then
|
||||||
|
compiler_flags="$compiler_flags -m64"
|
||||||
|
else
|
||||||
|
compiler_flags="$compiler_flags -m32"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1475,7 +1642,7 @@ set_solaris_configs()
|
|||||||
if test "x$fast_flag" = "xyes" ; then
|
if test "x$fast_flag" = "xyes" ; then
|
||||||
LDFLAGS="$LDFLAGS -O3"
|
LDFLAGS="$LDFLAGS -O3"
|
||||||
compiler_flags="$compiler_flags -O3"
|
compiler_flags="$compiler_flags -O3"
|
||||||
check_for_link_time_optimizer
|
check_for_gcc_link_time_optimizer
|
||||||
else
|
else
|
||||||
if test "x$fast_flag" = "xgeneric" ; then
|
if test "x$fast_flag" = "xgeneric" ; then
|
||||||
LDFLAGS="$LDFLAGS -O2"
|
LDFLAGS="$LDFLAGS -O2"
|
||||||
@ -1498,10 +1665,7 @@ set_solaris_configs()
|
|||||||
if test "x$fast_flag" = "xyes" ; then
|
if test "x$fast_flag" = "xyes" ; then
|
||||||
compiler_flags="$compiler_flags -xtarget=native"
|
compiler_flags="$compiler_flags -xtarget=native"
|
||||||
compiler_flags="$compiler_flags -xunroll=3"
|
compiler_flags="$compiler_flags -xunroll=3"
|
||||||
if test "x$with_link_time_optimizer" = "xyes" ; then
|
check_for_forte_link_time_optimizer
|
||||||
compiler_flags="$compiler_flags -xipo"
|
|
||||||
LDFLAGS="$LDFLAGS -xipo"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
compiler_flags="$compiler_flags -xtarget=generic"
|
compiler_flags="$compiler_flags -xtarget=generic"
|
||||||
fi
|
fi
|
||||||
@ -1612,17 +1776,6 @@ set_default_package()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_autotool_flags()
|
|
||||||
{
|
|
||||||
if test "x$use_autotools" = "x" ; then
|
|
||||||
if test "x$developer_flag" = "xno" ; then
|
|
||||||
use_autotools="no"
|
|
||||||
else
|
|
||||||
use_autotools="yes"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
set_defaults_based_on_environment()
|
set_defaults_based_on_environment()
|
||||||
{
|
{
|
||||||
if test ! -z "$MYSQL_DEVELOPER" ; then
|
if test ! -z "$MYSQL_DEVELOPER" ; then
|
||||||
@ -1674,25 +1827,28 @@ base_cxxflags=
|
|||||||
base_configs=
|
base_configs=
|
||||||
debug_flags=
|
debug_flags=
|
||||||
cxxflags=
|
cxxflags=
|
||||||
|
extra_debug_flags=
|
||||||
m64=
|
m64=
|
||||||
explicit_size_set=
|
explicit_size_set=
|
||||||
datadir=
|
datadir=
|
||||||
commands=
|
commands=
|
||||||
use_autotools=
|
|
||||||
engine_configs=
|
engine_configs=
|
||||||
ASFLAGS=
|
ASFLAGS=
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
use_tcmalloc=
|
use_tcmalloc=
|
||||||
without_comment="yes"
|
without_comment="yes"
|
||||||
with_fast_mutexes=
|
with_fast_mutexes=
|
||||||
|
with_perfschema="yes"
|
||||||
with_link_time_optimizer=
|
with_link_time_optimizer=
|
||||||
|
with_mso=
|
||||||
gcc_version="0"
|
gcc_version="0"
|
||||||
|
generate_feedback_path=
|
||||||
|
use_feedback_path=
|
||||||
|
|
||||||
set_defaults_based_on_environment
|
set_defaults_based_on_environment
|
||||||
|
|
||||||
parse_options "$@"
|
parse_options "$@"
|
||||||
|
|
||||||
set_autotool_flags
|
|
||||||
set_default_package
|
set_default_package
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@ -1793,9 +1949,6 @@ set_ccache_usage
|
|||||||
# Set up commands variable from variables prepared for base
|
# Set up commands variable from variables prepared for base
|
||||||
# configurations, compiler flags, and warnings flags.
|
# configurations, compiler flags, and warnings flags.
|
||||||
#
|
#
|
||||||
if test "x$use_autotools" = "xyes" ; then
|
|
||||||
init_auto_commands
|
|
||||||
fi
|
|
||||||
init_configure_commands
|
init_configure_commands
|
||||||
|
|
||||||
if test "x$just_configure" != "xyes" ; then
|
if test "x$just_configure" != "xyes" ; then
|
||||||
@ -1806,8 +1959,8 @@ fi
|
|||||||
# The commands variable now contains the entire command to be run for
|
# The commands variable now contains the entire command to be run for
|
||||||
# the build; we either execute it, or merely print it out.
|
# the build; we either execute it, or merely print it out.
|
||||||
#
|
#
|
||||||
if test "x$just_print" = "xyes" ; then
|
echo "Running command:"
|
||||||
echo "$commands"
|
echo "$commands"
|
||||||
else
|
if test "x$just_print" != "xyes" ; then
|
||||||
eval "set -x; $commands"
|
eval "set -x; $commands"
|
||||||
fi
|
fi
|
||||||
|
@ -115,30 +115,24 @@ ENDIF()
|
|||||||
# Control aspects of the development environment which are
|
# Control aspects of the development environment which are
|
||||||
# specific to MySQL maintainers and developers.
|
# specific to MySQL maintainers and developers.
|
||||||
#
|
#
|
||||||
INCLUDE (CheckCCompilerFlag)
|
INCLUDE(maintainer)
|
||||||
OPTION(MYSQL_MAINTAINER_MODE "MySQL maintainer-specific development environment" OFF)
|
|
||||||
# Whether the maintainer mode should be enabled.
|
OPTION(MYSQL_MAINTAINER_MODE
|
||||||
|
"MySQL maintainer-specific development environment" OFF)
|
||||||
|
|
||||||
|
# Whether the maintainer mode compiler options should be enabled.
|
||||||
IF(MYSQL_MAINTAINER_MODE)
|
IF(MYSQL_MAINTAINER_MODE)
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||||
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" HAVE_DECLARATION_AFTER_STATEMENT)
|
SET_MYSQL_MAINTAINER_GNU_C_OPTIONS()
|
||||||
IF(HAVE_DECLARATION_AFTER_STATEMENT)
|
|
||||||
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT "-Wdeclaration-after-statement")
|
|
||||||
ENDIF()
|
|
||||||
SET(MY_MAINTAINER_C_WARNINGS
|
|
||||||
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_C_WARNINGS} -Wno-unused-parameter"
|
SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS()
|
||||||
CACHE STRING "C++ warning options used in maintainer builds.")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||||
SET(MY_MAINTAINER_C_WARNINGS
|
SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS()
|
||||||
"${MY_MAINTAINER_C_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
|
|
||||||
CACHE STRING "C warning options used in maintainer builds.")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
# Do not make warnings in checks into errors.
|
IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
|
SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS()
|
||||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -1456,8 +1456,8 @@ static struct my_option my_long_options[] =
|
|||||||
&opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
|
&opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"one-database", 'o',
|
{"one-database", 'o',
|
||||||
"Only update the default database. This is useful for skipping updates "
|
"Ignore statements except those that occur while the default "
|
||||||
"to other database in the update log.",
|
"database is the one named at the command line.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef USE_POPEN
|
#ifdef USE_POPEN
|
||||||
{"pager", OPT_PAGER,
|
{"pager", OPT_PAGER,
|
||||||
@ -2692,6 +2692,10 @@ static void get_current_db()
|
|||||||
{
|
{
|
||||||
MYSQL_RES *res;
|
MYSQL_RES *res;
|
||||||
|
|
||||||
|
/* If one_database is set, current_db is not supposed to change. */
|
||||||
|
if (one_database)
|
||||||
|
return;
|
||||||
|
|
||||||
my_free(current_db);
|
my_free(current_db);
|
||||||
current_db= NULL;
|
current_db= NULL;
|
||||||
/* In case of error below current_db will be NULL */
|
/* In case of error below current_db will be NULL */
|
||||||
|
@ -44,6 +44,7 @@ static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations;
|
|||||||
static uint opt_count_iterations= 0, my_end_arg;
|
static uint opt_count_iterations= 0, my_end_arg;
|
||||||
static ulong opt_connect_timeout, opt_shutdown_timeout;
|
static ulong opt_connect_timeout, opt_shutdown_timeout;
|
||||||
static char * unix_port=0;
|
static char * unix_port=0;
|
||||||
|
static char *opt_plugin_dir= 0, *opt_default_auth;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
static char *shared_memory_base_name=0;
|
static char *shared_memory_base_name=0;
|
||||||
@ -206,6 +207,13 @@ static struct my_option my_long_options[] =
|
|||||||
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout,
|
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout,
|
||||||
&opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
&opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||||
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
|
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
|
||||||
|
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
|
||||||
|
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
|
||||||
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"default_auth", OPT_PLUGIN_DIR,
|
||||||
|
"Default authentication client-side plugin to use.",
|
||||||
|
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
|
||||||
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -342,6 +350,12 @@ int main(int argc,char *argv[])
|
|||||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
error_flags= (myf)(opt_nobeep ? 0 : ME_BELL);
|
error_flags= (myf)(opt_nobeep ? 0 : ME_BELL);
|
||||||
|
|
||||||
|
if (opt_plugin_dir && *opt_plugin_dir)
|
||||||
|
mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||||
|
|
||||||
|
if (opt_default_auth && *opt_default_auth)
|
||||||
|
mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
|
||||||
|
|
||||||
if (sql_connect(&mysql, option_wait))
|
if (sql_connect(&mysql, option_wait))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -137,6 +137,7 @@ FILE *stderror_file=0;
|
|||||||
static char *shared_memory_base_name=0;
|
static char *shared_memory_base_name=0;
|
||||||
#endif
|
#endif
|
||||||
static uint opt_protocol= 0;
|
static uint opt_protocol= 0;
|
||||||
|
static char *opt_plugin_dir= 0, *opt_default_auth;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Dynamic_string wrapper functions. In this file use these
|
Dynamic_string wrapper functions. In this file use these
|
||||||
@ -499,6 +500,13 @@ static struct my_option my_long_options[] =
|
|||||||
&where, &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&where, &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
|
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
|
||||||
|
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
|
||||||
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"default_auth", OPT_PLUGIN_DIR,
|
||||||
|
"Default authentication client-side plugin to use.",
|
||||||
|
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
|
||||||
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1452,6 +1460,13 @@ static int connect_to_db(char *host, char *user,char *passwd)
|
|||||||
mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
||||||
#endif
|
#endif
|
||||||
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
|
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
|
|
||||||
|
if (opt_plugin_dir && *opt_plugin_dir)
|
||||||
|
mysql_options(&mysql_connection, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||||
|
|
||||||
|
if (opt_default_auth && *opt_default_auth)
|
||||||
|
mysql_options(&mysql_connection, MYSQL_DEFAULT_AUTH, opt_default_auth);
|
||||||
|
|
||||||
if (!(mysql= mysql_real_connect(&mysql_connection,host,user,passwd,
|
if (!(mysql= mysql_real_connect(&mysql_connection,host,user,passwd,
|
||||||
NULL,opt_mysql_port,opt_mysql_unix_port,
|
NULL,opt_mysql_port,opt_mysql_unix_port,
|
||||||
0)))
|
0)))
|
||||||
|
@ -1169,8 +1169,8 @@ void handle_command_error(struct st_command *command, uint error)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (command->abort_on_error)
|
if (command->abort_on_error)
|
||||||
die("command \"%.*s\" failed with error %d",
|
die("command \"%.*s\" failed with error %d. my_errno=%d",
|
||||||
command->first_word_len, command->query, error);
|
command->first_word_len, command->query, error, my_errno);
|
||||||
|
|
||||||
i= match_expected_error(command, error, NULL);
|
i= match_expected_error(command, error, NULL);
|
||||||
|
|
||||||
@ -1181,8 +1181,8 @@ void handle_command_error(struct st_command *command, uint error)
|
|||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
if (command->expected_errors.count > 0)
|
if (command->expected_errors.count > 0)
|
||||||
die("command \"%.*s\" failed with wrong error: %d",
|
die("command \"%.*s\" failed with wrong error: %d. my_errno=%d",
|
||||||
command->first_word_len, command->query, error);
|
command->first_word_len, command->query, error, my_errno);
|
||||||
}
|
}
|
||||||
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
|
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
|
||||||
command->expected_errors.err[0].code.errnum != 0)
|
command->expected_errors.err[0].code.errnum != 0)
|
||||||
@ -2073,9 +2073,11 @@ VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
|
|||||||
name_len = strlen(name);
|
name_len = strlen(name);
|
||||||
if (!val_len && val)
|
if (!val_len && val)
|
||||||
val_len = strlen(val) ;
|
val_len = strlen(val) ;
|
||||||
|
if (!val)
|
||||||
|
val_len= 0;
|
||||||
val_alloc_len = val_len + 16; /* room to grow */
|
val_alloc_len = val_len + 16; /* room to grow */
|
||||||
if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc(sizeof(*tmp_var)
|
if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc(sizeof(*tmp_var)
|
||||||
+ name_len+1, MYF(MY_WME))))
|
+ name_len+2, MYF(MY_WME))))
|
||||||
die("Out of memory");
|
die("Out of memory");
|
||||||
|
|
||||||
if (name != NULL)
|
if (name != NULL)
|
||||||
@ -2093,10 +2095,9 @@ VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
|
|||||||
die("Out of memory");
|
die("Out of memory");
|
||||||
|
|
||||||
if (val)
|
if (val)
|
||||||
{
|
|
||||||
memcpy(tmp_var->str_val, val, val_len);
|
memcpy(tmp_var->str_val, val, val_len);
|
||||||
tmp_var->str_val[val_len]= 0;
|
tmp_var->str_val[val_len]= 0;
|
||||||
}
|
|
||||||
var_check_int(tmp_var);
|
var_check_int(tmp_var);
|
||||||
tmp_var->name_len = name_len;
|
tmp_var->name_len = name_len;
|
||||||
tmp_var->str_val_len = val_len;
|
tmp_var->str_val_len = val_len;
|
||||||
@ -5053,6 +5054,7 @@ void do_close_connection(struct st_command *command)
|
|||||||
dynstr_append_mem(ds, ";\n", 2);
|
dynstr_append_mem(ds, ";\n", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dynstr_free(&ds_connection);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5487,6 +5489,7 @@ void do_connect(struct st_command *command)
|
|||||||
dynstr_free(&ds_port);
|
dynstr_free(&ds_port);
|
||||||
dynstr_free(&ds_sock);
|
dynstr_free(&ds_sock);
|
||||||
dynstr_free(&ds_options);
|
dynstr_free(&ds_options);
|
||||||
|
dynstr_free(&ds_default_auth);
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
dynstr_free(&ds_shm);
|
dynstr_free(&ds_shm);
|
||||||
#endif
|
#endif
|
||||||
@ -5683,7 +5686,20 @@ void do_block(enum block_cmd cmd, struct st_command* command)
|
|||||||
}
|
}
|
||||||
while (my_isspace(charset_info, *curr_ptr))
|
while (my_isspace(charset_info, *curr_ptr))
|
||||||
curr_ptr++;
|
curr_ptr++;
|
||||||
|
if (curr_ptr == expr_end)
|
||||||
|
die("Missing right operand in comparison");
|
||||||
|
|
||||||
|
/* Strip off trailing white space */
|
||||||
|
while (my_isspace(charset_info, expr_end[-1]))
|
||||||
|
expr_end--;
|
||||||
|
/* strip off ' or " around the string */
|
||||||
|
if (*curr_ptr == '\'' || *curr_ptr == '"')
|
||||||
|
{
|
||||||
|
if (expr_end[-1] != *curr_ptr)
|
||||||
|
die("Unterminated string value");
|
||||||
|
curr_ptr++;
|
||||||
|
expr_end--;
|
||||||
|
}
|
||||||
VAR v2;
|
VAR v2;
|
||||||
var_init(&v2,0,0,0,0);
|
var_init(&v2,0,0,0,0);
|
||||||
eval_expr(&v2, curr_ptr, &expr_end);
|
eval_expr(&v2, curr_ptr, &expr_end);
|
||||||
@ -5726,6 +5742,7 @@ void do_block(enum block_cmd cmd, struct st_command* command)
|
|||||||
}
|
}
|
||||||
|
|
||||||
v.is_int= TRUE;
|
v.is_int= TRUE;
|
||||||
|
var_free(&v2);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (*expr_start != '`' && ! my_isdigit(charset_info, *expr_start))
|
if (*expr_start != '`' && ! my_isdigit(charset_info, *expr_start))
|
||||||
@ -7819,7 +7836,7 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
|||||||
ds, &ds_warnings);
|
ds, &ds_warnings);
|
||||||
|
|
||||||
dynstr_free(&ds_warnings);
|
dynstr_free(&ds_warnings);
|
||||||
if (command->type == Q_EVAL)
|
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
|
||||||
dynstr_free(&eval_query);
|
dynstr_free(&eval_query);
|
||||||
|
|
||||||
if (display_result_sorted)
|
if (display_result_sorted)
|
||||||
@ -7925,6 +7942,16 @@ void init_re(void)
|
|||||||
|
|
||||||
int match_re(my_regex_t *re, char *str)
|
int match_re(my_regex_t *re, char *str)
|
||||||
{
|
{
|
||||||
|
while (my_isspace(charset_info, *str))
|
||||||
|
str++;
|
||||||
|
if (str[0] == '/' && str[1] == '*')
|
||||||
|
{
|
||||||
|
char *comm_end= strstr (str, "*/");
|
||||||
|
if (! comm_end)
|
||||||
|
die("Statement is unterminated comment");
|
||||||
|
str= comm_end + 2;
|
||||||
|
}
|
||||||
|
|
||||||
int err= my_regexec(re, str, (size_t)0, NULL, 0);
|
int err= my_regexec(re, str, (size_t)0, NULL, 0);
|
||||||
|
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
@ -8063,13 +8090,16 @@ static void dump_backtrace(void)
|
|||||||
{
|
{
|
||||||
struct st_connection *conn= cur_con;
|
struct st_connection *conn= cur_con;
|
||||||
|
|
||||||
my_safe_print_str("read_command_buf", read_command_buf,
|
fprintf(stderr, "read_command_buf (%p): ", read_command_buf);
|
||||||
sizeof(read_command_buf));
|
my_safe_print_str(read_command_buf, sizeof(read_command_buf));
|
||||||
|
|
||||||
if (conn)
|
if (conn)
|
||||||
{
|
{
|
||||||
my_safe_print_str("conn->name", conn->name, conn->name_len);
|
fprintf(stderr, "conn->name (%p): ", conn->name);
|
||||||
|
my_safe_print_str(conn->name, conn->name_len);
|
||||||
#ifdef EMBEDDED_LIBRARY
|
#ifdef EMBEDDED_LIBRARY
|
||||||
my_safe_print_str("conn->cur_query", conn->cur_query, conn->cur_query_len);
|
fprintf(stderr, "conn->cur_query (%p): ", conn->cur_query);
|
||||||
|
my_safe_print_str(conn->cur_query, conn->cur_query_len);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
fputs("Attempting backtrace...\n", stderr);
|
fputs("Attempting backtrace...\n", stderr);
|
||||||
|
@ -117,19 +117,26 @@ IF(UNIX)
|
|||||||
|
|
||||||
OPTION(WITH_PIC "" ON) # Why?
|
OPTION(WITH_PIC "" ON) # Why?
|
||||||
|
|
||||||
# Ensure aio is available on Linux (required by InnoDB)
|
|
||||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
|
IF(NOT IGNORE_AIO_CHECK)
|
||||||
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
|
# Ensure aio is available on Linux (required by InnoDB)
|
||||||
IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO)
|
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
|
||||||
MESSAGE(FATAL_ERROR "
|
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
|
||||||
aio is required on Linux, you need to install the required library:
|
IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO)
|
||||||
|
MESSAGE(FATAL_ERROR "
|
||||||
|
aio is required on Linux, you need to install the required library:
|
||||||
|
|
||||||
Debian/Ubuntu: apt-get install libaio-dev
|
Debian/Ubuntu: apt-get install libaio-dev
|
||||||
RedHat/Fedora/Oracle Linux: yum install libaio-devel
|
RedHat/Fedora/Oracle Linux: yum install libaio-devel
|
||||||
SuSE: zypper install libaio-devel
|
SuSE: zypper install libaio-devel
|
||||||
")
|
|
||||||
|
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
|
||||||
|
")
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
# Enable fast mutexes on Linux
|
||||||
|
OPTION(WITH_FAST_MUTEXES "" ON)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -53,23 +53,27 @@
|
|||||||
SET(abi_check_out ${BINARY_DIR}/abi_check.out)
|
SET(abi_check_out ${BINARY_DIR}/abi_check.out)
|
||||||
|
|
||||||
FOREACH(file ${ABI_HEADERS})
|
FOREACH(file ${ABI_HEADERS})
|
||||||
SET(tmpfile ${file}.pp.tmp)
|
GET_FILENAME_COMPONENT(header_basename ${file} NAME)
|
||||||
EXECUTE_PROCESS(
|
SET(tmpfile ${BINARY_DIR}/${header_basename}.pp.tmp)
|
||||||
COMMAND ${COMPILER}
|
|
||||||
-E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
|
EXECUTE_PROCESS(
|
||||||
-I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
|
COMMAND ${COMPILER}
|
||||||
${file}
|
-E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
|
||||||
ERROR_QUIET OUTPUT_FILE ${tmpfile})
|
-I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
|
||||||
EXECUTE_PROCESS(
|
${file}
|
||||||
COMMAND sed -e
|
ERROR_QUIET OUTPUT_FILE ${tmpfile})
|
||||||
"/^# /d" -e "/^[ ]*$/d" -e "/^#pragma GCC set_debug_pwd/d" -e "/^#ident/d"
|
EXECUTE_PROCESS(
|
||||||
RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile})
|
COMMAND sed -e "/^# /d"
|
||||||
|
-e "/^[ ]*$/d"
|
||||||
|
-e "/^#pragma GCC set_debug_pwd/d"
|
||||||
|
-e "/^#ident/d"
|
||||||
|
RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile})
|
||||||
IF(NOT ${result} EQUAL 0)
|
IF(NOT ${result} EQUAL 0)
|
||||||
MESSAGE(FATAL_ERROR "sed returned error ${result}")
|
MESSAGE(FATAL_ERROR "sed returned error ${result}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
FILE(REMOVE ${tmpfile})
|
FILE(REMOVE ${tmpfile})
|
||||||
EXECUTE_PROCESS(COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE
|
EXECUTE_PROCESS(
|
||||||
result)
|
COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE result)
|
||||||
IF(NOT ${result} EQUAL 0)
|
IF(NOT ${result} EQUAL 0)
|
||||||
MESSAGE(FATAL_ERROR
|
MESSAGE(FATAL_ERROR
|
||||||
"ABI check found difference between ${file}.pp and ${abi_check_out}")
|
"ABI check found difference between ${file}.pp and ${abi_check_out}")
|
||||||
|
@ -153,13 +153,23 @@ ENDFUNCTION()
|
|||||||
# to mysqld.
|
# to mysqld.
|
||||||
MACRO (DTRACE_INSTRUMENT_STATIC_LIBS target libs)
|
MACRO (DTRACE_INSTRUMENT_STATIC_LIBS target libs)
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENABLE_DTRACE)
|
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENABLE_DTRACE)
|
||||||
|
# Filter out non-static libraries in the list, if any
|
||||||
|
SET(static_libs)
|
||||||
FOREACH(lib ${libs})
|
FOREACH(lib ${libs})
|
||||||
|
GET_TARGET_PROPERTY(libtype ${lib} TYPE)
|
||||||
|
IF(libtype MATCHES STATIC_LIBRARY)
|
||||||
|
SET(static_libs ${static_lics} ${lib})
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
FOREACH(lib ${static_libs})
|
||||||
SET(dirs ${dirs} ${TARGET_OBJECT_DIRECTORY_${lib}})
|
SET(dirs ${dirs} ${TARGET_OBJECT_DIRECTORY_${lib}})
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
SET (obj ${CMAKE_CURRENT_BINARY_DIR}/${target}_dtrace_all.o)
|
SET (obj ${CMAKE_CURRENT_BINARY_DIR}/${target}_dtrace_all.o)
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT ${obj}
|
OUTPUT ${obj}
|
||||||
DEPENDS ${libs}
|
DEPENDS ${static_libs}
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-DDTRACE=${DTRACE}
|
-DDTRACE=${DTRACE}
|
||||||
-DOUTFILE=${obj}
|
-DOUTFILE=${obj}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
# Build as per default RPM layout, with prefix=/usr
|
# Build as per default RPM layout, with prefix=/usr
|
||||||
#
|
#
|
||||||
# DEB
|
# DEB
|
||||||
# Build as per STANDALONE, prefix=/opt/mysql-$major.$minor
|
# Build as per STANDALONE, prefix=/opt/mysql/server-$major.$minor
|
||||||
#
|
#
|
||||||
# SVR4
|
# SVR4
|
||||||
# Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
|
# Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
|
||||||
@ -74,7 +74,7 @@ IF(UNIX)
|
|||||||
IF(INSTALL_LAYOUT MATCHES "RPM")
|
IF(INSTALL_LAYOUT MATCHES "RPM")
|
||||||
SET(default_prefix "/usr")
|
SET(default_prefix "/usr")
|
||||||
ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
|
ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
|
||||||
SET(default_prefix "/opt/${MYSQL_BASE_VERSION}")
|
SET(default_prefix "/opt/mysql/server-${MYSQL_BASE_VERSION}")
|
||||||
# This is required to avoid "cpack -GDEB" default of prefix=/usr
|
# This is required to avoid "cpack -GDEB" default of prefix=/usr
|
||||||
SET(CPACK_SET_DESTDIR ON)
|
SET(CPACK_SET_DESTDIR ON)
|
||||||
ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
|
ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
|
||||||
|
54
cmake/maintainer.cmake
Normal file
54
cmake/maintainer.cmake
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
#
|
||||||
|
# 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; version 2 of the License.
|
||||||
|
#
|
||||||
|
# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
INCLUDE(CheckCCompilerFlag)
|
||||||
|
|
||||||
|
# Setup GCC (GNU C compiler) warning options.
|
||||||
|
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
|
||||||
|
SET(MY_MAINTAINER_WARNINGS
|
||||||
|
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
|
||||||
|
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement"
|
||||||
|
HAVE_DECLARATION_AFTER_STATEMENT)
|
||||||
|
IF(HAVE_DECLARATION_AFTER_STATEMENT)
|
||||||
|
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT
|
||||||
|
"-Wdeclaration-after-statement")
|
||||||
|
ENDIF()
|
||||||
|
SET(MY_MAINTAINER_C_WARNINGS
|
||||||
|
"${MY_MAINTAINER_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
|
||||||
|
CACHE STRING "C warning options used in maintainer builds.")
|
||||||
|
# Do not make warnings in checks into errors.
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
# Setup G++ (GNU C++ compiler) warning options.
|
||||||
|
MACRO(SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS)
|
||||||
|
SET(MY_MAINTAINER_CXX_WARNINGS
|
||||||
|
"${MY_MAINTAINER_WARNINGS} -Wno-unused-parameter"
|
||||||
|
CACHE STRING "C++ warning options used in maintainer builds.")
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
# Setup ICC (Intel C Compiler) warning options.
|
||||||
|
MACRO(SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS)
|
||||||
|
SET(MY_MAINTAINER_WARNINGS "-Wcheck")
|
||||||
|
SET(MY_MAINTAINER_C_WARNINGS "${MY_MAINTAINER_WARNINGS}"
|
||||||
|
CACHE STRING "C warning options used in maintainer builds.")
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
# Setup ICPC (Intel C++ Compiler) warning options.
|
||||||
|
MACRO(SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS)
|
||||||
|
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_WARNINGS}"
|
||||||
|
CACHE STRING "C++ warning options used in maintainer builds.")
|
||||||
|
ENDMACRO()
|
||||||
|
|
@ -21,17 +21,21 @@ SET(SHARED_LIB_MAJOR_VERSION "16")
|
|||||||
SET(PROTOCOL_VERSION "10")
|
SET(PROTOCOL_VERSION "10")
|
||||||
SET(DOT_FRM_VERSION "6")
|
SET(DOT_FRM_VERSION "6")
|
||||||
|
|
||||||
|
# Generate "something" to trigger cmake rerun when VERSION changes
|
||||||
|
CONFIGURE_FILE(
|
||||||
|
${CMAKE_SOURCE_DIR}/VERSION
|
||||||
|
${CMAKE_BINARY_DIR}/VERSION.dep
|
||||||
|
)
|
||||||
|
|
||||||
# Read value for a variable from VERSION.
|
# Read value for a variable from VERSION.
|
||||||
|
|
||||||
MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
|
MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
|
||||||
IF(NOT ${var})
|
IF(NOT ${var})
|
||||||
IF (EXISTS ${CMAKE_SOURCE_DIR}/VERSION)
|
FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
|
||||||
FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
|
IF(str)
|
||||||
IF(str)
|
STRING(REPLACE "${keyword}=" "" str ${str})
|
||||||
STRING(REPLACE "${keyword}=" "" str ${str})
|
STRING(REGEX REPLACE "[ ].*" "" str "${str}")
|
||||||
STRING(REGEX REPLACE "[ ].*" "" str "${str}")
|
SET(${var} ${str})
|
||||||
SET(${var} ${str})
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
@ -123,7 +123,7 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||||||
|
|
||||||
# Update mysqld dependencies
|
# Update mysqld dependencies
|
||||||
SET (MYSQLD_STATIC_PLUGIN_LIBS ${MYSQLD_STATIC_PLUGIN_LIBS}
|
SET (MYSQLD_STATIC_PLUGIN_LIBS ${MYSQLD_STATIC_PLUGIN_LIBS}
|
||||||
${target} CACHE INTERNAL "" FORCE)
|
${target} ${ARG_LINK_LIBRARIES} CACHE INTERNAL "" FORCE)
|
||||||
|
|
||||||
IF(ARG_MANDATORY)
|
IF(ARG_MANDATORY)
|
||||||
SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server"
|
SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server"
|
||||||
|
@ -26,6 +26,21 @@ int main()
|
|||||||
tgoto(0,0,0);
|
tgoto(0,0,0);
|
||||||
return 0;
|
return 0;
|
||||||
}" HAVE_DECL_TGOTO)
|
}" HAVE_DECL_TGOTO)
|
||||||
|
IF(NOT HAVE_DECL_TGOTO)
|
||||||
|
# On Solaris 11, term.h is broken, curses.h is also required.
|
||||||
|
CHECK_CXX_SOURCE_COMPILES("
|
||||||
|
#include <curses.h>
|
||||||
|
#include <term.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
tgoto(0,0,0);
|
||||||
|
return 0;
|
||||||
|
}" HAVE_DECL_TGOTO2)
|
||||||
|
IF(HAVE_DECL_TGOTO2)
|
||||||
|
SET(HAVE_DECL_TGOTO 1 CACHE INTERNAL "" FORCE)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
|
||||||
|
19
dbug/dbug.c
19
dbug/dbug.c
@ -2377,6 +2377,25 @@ void _db_flush_()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __WIN__
|
||||||
|
void _db_suicide_()
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
sigset_t new_mask;
|
||||||
|
sigfillset(&new_mask);
|
||||||
|
|
||||||
|
fprintf(stderr, "SIGKILL myself\n");
|
||||||
|
fflush(stderr);
|
||||||
|
|
||||||
|
retval= kill(getpid(), SIGKILL);
|
||||||
|
assert(retval == 0);
|
||||||
|
retval= sigsuspend(&new_mask);
|
||||||
|
fprintf(stderr, "sigsuspend returned %d errno %d \n", retval, errno);
|
||||||
|
assert(FALSE); /* With full signal mask, we should never return here. */
|
||||||
|
}
|
||||||
|
#endif /* ! __WIN__ */
|
||||||
|
|
||||||
|
|
||||||
void _db_lock_file_()
|
void _db_lock_file_()
|
||||||
{
|
{
|
||||||
CODE_STATE *cs;
|
CODE_STATE *cs;
|
||||||
|
@ -78,15 +78,15 @@
|
|||||||
: "memory")
|
: "memory")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Actually 32-bit reads/writes are always atomic on x86
|
Actually 32/64-bit reads/writes are always atomic on x86_64,
|
||||||
But we add LOCK_prefix here anyway to force memory barriers
|
nonetheless issue memory barriers as appropriate.
|
||||||
*/
|
*/
|
||||||
#define make_atomic_load_body(S) \
|
#define make_atomic_load_body(S) \
|
||||||
ret=0; \
|
/* Serialize prior load and store operations. */ \
|
||||||
asm volatile (LOCK_prefix "; cmpxchg %2, %0" \
|
asm volatile ("mfence" ::: "memory"); \
|
||||||
: "=m" (*a), "=a" (ret) \
|
ret= *a; \
|
||||||
: "r" (ret), "m" (*a) \
|
/* Prevent compiler from reordering instructions. */ \
|
||||||
: "memory")
|
asm volatile ("" ::: "memory")
|
||||||
#define make_atomic_store_body(S) \
|
#define make_atomic_store_body(S) \
|
||||||
asm volatile ("; xchg %0, %1;" \
|
asm volatile ("; xchg %0, %1;" \
|
||||||
: "=m" (*a), "+r" (v) \
|
: "=m" (*a), "+r" (v) \
|
||||||
|
@ -356,6 +356,32 @@ extern CHARSET_INFO my_charset_utf8mb4_unicode_ci;
|
|||||||
#define MY_UTF8MB4 "utf8mb4"
|
#define MY_UTF8MB4 "utf8mb4"
|
||||||
|
|
||||||
|
|
||||||
|
/* Helper functions to handle contraction */
|
||||||
|
static inline my_bool
|
||||||
|
my_cs_have_contractions(CHARSET_INFO *cs)
|
||||||
|
{
|
||||||
|
return cs->contractions != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline my_bool
|
||||||
|
my_cs_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc)
|
||||||
|
{
|
||||||
|
return ((const char *)cs->contractions)[0x40*0x40 + (wc & 0xFF)];
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline my_bool
|
||||||
|
my_cs_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc)
|
||||||
|
{
|
||||||
|
return ((const char *)cs->contractions)[0x40*0x40 + (wc & 0xFF)];
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint16*
|
||||||
|
my_cs_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
|
||||||
|
{
|
||||||
|
return &cs->contractions[(wc1 - 0x40) * 0x40 + wc2 - 0x40];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* declarations for simple charsets */
|
/* declarations for simple charsets */
|
||||||
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
|
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
|
||||||
const uchar *, size_t);
|
const uchar *, size_t);
|
||||||
@ -430,6 +456,7 @@ ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
|
|||||||
|
|
||||||
void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill);
|
void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill);
|
||||||
|
|
||||||
|
/* For 8-bit character set */
|
||||||
my_bool my_like_range_simple(CHARSET_INFO *cs,
|
my_bool my_like_range_simple(CHARSET_INFO *cs,
|
||||||
const char *ptr, size_t ptr_length,
|
const char *ptr, size_t ptr_length,
|
||||||
pbool escape, pbool w_one, pbool w_many,
|
pbool escape, pbool w_one, pbool w_many,
|
||||||
@ -437,6 +464,7 @@ my_bool my_like_range_simple(CHARSET_INFO *cs,
|
|||||||
char *min_str, char *max_str,
|
char *min_str, char *max_str,
|
||||||
size_t *min_length, size_t *max_length);
|
size_t *min_length, size_t *max_length);
|
||||||
|
|
||||||
|
/* For ASCII-based multi-byte character sets with mbminlen=1 */
|
||||||
my_bool my_like_range_mb(CHARSET_INFO *cs,
|
my_bool my_like_range_mb(CHARSET_INFO *cs,
|
||||||
const char *ptr, size_t ptr_length,
|
const char *ptr, size_t ptr_length,
|
||||||
pbool escape, pbool w_one, pbool w_many,
|
pbool escape, pbool w_one, pbool w_many,
|
||||||
@ -444,26 +472,13 @@ my_bool my_like_range_mb(CHARSET_INFO *cs,
|
|||||||
char *min_str, char *max_str,
|
char *min_str, char *max_str,
|
||||||
size_t *min_length, size_t *max_length);
|
size_t *min_length, size_t *max_length);
|
||||||
|
|
||||||
my_bool my_like_range_ucs2(CHARSET_INFO *cs,
|
/* For other character sets, with arbitrary mbminlen and mbmaxlen numbers */
|
||||||
const char *ptr, size_t ptr_length,
|
my_bool my_like_range_generic(CHARSET_INFO *cs,
|
||||||
pbool escape, pbool w_one, pbool w_many,
|
const char *ptr, size_t ptr_length,
|
||||||
size_t res_length,
|
pbool escape, pbool w_one, pbool w_many,
|
||||||
char *min_str, char *max_str,
|
size_t res_length,
|
||||||
size_t *min_length, size_t *max_length);
|
char *min_str, char *max_str,
|
||||||
|
size_t *min_length, size_t *max_length);
|
||||||
my_bool my_like_range_utf16(CHARSET_INFO *cs,
|
|
||||||
const char *ptr, size_t ptr_length,
|
|
||||||
pbool escape, pbool w_one, pbool w_many,
|
|
||||||
size_t res_length,
|
|
||||||
char *min_str, char *max_str,
|
|
||||||
size_t *min_length, size_t *max_length);
|
|
||||||
|
|
||||||
my_bool my_like_range_utf32(CHARSET_INFO *cs,
|
|
||||||
const char *ptr, size_t ptr_length,
|
|
||||||
pbool escape, pbool w_one, pbool w_many,
|
|
||||||
size_t res_length,
|
|
||||||
char *min_str, char *max_str,
|
|
||||||
size_t *min_length, size_t *max_length);
|
|
||||||
|
|
||||||
int my_wildcmp_8bit(CHARSET_INFO *,
|
int my_wildcmp_8bit(CHARSET_INFO *,
|
||||||
const char *str,const char *str_end,
|
const char *str,const char *str_end,
|
||||||
@ -554,6 +569,8 @@ extern my_bool my_parse_charset_xml(const char *bug, size_t len,
|
|||||||
int (*add)(CHARSET_INFO *cs));
|
int (*add)(CHARSET_INFO *cs));
|
||||||
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
|
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
|
||||||
pchar c);
|
pchar c);
|
||||||
|
extern size_t my_strcspn(CHARSET_INFO *cs, const char *str, const char *end,
|
||||||
|
const char *accept);
|
||||||
|
|
||||||
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len);
|
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||||
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len);
|
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||||
|
@ -132,7 +132,8 @@ extern const char* _db_get_func_(void);
|
|||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
#define DBUG_SUICIDE() DBUG_ABORT()
|
#define DBUG_SUICIDE() DBUG_ABORT()
|
||||||
#else
|
#else
|
||||||
#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause())
|
extern void _db_suicide_();
|
||||||
|
#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /* No debugger */
|
#else /* No debugger */
|
||||||
|
@ -611,6 +611,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define FN_LIBCHAR '\\'
|
#define FN_LIBCHAR '\\'
|
||||||
#define FN_LIBCHAR2 '/'
|
#define FN_LIBCHAR2 '/'
|
||||||
|
#define FN_DIRSEP "/\\" /* Valid directory separators */
|
||||||
#define FN_ROOTDIR "\\"
|
#define FN_ROOTDIR "\\"
|
||||||
#define FN_DEVCHAR ':'
|
#define FN_DEVCHAR ':'
|
||||||
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
|
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
|
||||||
@ -618,6 +619,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
|||||||
#else
|
#else
|
||||||
#define FN_LIBCHAR '/'
|
#define FN_LIBCHAR '/'
|
||||||
#define FN_LIBCHAR2 '/'
|
#define FN_LIBCHAR2 '/'
|
||||||
|
#define FN_DIRSEP "/" /* Valid directory separators */
|
||||||
#define FN_ROOTDIR "/"
|
#define FN_ROOTDIR "/"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ C_MODE_START
|
|||||||
#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
|
#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
|
||||||
void my_init_stacktrace();
|
void my_init_stacktrace();
|
||||||
void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack);
|
void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack);
|
||||||
void my_safe_print_str(const char* name, const char* val, int max_len);
|
void my_safe_print_str(const char* val, int max_len);
|
||||||
void my_write_core(int sig);
|
void my_write_core(int sig);
|
||||||
#if BACKTRACE_DEMANGLE
|
#if BACKTRACE_DEMANGLE
|
||||||
char *my_demangle(const char *mangled_name, int *status);
|
char *my_demangle(const char *mangled_name, int *status);
|
||||||
|
@ -456,7 +456,8 @@ typedef struct st_io_cache /* Used when cacheing files */
|
|||||||
IO_CACHE_CALLBACK pre_close;
|
IO_CACHE_CALLBACK pre_close;
|
||||||
/*
|
/*
|
||||||
Counts the number of times, when we were forced to use disk. We use it to
|
Counts the number of times, when we were forced to use disk. We use it to
|
||||||
increase the binlog_cache_disk_use status variable.
|
increase the binlog_cache_disk_use and binlog_stmt_cache_disk_use status
|
||||||
|
variables.
|
||||||
*/
|
*/
|
||||||
ulong disk_writes;
|
ulong disk_writes;
|
||||||
void* arg; /* for use by pre/post_read */
|
void* arg; /* for use by pre/post_read */
|
||||||
|
@ -42,6 +42,8 @@ struct mysql_event
|
|||||||
LOG events occurs before emitting to the general query log.
|
LOG events occurs before emitting to the general query log.
|
||||||
ERROR events occur before transmitting errors to the user.
|
ERROR events occur before transmitting errors to the user.
|
||||||
RESULT events occur after transmitting a resultset to the user.
|
RESULT events occur after transmitting a resultset to the user.
|
||||||
|
STATUS events occur after transmitting a resultset or errors
|
||||||
|
to the user.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MYSQL_AUDIT_GENERAL_CLASS 0
|
#define MYSQL_AUDIT_GENERAL_CLASS 0
|
||||||
@ -49,6 +51,7 @@ struct mysql_event
|
|||||||
#define MYSQL_AUDIT_GENERAL_LOG 0
|
#define MYSQL_AUDIT_GENERAL_LOG 0
|
||||||
#define MYSQL_AUDIT_GENERAL_ERROR 1
|
#define MYSQL_AUDIT_GENERAL_ERROR 1
|
||||||
#define MYSQL_AUDIT_GENERAL_RESULT 2
|
#define MYSQL_AUDIT_GENERAL_RESULT 2
|
||||||
|
#define MYSQL_AUDIT_GENERAL_STATUS 3
|
||||||
|
|
||||||
struct mysql_event_general
|
struct mysql_event_general
|
||||||
{
|
{
|
||||||
@ -68,6 +71,43 @@ struct mysql_event_general
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
AUDIT CLASS : CONNECTION
|
||||||
|
|
||||||
|
CONNECT occurs after authentication phase is completed.
|
||||||
|
DISCONNECT occurs after connection is terminated.
|
||||||
|
CHANGE_USER occurs after COM_CHANGE_USER RPC is completed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_CLASS 1
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_CLASSMASK (1 << MYSQL_AUDIT_CONNECTION_CLASS)
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_CONNECT 0
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_DISCONNECT 1
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_CHANGE_USER 2
|
||||||
|
|
||||||
|
struct mysql_event_connection
|
||||||
|
{
|
||||||
|
unsigned int event_class;
|
||||||
|
unsigned int event_subclass;
|
||||||
|
int status;
|
||||||
|
unsigned long thread_id;
|
||||||
|
const char *user;
|
||||||
|
unsigned int user_length;
|
||||||
|
const char *priv_user;
|
||||||
|
unsigned int priv_user_length;
|
||||||
|
const char *external_user;
|
||||||
|
unsigned int external_user_length;
|
||||||
|
const char *proxy_user;
|
||||||
|
unsigned int proxy_user_length;
|
||||||
|
const char *host;
|
||||||
|
unsigned int host_length;
|
||||||
|
const char *ip;
|
||||||
|
unsigned int ip_length;
|
||||||
|
const char *database;
|
||||||
|
unsigned int database_length;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Here we define the descriptor structure, that is referred from
|
Here we define the descriptor structure, that is referred from
|
||||||
st_mysql_plugin.
|
st_mysql_plugin.
|
||||||
|
@ -208,6 +208,27 @@ struct mysql_event_general
|
|||||||
unsigned long long general_time;
|
unsigned long long general_time;
|
||||||
unsigned long long general_rows;
|
unsigned long long general_rows;
|
||||||
};
|
};
|
||||||
|
struct mysql_event_connection
|
||||||
|
{
|
||||||
|
unsigned int event_class;
|
||||||
|
unsigned int event_subclass;
|
||||||
|
int status;
|
||||||
|
unsigned long thread_id;
|
||||||
|
const char *user;
|
||||||
|
unsigned int user_length;
|
||||||
|
const char *priv_user;
|
||||||
|
unsigned int priv_user_length;
|
||||||
|
const char *external_user;
|
||||||
|
unsigned int external_user_length;
|
||||||
|
const char *proxy_user;
|
||||||
|
unsigned int proxy_user_length;
|
||||||
|
const char *host;
|
||||||
|
unsigned int host_length;
|
||||||
|
const char *ip;
|
||||||
|
unsigned int ip_length;
|
||||||
|
const char *database;
|
||||||
|
unsigned int database_length;
|
||||||
|
};
|
||||||
struct st_mysql_audit
|
struct st_mysql_audit
|
||||||
{
|
{
|
||||||
int interface_version;
|
int interface_version;
|
||||||
|
@ -65,7 +65,8 @@ extern const char *globerrs[]; /* my_error_messages is here */
|
|||||||
#define EE_FILE_NOT_CLOSED 30
|
#define EE_FILE_NOT_CLOSED 30
|
||||||
#define EE_CHANGE_OWNERSHIP 31
|
#define EE_CHANGE_OWNERSHIP 31
|
||||||
#define EE_CHANGE_PERMISSIONS 32
|
#define EE_CHANGE_PERMISSIONS 32
|
||||||
#define EE_ERROR_LAST 32 /* Copy last error nr */
|
#define EE_CANT_SEEK 33
|
||||||
|
#define EE_ERROR_LAST 33 /* Copy last error nr */
|
||||||
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
|
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
|
||||||
|
|
||||||
/* exit codes for all MySQL programs */
|
/* exit codes for all MySQL programs */
|
||||||
|
@ -26,7 +26,6 @@ ${CMAKE_SOURCE_DIR}/regex
|
|||||||
${ZLIB_INCLUDE_DIR}
|
${ZLIB_INCLUDE_DIR}
|
||||||
${SSL_INCLUDE_DIRS}
|
${SSL_INCLUDE_DIRS}
|
||||||
${SSL_INTERNAL_INCLUDE_DIRS}
|
${SSL_INTERNAL_INCLUDE_DIRS}
|
||||||
${NDB_CLUSTER_INCLUDES}
|
|
||||||
${CMAKE_SOURCE_DIR}/sql/backup
|
${CMAKE_SOURCE_DIR}/sql/backup
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -110,7 +109,7 @@ SET(LIBS
|
|||||||
dbug strings regex mysys vio
|
dbug strings regex mysys vio
|
||||||
${ZLIB_LIBRARY} ${SSL_LIBRARIES}
|
${ZLIB_LIBRARY} ${SSL_LIBRARIES}
|
||||||
${LIBWRAP} ${LIBCRYPT} ${LIBDL}
|
${LIBWRAP} ${LIBCRYPT} ${LIBDL}
|
||||||
${MYSQLD_STATIC_PLUGIN_LIBS} ${NDB_CLIENT_LIBS}
|
${MYSQLD_STATIC_PLUGIN_LIBS}
|
||||||
sql_embedded
|
sql_embedded
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
perl mysql-test-run.pl --timer --force --comment=1st --experimental=collections/default.experimental 1st
|
perl mysql-test-run.pl --timer --force --parallel=auto --comment=1st --experimental=collections/default.experimental 1st
|
||||||
perl mysql-test-run.pl --timer --force --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 large_tests.alter_table main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_ndb parts.partition_alter1_2_innodb parts.partition_alter1_2_ndb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb rpl_ndb.rpl_truncate_7ndb_2
|
perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_ndb parts.partition_alter1_2_innodb parts.partition_alter1_2_ndb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb rpl_ndb.rpl_truncate_7ndb_2
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
perl mysql-test-run.pl --force --timer --comment=normal --skip-ndbcluster --report-features --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=normal --skip-ndbcluster --report-features --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=ps --skip-ndbcluster --ps-protocol --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=ps --skip-ndbcluster --ps-protocol --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=funcs1+ps --suite=funcs_1 --ps-protocol --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=funcs1+ps --suite=funcs_1 --ps-protocol --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=funcs2 --suite=funcs_2 --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=funcs2 --suite=funcs_2 --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=partitions --suite=parts --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=partitions --suite=parts --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=stress --suite=stress --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=stress --suite=stress --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=jp --suite=jp --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=jp --suite=jp --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=embedded --embedded-server --skip-rpl --skip-ndbcluster --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=embedded --embedded-server --skip-rpl --skip-ndbcluster --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=nist --suite=nist --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=nist --suite=nist --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=nist+ps --suite=nist --ps-protocol --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=nist+ps --suite=nist --ps-protocol --experimental=collections/default.experimental
|
||||||
|
@ -1 +1 @@
|
|||||||
perl mysql-test-run.pl --force --timer --comment=debug --skip-ndbcluster --skip-rpl --report-features --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=debug --skip-ndbcluster --skip-rpl --report-features --experimental=collections/default.experimental
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
perl mysql-test-run.pl --force --timer --comment=ps --skip-ndbcluster --ps-protocol --report-features --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=ps --skip-ndbcluster --ps-protocol --report-features --experimental=collections/default.experimental
|
||||||
perl mysql-test-run.pl --force --timer --comment=stress --suite=stress --experimental=collections/default.experimental
|
perl mysql-test-run.pl --force --timer --parallel=auto --comment=stress --suite=stress --experimental=collections/default.experimental
|
||||||
|
@ -304,5 +304,58 @@ BINLOG '
|
|||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # BUG#54903 BINLOG statement toggles session variables
|
||||||
|
--echo # ----------------------------------------------------------------------
|
||||||
|
--echo # This test verify that BINLOG statement doesn't change current session's
|
||||||
|
--echo # variables foreign_key_checks and unique_checks.
|
||||||
|
--echo
|
||||||
|
CREATE TABLE t1 (c1 INT KEY);
|
||||||
|
|
||||||
|
SET @@SESSION.foreign_key_checks= ON;
|
||||||
|
SET @@SESSION.unique_checks= ON;
|
||||||
|
|
||||||
|
--echo # INSERT INTO t1 VALUES (1)
|
||||||
|
--echo # foreign_key_checks=0 and unique_checks=0
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
|
||||||
|
';
|
||||||
|
|
||||||
|
SELECT * FROM t1;
|
||||||
|
--echo # Their values should be ON
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
|
||||||
|
--echo
|
||||||
|
SET @@SESSION.foreign_key_checks= OFF;
|
||||||
|
SET @@SESSION.unique_checks= OFF;
|
||||||
|
|
||||||
|
--echo # INSERT INTO t1 VALUES(2)
|
||||||
|
--echo # foreign_key_checks=1 and unique_checks=1
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||||
|
';
|
||||||
|
|
||||||
|
SELECT * FROM t1;
|
||||||
|
--echo # Their values should be OFF
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
|
||||||
|
--echo # INSERT INTO t1 VALUES(2)
|
||||||
|
--echo # foreign_key_checks=1 and unique_checks=1
|
||||||
|
--echo # It should not change current session's variables, even error happens
|
||||||
|
--error 1062
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||||
|
';
|
||||||
|
|
||||||
|
SELECT * FROM t1;
|
||||||
|
--echo # Their values should be OFF
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
disconnect fresh;
|
disconnect fresh;
|
||||||
|
|
||||||
|
251
mysql-test/extra/binlog_tests/binlog_cache_stat.test
Normal file
251
mysql-test/extra/binlog_tests/binlog_cache_stat.test
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
# Embedded server doesn't support binlog
|
||||||
|
-- source include/not_embedded.inc
|
||||||
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
|
# Creating tables
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1, t2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
create table t2 (a int) engine=myisam;
|
||||||
|
|
||||||
|
#
|
||||||
|
# This test checks binlog_cache_use and binlog_cache_disk_use when
|
||||||
|
# transactions are committed and after when they are aborted.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking commit.
|
||||||
|
#
|
||||||
|
--echo **** Preparing the enviroment to check commit and its effect on status variables.
|
||||||
|
--echo **** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
flush status;
|
||||||
|
let $exp_cache= 0;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 0;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 0;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo **** Transactional changes which are long enough so they will be flushed to disk...
|
||||||
|
--echo **** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
let $1=2000;
|
||||||
|
disable_query_log;
|
||||||
|
begin;
|
||||||
|
while ($1)
|
||||||
|
{
|
||||||
|
eval insert into t1 values( $1 );
|
||||||
|
dec $1;
|
||||||
|
}
|
||||||
|
commit;
|
||||||
|
enable_query_log;
|
||||||
|
let $exp_cache= 1;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 1;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 0;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo **** Transactional changes which should not be flushed to disk and so should not
|
||||||
|
--echo **** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
--echo **** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
commit;
|
||||||
|
let $exp_cache= 2;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 1;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 0;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo **** Non-Transactional changes which should not be flushed to disk and so should not
|
||||||
|
--echo **** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
--echo **** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
commit;
|
||||||
|
let $exp_cache= 2;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 1;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 1;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo **** Mixed changes which should not be flushed to disk and so should not
|
||||||
|
--echo **** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
--echo **** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
commit;
|
||||||
|
let $exp_cache= 3;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 1;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 2;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking abort.
|
||||||
|
#
|
||||||
|
--echo **** Preparing the enviroment to check abort and its effect on the status variables.
|
||||||
|
--echo **** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
flush status;
|
||||||
|
let $exp_cache= 0;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 0;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 0;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo **** Transactional changes which are long enough so they will be flushed to disk...
|
||||||
|
--echo **** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
let $1=2000;
|
||||||
|
disable_query_log;
|
||||||
|
begin;
|
||||||
|
while ($1)
|
||||||
|
{
|
||||||
|
eval insert into t1 values( $1 );
|
||||||
|
dec $1;
|
||||||
|
}
|
||||||
|
rollback;
|
||||||
|
enable_query_log;
|
||||||
|
let $exp_cache= 1;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 1;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 0;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo **** Transactional changes which should not be flushed to disk and so should not
|
||||||
|
--echo **** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
--echo **** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
rollback;
|
||||||
|
let $exp_cache= 2;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 1;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 0;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo **** Non-Transactional changes which should not be flushed to disk and so should not
|
||||||
|
--echo **** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
--echo **** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
rollback;
|
||||||
|
let $exp_cache= 2;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 1;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 1;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo **** Mixed changes which should not be flushed to disk and so should not
|
||||||
|
--echo **** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
--echo **** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
|
||||||
|
--echo **** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
rollback;
|
||||||
|
let $exp_cache= 3;
|
||||||
|
let $got_cache= query_get_value(show status like "binlog_cache_use", Value, 1);
|
||||||
|
let $exp_disk= 1;
|
||||||
|
let $got_disk= query_get_value(show status like "binlog_cache_disk_use", Value, 1);
|
||||||
|
let $exp_stmt_cache= 2;
|
||||||
|
let $got_stmt_cache= query_get_value(show status like "binlog_stmt_cache_use", Value, 1);
|
||||||
|
let $exp_stmt_disk= 0;
|
||||||
|
let $got_stmt_disk= query_get_value(show status like "binlog_stmt_cache_disk_use", Value, 1);
|
||||||
|
if (`SELECT $got_cache <> $exp_cache || $got_disk <> $exp_disk || $got_stmt_cache <> $exp_stmt_cache || $got_stmt_disk <> $exp_stmt_disk`)
|
||||||
|
{
|
||||||
|
-- echo "Expected: binlog_cache_use = $exp_cache, binlog_cache_disk_use = $exp_disk but got binlog_cache_use = $got_cache, binlog_cache_disk_use = $got_disk"
|
||||||
|
-- echo "Expected: binlog_stmt_cache_use = $exp_stmt_cache, binlog_stmt_cache_disk_use = $exp_stmt_disk but got binlog_stmt_cache_use = $got_stmt_cache, binlog_stmt_cache_disk_use = $got_stmt_disk"
|
||||||
|
-- die
|
||||||
|
}
|
||||||
|
drop table t1, t2;
|
@ -34,11 +34,11 @@ create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
|||||||
let $table=t1;
|
let $table=t1;
|
||||||
let $count=0;
|
let $count=0;
|
||||||
|
|
||||||
insert delayed into t1 values (207);
|
insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
|
||||||
inc $count;
|
inc $count;
|
||||||
--source include/wait_until_rows_count.inc
|
--source include/wait_until_rows_count.inc
|
||||||
|
|
||||||
insert delayed into t1 values (null);
|
insert /*! delayed */ into t1 values (null);
|
||||||
inc $count;
|
inc $count;
|
||||||
--source include/wait_until_rows_count.inc
|
--source include/wait_until_rows_count.inc
|
||||||
|
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
# Embedded server doesn't support binlog
|
|
||||||
-- source include/not_embedded.inc
|
|
||||||
-- source include/have_innodb.inc
|
|
||||||
|
|
||||||
#
|
|
||||||
# Let us test binlog_cache_use and binlog_cache_disk_use status vars.
|
|
||||||
# Actually this test has nothing to do with innodb per se, it just requires
|
|
||||||
# transactional table.
|
|
||||||
#
|
|
||||||
flush status;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
create table t1 (a int) engine=innodb;
|
|
||||||
|
|
||||||
# Now we are going to create transaction which is long enough so its
|
|
||||||
# transaction binlog will be flushed to disk...
|
|
||||||
let $1=2000;
|
|
||||||
disable_query_log;
|
|
||||||
begin;
|
|
||||||
while ($1)
|
|
||||||
{
|
|
||||||
eval insert into t1 values( $1 );
|
|
||||||
dec $1;
|
|
||||||
}
|
|
||||||
commit;
|
|
||||||
enable_query_log;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
|
|
||||||
# Transaction which should not be flushed to disk and so should not
|
|
||||||
# increase binlog_cache_disk_use.
|
|
||||||
begin;
|
|
||||||
delete from t1;
|
|
||||||
commit;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
drop table t1;
|
|
@ -25,11 +25,13 @@ call mtr.add_suppression("Unsafe statement written to the binary log using state
|
|||||||
|
|
||||||
let $old_max_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "max_binlog_cache_size", Value, 1);
|
let $old_max_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "max_binlog_cache_size", Value, 1);
|
||||||
let $old_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "binlog_cache_size", Value, 1);
|
let $old_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "binlog_cache_size", Value, 1);
|
||||||
|
let $old_max_binlog_stmt_cache_size= query_get_value(SHOW VARIABLES LIKE "max_binlog_stmt_cache_size", Value, 1);
|
||||||
|
let $old_binlog_stmt_cache_size= query_get_value(SHOW VARIABLES LIKE "binlog_stmt_cache_size", Value, 1);
|
||||||
|
|
||||||
SET GLOBAL max_binlog_cache_size = 4096;
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
# Becuase of bug#55377, we have to set binlog_cache_size until the bug is
|
|
||||||
# fixed.
|
|
||||||
SET GLOBAL binlog_cache_size = 4096;
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL max_binlog_stmt_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_stmt_cache_size = 4096;
|
||||||
disconnect master;
|
disconnect master;
|
||||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||||
|
|
||||||
@ -47,14 +49,14 @@ connection master;
|
|||||||
|
|
||||||
--echo *** Single statement on transactional table ***
|
--echo *** Single statement on transactional table ***
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
eval INSERT INTO t1 (a, data) VALUES (1,
|
eval INSERT INTO t1 (a, data) VALUES (1,
|
||||||
CONCAT($data, $data, $data, $data, $data));
|
CONCAT($data, $data, $data, $data, $data));
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
--echo *** Single statement on non-transactional table ***
|
--echo *** Single statement on non-transactional table ***
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
eval INSERT INTO t2 (a, data) VALUES (2,
|
eval INSERT INTO t2 (a, data) VALUES (2,
|
||||||
CONCAT($data, $data, $data, $data, $data, $data));
|
CONCAT($data, $data, $data, $data, $data, $data));
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
@ -74,7 +76,7 @@ eval INSERT INTO t2 (a, data) VALUES (5, $data);
|
|||||||
|
|
||||||
--echo *** Single statement on both transactional and non-transactional tables. ***
|
--echo *** Single statement on both transactional and non-transactional tables. ***
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data),
|
eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data),
|
||||||
t1.data = CONCAT($data, $data, $data, $data);
|
t1.data = CONCAT($data, $data, $data, $data);
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
@ -103,11 +105,11 @@ BEGIN;
|
|||||||
--eval INSERT INTO t1 (a, data) VALUES (1, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (1, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (7, 's');
|
--eval INSERT INTO t1 (a, data) VALUES (7, 's');
|
||||||
--eval INSERT INTO t2 (a, data) VALUES (8, 's');
|
--eval INSERT INTO t2 (a, data) VALUES (8, 's');
|
||||||
@ -130,9 +132,9 @@ BEGIN;
|
|||||||
--eval INSERT INTO t1 (a, data) VALUES (14, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (14, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (15, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (15, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (16, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (16, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (17, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (17, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (18, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (18, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (19, 's');
|
--eval INSERT INTO t1 (a, data) VALUES (19, 's');
|
||||||
--eval INSERT INTO t2 (a, data) VALUES (20, 's');
|
--eval INSERT INTO t2 (a, data) VALUES (20, 's');
|
||||||
@ -148,7 +150,7 @@ if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
|
|||||||
if (`SELECT @@binlog_format = 'ROW'`)
|
if (`SELECT @@binlog_format = 'ROW'`)
|
||||||
{
|
{
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
CREATE TABLE t4 SELECT * FROM t1;
|
CREATE TABLE t4 SELECT * FROM t1;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
}
|
}
|
||||||
@ -162,9 +164,9 @@ BEGIN;
|
|||||||
--eval INSERT INTO t1 (a, data) VALUES (22, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (22, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (23, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (23, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (24, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (24, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (25, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (25, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (26, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (26, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (27, 's');
|
--eval INSERT INTO t1 (a, data) VALUES (27, 's');
|
||||||
--eval INSERT INTO t2 (a, data) VALUES (28, 's');
|
--eval INSERT INTO t2 (a, data) VALUES (28, 's');
|
||||||
@ -192,11 +194,11 @@ BEGIN;
|
|||||||
--eval INSERT INTO t1 (a, data) VALUES (1, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (1, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (7, 's');
|
--eval INSERT INTO t1 (a, data) VALUES (7, 's');
|
||||||
--eval INSERT INTO t2 (a, data) VALUES (8, 's');
|
--eval INSERT INTO t2 (a, data) VALUES (8, 's');
|
||||||
@ -221,11 +223,11 @@ BEGIN;
|
|||||||
--eval INSERT INTO t1 (a, data) VALUES (1, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (1, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (7, 's');
|
--eval INSERT INTO t1 (a, data) VALUES (7, 's');
|
||||||
--eval INSERT INTO t2 (a, data) VALUES (8, 's');
|
--eval INSERT INTO t2 (a, data) VALUES (8, 's');
|
||||||
@ -268,7 +270,7 @@ TRUNCATE TABLE t1;
|
|||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
eval CALL p1($data);
|
eval CALL p1($data);
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@ -277,7 +279,7 @@ TRUNCATE TABLE t1;
|
|||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
eval CALL p1($data);
|
eval CALL p1($data);
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
@ -299,12 +301,12 @@ BEGIN;
|
|||||||
--eval INSERT INTO t1 (a, data) VALUES (1, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (1, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
||||||
SAVEPOINT sv;
|
SAVEPOINT sv;
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (7, 's');
|
--eval INSERT INTO t1 (a, data) VALUES (7, 's');
|
||||||
--eval INSERT INTO t2 (a, data) VALUES (8, 's');
|
--eval INSERT INTO t2 (a, data) VALUES (8, 's');
|
||||||
@ -331,11 +333,11 @@ BEGIN;
|
|||||||
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (2, $data);
|
||||||
--eval INSERT INTO t2 (a, data) VALUES (3, $data);
|
--eval INSERT INTO t2 (a, data) VALUES (3, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (4, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (5, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (6, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (7, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (7, $data);
|
||||||
--eval UPDATE t2 SET data= CONCAT($data, $data);
|
--eval UPDATE t2 SET data= CONCAT($data, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (8, 's');
|
--eval INSERT INTO t1 (a, data) VALUES (8, 's');
|
||||||
@ -351,7 +353,7 @@ BEGIN;
|
|||||||
--eval INSERT INTO t1 (a, data) VALUES (16, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (16, $data);
|
||||||
--eval INSERT INTO t2 (a, data) VALUES (17, $data);
|
--eval INSERT INTO t2 (a, data) VALUES (17, $data);
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (18, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (18, $data);
|
||||||
--error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE
|
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||||
--eval INSERT INTO t1 (a, data) VALUES (19, $data);
|
--eval INSERT INTO t1 (a, data) VALUES (19, $data);
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@ -367,10 +369,13 @@ let $diff_statement= SELECT * FROM t1;
|
|||||||
--echo # [ On Slave ]
|
--echo # [ On Slave ]
|
||||||
SET GLOBAL max_binlog_cache_size = 4096;
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
SET GLOBAL binlog_cache_size = 4096;
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL max_binlog_stmt_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_stmt_cache_size = 4096;
|
||||||
|
|
||||||
source include/stop_slave.inc;
|
source include/stop_slave.inc;
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
|
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
|
||||||
|
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
|
||||||
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@ -385,6 +390,10 @@ connection master;
|
|||||||
--eval SET GLOBAL max_binlog_cache_size= $old_max_binlog_cache_size
|
--eval SET GLOBAL max_binlog_cache_size= $old_max_binlog_cache_size
|
||||||
--replace_result $old_binlog_cache_size ORIGINAL_VALUE
|
--replace_result $old_binlog_cache_size ORIGINAL_VALUE
|
||||||
--eval SET GLOBAL binlog_cache_size= $old_binlog_cache_size
|
--eval SET GLOBAL binlog_cache_size= $old_binlog_cache_size
|
||||||
|
--replace_result $old_max_binlog_stmt_cache_size ORIGINAL_VALUE
|
||||||
|
--eval SET GLOBAL max_binlog_stmt_cache_size= $old_max_binlog_stmt_cache_size
|
||||||
|
--replace_result $old_binlog_stmt_cache_size ORIGINAL_VALUE
|
||||||
|
--eval SET GLOBAL binlog_stmt_cache_size= $old_binlog_stmt_cache_size
|
||||||
disconnect master;
|
disconnect master;
|
||||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||||
|
|
||||||
@ -415,6 +424,10 @@ source include/show_binlog_events.inc;
|
|||||||
--eval SET GLOBAL max_binlog_cache_size= $old_max_binlog_cache_size
|
--eval SET GLOBAL max_binlog_cache_size= $old_max_binlog_cache_size
|
||||||
--replace_result $old_binlog_cache_size ORIGINAL_VALUE
|
--replace_result $old_binlog_cache_size ORIGINAL_VALUE
|
||||||
--eval SET GLOBAL binlog_cache_size= $old_binlog_cache_size
|
--eval SET GLOBAL binlog_cache_size= $old_binlog_cache_size
|
||||||
|
--replace_result $old_max_binlog_stmt_cache_size ORIGINAL_VALUE
|
||||||
|
--eval SET GLOBAL max_binlog_stmt_cache_size= $old_max_binlog_stmt_cache_size
|
||||||
|
--replace_result $old_binlog_stmt_cache_size ORIGINAL_VALUE
|
||||||
|
--eval SET GLOBAL binlog_stmt_cache_size= $old_binlog_stmt_cache_size
|
||||||
|
|
||||||
source include/stop_slave.inc;
|
source include/stop_slave.inc;
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
|
@ -53,9 +53,7 @@ source include/wait_for_slave_to_start.inc;
|
|||||||
connection master;
|
connection master;
|
||||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||||
# it until it's told to
|
# it until it's told to
|
||||||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
wait
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Send shutdown to the connected server and give
|
# Send shutdown to the connected server and give
|
||||||
# it 10 seconds to die before zapping it
|
# it 10 seconds to die before zapping it
|
||||||
@ -85,9 +83,7 @@ source include/wait_for_slave_io_error.inc;
|
|||||||
eval set @@global.debug = "-d,$dbug_sync_point";
|
eval set @@global.debug = "-d,$dbug_sync_point";
|
||||||
|
|
||||||
# Write file to make mysql-test-run.pl start up the server again
|
# Write file to make mysql-test-run.pl start up the server again
|
||||||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
restart
|
|
||||||
EOF
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
# Turn on reconnect
|
# Turn on reconnect
|
||||||
|
@ -36,8 +36,8 @@ let $ddl_cases= 41;
|
|||||||
while ($ddl_cases >= 1)
|
while ($ddl_cases >= 1)
|
||||||
{
|
{
|
||||||
--echo -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
|
--echo -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
let $in_temporary= "no";
|
let $in_temporary= no;
|
||||||
let $ok= "yes";
|
let $ok= yes;
|
||||||
#
|
#
|
||||||
# In SBR and MIXED modes, the commit event is usually the third event in the
|
# In SBR and MIXED modes, the commit event is usually the third event in the
|
||||||
# binary log:
|
# binary log:
|
||||||
@ -91,7 +91,7 @@ while ($ddl_cases >= 1)
|
|||||||
{
|
{
|
||||||
# This seems to be related to epochs.
|
# This seems to be related to epochs.
|
||||||
# We need to check this against an updated version or avoid it.
|
# We need to check this against an updated version or avoid it.
|
||||||
let $ok= "no";
|
let $ok= no;
|
||||||
let $commit_event_row_number= 6;
|
let $commit_event_row_number= 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -356,7 +356,7 @@ while ($ddl_cases >= 1)
|
|||||||
if ($ddl_cases == 11)
|
if ($ddl_cases == 11)
|
||||||
{
|
{
|
||||||
let $cmd= CREATE TEMPORARY TABLE tt_xx (a int);
|
let $cmd= CREATE TEMPORARY TABLE tt_xx (a int);
|
||||||
let $in_temporary= "yes";
|
let $in_temporary= yes;
|
||||||
# In SBR and MIXED modes, the DDL statement is written to the binary log but
|
# In SBR and MIXED modes, the DDL statement is written to the binary log but
|
||||||
# does not commit the current transaction.
|
# does not commit the current transaction.
|
||||||
#
|
#
|
||||||
@ -478,7 +478,7 @@ while ($ddl_cases >= 1)
|
|||||||
if ($ddl_cases == 8)
|
if ($ddl_cases == 8)
|
||||||
{
|
{
|
||||||
let $cmd= DROP TEMPORARY TABLE IF EXISTS new_tt_xx;
|
let $cmd= DROP TEMPORARY TABLE IF EXISTS new_tt_xx;
|
||||||
let $in_temporary= "yes";
|
let $in_temporary= yes;
|
||||||
#
|
#
|
||||||
# In SBR and MIXED modes, the DDL statement is written to the binary log
|
# In SBR and MIXED modes, the DDL statement is written to the binary log
|
||||||
# but does not commit the current transaction:
|
# but does not commit the current transaction:
|
||||||
@ -618,14 +618,14 @@ while ($ddl_cases >= 1)
|
|||||||
# commit. The flag in_temporary is used to avoid aborting the test in such
|
# commit. The flag in_temporary is used to avoid aborting the test in such
|
||||||
# cases. Thus we force the commit.
|
# cases. Thus we force the commit.
|
||||||
#
|
#
|
||||||
if ($in_temporary == "yes")
|
if ($in_temporary == yes)
|
||||||
{
|
{
|
||||||
--eval COMMIT
|
--eval COMMIT
|
||||||
}
|
}
|
||||||
let $event_commit= query_get_value("SHOW BINLOG EVENTS FROM $first_binlog_position", Info, $commit_event_row_number);
|
let $event_commit= query_get_value("SHOW BINLOG EVENTS FROM $first_binlog_position", Info, $commit_event_row_number);
|
||||||
if (`SELECT SUBSTRING("$event_commit",1,6) != "COMMIT"`)
|
if (`SELECT SUBSTRING("$event_commit",1,6) != "COMMIT"`)
|
||||||
{
|
{
|
||||||
if ($ok == "yes")
|
if ($ok == yes)
|
||||||
{
|
{
|
||||||
--echo it *does not* commit the current transaction.
|
--echo it *does not* commit the current transaction.
|
||||||
--echo $cmd
|
--echo $cmd
|
||||||
|
46
mysql-test/include/ctype_8bit.inc
Normal file
46
mysql-test/include/ctype_8bit.inc
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#
|
||||||
|
# Test Unicode conversion, upper, lower
|
||||||
|
#
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
CREATE TABLE t1 AS SELECT ' ' AS a LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
|
||||||
|
INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
|
||||||
|
INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
|
||||||
|
INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
|
||||||
|
INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
|
||||||
|
INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
|
||||||
|
INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
|
||||||
|
INSERT INTO t1 VALUES (0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
|
||||||
|
INSERT INTO t1 VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
|
||||||
|
INSERT INTO t1 VALUES (0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
|
||||||
|
INSERT INTO t1 VALUES (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57);
|
||||||
|
INSERT INTO t1 VALUES (0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
|
||||||
|
INSERT INTO t1 VALUES (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67);
|
||||||
|
INSERT INTO t1 VALUES (0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
|
||||||
|
INSERT INTO t1 VALUES (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77);
|
||||||
|
INSERT INTO t1 VALUES (0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
|
||||||
|
INSERT INTO t1 VALUES (0x80),(0x81),(0x82),(0x83),(0x84),(0x85),(0x86),(0x87);
|
||||||
|
INSERT INTO t1 VALUES (0x88),(0x89),(0x8A),(0x8B),(0x8C),(0x8D),(0x8E),(0x8F);
|
||||||
|
INSERT INTO t1 VALUES (0x90),(0x91),(0x92),(0x93),(0x94),(0x95),(0x96),(0x97);
|
||||||
|
INSERT INTO t1 VALUES (0x98),(0x99),(0x9A),(0x9B),(0x9C),(0x9D),(0x9E),(0x9F);
|
||||||
|
INSERT INTO t1 VALUES (0xA0),(0xA1),(0xA2),(0xA3),(0xA4),(0xA5),(0xA6),(0xA7);
|
||||||
|
INSERT INTO t1 VALUES (0xA8),(0xA9),(0xAA),(0xAB),(0xAC),(0xAD),(0xAE),(0xAF);
|
||||||
|
INSERT INTO t1 VALUES (0xB0),(0xB1),(0xB2),(0xB3),(0xB4),(0xB5),(0xB6),(0xB7);
|
||||||
|
INSERT INTO t1 VALUES (0xB8),(0xB9),(0xBA),(0xBB),(0xBC),(0xBD),(0xBE),(0xBF);
|
||||||
|
INSERT INTO t1 VALUES (0xC0),(0xC1),(0xC2),(0xC3),(0xC4),(0xC5),(0xC6),(0xC7);
|
||||||
|
INSERT INTO t1 VALUES (0xC8),(0xC9),(0xCA),(0xCB),(0xCC),(0xCD),(0xCE),(0xCF);
|
||||||
|
INSERT INTO t1 VALUES (0xD0),(0xD1),(0xD2),(0xD3),(0xD4),(0xD5),(0xD6),(0xD7);
|
||||||
|
INSERT INTO t1 VALUES (0xD8),(0xD9),(0xDA),(0xDB),(0xDC),(0xDD),(0xDE),(0xDF);
|
||||||
|
INSERT INTO t1 VALUES (0xE0),(0xE1),(0xE2),(0xE3),(0xE4),(0xE5),(0xE6),(0xE7);
|
||||||
|
INSERT INTO t1 VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF);
|
||||||
|
INSERT INTO t1 VALUES (0xF0),(0xF1),(0xF2),(0xF3),(0xF4),(0xF5),(0xF6),(0xF7);
|
||||||
|
INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
|
||||||
|
SELECT
|
||||||
|
HEX(a) AS chr,
|
||||||
|
HEX(LOWER(a)) AS upper,
|
||||||
|
HEX(LOWER(a)) AS lower,
|
||||||
|
HEX(@utf8:=CONVERT(a USING utf8)) AS utf8,
|
||||||
|
HEX(@roundtrip:=CAST(@utf8 AS CHAR)) AS roundtrip,
|
||||||
|
if(a=BINARY @roundtrip,'','Round trip unsafe') AS issafe
|
||||||
|
FROM t1 ORDER BY chr;
|
||||||
|
DROP TABLE t1;
|
12
mysql-test/include/ctype_czech.inc
Normal file
12
mysql-test/include/ctype_czech.inc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
SELECT @@collation_connection;
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'ch';
|
||||||
|
DROP TABLE t1;
|
11
mysql-test/include/ctype_like_ignorable.inc
Normal file
11
mysql-test/include/ctype_like_ignorable.inc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
SELECT @@collation_connection;
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
--echo # Part#2 - ignorable characters
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
DROP TABLE t1;
|
21
mysql-test/include/io_thd_fault_injection.inc
Normal file
21
mysql-test/include/io_thd_fault_injection.inc
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#
|
||||||
|
# Takes the flag as an argument:
|
||||||
|
# -- let $io_thd_injection_fault_flag=+d,fault_injection_new_file_rotate_event
|
||||||
|
# -- source include/io_thd_fault_injection.inc
|
||||||
|
#
|
||||||
|
|
||||||
|
SET @old_debug=@@global.debug;
|
||||||
|
-- disable_warnings
|
||||||
|
-- source include/stop_slave.inc
|
||||||
|
-- enable_warnings
|
||||||
|
-- eval SET GLOBAL debug="+d,$io_thd_injection_fault_flag"
|
||||||
|
|
||||||
|
START SLAVE io_thread;
|
||||||
|
-- source include/wait_for_slave_io_to_stop.inc
|
||||||
|
-- source include/wait_for_slave_io_error.inc
|
||||||
|
|
||||||
|
-- eval SET GLOBAL debug="-d,$io_thd_injection_fault_flag"
|
||||||
|
SET GLOBAL debug=@old_debug;
|
||||||
|
|
||||||
|
# restart because slave is in bad shape
|
||||||
|
-- source include/restart_mysqld.inc
|
@ -1,18 +1,16 @@
|
|||||||
|
|
||||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||||
# it until it's told to
|
# it until it's told to
|
||||||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--let $_server_id= `SELECT @@server_id`
|
||||||
wait
|
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||||
EOF
|
--exec echo "wait" > $_expect_file_name
|
||||||
|
|
||||||
# Send shutdown to the connected server and give
|
# Send shutdown to the connected server and give
|
||||||
# it 10 seconds to die before zapping it
|
# it 10 seconds to die before zapping it
|
||||||
shutdown_server 10;
|
shutdown_server 10;
|
||||||
|
|
||||||
# Write file to make mysql-test-run.pl start up the server again
|
# Write file to make mysql-test-run.pl start up the server again
|
||||||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--exec echo "restart" > $_expect_file_name
|
||||||
restart
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Turn on reconnect
|
# Turn on reconnect
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
|
@ -150,7 +150,7 @@ sub collect_test_cases ($$$$) {
|
|||||||
{
|
{
|
||||||
last unless $opt_reorder;
|
last unless $opt_reorder;
|
||||||
# test->{name} is always in suite.name format
|
# test->{name} is always in suite.name format
|
||||||
if ( $test->{name} =~ /.*\.$tname/ )
|
if ( $test->{name} =~ /^$sname.*\.$tname$/ )
|
||||||
{
|
{
|
||||||
$found= 1;
|
$found= 1;
|
||||||
last;
|
last;
|
||||||
|
@ -191,6 +191,8 @@ my $opt_cursor_protocol;
|
|||||||
my $opt_view_protocol;
|
my $opt_view_protocol;
|
||||||
|
|
||||||
our $opt_debug;
|
our $opt_debug;
|
||||||
|
my $debug_d= "d";
|
||||||
|
my $opt_debug_common;
|
||||||
our @opt_cases; # The test cases names in argv
|
our @opt_cases; # The test cases names in argv
|
||||||
our $opt_embedded_server;
|
our $opt_embedded_server;
|
||||||
|
|
||||||
@ -607,7 +609,10 @@ sub run_test_server ($$$) {
|
|||||||
if ( !$opt_force ) {
|
if ( !$opt_force ) {
|
||||||
# Test has failed, force is off
|
# Test has failed, force is off
|
||||||
push(@$completed, $result);
|
push(@$completed, $result);
|
||||||
return $completed;
|
return $completed unless $result->{'dont_kill_server'};
|
||||||
|
# Prevent kill of server, to get valgrind report
|
||||||
|
print $sock "BYE\n";
|
||||||
|
next;
|
||||||
}
|
}
|
||||||
elsif ($opt_max_test_fail > 0 and
|
elsif ($opt_max_test_fail > 0 and
|
||||||
$num_failed_test >= $opt_max_test_fail) {
|
$num_failed_test >= $opt_max_test_fail) {
|
||||||
@ -854,15 +859,16 @@ sub run_worker ($) {
|
|||||||
mtr_report("Server said BYE");
|
mtr_report("Server said BYE");
|
||||||
stop_all_servers($opt_shutdown_timeout);
|
stop_all_servers($opt_shutdown_timeout);
|
||||||
mark_time_used('restart');
|
mark_time_used('restart');
|
||||||
|
my $valgrind_reports= 0;
|
||||||
if ($opt_valgrind_mysqld) {
|
if ($opt_valgrind_mysqld) {
|
||||||
valgrind_exit_reports();
|
$valgrind_reports= valgrind_exit_reports();
|
||||||
}
|
}
|
||||||
if ( $opt_gprof ) {
|
if ( $opt_gprof ) {
|
||||||
gprof_collect (find_mysqld($basedir), keys %gprof_dirs);
|
gprof_collect (find_mysqld($basedir), keys %gprof_dirs);
|
||||||
}
|
}
|
||||||
mark_time_used('init');
|
mark_time_used('init');
|
||||||
print_times_used($server, $thread_num);
|
print_times_used($server, $thread_num);
|
||||||
exit(0);
|
exit($valgrind_reports);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mtr_error("Could not understand server, '$line'");
|
mtr_error("Could not understand server, '$line'");
|
||||||
@ -907,7 +913,7 @@ sub command_line_setup {
|
|||||||
my $opt_list_options;
|
my $opt_list_options;
|
||||||
|
|
||||||
# Read the command line options
|
# Read the command line options
|
||||||
# Note: Keep list, and the order, in sync with usage at end of this file
|
# Note: Keep list in sync with usage at end of this file
|
||||||
Getopt::Long::Configure("pass_through");
|
Getopt::Long::Configure("pass_through");
|
||||||
my %options=(
|
my %options=(
|
||||||
# Control what engine/variation to run
|
# Control what engine/variation to run
|
||||||
@ -943,6 +949,7 @@ sub command_line_setup {
|
|||||||
'combination=s' => \@opt_combinations,
|
'combination=s' => \@opt_combinations,
|
||||||
'skip-combinations' => \&collect_option,
|
'skip-combinations' => \&collect_option,
|
||||||
'experimental=s' => \@opt_experimentals,
|
'experimental=s' => \@opt_experimentals,
|
||||||
|
# skip-im is deprecated and silently ignored
|
||||||
'skip-im' => \&ignore_option,
|
'skip-im' => \&ignore_option,
|
||||||
|
|
||||||
# Specify ports
|
# Specify ports
|
||||||
@ -962,6 +969,7 @@ sub command_line_setup {
|
|||||||
|
|
||||||
# Debugging
|
# Debugging
|
||||||
'debug' => \$opt_debug,
|
'debug' => \$opt_debug,
|
||||||
|
'debug-common' => \$opt_debug_common,
|
||||||
'gdb' => \$opt_gdb,
|
'gdb' => \$opt_gdb,
|
||||||
'client-gdb' => \$opt_client_gdb,
|
'client-gdb' => \$opt_client_gdb,
|
||||||
'manual-gdb' => \$opt_manual_gdb,
|
'manual-gdb' => \$opt_manual_gdb,
|
||||||
@ -1038,7 +1046,8 @@ sub command_line_setup {
|
|||||||
'report-times' => \$opt_report_times,
|
'report-times' => \$opt_report_times,
|
||||||
|
|
||||||
'help|h' => \$opt_usage,
|
'help|h' => \$opt_usage,
|
||||||
'list-options' => \$opt_list_options,
|
# list-options is internal, not listed in help
|
||||||
|
'list-options' => \$opt_list_options,
|
||||||
'skip-test-list=s' => \@opt_skip_test_list
|
'skip-test-list=s' => \@opt_skip_test_list
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1551,6 +1560,18 @@ sub command_line_setup {
|
|||||||
join(" ", @valgrind_args), "\"");
|
join(" ", @valgrind_args), "\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($opt_debug_common)
|
||||||
|
{
|
||||||
|
$opt_debug= 1;
|
||||||
|
$debug_d= "d,query,info,error,enter,exit";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($opt_debug && $opt_debug ne "1")
|
||||||
|
{
|
||||||
|
$debug_d= "d,$opt_debug";
|
||||||
|
$debug_d= "d,query,info,error,enter,exit" if $opt_debug eq "std";
|
||||||
|
}
|
||||||
|
|
||||||
mtr_report("Checking supported features...");
|
mtr_report("Checking supported features...");
|
||||||
|
|
||||||
check_ndbcluster_support(\%mysqld_variables);
|
check_ndbcluster_support(\%mysqld_variables);
|
||||||
@ -1848,7 +1869,7 @@ sub client_debug_arg($$) {
|
|||||||
|
|
||||||
if ( $opt_debug ) {
|
if ( $opt_debug ) {
|
||||||
mtr_add_arg($args,
|
mtr_add_arg($args,
|
||||||
"--debug=d:t:A,%s/log/%s.trace",
|
"--debug=$debug_d:t:A,%s/log/%s.trace",
|
||||||
$path_vardir_trace, $client_name)
|
$path_vardir_trace, $client_name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3029,13 +3050,19 @@ sub mysql_install_db {
|
|||||||
|
|
||||||
if ( $opt_debug )
|
if ( $opt_debug )
|
||||||
{
|
{
|
||||||
mtr_add_arg($args, "--debug=d:t:i:A,%s/log/bootstrap.trace",
|
mtr_add_arg($args, "--debug=$debug_d:t:i:A,%s/log/bootstrap.trace",
|
||||||
$path_vardir_trace);
|
$path_vardir_trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
mtr_add_arg($args, "--lc-messages-dir=%s", $install_lang);
|
mtr_add_arg($args, "--lc-messages-dir=%s", $install_lang);
|
||||||
mtr_add_arg($args, "--character-sets-dir=%s", $install_chsdir);
|
mtr_add_arg($args, "--character-sets-dir=%s", $install_chsdir);
|
||||||
|
|
||||||
|
# On some old linux kernels, aio on tmpfs is not supported
|
||||||
|
# Remove this if/when Bug #58421 fixes this in the server
|
||||||
|
if ($^O eq "linux" && $opt_mem) {
|
||||||
|
mtr_add_arg($args, "--loose-skip-innodb-use-native-aio");
|
||||||
|
}
|
||||||
|
|
||||||
# InnoDB arguments that affect file location and sizes may
|
# InnoDB arguments that affect file location and sizes may
|
||||||
# need to be given to the bootstrap process as well as the
|
# need to be given to the bootstrap process as well as the
|
||||||
# server process.
|
# server process.
|
||||||
@ -4396,7 +4423,12 @@ sub after_failure ($) {
|
|||||||
sub report_failure_and_restart ($) {
|
sub report_failure_and_restart ($) {
|
||||||
my $tinfo= shift;
|
my $tinfo= shift;
|
||||||
|
|
||||||
stop_all_servers();
|
if ($opt_valgrind_mysqld && ($tinfo->{'warnings'} || $tinfo->{'timeout'})) {
|
||||||
|
# In these cases we may want valgrind report from normal termination
|
||||||
|
$tinfo->{'dont_kill_server'}= 1;
|
||||||
|
}
|
||||||
|
# Shotdown properly if not to be killed (for valgrind)
|
||||||
|
stop_all_servers($tinfo->{'dont_kill_server'} ? $opt_shutdown_timeout : 0);
|
||||||
|
|
||||||
$tinfo->{'result'}= 'MTR_RES_FAILED';
|
$tinfo->{'result'}= 'MTR_RES_FAILED';
|
||||||
|
|
||||||
@ -4522,6 +4554,13 @@ sub mysqld_arguments ($$$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# On some old linux kernels, aio on tmpfs is not supported
|
||||||
|
# Remove this if/when Bug #58421 fixes this in the server
|
||||||
|
if ($^O eq "linux" && $opt_mem)
|
||||||
|
{
|
||||||
|
mtr_add_arg($args, "--loose-skip-innodb-use-native-aio");
|
||||||
|
}
|
||||||
|
|
||||||
if ( $mysql_version_id >= 50106 && !$opt_user_args)
|
if ( $mysql_version_id >= 50106 && !$opt_user_args)
|
||||||
{
|
{
|
||||||
# Turn on logging to file
|
# Turn on logging to file
|
||||||
@ -4614,7 +4653,7 @@ sub mysqld_start ($$) {
|
|||||||
|
|
||||||
if ( $opt_debug )
|
if ( $opt_debug )
|
||||||
{
|
{
|
||||||
mtr_add_arg($args, "--debug=d:t:i:A,%s/log/%s.trace",
|
mtr_add_arg($args, "--debug=$debug_d:t:i:A,%s/log/%s.trace",
|
||||||
$path_vardir_trace, $mysqld->name());
|
$path_vardir_trace, $mysqld->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5536,6 +5575,8 @@ sub valgrind_arguments {
|
|||||||
#
|
#
|
||||||
|
|
||||||
sub valgrind_exit_reports() {
|
sub valgrind_exit_reports() {
|
||||||
|
my $found_err= 0;
|
||||||
|
|
||||||
foreach my $log_file (keys %mysqld_logs)
|
foreach my $log_file (keys %mysqld_logs)
|
||||||
{
|
{
|
||||||
my @culprits= ();
|
my @culprits= ();
|
||||||
@ -5571,7 +5612,7 @@ sub valgrind_exit_reports() {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
# This line marks the start of a valgrind report
|
# This line marks the start of a valgrind report
|
||||||
$found_report= 1 if $line =~ /ERROR SUMMARY:/;
|
$found_report= 1 if $line =~ /^==\d+== .* SUMMARY:/;
|
||||||
|
|
||||||
if ($found_report) {
|
if ($found_report) {
|
||||||
$line=~ s/^==\d+== //;
|
$line=~ s/^==\d+== //;
|
||||||
@ -5588,8 +5629,11 @@ sub valgrind_exit_reports() {
|
|||||||
mtr_print ("Valgrind report from $log_file after tests:\n", @culprits);
|
mtr_print ("Valgrind report from $log_file after tests:\n", @culprits);
|
||||||
mtr_print_line();
|
mtr_print_line();
|
||||||
print ("$valgrind_rep\n");
|
print ("$valgrind_rep\n");
|
||||||
|
$found_err= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $found_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -5623,7 +5667,7 @@ Options to control what engine/variation to run
|
|||||||
|
|
||||||
defaults-file=<config template> Use fixed config template for all
|
defaults-file=<config template> Use fixed config template for all
|
||||||
tests
|
tests
|
||||||
defaults_extra_file=<config template> Extra config template to add to
|
defaults-extra-file=<config template> Extra config template to add to
|
||||||
all generated configs
|
all generated configs
|
||||||
combination=<opt> Use at least twice to run tests with specified
|
combination=<opt> Use at least twice to run tests with specified
|
||||||
options to mysqld
|
options to mysqld
|
||||||
@ -5711,6 +5755,8 @@ Options for debugging the product
|
|||||||
client-gdb Start mysqltest client in gdb
|
client-gdb Start mysqltest client in gdb
|
||||||
ddd Start mysqld in ddd
|
ddd Start mysqld in ddd
|
||||||
debug Dump trace output for all servers and client programs
|
debug Dump trace output for all servers and client programs
|
||||||
|
debug-common Same as debug, but sets 'd' debug flags to
|
||||||
|
"query,info,error,enter,exit"
|
||||||
debugger=NAME Start mysqld in the selected debugger
|
debugger=NAME Start mysqld in the selected debugger
|
||||||
gdb Start the mysqld(s) in gdb
|
gdb Start the mysqld(s) in gdb
|
||||||
manual-debug Let user manually start mysqld in debugger, before
|
manual-debug Let user manually start mysqld in debugger, before
|
||||||
@ -5719,7 +5765,7 @@ Options for debugging the product
|
|||||||
test(s)
|
test(s)
|
||||||
manual-ddd Let user manually start mysqld in ddd, before running
|
manual-ddd Let user manually start mysqld in ddd, before running
|
||||||
test(s)
|
test(s)
|
||||||
strace-client=[path] Create strace output for mysqltest client, optionally
|
strace-client[=path] Create strace output for mysqltest client, optionally
|
||||||
specifying name and path to the trace program to use.
|
specifying name and path to the trace program to use.
|
||||||
Example: $0 --strace-client=ktrace
|
Example: $0 --strace-client=ktrace
|
||||||
max-save-core Limit the number of core files saved (to avoid filling
|
max-save-core Limit the number of core files saved (to avoid filling
|
||||||
@ -5752,7 +5798,7 @@ Options for valgrind
|
|||||||
Misc options
|
Misc options
|
||||||
user=USER User for connecting to mysqld(default: $opt_user)
|
user=USER User for connecting to mysqld(default: $opt_user)
|
||||||
comment=STR Write STR to the output
|
comment=STR Write STR to the output
|
||||||
notimer Don't show test case execution time
|
timer Show test case execution time.
|
||||||
verbose More verbose output(use multiple times for even more)
|
verbose More verbose output(use multiple times for even more)
|
||||||
verbose-restart Write when and why servers are restarted
|
verbose-restart Write when and why servers are restarted
|
||||||
start Only initialize and start the servers, using the
|
start Only initialize and start the servers, using the
|
||||||
@ -5792,6 +5838,7 @@ Misc options
|
|||||||
actions. Disable facility with NUM=0.
|
actions. Disable facility with NUM=0.
|
||||||
gcov Collect coverage information after the test.
|
gcov Collect coverage information after the test.
|
||||||
The result is a gcov file per source and header file.
|
The result is a gcov file per source and header file.
|
||||||
|
gprof Collect profiling information using gprof.
|
||||||
experimental=<file> Refer to list of tests considered experimental;
|
experimental=<file> Refer to list of tests considered experimental;
|
||||||
failures will be marked exp-fail instead of fail.
|
failures will be marked exp-fail instead of fail.
|
||||||
report-features First run a "test" that reports mysql features
|
report-features First run a "test" that reports mysql features
|
||||||
@ -5804,6 +5851,11 @@ Misc options
|
|||||||
engine to InnoDB.
|
engine to InnoDB.
|
||||||
report-times Report how much time has been spent on different
|
report-times Report how much time has been spent on different
|
||||||
phases of test execution.
|
phases of test execution.
|
||||||
|
|
||||||
|
Some options that control enabling a feature for normal test runs,
|
||||||
|
can be turned off by prepending 'no' to the option, e.g. --notimer.
|
||||||
|
This applies to reorder, timer, check-testcases and warnings.
|
||||||
|
|
||||||
HERE
|
HERE
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
|
@ -12801,3 +12801,9 @@ t1 CREATE TABLE `t1` (
|
|||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# BUG#58205 - Valgrind failure in fn_format when called from
|
||||||
|
# archive_discover
|
||||||
|
#
|
||||||
|
CREATE TABLE `a/../`(a INT) ENGINE=ARCHIVE;
|
||||||
|
DROP TABLE `a/../`;
|
||||||
|
@ -476,3 +476,24 @@ SELECT a FROM t2;
|
|||||||
a
|
a
|
||||||
2
|
2
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
#
|
||||||
|
# Bug#39828 autoinc wraps around when offset and increment > 1
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) engine=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES(1);
|
||||||
|
INSERT INTO t1 VALUES (18446744073709551601);
|
||||||
|
SET @@SESSION.AUTO_INCREMENT_INCREMENT=10;
|
||||||
|
SELECT @@SESSION.AUTO_INCREMENT_OFFSET;
|
||||||
|
@@SESSION.AUTO_INCREMENT_OFFSET
|
||||||
|
1
|
||||||
|
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||||
|
ERROR 22003: Out of range value for column 't1' at row 167
|
||||||
|
SELECT * FROM t1;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
18446744073709551601
|
||||||
|
18446744073709551611
|
||||||
|
SET @@SESSION.AUTO_INCREMENT_INCREMENT=default;
|
||||||
|
SET @@SESSION.AUTO_INCREMENT_OFFSET=default;
|
||||||
|
DROP TABLE t1;
|
||||||
|
End of 5.1 tests
|
||||||
|
17
mysql-test/r/bug58669.result
Normal file
17
mysql-test/r/bug58669.result
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# Bug#58669: read_only not enforced on 5.5.x
|
||||||
|
#
|
||||||
|
CREATE USER user1@localhost;
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
GRANT ALL PRIVILEGES ON db1.* TO user1@localhost;
|
||||||
|
CREATE TABLE db1.t1(a INT);
|
||||||
|
SELECT CURRENT_USER();
|
||||||
|
CURRENT_USER()
|
||||||
|
user1@localhost
|
||||||
|
SHOW VARIABLES LIKE "%read_only%";
|
||||||
|
Variable_name Value
|
||||||
|
read_only ON
|
||||||
|
INSERT INTO db1.t1 VALUES (1);
|
||||||
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
||||||
|
DROP DATABASE db1;
|
||||||
|
DROP USER user1@localhost;
|
@ -82,6 +82,314 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
|
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# Start of 5.1 tests
|
||||||
|
#
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
cp1251_general_ci
|
||||||
|
CREATE TABLE t1 AS SELECT ' ' AS a LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
|
||||||
|
INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
|
||||||
|
INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
|
||||||
|
INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
|
||||||
|
INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
|
||||||
|
INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
|
||||||
|
INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
|
||||||
|
INSERT INTO t1 VALUES (0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
|
||||||
|
INSERT INTO t1 VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
|
||||||
|
INSERT INTO t1 VALUES (0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
|
||||||
|
INSERT INTO t1 VALUES (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57);
|
||||||
|
INSERT INTO t1 VALUES (0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
|
||||||
|
INSERT INTO t1 VALUES (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67);
|
||||||
|
INSERT INTO t1 VALUES (0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
|
||||||
|
INSERT INTO t1 VALUES (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77);
|
||||||
|
INSERT INTO t1 VALUES (0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
|
||||||
|
INSERT INTO t1 VALUES (0x80),(0x81),(0x82),(0x83),(0x84),(0x85),(0x86),(0x87);
|
||||||
|
INSERT INTO t1 VALUES (0x88),(0x89),(0x8A),(0x8B),(0x8C),(0x8D),(0x8E),(0x8F);
|
||||||
|
INSERT INTO t1 VALUES (0x90),(0x91),(0x92),(0x93),(0x94),(0x95),(0x96),(0x97);
|
||||||
|
INSERT INTO t1 VALUES (0x98),(0x99),(0x9A),(0x9B),(0x9C),(0x9D),(0x9E),(0x9F);
|
||||||
|
INSERT INTO t1 VALUES (0xA0),(0xA1),(0xA2),(0xA3),(0xA4),(0xA5),(0xA6),(0xA7);
|
||||||
|
INSERT INTO t1 VALUES (0xA8),(0xA9),(0xAA),(0xAB),(0xAC),(0xAD),(0xAE),(0xAF);
|
||||||
|
INSERT INTO t1 VALUES (0xB0),(0xB1),(0xB2),(0xB3),(0xB4),(0xB5),(0xB6),(0xB7);
|
||||||
|
INSERT INTO t1 VALUES (0xB8),(0xB9),(0xBA),(0xBB),(0xBC),(0xBD),(0xBE),(0xBF);
|
||||||
|
INSERT INTO t1 VALUES (0xC0),(0xC1),(0xC2),(0xC3),(0xC4),(0xC5),(0xC6),(0xC7);
|
||||||
|
INSERT INTO t1 VALUES (0xC8),(0xC9),(0xCA),(0xCB),(0xCC),(0xCD),(0xCE),(0xCF);
|
||||||
|
INSERT INTO t1 VALUES (0xD0),(0xD1),(0xD2),(0xD3),(0xD4),(0xD5),(0xD6),(0xD7);
|
||||||
|
INSERT INTO t1 VALUES (0xD8),(0xD9),(0xDA),(0xDB),(0xDC),(0xDD),(0xDE),(0xDF);
|
||||||
|
INSERT INTO t1 VALUES (0xE0),(0xE1),(0xE2),(0xE3),(0xE4),(0xE5),(0xE6),(0xE7);
|
||||||
|
INSERT INTO t1 VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF);
|
||||||
|
INSERT INTO t1 VALUES (0xF0),(0xF1),(0xF2),(0xF3),(0xF4),(0xF5),(0xF6),(0xF7);
|
||||||
|
INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
|
||||||
|
SELECT
|
||||||
|
HEX(a) AS chr,
|
||||||
|
HEX(LOWER(a)) AS upper,
|
||||||
|
HEX(LOWER(a)) AS lower,
|
||||||
|
HEX(@utf8:=CONVERT(a USING utf8)) AS utf8,
|
||||||
|
HEX(@roundtrip:=CAST(@utf8 AS CHAR)) AS roundtrip,
|
||||||
|
if(a=BINARY @roundtrip,'','Round trip unsafe') AS issafe
|
||||||
|
FROM t1 ORDER BY chr;
|
||||||
|
chr upper lower utf8 roundtrip issafe
|
||||||
|
00 00 00 00 00
|
||||||
|
01 01 01 01 01
|
||||||
|
02 02 02 02 02
|
||||||
|
03 03 03 03 03
|
||||||
|
04 04 04 04 04
|
||||||
|
05 05 05 05 05
|
||||||
|
06 06 06 06 06
|
||||||
|
07 07 07 07 07
|
||||||
|
08 08 08 08 08
|
||||||
|
09 09 09 09 09
|
||||||
|
0A 0A 0A 0A 0A
|
||||||
|
0B 0B 0B 0B 0B
|
||||||
|
0C 0C 0C 0C 0C
|
||||||
|
0D 0D 0D 0D 0D
|
||||||
|
0E 0E 0E 0E 0E
|
||||||
|
0F 0F 0F 0F 0F
|
||||||
|
10 10 10 10 10
|
||||||
|
11 11 11 11 11
|
||||||
|
12 12 12 12 12
|
||||||
|
13 13 13 13 13
|
||||||
|
14 14 14 14 14
|
||||||
|
15 15 15 15 15
|
||||||
|
16 16 16 16 16
|
||||||
|
17 17 17 17 17
|
||||||
|
18 18 18 18 18
|
||||||
|
19 19 19 19 19
|
||||||
|
1A 1A 1A 1A 1A
|
||||||
|
1B 1B 1B 1B 1B
|
||||||
|
1C 1C 1C 1C 1C
|
||||||
|
1D 1D 1D 1D 1D
|
||||||
|
1E 1E 1E 1E 1E
|
||||||
|
1F 1F 1F 1F 1F
|
||||||
|
20 20 20 20 20
|
||||||
|
21 21 21 21 21
|
||||||
|
22 22 22 22 22
|
||||||
|
23 23 23 23 23
|
||||||
|
24 24 24 24 24
|
||||||
|
25 25 25 25 25
|
||||||
|
26 26 26 26 26
|
||||||
|
27 27 27 27 27
|
||||||
|
28 28 28 28 28
|
||||||
|
29 29 29 29 29
|
||||||
|
2A 2A 2A 2A 2A
|
||||||
|
2B 2B 2B 2B 2B
|
||||||
|
2C 2C 2C 2C 2C
|
||||||
|
2D 2D 2D 2D 2D
|
||||||
|
2E 2E 2E 2E 2E
|
||||||
|
2F 2F 2F 2F 2F
|
||||||
|
30 30 30 30 30
|
||||||
|
31 31 31 31 31
|
||||||
|
32 32 32 32 32
|
||||||
|
33 33 33 33 33
|
||||||
|
34 34 34 34 34
|
||||||
|
35 35 35 35 35
|
||||||
|
36 36 36 36 36
|
||||||
|
37 37 37 37 37
|
||||||
|
38 38 38 38 38
|
||||||
|
39 39 39 39 39
|
||||||
|
3A 3A 3A 3A 3A
|
||||||
|
3B 3B 3B 3B 3B
|
||||||
|
3C 3C 3C 3C 3C
|
||||||
|
3D 3D 3D 3D 3D
|
||||||
|
3E 3E 3E 3E 3E
|
||||||
|
3F 3F 3F 3F 3F
|
||||||
|
40 40 40 40 40
|
||||||
|
41 61 61 41 41
|
||||||
|
42 62 62 42 42
|
||||||
|
43 63 63 43 43
|
||||||
|
44 64 64 44 44
|
||||||
|
45 65 65 45 45
|
||||||
|
46 66 66 46 46
|
||||||
|
47 67 67 47 47
|
||||||
|
48 68 68 48 48
|
||||||
|
49 69 69 49 49
|
||||||
|
4A 6A 6A 4A 4A
|
||||||
|
4B 6B 6B 4B 4B
|
||||||
|
4C 6C 6C 4C 4C
|
||||||
|
4D 6D 6D 4D 4D
|
||||||
|
4E 6E 6E 4E 4E
|
||||||
|
4F 6F 6F 4F 4F
|
||||||
|
50 70 70 50 50
|
||||||
|
51 71 71 51 51
|
||||||
|
52 72 72 52 52
|
||||||
|
53 73 73 53 53
|
||||||
|
54 74 74 54 54
|
||||||
|
55 75 75 55 55
|
||||||
|
56 76 76 56 56
|
||||||
|
57 77 77 57 57
|
||||||
|
58 78 78 58 58
|
||||||
|
59 79 79 59 59
|
||||||
|
5A 7A 7A 5A 5A
|
||||||
|
5B 5B 5B 5B 5B
|
||||||
|
5C 5C 5C 5C 5C
|
||||||
|
5D 5D 5D 5D 5D
|
||||||
|
5E 5E 5E 5E 5E
|
||||||
|
5F 5F 5F 5F 5F
|
||||||
|
60 60 60 60 60
|
||||||
|
61 61 61 61 61
|
||||||
|
62 62 62 62 62
|
||||||
|
63 63 63 63 63
|
||||||
|
64 64 64 64 64
|
||||||
|
65 65 65 65 65
|
||||||
|
66 66 66 66 66
|
||||||
|
67 67 67 67 67
|
||||||
|
68 68 68 68 68
|
||||||
|
69 69 69 69 69
|
||||||
|
6A 6A 6A 6A 6A
|
||||||
|
6B 6B 6B 6B 6B
|
||||||
|
6C 6C 6C 6C 6C
|
||||||
|
6D 6D 6D 6D 6D
|
||||||
|
6E 6E 6E 6E 6E
|
||||||
|
6F 6F 6F 6F 6F
|
||||||
|
70 70 70 70 70
|
||||||
|
71 71 71 71 71
|
||||||
|
72 72 72 72 72
|
||||||
|
73 73 73 73 73
|
||||||
|
74 74 74 74 74
|
||||||
|
75 75 75 75 75
|
||||||
|
76 76 76 76 76
|
||||||
|
77 77 77 77 77
|
||||||
|
78 78 78 78 78
|
||||||
|
79 79 79 79 79
|
||||||
|
7A 7A 7A 7A 7A
|
||||||
|
7B 7B 7B 7B 7B
|
||||||
|
7C 7C 7C 7C 7C
|
||||||
|
7D 7D 7D 7D 7D
|
||||||
|
7E 7E 7E 7E 7E
|
||||||
|
7F 7F 7F 7F 7F
|
||||||
|
80 90 90 D082 80
|
||||||
|
81 83 83 D083 81
|
||||||
|
82 82 82 E2809A 82
|
||||||
|
83 83 83 D193 83
|
||||||
|
84 84 84 E2809E 84
|
||||||
|
85 85 85 E280A6 85
|
||||||
|
86 86 86 E280A0 86
|
||||||
|
87 87 87 E280A1 87
|
||||||
|
88 88 88 E282AC 88
|
||||||
|
89 89 89 E280B0 89
|
||||||
|
8A 9A 9A D089 8A
|
||||||
|
8B 8B 8B E280B9 8B
|
||||||
|
8C 9C 9C D08A 8C
|
||||||
|
8D 9D 9D D08C 8D
|
||||||
|
8E 9E 9E D08B 8E
|
||||||
|
8F 9F 9F D08F 8F
|
||||||
|
90 90 90 D192 90
|
||||||
|
91 91 91 E28098 91
|
||||||
|
92 92 92 E28099 92
|
||||||
|
93 93 93 E2809C 93
|
||||||
|
94 94 94 E2809D 94
|
||||||
|
95 95 95 E280A2 95
|
||||||
|
96 96 96 E28093 96
|
||||||
|
97 97 97 E28094 97
|
||||||
|
98 98 98 3F 3F Round trip unsafe
|
||||||
|
99 99 99 E284A2 99
|
||||||
|
9A 9A 9A D199 9A
|
||||||
|
9B 9B 9B E280BA 9B
|
||||||
|
9C 9C 9C D19A 9C
|
||||||
|
9D 9D 9D D19C 9D
|
||||||
|
9E 9E 9E D19B 9E
|
||||||
|
9F 9F 9F D19F 9F
|
||||||
|
A0 A0 A0 C2A0 A0
|
||||||
|
A1 A2 A2 D08E A1
|
||||||
|
A2 A2 A2 D19E A2
|
||||||
|
A3 BC BC D088 A3
|
||||||
|
A4 A4 A4 C2A4 A4
|
||||||
|
A5 B4 B4 D290 A5
|
||||||
|
A6 A6 A6 C2A6 A6
|
||||||
|
A7 A7 A7 C2A7 A7
|
||||||
|
A8 B8 B8 D081 A8
|
||||||
|
A9 A9 A9 C2A9 A9
|
||||||
|
AA BA BA D084 AA
|
||||||
|
AB AB AB C2AB AB
|
||||||
|
AC AC AC C2AC AC
|
||||||
|
AD AD AD C2AD AD
|
||||||
|
AE AE AE C2AE AE
|
||||||
|
AF BF BF D087 AF
|
||||||
|
B0 B0 B0 C2B0 B0
|
||||||
|
B1 B1 B1 C2B1 B1
|
||||||
|
B2 B3 B3 D086 B2
|
||||||
|
B3 B3 B3 D196 B3
|
||||||
|
B4 B4 B4 D291 B4
|
||||||
|
B5 B5 B5 C2B5 B5
|
||||||
|
B6 B6 B6 C2B6 B6
|
||||||
|
B7 B7 B7 C2B7 B7
|
||||||
|
B8 B8 B8 D191 B8
|
||||||
|
B9 B9 B9 E28496 B9
|
||||||
|
BA BA BA D194 BA
|
||||||
|
BB BB BB C2BB BB
|
||||||
|
BC BC BC D198 BC
|
||||||
|
BD BE BE D085 BD
|
||||||
|
BE BE BE D195 BE
|
||||||
|
BF BF BF D197 BF
|
||||||
|
C0 E0 E0 D090 C0
|
||||||
|
C1 E1 E1 D091 C1
|
||||||
|
C2 E2 E2 D092 C2
|
||||||
|
C3 E3 E3 D093 C3
|
||||||
|
C4 E4 E4 D094 C4
|
||||||
|
C5 E5 E5 D095 C5
|
||||||
|
C6 E6 E6 D096 C6
|
||||||
|
C7 E7 E7 D097 C7
|
||||||
|
C8 E8 E8 D098 C8
|
||||||
|
C9 E9 E9 D099 C9
|
||||||
|
CA EA EA D09A CA
|
||||||
|
CB EB EB D09B CB
|
||||||
|
CC EC EC D09C CC
|
||||||
|
CD ED ED D09D CD
|
||||||
|
CE EE EE D09E CE
|
||||||
|
CF EF EF D09F CF
|
||||||
|
D0 F0 F0 D0A0 D0
|
||||||
|
D1 F1 F1 D0A1 D1
|
||||||
|
D2 F2 F2 D0A2 D2
|
||||||
|
D3 F3 F3 D0A3 D3
|
||||||
|
D4 F4 F4 D0A4 D4
|
||||||
|
D5 F5 F5 D0A5 D5
|
||||||
|
D6 F6 F6 D0A6 D6
|
||||||
|
D7 F7 F7 D0A7 D7
|
||||||
|
D8 F8 F8 D0A8 D8
|
||||||
|
D9 F9 F9 D0A9 D9
|
||||||
|
DA FA FA D0AA DA
|
||||||
|
DB FB FB D0AB DB
|
||||||
|
DC FC FC D0AC DC
|
||||||
|
DD FD FD D0AD DD
|
||||||
|
DE FE FE D0AE DE
|
||||||
|
DF FF FF D0AF DF
|
||||||
|
E0 E0 E0 D0B0 E0
|
||||||
|
E1 E1 E1 D0B1 E1
|
||||||
|
E2 E2 E2 D0B2 E2
|
||||||
|
E3 E3 E3 D0B3 E3
|
||||||
|
E4 E4 E4 D0B4 E4
|
||||||
|
E5 E5 E5 D0B5 E5
|
||||||
|
E6 E6 E6 D0B6 E6
|
||||||
|
E7 E7 E7 D0B7 E7
|
||||||
|
E8 E8 E8 D0B8 E8
|
||||||
|
E9 E9 E9 D0B9 E9
|
||||||
|
EA EA EA D0BA EA
|
||||||
|
EB EB EB D0BB EB
|
||||||
|
EC EC EC D0BC EC
|
||||||
|
ED ED ED D0BD ED
|
||||||
|
EE EE EE D0BE EE
|
||||||
|
EF EF EF D0BF EF
|
||||||
|
F0 F0 F0 D180 F0
|
||||||
|
F1 F1 F1 D181 F1
|
||||||
|
F2 F2 F2 D182 F2
|
||||||
|
F3 F3 F3 D183 F3
|
||||||
|
F4 F4 F4 D184 F4
|
||||||
|
F5 F5 F5 D185 F5
|
||||||
|
F6 F6 F6 D186 F6
|
||||||
|
F7 F7 F7 D187 F7
|
||||||
|
F8 F8 F8 D188 F8
|
||||||
|
F9 F9 F9 D189 F9
|
||||||
|
FA FA FA D18A FA
|
||||||
|
FB FB FB D18B FB
|
||||||
|
FC FC FC D18C FC
|
||||||
|
FD FD FD D18D FD
|
||||||
|
FE FE FE D18E FE
|
||||||
|
FF FF FF D18F FF
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of 5.1 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
# Start of 5.5 tests
|
# Start of 5.5 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
2310
mysql-test/r/ctype_like_range.result
Normal file
2310
mysql-test/r/ctype_like_range.result
Normal file
File diff suppressed because it is too large
Load Diff
@ -1684,6 +1684,9 @@ ARMENIAN CAPIT ECH 2
|
|||||||
ARMENIAN CAPIT ZA 2
|
ARMENIAN CAPIT ZA 2
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# Start of 5.5 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
# WL#1213 Implement 4-byte UTF8, UTF16 and UTF32
|
# WL#1213 Implement 4-byte UTF8, UTF16 and UTF32
|
||||||
# Testing that only utf8mb4 is superset for utf8
|
# Testing that only utf8mb4 is superset for utf8
|
||||||
# No other Unicode character set pairs have superset/subset relations
|
# No other Unicode character set pairs have superset/subset relations
|
||||||
@ -1739,3 +1742,22 @@ ERROR HY000: Illegal mix of collations (utf32_general_ci,IMPLICIT) and (utf8mb4_
|
|||||||
SELECT CHARSET(CONCAT(utf32, utf16)) FROM t1;
|
SELECT CHARSET(CONCAT(utf32, utf16)) FROM t1;
|
||||||
ERROR HY000: Illegal mix of collations (utf32_general_ci,IMPLICIT) and (utf16_general_ci,IMPLICIT) for operation 'concat'
|
ERROR HY000: Illegal mix of collations (utf32_general_ci,IMPLICIT) and (utf16_general_ci,IMPLICIT) for operation 'concat'
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug#58321 No warning when characters outside BMP0 is converted to UCS2
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf32);
|
||||||
|
CREATE TABLE t2 (a VARCHAR(10) CHARACTER SET ucs2);
|
||||||
|
INSERT INTO t1 VALUES (0x10082), (0x12345);
|
||||||
|
INSERT INTO t2 SELECT * FROM t1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1366 Incorrect string value: '\x00\x01\x00\x82' for column 'a' at row 1
|
||||||
|
Warning 1366 Incorrect string value: '\x00\x01\x23\x45' for column 'a' at row 2
|
||||||
|
SELECT HEX(a) FROM t2;
|
||||||
|
HEX(a)
|
||||||
|
003F
|
||||||
|
003F
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP TABLE t2;
|
||||||
|
#
|
||||||
|
# End of 5.5 tests
|
||||||
|
#
|
||||||
|
@ -2888,3 +2888,101 @@ a hex(b) c
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
set names utf8;
|
set names utf8;
|
||||||
End for 5.0 tests
|
End for 5.0 tests
|
||||||
|
#
|
||||||
|
# Start of 5.5 tests
|
||||||
|
#
|
||||||
|
SET collation_connection=utf8_czech_ci;
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
utf8_czech_ci
|
||||||
|
#
|
||||||
|
# Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
s1
|
||||||
|
c
|
||||||
|
ce
|
||||||
|
cé
|
||||||
|
ch
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
s1
|
||||||
|
c
|
||||||
|
ce
|
||||||
|
cé
|
||||||
|
ch
|
||||||
|
ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'ch';
|
||||||
|
s1
|
||||||
|
ch
|
||||||
|
DROP TABLE t1;
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
utf8_czech_ci
|
||||||
|
#
|
||||||
|
# Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
# Part#2 - ignorable characters
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
HEX(s1)
|
||||||
|
61000000000009
|
||||||
|
61
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
HEX(s1)
|
||||||
|
61000000000009
|
||||||
|
61
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET collation_connection=ucs2_czech_ci;
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
ucs2_czech_ci
|
||||||
|
#
|
||||||
|
# Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
s1
|
||||||
|
c
|
||||||
|
ce
|
||||||
|
cé
|
||||||
|
ch
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
s1
|
||||||
|
c
|
||||||
|
ce
|
||||||
|
cé
|
||||||
|
ch
|
||||||
|
ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'ch';
|
||||||
|
s1
|
||||||
|
ch
|
||||||
|
DROP TABLE t1;
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
ucs2_czech_ci
|
||||||
|
#
|
||||||
|
# Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
# Part#2 - ignorable characters
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
HEX(s1)
|
||||||
|
0061000000000000000000000009
|
||||||
|
0061
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
HEX(s1)
|
||||||
|
0061000000000000000000000009
|
||||||
|
0061
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of 5.5 tests
|
||||||
|
#
|
||||||
|
@ -2368,6 +2368,52 @@ NULL
|
|||||||
NULL
|
NULL
|
||||||
NULL
|
NULL
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
SET collation_connection=utf16_czech_ci;
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
utf16_czech_ci
|
||||||
|
#
|
||||||
|
# Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
s1
|
||||||
|
c
|
||||||
|
ce
|
||||||
|
cé
|
||||||
|
ch
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
s1
|
||||||
|
c
|
||||||
|
ce
|
||||||
|
cé
|
||||||
|
ch
|
||||||
|
ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'ch';
|
||||||
|
s1
|
||||||
|
ch
|
||||||
|
DROP TABLE t1;
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
utf16_czech_ci
|
||||||
|
#
|
||||||
|
# Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
# Part#2 - ignorable characters
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
HEX(s1)
|
||||||
|
0061000000000000000000000009
|
||||||
|
0061
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
HEX(s1)
|
||||||
|
0061000000000000000000000009
|
||||||
|
0061
|
||||||
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
#
|
#
|
||||||
|
@ -2368,6 +2368,52 @@ NULL
|
|||||||
NULL
|
NULL
|
||||||
NULL
|
NULL
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
SET collation_connection=utf32_czech_ci;
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
utf32_czech_ci
|
||||||
|
#
|
||||||
|
# Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
s1
|
||||||
|
c
|
||||||
|
ce
|
||||||
|
cé
|
||||||
|
ch
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||||
|
s1
|
||||||
|
c
|
||||||
|
ce
|
||||||
|
cé
|
||||||
|
ch
|
||||||
|
ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
|
||||||
|
SELECT * FROM t1 WHERE s1 LIKE 'ch';
|
||||||
|
s1
|
||||||
|
ch
|
||||||
|
DROP TABLE t1;
|
||||||
|
SELECT @@collation_connection;
|
||||||
|
@@collation_connection
|
||||||
|
utf32_czech_ci
|
||||||
|
#
|
||||||
|
# Bug#57737 Character sets: search fails with like, contraction, index
|
||||||
|
# Part#2 - ignorable characters
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||||
|
INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
HEX(s1)
|
||||||
|
00000061000000000000000000000000000000000000000000000009
|
||||||
|
00000061
|
||||||
|
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||||
|
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||||
|
HEX(s1)
|
||||||
|
00000061000000000000000000000000000000000000000000000009
|
||||||
|
00000061
|
||||||
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
#
|
#
|
||||||
|
@ -400,4 +400,30 @@ SELECT 0 FROM
|
|||||||
(SELECT 0) t61;
|
(SELECT 0) t61;
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
|
#
|
||||||
|
# A nested materialized derived table is used before being populated.
|
||||||
|
# (addon for bug#19077)
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (i INT, j BIGINT);
|
||||||
|
INSERT INTO t1 VALUES (1, 2), (2, 2), (3, 2);
|
||||||
|
SELECT * FROM (SELECT MIN(i) FROM t1
|
||||||
|
WHERE j = SUBSTRING('12', (SELECT * FROM (SELECT MIN(j) FROM t1) t2))) t3;
|
||||||
|
MIN(i)
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
||||||
# End of 5.0 tests
|
# End of 5.0 tests
|
||||||
|
#
|
||||||
|
# Bug#58730 Assertion failed: table->key_read == 0 in close_thread_table,
|
||||||
|
# temptable views
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
CREATE TABLE t2 (b INT, KEY (b));
|
||||||
|
INSERT INTO t1 VALUES (1),(1);
|
||||||
|
INSERT INTO t2 VALUES (1),(1);
|
||||||
|
CREATE algorithm=temptable VIEW v1 AS
|
||||||
|
SELECT 1 FROM t1 LEFT JOIN t1 t3 ON 1 > (SELECT 1 FROM t1);
|
||||||
|
CREATE algorithm=temptable VIEW v2 AS SELECT 1 FROM t2;
|
||||||
|
EXPLAIN SELECT 1 FROM t1 JOIN v1 ON 1 > (SELECT 1 FROM v2);
|
||||||
|
ERROR 21000: Subquery returns more than 1 row
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
DROP VIEW v1, v2;
|
||||||
|
@ -1046,6 +1046,18 @@ INSERT INTO t1 values (0),(0);
|
|||||||
SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d));
|
SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d));
|
||||||
ERROR 22007: Illegal non geometric '(select 1 from (select (1 = group_concat(`test`.`t1`.`f1` separator ',')) AS `1 IN (GROUP_CONCAT(t1.f1))` from `test`.`t1` join `test`.`t1` `t` group by `t`.`f1`) `d`)' value found during parsing
|
ERROR 22007: Illegal non geometric '(select 1 from (select (1 = group_concat(`test`.`t1`.`f1` separator ',')) AS `1 IN (GROUP_CONCAT(t1.f1))` from `test`.`t1` join `test`.`t1` `t` group by `t`.`f1`) `d`)' value found during parsing
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug#58396 group_concat and explain extended are still crashy
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(a INT);
|
||||||
|
EXPLAIN EXTENDED SELECT UPDATEXML('1', a, '1')
|
||||||
|
FROM t1 ORDER BY (SELECT GROUP_CONCAT(1) FROM t1);
|
||||||
|
ERROR HY000: Only constant XPATH queries are supported
|
||||||
|
SHOW WARNINGS;
|
||||||
|
Level Code Message
|
||||||
|
Error 1105 Only constant XPATH queries are supported
|
||||||
|
Note 1003 select updatexml('1',`test`.`t1`.`a`,'1') AS `UPDATEXML('1', a, '1')` from `test`.`t1` order by (select group_concat(1 separator ',') from `test`.`t1`)
|
||||||
|
DROP TABLE t1;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
DROP TABLE IF EXISTS t1, t2;
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
CREATE TABLE t1 (a VARCHAR(6), b INT);
|
CREATE TABLE t1 (a VARCHAR(6), b INT);
|
||||||
|
@ -1746,3 +1746,18 @@ MAX(c1) MIN(c1)
|
|||||||
-00:00:01 -00:00:01
|
-00:00:01 -00:00:01
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# End of the bug#56120
|
# End of the bug#56120
|
||||||
|
#
|
||||||
|
# Bug#57932 "query with AVG(DISTINCT) returns NULL if last
|
||||||
|
# aggregated value was NULL"
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (col_int_nokey int(11));
|
||||||
|
INSERT INTO t1 VALUES (7),(8),(NULL);
|
||||||
|
SELECT AVG(DISTINCT col_int_nokey) FROM t1;
|
||||||
|
AVG(DISTINCT col_int_nokey)
|
||||||
|
7.5000
|
||||||
|
SELECT AVG(DISTINCT outr.col_int_nokey) FROM t1 AS outr LEFT JOIN t1 AS outr2 ON
|
||||||
|
outr.col_int_nokey = outr2.col_int_nokey;
|
||||||
|
AVG(DISTINCT outr.col_int_nokey)
|
||||||
|
7.5000
|
||||||
|
DROP TABLE t1;
|
||||||
|
# End of the bug#57932
|
||||||
|
@ -145,3 +145,50 @@ select count(*), min(7), max(7) from t2m, t1i;
|
|||||||
count(*) min(7) max(7)
|
count(*) min(7) max(7)
|
||||||
0 NULL NULL
|
0 NULL NULL
|
||||||
drop table t1m, t1i, t2m, t2i;
|
drop table t1m, t1i, t2m, t2i;
|
||||||
|
#
|
||||||
|
# Bug #57954: BIT_AND function returns incorrect results when
|
||||||
|
# semijoin=on
|
||||||
|
CREATE TABLE c (
|
||||||
|
pk INT,
|
||||||
|
col_varchar_key VARCHAR(1),
|
||||||
|
PRIMARY KEY (pk),
|
||||||
|
KEY col_varchar_key (col_varchar_key)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
INSERT INTO c VALUES (11,NULL);
|
||||||
|
INSERT INTO c VALUES (16,'c');
|
||||||
|
CREATE TABLE bb (
|
||||||
|
pk INT,
|
||||||
|
col_varchar_key VARCHAR(1),
|
||||||
|
PRIMARY KEY (pk),
|
||||||
|
KEY col_varchar_key (col_varchar_key)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
INSERT INTO bb VALUES (10,NULL);
|
||||||
|
SELECT straight_join BIT_AND(c.pk)
|
||||||
|
FROM
|
||||||
|
bb, c
|
||||||
|
WHERE c.col_varchar_key='ABC'
|
||||||
|
ORDER BY c.pk;
|
||||||
|
BIT_AND(c.pk)
|
||||||
|
18446744073709551615
|
||||||
|
DROP TABLE c,bb;
|
||||||
|
#
|
||||||
|
# Bug #58050: BIT_OR and BIT_XOR return incorrect results when
|
||||||
|
# semijoin=on
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES(1, 1, 1);
|
||||||
|
CREATE TABLE t2 (pk INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t2 VALUES (1, 1, NULL);
|
||||||
|
SELECT t1.* FROM t1 JOIN t2 ON t1.c=t2.c WHERE t1.pk=1;
|
||||||
|
pk b c
|
||||||
|
SELECT BIT_OR(t1.b) FROM t1 JOIN t2 ON t1.c=t2.c WHERE t1.pk=1;
|
||||||
|
BIT_OR(t1.b)
|
||||||
|
0
|
||||||
|
SELECT BIT_AND(t1.b) FROM t1 JOIN t2 ON t1.c=t2.c WHERE t1.pk=1;
|
||||||
|
BIT_AND(t1.b)
|
||||||
|
18446744073709551615
|
||||||
|
SELECT BIT_XOR(t1.b) FROM t1 JOIN t2 ON t1.c=t2.c WHERE t1.pk=1;
|
||||||
|
BIT_XOR(t1.b)
|
||||||
|
0
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
End of 5.5 tests
|
||||||
|
@ -351,6 +351,12 @@ GREATEST(a, (SELECT b FROM t1 LIMIT 1))
|
|||||||
3
|
3
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
SELECT INET_NTOA(0);
|
||||||
|
INET_NTOA(0)
|
||||||
|
0.0.0.0
|
||||||
|
SELECT '1' IN ('1', INET_NTOA(0));
|
||||||
|
'1' IN ('1', INET_NTOA(0))
|
||||||
|
1
|
||||||
#
|
#
|
||||||
# Bug #52165: Assertion failed: file .\dtoa.c, line 465
|
# Bug #52165: Assertion failed: file .\dtoa.c, line 465
|
||||||
#
|
#
|
||||||
|
@ -2603,6 +2603,18 @@ ORDER BY QUOTE(t1.a);
|
|||||||
1
|
1
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug#57913 large negative number to string conversion functions crash
|
||||||
|
# Bug#57810 case/when/then : Assertion failed: length || !scale
|
||||||
|
#
|
||||||
|
SELECT '1' IN ('1', SUBSTRING(-9223372036854775809, 1));
|
||||||
|
'1' IN ('1', SUBSTRING(-9223372036854775809, 1))
|
||||||
|
1
|
||||||
|
SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3));
|
||||||
|
CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3))
|
||||||
|
1
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect DECIMAL value: ''
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
Start of 5.4 tests
|
Start of 5.4 tests
|
||||||
SELECT format(12345678901234567890.123, 3);
|
SELECT format(12345678901234567890.123, 3);
|
||||||
|
@ -1341,3 +1341,12 @@ SELECT * FROM t1 WHERE date_date <= addtime(date_add("2000-1-1", INTERVAL "1:1:1
|
|||||||
date_date
|
date_date
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# Bug#57512 str_to_date crash...
|
||||||
|
#
|
||||||
|
SELECT WEEK(STR_TO_DATE(NULL,0));
|
||||||
|
WEEK(STR_TO_DATE(NULL,0))
|
||||||
|
NULL
|
||||||
|
SELECT SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR);
|
||||||
|
SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR)
|
||||||
|
NULL
|
||||||
|
#
|
||||||
|
@ -17,3 +17,38 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
|
1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
|
||||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
|
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
#
|
||||||
|
# BUG#58456: Assertion 0 in QUICK_INDEX_MERGE_SELECT::need_sorted_output
|
||||||
|
# in opt_range.h
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
col_int INT,
|
||||||
|
col_int_key INT,
|
||||||
|
pk INT NOT NULL,
|
||||||
|
PRIMARY KEY (pk),
|
||||||
|
KEY col_int_key (col_int_key)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (NULL,1,1), (6,2,2), (5,3,3), (NULL,4,4);
|
||||||
|
INSERT INTO t1 VALUES (1,NULL,6), (8,5,7), (NULL,8,8), (8,NULL,5);
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
pk INT PRIMARY KEY
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
EXPLAIN SELECT t1.pk
|
||||||
|
FROM t2 LEFT JOIN t1 ON t2.pk = t1.col_int
|
||||||
|
WHERE t1.col_int_key BETWEEN 5 AND 6
|
||||||
|
AND t1.pk IS NULL OR t1.pk IN (5)
|
||||||
|
ORDER BY pk;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 const PRIMARY,col_int_key PRIMARY 4 const 2 Using where
|
||||||
|
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.col_int 1 Using index
|
||||||
|
|
||||||
|
SELECT t1.pk
|
||||||
|
FROM t2 LEFT JOIN t1 ON t2.pk = t1.col_int
|
||||||
|
WHERE t1.col_int_key BETWEEN 5 AND 6
|
||||||
|
AND t1.pk IS NULL OR t1.pk IN (5)
|
||||||
|
ORDER BY pk;
|
||||||
|
pk
|
||||||
|
|
||||||
|
DROP TABLE t1,t2;
|
||||||
|
# End BUG#58456
|
||||||
|
@ -430,6 +430,8 @@ SELECT table_name, table_comment FROM information_schema.tables
|
|||||||
WHERE table_schema= 'test' AND table_name= 't1';
|
WHERE table_schema= 'test' AND table_name= 't1';
|
||||||
table_name table_comment
|
table_name table_comment
|
||||||
t1 Lock wait timeout exceeded; try restarting transaction
|
t1 Lock wait timeout exceeded; try restarting transaction
|
||||||
|
Warnings:
|
||||||
|
Warning 1205 Lock wait timeout exceeded; try restarting transaction
|
||||||
# Connection default
|
# Connection default
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
# Connection con3
|
# Connection con3
|
||||||
|
@ -2322,6 +2322,8 @@ select table_name, table_type, auto_increment, table_comment
|
|||||||
from information_schema.tables where table_schema='test' and table_name='t2';
|
from information_schema.tables where table_schema='test' and table_name='t2';
|
||||||
table_name table_type auto_increment table_comment
|
table_name table_type auto_increment table_comment
|
||||||
t2 BASE TABLE NULL Table 'test'.'t2' was skipped since its definition is being modified by concurrent DDL statement
|
t2 BASE TABLE NULL Table 'test'.'t2' was skipped since its definition is being modified by concurrent DDL statement
|
||||||
|
Warnings:
|
||||||
|
Warning 1684 Table 'test'.'t2' was skipped since its definition is being modified by concurrent DDL statement
|
||||||
# Switching to connection 'default'.
|
# Switching to connection 'default'.
|
||||||
unlock tables;
|
unlock tables;
|
||||||
# Switching to connection 'con46044'.
|
# Switching to connection 'con46044'.
|
||||||
|
@ -2084,6 +2084,8 @@ SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE
|
|||||||
TABLE_SCHEMA = 'test' and TABLE_NAME='tm1';
|
TABLE_SCHEMA = 'test' and TABLE_NAME='tm1';
|
||||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
|
||||||
def test tm1 BASE TABLE NULL NULL NULL # # # # # # # # # # NULL # # Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
def test tm1 BASE TABLE NULL NULL NULL # # # # # # # # # # NULL # # Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
Warnings:
|
||||||
|
Warning 1168 Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
DROP TABLE tm1;
|
DROP TABLE tm1;
|
||||||
CREATE TABLE t1(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM;
|
CREATE TABLE t1(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM;
|
||||||
CREATE TABLE t2(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM;
|
CREATE TABLE t2(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM;
|
||||||
|
@ -669,4 +669,15 @@ Error 1242 Subquery returns more than 1 row
|
|||||||
Error 1242 Subquery returns more than 1 row
|
Error 1242 Subquery returns more than 1 row
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
SET SESSION sql_safe_updates = DEFAULT;
|
SET SESSION sql_safe_updates = DEFAULT;
|
||||||
|
#
|
||||||
|
# Bug#52157 various crashes and assertions with multi-table update, stored function
|
||||||
|
#
|
||||||
|
CREATE FUNCTION f1 () RETURNS BLOB RETURN 1;
|
||||||
|
CREATE TABLE t1 (f1 DATE);
|
||||||
|
INSERT INTO t1 VALUES('2001-01-01');
|
||||||
|
UPDATE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect datetime value: '1'
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
DROP TABLE t1;
|
||||||
end of tests
|
end of tests
|
||||||
|
@ -433,4 +433,73 @@ Bug #47147: mysql client option --skip-column-names does not apply to vertical o
|
|||||||
*************************** 1. row ***************************
|
*************************** 1. row ***************************
|
||||||
1
|
1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE
|
||||||
|
# commands.
|
||||||
|
#
|
||||||
|
CREATE DATABASE connected_db;
|
||||||
|
USE connected_db;
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_connected_db
|
||||||
|
table_in_connected_db
|
||||||
|
DROP DATABASE connected_db;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Testing --one-database option
|
||||||
|
#
|
||||||
|
CREATE DATABASE connected_db;
|
||||||
|
SHOW TABLES IN connected_db;
|
||||||
|
Tables_in_connected_db
|
||||||
|
t1
|
||||||
|
SHOW TABLES IN test;
|
||||||
|
Tables_in_test
|
||||||
|
t1
|
||||||
|
USE test;
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP DATABASE connected_db;
|
||||||
|
|
||||||
|
SHOW TABLES IN test;
|
||||||
|
Tables_in_test
|
||||||
|
SHOW TABLES IN test1;
|
||||||
|
Tables_in_test1
|
||||||
|
DROP DATABASE test1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking --one-database option followed by the execution of
|
||||||
|
# connect command.
|
||||||
|
#
|
||||||
|
CREATE DATABASE connected_db;
|
||||||
|
SHOW TABLES IN connected_db;
|
||||||
|
Tables_in_connected_db
|
||||||
|
t1
|
||||||
|
t2
|
||||||
|
SHOW TABLES IN test;
|
||||||
|
Tables_in_test
|
||||||
|
t1
|
||||||
|
t2
|
||||||
|
DROP TABLE test.t1;
|
||||||
|
DROP TABLE test.t2;
|
||||||
|
DROP DATABASE connected_db;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking --one-database option with no database specified
|
||||||
|
# at command-line.
|
||||||
|
#
|
||||||
|
SHOW TABLES IN test;
|
||||||
|
Tables_in_test
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking --one-database option with non_existent_db
|
||||||
|
# specified with USE command
|
||||||
|
#
|
||||||
|
CREATE DATABASE connected_db;
|
||||||
|
SHOW TABLES IN connected_db;
|
||||||
|
Tables_in_connected_db
|
||||||
|
table_in_connected_db
|
||||||
|
|
||||||
|
SHOW TABLES IN connected_db;
|
||||||
|
Tables_in_connected_db
|
||||||
|
table_in_connected_db
|
||||||
|
DROP DATABASE connected_db;
|
||||||
|
|
||||||
End of tests
|
End of tests
|
||||||
|
@ -32,10 +32,10 @@ The following options may be given as the first argument:
|
|||||||
file (Solves most 'table full' errors)
|
file (Solves most 'table full' errors)
|
||||||
--bind-address=name IP address to bind to.
|
--bind-address=name IP address to bind to.
|
||||||
--binlog-cache-size=#
|
--binlog-cache-size=#
|
||||||
The size of the cache to hold the SQL statements for the
|
The size of the transactional cache for updates to
|
||||||
binary log during a transaction. If you often use big,
|
transactional engines for the binary log. If you often
|
||||||
multi-statement transactions you can increase this to get
|
use transactions containing many statements, you can
|
||||||
more performance
|
increase this to get more performance
|
||||||
--binlog-direct-non-transactional-updates
|
--binlog-direct-non-transactional-updates
|
||||||
Causes updates to non-transactional engines using
|
Causes updates to non-transactional engines using
|
||||||
statement format to be written directly to binary log.
|
statement format to be written directly to binary log.
|
||||||
@ -66,6 +66,11 @@ The following options may be given as the first argument:
|
|||||||
The maximum size of a row-based binary log event in
|
The maximum size of a row-based binary log event in
|
||||||
bytes. Rows will be grouped into events smaller than this
|
bytes. Rows will be grouped into events smaller than this
|
||||||
size if possible. The value has to be a multiple of 256.
|
size if possible. The value has to be a multiple of 256.
|
||||||
|
--binlog-stmt-cache-size=#
|
||||||
|
The size of the statement cache for updates to
|
||||||
|
non-transactional engines for the binary log. If you
|
||||||
|
often use statements updating a great number of rows, you
|
||||||
|
can increase this to get more performance
|
||||||
--bootstrap Used by mysql installation scripts.
|
--bootstrap Used by mysql installation scripts.
|
||||||
--bulk-insert-buffer-size=#
|
--bulk-insert-buffer-size=#
|
||||||
Size of tree cache used in bulk insert optimisation. Note
|
Size of tree cache used in bulk insert optimisation. Note
|
||||||
@ -278,14 +283,15 @@ The following options may be given as the first argument:
|
|||||||
--max-allowed-packet=#
|
--max-allowed-packet=#
|
||||||
Max packet length to send to or receive from the server
|
Max packet length to send to or receive from the server
|
||||||
--max-binlog-cache-size=#
|
--max-binlog-cache-size=#
|
||||||
Can be used to restrict the total size used to cache a
|
Sets the total size of the transactional cache
|
||||||
multi-transaction query
|
|
||||||
--max-binlog-dump-events=#
|
--max-binlog-dump-events=#
|
||||||
Option used by mysql-test for debugging and testing of
|
Option used by mysql-test for debugging and testing of
|
||||||
replication.
|
replication.
|
||||||
--max-binlog-size=# Binary log will be rotated automatically when the size
|
--max-binlog-size=# Binary log will be rotated automatically when the size
|
||||||
exceeds this value. Will also apply to relay logs if
|
exceeds this value. Will also apply to relay logs if
|
||||||
max_relay_log_size is 0
|
max_relay_log_size is 0
|
||||||
|
--max-binlog-stmt-cache-size=#
|
||||||
|
Sets the total size of the statement cache
|
||||||
--max-connect-errors=#
|
--max-connect-errors=#
|
||||||
If there is more than this number of interrupted
|
If there is more than this number of interrupted
|
||||||
connections from a host this host will be blocked from
|
connections from a host this host will be blocked from
|
||||||
@ -734,6 +740,7 @@ binlog-cache-size 32768
|
|||||||
binlog-direct-non-transactional-updates FALSE
|
binlog-direct-non-transactional-updates FALSE
|
||||||
binlog-format STATEMENT
|
binlog-format STATEMENT
|
||||||
binlog-row-event-max-size 1024
|
binlog-row-event-max-size 1024
|
||||||
|
binlog-stmt-cache-size 32768
|
||||||
bulk-insert-buffer-size 8388608
|
bulk-insert-buffer-size 8388608
|
||||||
character-set-client-handshake TRUE
|
character-set-client-handshake TRUE
|
||||||
character-set-filesystem binary
|
character-set-filesystem binary
|
||||||
@ -813,6 +820,7 @@ max-allowed-packet 1048576
|
|||||||
max-binlog-cache-size 18446744073709547520
|
max-binlog-cache-size 18446744073709547520
|
||||||
max-binlog-dump-events 0
|
max-binlog-dump-events 0
|
||||||
max-binlog-size 1073741824
|
max-binlog-size 1073741824
|
||||||
|
max-binlog-stmt-cache-size 18446744073709547520
|
||||||
max-connect-errors 10
|
max-connect-errors 10
|
||||||
max-connections 151
|
max-connections 151
|
||||||
max-delayed-threads 20
|
max-delayed-threads 20
|
||||||
|
@ -32,10 +32,10 @@ The following options may be given as the first argument:
|
|||||||
file (Solves most 'table full' errors)
|
file (Solves most 'table full' errors)
|
||||||
--bind-address=name IP address to bind to.
|
--bind-address=name IP address to bind to.
|
||||||
--binlog-cache-size=#
|
--binlog-cache-size=#
|
||||||
The size of the cache to hold the SQL statements for the
|
The size of the transactional cache for updates to
|
||||||
binary log during a transaction. If you often use big,
|
transactional engines for the binary log. If you often
|
||||||
multi-statement transactions you can increase this to get
|
use transactions containing many statements, you can
|
||||||
more performance
|
increase this to get more performance
|
||||||
--binlog-direct-non-transactional-updates
|
--binlog-direct-non-transactional-updates
|
||||||
Causes updates to non-transactional engines using
|
Causes updates to non-transactional engines using
|
||||||
statement format to be written directly to binary log.
|
statement format to be written directly to binary log.
|
||||||
@ -66,6 +66,11 @@ The following options may be given as the first argument:
|
|||||||
The maximum size of a row-based binary log event in
|
The maximum size of a row-based binary log event in
|
||||||
bytes. Rows will be grouped into events smaller than this
|
bytes. Rows will be grouped into events smaller than this
|
||||||
size if possible. The value has to be a multiple of 256.
|
size if possible. The value has to be a multiple of 256.
|
||||||
|
--binlog-stmt-cache-size=#
|
||||||
|
The size of the statement cache for updates to
|
||||||
|
non-transactional engines for the binary log. If you
|
||||||
|
often use statements updating a great number of rows, you
|
||||||
|
can increase this to get more performance
|
||||||
--bootstrap Used by mysql installation scripts.
|
--bootstrap Used by mysql installation scripts.
|
||||||
--bulk-insert-buffer-size=#
|
--bulk-insert-buffer-size=#
|
||||||
Size of tree cache used in bulk insert optimisation. Note
|
Size of tree cache used in bulk insert optimisation. Note
|
||||||
@ -277,14 +282,15 @@ The following options may be given as the first argument:
|
|||||||
--max-allowed-packet=#
|
--max-allowed-packet=#
|
||||||
Max packet length to send to or receive from the server
|
Max packet length to send to or receive from the server
|
||||||
--max-binlog-cache-size=#
|
--max-binlog-cache-size=#
|
||||||
Can be used to restrict the total size used to cache a
|
Sets the total size of the transactional cache
|
||||||
multi-transaction query
|
|
||||||
--max-binlog-dump-events=#
|
--max-binlog-dump-events=#
|
||||||
Option used by mysql-test for debugging and testing of
|
Option used by mysql-test for debugging and testing of
|
||||||
replication.
|
replication.
|
||||||
--max-binlog-size=# Binary log will be rotated automatically when the size
|
--max-binlog-size=# Binary log will be rotated automatically when the size
|
||||||
exceeds this value. Will also apply to relay logs if
|
exceeds this value. Will also apply to relay logs if
|
||||||
max_relay_log_size is 0
|
max_relay_log_size is 0
|
||||||
|
--max-binlog-stmt-cache-size=#
|
||||||
|
Sets the total size of the statement cache
|
||||||
--max-connect-errors=#
|
--max-connect-errors=#
|
||||||
If there is more than this number of interrupted
|
If there is more than this number of interrupted
|
||||||
connections from a host this host will be blocked from
|
connections from a host this host will be blocked from
|
||||||
@ -738,6 +744,7 @@ binlog-cache-size 32768
|
|||||||
binlog-direct-non-transactional-updates FALSE
|
binlog-direct-non-transactional-updates FALSE
|
||||||
binlog-format STATEMENT
|
binlog-format STATEMENT
|
||||||
binlog-row-event-max-size 1024
|
binlog-row-event-max-size 1024
|
||||||
|
binlog-stmt-cache-size 32768
|
||||||
bulk-insert-buffer-size 8388608
|
bulk-insert-buffer-size 8388608
|
||||||
character-set-client-handshake TRUE
|
character-set-client-handshake TRUE
|
||||||
character-set-filesystem binary
|
character-set-filesystem binary
|
||||||
@ -816,6 +823,7 @@ max-allowed-packet 1048576
|
|||||||
max-binlog-cache-size 18446744073709547520
|
max-binlog-cache-size 18446744073709547520
|
||||||
max-binlog-dump-events 0
|
max-binlog-dump-events 0
|
||||||
max-binlog-size 1073741824
|
max-binlog-size 1073741824
|
||||||
|
max-binlog-stmt-cache-size 18446744073709547520
|
||||||
max-connect-errors 10
|
max-connect-errors 10
|
||||||
max-connections 151
|
max-connections 151
|
||||||
max-delayed-threads 20
|
max-delayed-threads 20
|
||||||
|
@ -423,7 +423,10 @@ while with string, only once
|
|||||||
hello == hello
|
hello == hello
|
||||||
hello == hello
|
hello == hello
|
||||||
hello != goodbye
|
hello != goodbye
|
||||||
|
'quoted' == ''quoted''
|
||||||
two words
|
two words
|
||||||
|
'two words'
|
||||||
|
"two words"
|
||||||
two words are two words
|
two words are two words
|
||||||
right answer
|
right answer
|
||||||
anything goes
|
anything goes
|
||||||
@ -431,6 +434,8 @@ anything goes
|
|||||||
mysqltest: At line 2: Only == and != are supported for string values
|
mysqltest: At line 2: Only == and != are supported for string values
|
||||||
mysqltest: At line 2: Found junk '~= 6' after $variable in condition
|
mysqltest: At line 2: Found junk '~= 6' after $variable in condition
|
||||||
mysqltest: At line 2: Expression in if/while must beging with $, ` or a number
|
mysqltest: At line 2: Expression in if/while must beging with $, ` or a number
|
||||||
|
mysqltest: At line 1: Missing right operand in comparison
|
||||||
|
mysqltest: At line 1: Missing right operand in comparison
|
||||||
counter is 2
|
counter is 2
|
||||||
counter is 3
|
counter is 3
|
||||||
counter is 4
|
counter is 4
|
||||||
@ -620,7 +625,7 @@ if things work as expected
|
|||||||
Some data
|
Some data
|
||||||
for cat_file command
|
for cat_file command
|
||||||
of mysqltest
|
of mysqltest
|
||||||
mysqltest: At line 1: command "cat_file" failed with error 1
|
mysqltest: At line 1: command "cat_file" failed with error 1. (my_errno)
|
||||||
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
|
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
|
||||||
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
|
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
|
||||||
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
|
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
|
||||||
|
49
mysql-test/r/partition_binlog.result
Normal file
49
mysql-test/r/partition_binlog.result
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
#
|
||||||
|
# Bug#58147: ALTER TABLE w/ TRUNCATE PARTITION fails
|
||||||
|
# but the statement is written to binlog
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(id INT)
|
||||||
|
PARTITION BY RANGE (id)
|
||||||
|
(PARTITION p0 VALUES LESS THAN (100),
|
||||||
|
PARTITION pmax VALUES LESS THAN (MAXVALUE));
|
||||||
|
INSERT INTO t1 VALUES (1), (10), (100), (1000);
|
||||||
|
ALTER TABLE t1 TRUNCATE PARTITION p1;
|
||||||
|
ERROR HY000: Incorrect partition name
|
||||||
|
ALTER TABLE t1 DROP PARTITION p1;
|
||||||
|
ERROR HY000: Error in list of partitions to DROP
|
||||||
|
# No error returned, output in table format instead:
|
||||||
|
ALTER TABLE t1 ANALYZE PARTITION p1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze error Error in list of partitions to test.t1
|
||||||
|
ALTER TABLE t1 CHECK PARTITION p1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check error Error in list of partitions to test.t1
|
||||||
|
ALTER TABLE t1 OPTIMIZE PARTITION p1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize error Error in list of partitions to test.t1
|
||||||
|
ALTER TABLE t1 REPAIR PARTITION p1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair error Error in list of partitions to test.t1
|
||||||
|
ALTER TABLE t1 ANALYZE PARTITION p0;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status OK
|
||||||
|
ALTER TABLE t1 CHECK PARTITION p0;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
ALTER TABLE t1 OPTIMIZE PARTITION p0;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize status OK
|
||||||
|
ALTER TABLE t1 REPAIR PARTITION p0;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
ALTER TABLE t1 TRUNCATE PARTITION p0;
|
||||||
|
ALTER TABLE t1 DROP PARTITION p0;
|
||||||
|
show binlog events in 'master-bin.000001' from <binlog_start>;
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Query # # use `test`; ALTER TABLE t1 ANALYZE PARTITION p0
|
||||||
|
master-bin.000001 # Query # # use `test`; ALTER TABLE t1 OPTIMIZE PARTITION p0
|
||||||
|
master-bin.000001 # Query # # use `test`; ALTER TABLE t1 REPAIR PARTITION p0
|
||||||
|
master-bin.000001 # Query # # use `test`; ALTER TABLE t1 TRUNCATE PARTITION p0
|
||||||
|
master-bin.000001 # Query # # use `test`; ALTER TABLE t1 DROP PARTITION p0
|
||||||
|
DROP TABLE t1;
|
@ -318,4 +318,14 @@ Proxied_host
|
|||||||
Proxied_user
|
Proxied_user
|
||||||
With_grant 1
|
With_grant 1
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
|
#
|
||||||
|
# Bug#58139 : default-auth option not recognized in MySQL standardi
|
||||||
|
# command line clients
|
||||||
|
#
|
||||||
|
# Executing 'mysql'
|
||||||
|
1
|
||||||
|
1
|
||||||
|
# Executing 'mysqladmin'
|
||||||
|
mysqld is alive
|
||||||
|
# Executing 'mysqldump'
|
||||||
End of 5.5 tests
|
End of 5.5 tests
|
||||||
|
@ -8,3 +8,5 @@ ERROR 42000: DELETE command denied to user 'bug51770'@'localhost' for table 'plu
|
|||||||
GRANT DELETE ON mysql.plugin TO bug51770@localhost;
|
GRANT DELETE ON mysql.plugin TO bug51770@localhost;
|
||||||
UNINSTALL PLUGIN example;
|
UNINSTALL PLUGIN example;
|
||||||
DROP USER bug51770@localhost;
|
DROP USER bug51770@localhost;
|
||||||
|
INSTALL PLUGIN example SONAME '../ha_example.so';
|
||||||
|
ERROR HY000: No paths allowed for shared library
|
||||||
|
@ -663,6 +663,8 @@ flush tables;
|
|||||||
SHOW TABLE STATUS like 't1';
|
SHOW TABLE STATUS like 't1';
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||||
|
Warnings:
|
||||||
|
Warning 1033 Incorrect information in file: './test/t1.frm'
|
||||||
show create table t1;
|
show create table t1;
|
||||||
ERROR HY000: Incorrect information in file: './test/t1.frm'
|
ERROR HY000: Incorrect information in file: './test/t1.frm'
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
@ -150,3 +150,21 @@ Warnings:
|
|||||||
Error 1547 Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
|
Error 1547 Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
|
||||||
# Restore mysql.proc.
|
# Restore mysql.proc.
|
||||||
drop table mysql.proc;
|
drop table mysql.proc;
|
||||||
|
#
|
||||||
|
# Bug#58414 mysql_upgrade fails on dump upgrade between 5.1.53 -> 5.5.8
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS proc_backup;
|
||||||
|
DROP DATABASE IF EXISTS db1;
|
||||||
|
# Backup the proc table
|
||||||
|
RENAME TABLE mysql.proc TO proc_backup;
|
||||||
|
CREATE TABLE mysql.proc LIKE proc_backup;
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
CREATE PROCEDURE db1.p1() SET @foo = 10;
|
||||||
|
# Modify a field of the table.
|
||||||
|
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
|
||||||
|
DROP DATABASE db1;
|
||||||
|
Warnings:
|
||||||
|
Error 1548 Cannot load from mysql.proc. The table is probably corrupted
|
||||||
|
# Restore mysql.proc
|
||||||
|
DROP TABLE mysql.proc;
|
||||||
|
RENAME TABLE proc_backup TO mysql.proc;
|
||||||
|
@ -1511,6 +1511,39 @@ SELECT @@skip_name_resolve;
|
|||||||
SHOW VARIABLES LIKE 'skip_name_resolve';
|
SHOW VARIABLES LIKE 'skip_name_resolve';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
skip_name_resolve OFF
|
skip_name_resolve OFF
|
||||||
|
#
|
||||||
|
# Bug #43233 : Some server variables are clipped during "update,"
|
||||||
|
# not "check" stage
|
||||||
|
#
|
||||||
|
SET @kbs=@@global.key_buffer_size;
|
||||||
|
SET @kcbs=@@global.key_cache_block_size;
|
||||||
|
throw errors in STRICT mode
|
||||||
|
SET SQL_MODE=STRICT_ALL_TABLES;
|
||||||
|
SET @@global.max_binlog_cache_size=-1;
|
||||||
|
ERROR 42000: Variable 'max_binlog_cache_size' can't be set to the value of '-1'
|
||||||
|
SET @@global.max_join_size=0;
|
||||||
|
ERROR 42000: Variable 'max_join_size' can't be set to the value of '0'
|
||||||
|
SET @@global.key_buffer_size=0;
|
||||||
|
ERROR HY000: Cannot drop default keycache
|
||||||
|
SET @@global.key_cache_block_size=0;
|
||||||
|
ERROR 42000: Variable 'key_cache_block_size' can't be set to the value of '0'
|
||||||
|
throw warnings in default mode
|
||||||
|
SET SQL_MODE=DEFAULT;
|
||||||
|
SET @@global.max_binlog_cache_size=-1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1'
|
||||||
|
SET @@global.max_join_size=0;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect max_join_size value: '0'
|
||||||
|
SET @@global.key_buffer_size=0;
|
||||||
|
ERROR HY000: Cannot drop default keycache
|
||||||
|
SET @@global.key_cache_block_size=0;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect key_cache_block_size value: '0'
|
||||||
|
SET @@global.max_binlog_cache_size=DEFAULT;
|
||||||
|
SET @@global.max_join_size=DEFAULT;
|
||||||
|
SET @@global.key_buffer_size=@kbs;
|
||||||
|
SET @@global.key_cache_block_size=@kcbs;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -840,6 +840,8 @@ show table status;
|
|||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL
|
t1 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL
|
||||||
v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||||
|
Warnings:
|
||||||
|
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1;
|
create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1;
|
||||||
@ -3997,6 +3999,19 @@ CREATE VIEW v1 AS SELECT 1 from t1
|
|||||||
WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
|
WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug#57703 create view cause Assertion failed: 0, file .\item_subselect.cc, line 846
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(a int);
|
||||||
|
CREATE VIEW v1 AS SELECT 1 FROM t1 GROUP BY
|
||||||
|
SUBSTRING(1 FROM (SELECT 3 FROM t1 WHERE a >= ANY(SELECT 1)));
|
||||||
|
DROP VIEW v1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug#57352 valgrind warnings when creating view
|
||||||
|
#
|
||||||
|
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
|
||||||
|
DROP VIEW v1;
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# -- End of 5.1 tests.
|
# -- End of 5.1 tests.
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
@ -2,7 +2,9 @@ call mtr.add_suppression('Attempting backtrace');
|
|||||||
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
||||||
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
|
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
|
||||||
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
|
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
|
||||||
|
call mtr.add_suppression('Could not open .*');
|
||||||
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
|
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
|
||||||
|
RESET MASTER;
|
||||||
flush logs;
|
flush logs;
|
||||||
flush logs;
|
flush logs;
|
||||||
flush logs;
|
flush logs;
|
||||||
@ -116,11 +118,31 @@ master-bin.000011
|
|||||||
# This should put the server in unsafe state and stop
|
# This should put the server in unsafe state and stop
|
||||||
# accepting any command. If we inject a fault at this
|
# accepting any command. If we inject a fault at this
|
||||||
# point and continue the execution the server crashes.
|
# point and continue the execution the server crashes.
|
||||||
# Besides the flush command does not report an error.
|
|
||||||
#
|
#
|
||||||
|
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||||
|
SELECT @index;
|
||||||
|
@index
|
||||||
|
master-bin.000006
|
||||||
|
master-bin.000007
|
||||||
|
master-bin.000008
|
||||||
|
master-bin.000009
|
||||||
|
master-bin.000010
|
||||||
|
master-bin.000011
|
||||||
|
|
||||||
# fault_injection_registering_index
|
# fault_injection_registering_index
|
||||||
SET SESSION debug="+d,fault_injection_registering_index";
|
SET SESSION debug="+d,fault_injection_registering_index";
|
||||||
flush logs;
|
flush logs;
|
||||||
|
ERROR HY000: Can't open file: 'master-bin.000012' (errno: 1)
|
||||||
|
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||||
|
SELECT @index;
|
||||||
|
@index
|
||||||
|
master-bin.000006
|
||||||
|
master-bin.000007
|
||||||
|
master-bin.000008
|
||||||
|
master-bin.000009
|
||||||
|
master-bin.000010
|
||||||
|
master-bin.000011
|
||||||
|
|
||||||
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||||
SELECT @index;
|
SELECT @index;
|
||||||
@index
|
@index
|
||||||
@ -135,6 +157,18 @@ master-bin.000012
|
|||||||
# fault_injection_updating_index
|
# fault_injection_updating_index
|
||||||
SET SESSION debug="+d,fault_injection_updating_index";
|
SET SESSION debug="+d,fault_injection_updating_index";
|
||||||
flush logs;
|
flush logs;
|
||||||
|
ERROR HY000: Can't open file: 'master-bin.000013' (errno: 1)
|
||||||
|
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||||
|
SELECT @index;
|
||||||
|
@index
|
||||||
|
master-bin.000006
|
||||||
|
master-bin.000007
|
||||||
|
master-bin.000008
|
||||||
|
master-bin.000009
|
||||||
|
master-bin.000010
|
||||||
|
master-bin.000011
|
||||||
|
master-bin.000012
|
||||||
|
|
||||||
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
|
||||||
SELECT @index;
|
SELECT @index;
|
||||||
@index
|
@index
|
||||||
|
@ -123,7 +123,7 @@ Binlog_cache_disk_use 0
|
|||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int) engine=innodb;
|
||||||
show status like "binlog_cache_use";
|
show status like "binlog_cache_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_use 2
|
Binlog_cache_use 1
|
||||||
show status like "binlog_cache_disk_use";
|
show status like "binlog_cache_disk_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_disk_use 1
|
Binlog_cache_disk_use 1
|
||||||
@ -132,7 +132,7 @@ delete from t1;
|
|||||||
commit;
|
commit;
|
||||||
show status like "binlog_cache_use";
|
show status like "binlog_cache_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_use 4
|
Binlog_cache_use 2
|
||||||
show status like "binlog_cache_disk_use";
|
show status like "binlog_cache_disk_use";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Binlog_cache_disk_use 1
|
Binlog_cache_disk_use 1
|
||||||
|
@ -3,6 +3,5 @@ call mtr.add_suppression("Log filename extension number exhausted:");
|
|||||||
call mtr.add_suppression("Can't generate a unique log-filename");
|
call mtr.add_suppression("Can't generate a unique log-filename");
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
Warnings:
|
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||||
Warning 1098 Can't generate a unique log-filename master-bin.(1-999)
|
|
||||||
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
flush status;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 0
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 0
|
|
||||||
drop table if exists t1;
|
|
||||||
create table t1 (a int) engine=innodb;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 2
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 1
|
|
||||||
begin;
|
|
||||||
delete from t1;
|
|
||||||
commit;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 4
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 1
|
|
||||||
drop table t1;
|
|
66
mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result
Normal file
66
mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
drop table if exists t1, t2;
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
create table t2 (a int) engine=myisam;
|
||||||
|
**** Preparing the enviroment to check commit and its effect on status variables.
|
||||||
|
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
flush status;
|
||||||
|
**** Transactional changes which are long enough so they will be flushed to disk...
|
||||||
|
**** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
**** Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Non-Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Mixed changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Preparing the enviroment to check abort and its effect on the status variables.
|
||||||
|
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
flush status;
|
||||||
|
**** Transactional changes which are long enough so they will be flushed to disk...
|
||||||
|
**** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
**** Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
rollback;
|
||||||
|
**** Non-Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
rollback;
|
||||||
|
Warnings:
|
||||||
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
|
**** Mixed changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
rollback;
|
||||||
|
Warnings:
|
||||||
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
|
drop table t1, t2;
|
@ -1218,8 +1218,8 @@ master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
|
|||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
drop table t1,t2,t3,tt1;
|
drop table t1,t2,t3,tt1;
|
||||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||||
insert delayed into t1 values (207);
|
insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
|
||||||
insert delayed into t1 values (null);
|
insert /*! delayed */ into t1 values (null);
|
||||||
insert delayed into t1 values (300);
|
insert delayed into t1 values (300);
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
show binlog events from <binlog_start>;
|
show binlog events from <binlog_start>;
|
||||||
@ -1330,3 +1330,62 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||||||
# # Write_rows 1 # table_id: # flags: STMT_END_F
|
# # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||||
# # Query 1 # COMMIT
|
# # Query 1 # COMMIT
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
# BUG#54903 BINLOG statement toggles session variables
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# This test verify that BINLOG statement doesn't change current session's
|
||||||
|
# variables foreign_key_checks and unique_checks.
|
||||||
|
|
||||||
|
CREATE TABLE t1 (c1 INT KEY);
|
||||||
|
SET @@SESSION.foreign_key_checks= ON;
|
||||||
|
SET @@SESSION.unique_checks= ON;
|
||||||
|
# INSERT INTO t1 VALUES (1)
|
||||||
|
# foreign_key_checks=0 and unique_checks=0
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
|
||||||
|
';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
# Their values should be ON
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
Variable_name Value
|
||||||
|
foreign_key_checks ON
|
||||||
|
unique_checks ON
|
||||||
|
|
||||||
|
SET @@SESSION.foreign_key_checks= OFF;
|
||||||
|
SET @@SESSION.unique_checks= OFF;
|
||||||
|
# INSERT INTO t1 VALUES(2)
|
||||||
|
# foreign_key_checks=1 and unique_checks=1
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||||
|
';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
2
|
||||||
|
# Their values should be OFF
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
Variable_name Value
|
||||||
|
foreign_key_checks OFF
|
||||||
|
unique_checks OFF
|
||||||
|
# INSERT INTO t1 VALUES(2)
|
||||||
|
# foreign_key_checks=1 and unique_checks=1
|
||||||
|
# It should not change current session's variables, even error happens
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||||
|
';
|
||||||
|
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
||||||
|
SELECT * FROM t1;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
2
|
||||||
|
# Their values should be OFF
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
Variable_name Value
|
||||||
|
foreign_key_checks OFF
|
||||||
|
unique_checks OFF
|
||||||
|
DROP TABLE t1;
|
||||||
|
66
mysql-test/suite/binlog/r/binlog_row_cache_stat.result
Normal file
66
mysql-test/suite/binlog/r/binlog_row_cache_stat.result
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
drop table if exists t1, t2;
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
create table t2 (a int) engine=myisam;
|
||||||
|
**** Preparing the enviroment to check commit and its effect on status variables.
|
||||||
|
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
flush status;
|
||||||
|
**** Transactional changes which are long enough so they will be flushed to disk...
|
||||||
|
**** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
**** Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Non-Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Mixed changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Preparing the enviroment to check abort and its effect on the status variables.
|
||||||
|
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
flush status;
|
||||||
|
**** Transactional changes which are long enough so they will be flushed to disk...
|
||||||
|
**** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
**** Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
rollback;
|
||||||
|
**** Non-Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
rollback;
|
||||||
|
Warnings:
|
||||||
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
|
**** Mixed changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
rollback;
|
||||||
|
Warnings:
|
||||||
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
|
drop table t1, t2;
|
@ -1,25 +0,0 @@
|
|||||||
flush status;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 0
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 0
|
|
||||||
drop table if exists t1;
|
|
||||||
create table t1 (a int) engine=innodb;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 2
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 1
|
|
||||||
begin;
|
|
||||||
delete from t1;
|
|
||||||
commit;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 4
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 1
|
|
||||||
drop table t1;
|
|
@ -1,6 +1,6 @@
|
|||||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||||
insert delayed into t1 values (207);
|
insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
|
||||||
insert delayed into t1 values (null);
|
insert /*! delayed */ into t1 values (null);
|
||||||
insert delayed into t1 values (300);
|
insert delayed into t1 values (300);
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
show binlog events from <binlog_start>;
|
show binlog events from <binlog_start>;
|
||||||
@ -10,14 +10,14 @@ master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern)
|
|||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
|
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Query # # use `test`; insert delayed into t1 values (207)
|
master-bin.000001 # Query # # use `test`; insert /* before delayed */ /* after delayed */ into t1 values (207)
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Intvar # # INSERT_ID=208
|
master-bin.000001 # Intvar # # INSERT_ID=208
|
||||||
master-bin.000001 # Query # # use `test`; insert delayed into t1 values (null)
|
master-bin.000001 # Query # # use `test`; insert /*! */ into t1 values (null)
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Query # # use `test`; insert delayed into t1 values (300)
|
master-bin.000001 # Query # # use `test`; insert into t1 values (300)
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
master-bin.000001 # Query # # use `test`; FLUSH TABLES
|
master-bin.000001 # Query # # use `test`; FLUSH TABLES
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
|
@ -717,8 +717,8 @@ master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhos
|
|||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
drop table t1,t2,t3,tt1;
|
drop table t1,t2,t3,tt1;
|
||||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||||
insert delayed into t1 values (207);
|
insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
|
||||||
insert delayed into t1 values (null);
|
insert /*! delayed */ into t1 values (null);
|
||||||
insert delayed into t1 values (300);
|
insert delayed into t1 values (300);
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
show binlog events from <binlog_start>;
|
show binlog events from <binlog_start>;
|
||||||
@ -820,3 +820,62 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||||||
# # Write_rows 1 # table_id: # flags: STMT_END_F
|
# # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||||
# # Query 1 # COMMIT
|
# # Query 1 # COMMIT
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
# BUG#54903 BINLOG statement toggles session variables
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# This test verify that BINLOG statement doesn't change current session's
|
||||||
|
# variables foreign_key_checks and unique_checks.
|
||||||
|
|
||||||
|
CREATE TABLE t1 (c1 INT KEY);
|
||||||
|
SET @@SESSION.foreign_key_checks= ON;
|
||||||
|
SET @@SESSION.unique_checks= ON;
|
||||||
|
# INSERT INTO t1 VALUES (1)
|
||||||
|
# foreign_key_checks=0 and unique_checks=0
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
|
||||||
|
';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
# Their values should be ON
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
Variable_name Value
|
||||||
|
foreign_key_checks ON
|
||||||
|
unique_checks ON
|
||||||
|
|
||||||
|
SET @@SESSION.foreign_key_checks= OFF;
|
||||||
|
SET @@SESSION.unique_checks= OFF;
|
||||||
|
# INSERT INTO t1 VALUES(2)
|
||||||
|
# foreign_key_checks=1 and unique_checks=1
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||||
|
';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
2
|
||||||
|
# Their values should be OFF
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
Variable_name Value
|
||||||
|
foreign_key_checks OFF
|
||||||
|
unique_checks OFF
|
||||||
|
# INSERT INTO t1 VALUES(2)
|
||||||
|
# foreign_key_checks=1 and unique_checks=1
|
||||||
|
# It should not change current session's variables, even error happens
|
||||||
|
BINLOG '
|
||||||
|
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||||
|
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||||
|
';
|
||||||
|
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
||||||
|
SELECT * FROM t1;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
2
|
||||||
|
# Their values should be OFF
|
||||||
|
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||||
|
Variable_name Value
|
||||||
|
foreign_key_checks OFF
|
||||||
|
unique_checks OFF
|
||||||
|
DROP TABLE t1;
|
||||||
|
66
mysql-test/suite/binlog/r/binlog_stm_cache_stat.result
Normal file
66
mysql-test/suite/binlog/r/binlog_stm_cache_stat.result
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
drop table if exists t1, t2;
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
create table t2 (a int) engine=myisam;
|
||||||
|
**** Preparing the enviroment to check commit and its effect on status variables.
|
||||||
|
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
flush status;
|
||||||
|
**** Transactional changes which are long enough so they will be flushed to disk...
|
||||||
|
**** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
**** Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Non-Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Mixed changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
commit;
|
||||||
|
**** Preparing the enviroment to check abort and its effect on the status variables.
|
||||||
|
**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
flush status;
|
||||||
|
**** Transactional changes which are long enough so they will be flushed to disk...
|
||||||
|
**** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
**** Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 0, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
rollback;
|
||||||
|
**** Non-Transactional changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
rollback;
|
||||||
|
Warnings:
|
||||||
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
|
**** Mixed changes which should not be flushed to disk and so should not
|
||||||
|
**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
|
||||||
|
**** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
|
||||||
|
**** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
|
||||||
|
begin;
|
||||||
|
insert into t1 values( 1 );
|
||||||
|
insert into t2 values( 1 );
|
||||||
|
rollback;
|
||||||
|
Warnings:
|
||||||
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
|
drop table t1, t2;
|
@ -1,25 +0,0 @@
|
|||||||
flush status;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 0
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 0
|
|
||||||
drop table if exists t1;
|
|
||||||
create table t1 (a int) engine=innodb;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 2
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 1
|
|
||||||
begin;
|
|
||||||
delete from t1;
|
|
||||||
commit;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 4
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 1
|
|
||||||
drop table t1;
|
|
@ -10,9 +10,12 @@ call mtr.add_suppression('Attempting backtrace');
|
|||||||
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
||||||
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
|
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
|
||||||
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
|
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
|
||||||
|
call mtr.add_suppression('Could not open .*');
|
||||||
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
|
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
|
||||||
let $old=`select @@debug`;
|
let $old=`select @@debug`;
|
||||||
|
|
||||||
|
RESET MASTER;
|
||||||
|
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
let $INDEX=$MYSQLD_DATADIR/master-bin.index;
|
let $INDEX=$MYSQLD_DATADIR/master-bin.index;
|
||||||
|
|
||||||
@ -205,12 +208,26 @@ SELECT @index;
|
|||||||
--echo # This should put the server in unsafe state and stop
|
--echo # This should put the server in unsafe state and stop
|
||||||
--echo # accepting any command. If we inject a fault at this
|
--echo # accepting any command. If we inject a fault at this
|
||||||
--echo # point and continue the execution the server crashes.
|
--echo # point and continue the execution the server crashes.
|
||||||
--echo # Besides the flush command does not report an error.
|
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
--chmod 0644 $INDEX
|
||||||
|
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
-- eval SET @index=LOAD_FILE('$index')
|
||||||
|
-- replace_regex /\.[\\\/]master/master/
|
||||||
|
SELECT @index;
|
||||||
|
|
||||||
--echo # fault_injection_registering_index
|
--echo # fault_injection_registering_index
|
||||||
SET SESSION debug="+d,fault_injection_registering_index";
|
SET SESSION debug="+d,fault_injection_registering_index";
|
||||||
|
-- replace_regex /\.[\\\/]master/master/
|
||||||
|
-- error ER_CANT_OPEN_FILE
|
||||||
flush logs;
|
flush logs;
|
||||||
|
|
||||||
|
--chmod 0644 $INDEX
|
||||||
|
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
-- eval SET @index=LOAD_FILE('$index')
|
||||||
|
-- replace_regex /\.[\\\/]master/master/
|
||||||
|
SELECT @index;
|
||||||
|
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
|
|
||||||
--chmod 0644 $INDEX
|
--chmod 0644 $INDEX
|
||||||
@ -221,7 +238,16 @@ SELECT @index;
|
|||||||
|
|
||||||
--echo # fault_injection_updating_index
|
--echo # fault_injection_updating_index
|
||||||
SET SESSION debug="+d,fault_injection_updating_index";
|
SET SESSION debug="+d,fault_injection_updating_index";
|
||||||
|
-- replace_regex /\.[\\\/]master/master/
|
||||||
|
-- error ER_CANT_OPEN_FILE
|
||||||
flush logs;
|
flush logs;
|
||||||
|
|
||||||
|
--chmod 0644 $INDEX
|
||||||
|
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
-- eval SET @index=LOAD_FILE('$index')
|
||||||
|
-- replace_regex /\.[\\\/]master/master/
|
||||||
|
SELECT @index;
|
||||||
|
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
|
|
||||||
--chmod 0644 $INDEX
|
--chmod 0644 $INDEX
|
||||||
|
@ -38,9 +38,7 @@ RESET MASTER;
|
|||||||
##########
|
##########
|
||||||
|
|
||||||
# 1. Stop master server
|
# 1. Stop master server
|
||||||
-- write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
wait
|
|
||||||
EOF
|
|
||||||
-- shutdown_server 10
|
-- shutdown_server 10
|
||||||
-- source include/wait_until_disconnected.inc
|
-- source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
@ -52,9 +50,7 @@ master-bin.2147483646
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# 3. Restart the server
|
# 3. Restart the server
|
||||||
-- append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
restart
|
|
||||||
EOF
|
|
||||||
-- enable_reconnect
|
-- enable_reconnect
|
||||||
-- source include/wait_until_connected_again.inc
|
-- source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
@ -62,7 +58,8 @@ EOF
|
|||||||
# Assertion
|
# Assertion
|
||||||
###########
|
###########
|
||||||
|
|
||||||
# assertion: should throw warning
|
# assertion: should raise error
|
||||||
|
-- error ER_NO_UNIQUE_LOGFILE
|
||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
|
|
||||||
##############
|
##############
|
||||||
@ -70,9 +67,7 @@ FLUSH LOGS;
|
|||||||
##############
|
##############
|
||||||
|
|
||||||
# 1. Stop the server
|
# 1. Stop the server
|
||||||
-- write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
wait
|
|
||||||
EOF
|
|
||||||
-- shutdown_server 10
|
-- shutdown_server 10
|
||||||
-- source include/wait_until_disconnected.inc
|
-- source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
@ -85,8 +80,6 @@ EOF
|
|||||||
-- remove_file $MYSQLD_DATADIR/master-bin.2147483647
|
-- remove_file $MYSQLD_DATADIR/master-bin.2147483647
|
||||||
|
|
||||||
# 3. Restart the server
|
# 3. Restart the server
|
||||||
-- append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
restart
|
|
||||||
EOF
|
|
||||||
-- enable_reconnect
|
-- enable_reconnect
|
||||||
-- source include/wait_until_connected_again.inc
|
-- source include/wait_until_connected_again.inc
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
# For both statement and row based bin logs 9/19/2005 [jbm]
|
# For both statement and row based bin logs 9/19/2005 [jbm]
|
||||||
|
|
||||||
-- source include/have_binlog_format_mixed.inc
|
-- source include/have_binlog_format_mixed.inc
|
||||||
-- source extra/binlog_tests/innodb_stat.test
|
-- source extra/binlog_tests/binlog_cache_stat.test
|
@ -2,4 +2,4 @@
|
|||||||
# For both statement and row based bin logs 9/19/2005 [jbm]
|
# For both statement and row based bin logs 9/19/2005 [jbm]
|
||||||
|
|
||||||
-- source include/have_binlog_format_row.inc
|
-- source include/have_binlog_format_row.inc
|
||||||
-- source extra/binlog_tests/innodb_stat.test
|
-- source extra/binlog_tests/binlog_cache_stat.test
|
@ -2,4 +2,4 @@
|
|||||||
# For both statement and row based bin logs 9/19/2005 [jbm]
|
# For both statement and row based bin logs 9/19/2005 [jbm]
|
||||||
|
|
||||||
-- source include/have_binlog_format_statement.inc
|
-- source include/have_binlog_format_statement.inc
|
||||||
-- source extra/binlog_tests/innodb_stat.test
|
-- source extra/binlog_tests/binlog_cache_stat.test
|
67
mysql-test/suite/federated/federated_bug_35333.result
Normal file
67
mysql-test/suite/federated/federated_bug_35333.result
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#
|
||||||
|
# Bug 35333 "If a Federated table can't connect to the remote hose, can't retrieve metadata"
|
||||||
|
#
|
||||||
|
# Queries such as SHOW TABLE STATUS and SELECT * FROM INFORMATION_SCHEMA.TABLES fail
|
||||||
|
# when encountering a federated table that cannot connect to its remote table.
|
||||||
|
#
|
||||||
|
# The fix is to store the error text in the TABLE COMMENTS column of I_S.TABLES, clear
|
||||||
|
# the remote connection error and push a warning instead. This allows the SELECT operation
|
||||||
|
# to complete while still indicating a problem. This fix applies to any non-fatal system
|
||||||
|
# error that occurs during a query against I_S.TABLES.de
|
||||||
|
CREATE DATABASE federated;
|
||||||
|
CREATE DATABASE federated;
|
||||||
|
CREATE DATABASE IF NOT EXISTS realdb;
|
||||||
|
DROP TABLE IF EXISTS realdb.t0;
|
||||||
|
DROP TABLE IF EXISTS federated.t0;
|
||||||
|
#
|
||||||
|
# Create the base table to be referenced
|
||||||
|
#
|
||||||
|
CREATE TABLE realdb.t0 (a text, b text) ENGINE=MYISAM;
|
||||||
|
#
|
||||||
|
# Create a federated table with a bogus port number
|
||||||
|
#
|
||||||
|
CREATE TABLE federated.t0 (a text, b text) ENGINE=FEDERATED
|
||||||
|
CONNECTION='mysql://root@127.0.0.1:63333/realdb/t0';
|
||||||
|
#
|
||||||
|
# Trigger a federated system error during a INFORMATION_SCHEMA.TABLES query
|
||||||
|
#
|
||||||
|
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT
|
||||||
|
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'realdb' or TABLE_SCHEMA = 'federated';
|
||||||
|
TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE ROW_FORMAT TABLE_ROWS DATA_LENGTH TABLE_COMMENT
|
||||||
|
federated t0 BASE TABLE FEDERATED NULL 0 Unable to connect to foreign data source: Can't connect to MySQL server on '127.0.0.1' (socket errno)
|
||||||
|
realdb t0 BASE TABLE MyISAM Dynamic 0 0
|
||||||
|
Warnings:
|
||||||
|
Warning 1429 Unable to connect to foreign data source: Can't connect to MySQL server on '127.0.0.1' (socket errno)
|
||||||
|
SHOW WARNINGS;
|
||||||
|
Level Code Message
|
||||||
|
Warning 1429 Unable to connect to foreign data source: Can't connect to MySQL server on '127.0.0.1' (socket errno)
|
||||||
|
#
|
||||||
|
# Create a MyISAM table then corrupt the file
|
||||||
|
#
|
||||||
|
USE realdb;
|
||||||
|
CREATE TABLE t1 (c1 int) ENGINE=MYISAM;
|
||||||
|
#
|
||||||
|
# Corrupt the MyISAM table by deleting the base file
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Trigger a MyISAM system error during an INFORMATION_SCHEMA.TABLES query
|
||||||
|
#
|
||||||
|
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT
|
||||||
|
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||||
|
TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE ROW_FORMAT TABLE_ROWS DATA_LENGTH TABLE_COMMENT
|
||||||
|
realdb t1 BASE TABLE NULL NULL NULL NULL Can't find file: 't1' (errno: 2)
|
||||||
|
Warnings:
|
||||||
|
Warning 1017 Can't find file: 't1' (errno: 2)
|
||||||
|
SHOW WARNINGS;
|
||||||
|
Level Code Message
|
||||||
|
Warning 1017 Can't find file: 't1' (errno: 2)
|
||||||
|
#
|
||||||
|
# Cleanup
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS realdb.t0;
|
||||||
|
DROP TABLE IF EXISTS federated.t0;
|
||||||
|
DROP DATABASE realdb;
|
||||||
|
DROP TABLE IF EXISTS federated.t1;
|
||||||
|
DROP DATABASE federated;
|
||||||
|
DROP TABLE IF EXISTS federated.t1;
|
||||||
|
DROP DATABASE federated;
|
74
mysql-test/suite/federated/federated_bug_35333.test
Normal file
74
mysql-test/suite/federated/federated_bug_35333.test
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
--echo #
|
||||||
|
--echo # Bug 35333 "If a Federated table can't connect to the remote hose, can't retrieve metadata"
|
||||||
|
--echo #
|
||||||
|
--echo # Queries such as SHOW TABLE STATUS and SELECT * FROM INFORMATION_SCHEMA.TABLES fail
|
||||||
|
--echo # when encountering a federated table that cannot connect to its remote table.
|
||||||
|
--echo #
|
||||||
|
--echo # The fix is to store the error text in the TABLE COMMENTS column of I_S.TABLES, clear
|
||||||
|
--echo # the remote connection error and push a warning instead. This allows the SELECT operation
|
||||||
|
--echo # to complete while still indicating a problem. This fix applies to any non-fatal system
|
||||||
|
--echo # error that occurs during a query against I_S.TABLES.de
|
||||||
|
|
||||||
|
--source federated.inc
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
CREATE DATABASE IF NOT EXISTS realdb;
|
||||||
|
# Federated database exists
|
||||||
|
DROP TABLE IF EXISTS realdb.t0;
|
||||||
|
DROP TABLE IF EXISTS federated.t0;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Create the base table to be referenced
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE realdb.t0 (a text, b text) ENGINE=MYISAM;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Create a federated table with a bogus port number
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE federated.t0 (a text, b text) ENGINE=FEDERATED
|
||||||
|
CONNECTION='mysql://root@127.0.0.1:63333/realdb/t0';
|
||||||
|
|
||||||
|
#--warning ER_CONNECT_TO_FOREIGN_DATA_SOURCE
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Trigger a federated system error during a INFORMATION_SCHEMA.TABLES query
|
||||||
|
--echo #
|
||||||
|
# Remove O/S-specific socket error
|
||||||
|
--replace_regex /\(.*\)/(socket errno)/
|
||||||
|
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT
|
||||||
|
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'realdb' or TABLE_SCHEMA = 'federated';
|
||||||
|
|
||||||
|
# Remove O/S-specific socket error
|
||||||
|
--replace_regex /\(.*\)/(socket errno)/
|
||||||
|
SHOW WARNINGS;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Create a MyISAM table then corrupt the file
|
||||||
|
--echo #
|
||||||
|
USE realdb;
|
||||||
|
CREATE TABLE t1 (c1 int) ENGINE=MYISAM;
|
||||||
|
--echo #
|
||||||
|
--echo # Corrupt the MyISAM table by deleting the base file
|
||||||
|
--echo #
|
||||||
|
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||||
|
--remove_file $MYSQLD_DATADIR/realdb/t1.MYD
|
||||||
|
--remove_file $MYSQLD_DATADIR/realdb/t1.MYI
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Trigger a MyISAM system error during an INFORMATION_SCHEMA.TABLES query
|
||||||
|
--echo #
|
||||||
|
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT
|
||||||
|
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||||
|
|
||||||
|
SHOW WARNINGS;
|
||||||
|
--echo #
|
||||||
|
--echo # Cleanup
|
||||||
|
--echo #
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS realdb.t0;
|
||||||
|
DROP TABLE IF EXISTS federated.t0;
|
||||||
|
DROP DATABASE realdb;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
--source federated_cleanup.inc
|
@ -471,17 +471,12 @@ SHOW VARIABLES LIKE "%auto_inc%";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
auto_increment_increment 2
|
auto_increment_increment 2
|
||||||
auto_increment_offset 10
|
auto_increment_offset 10
|
||||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||||
|
ERROR HY000: Failed to read auto-increment value from storage engine
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
c1
|
c1
|
||||||
1
|
1
|
||||||
18446744073709551603
|
18446744073709551603
|
||||||
18446744073709551604
|
|
||||||
18446744073709551606
|
|
||||||
18446744073709551608
|
|
||||||
18446744073709551610
|
|
||||||
18446744073709551612
|
|
||||||
18446744073709551614
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||||
SET @@INSERT_ID=1;
|
SET @@INSERT_ID=1;
|
||||||
@ -504,13 +499,12 @@ SHOW VARIABLES LIKE "%auto_inc%";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
auto_increment_increment 5
|
auto_increment_increment 5
|
||||||
auto_increment_offset 7
|
auto_increment_offset 7
|
||||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
INSERT INTO t1 VALUES (NULL),(NULL), (NULL);
|
||||||
|
ERROR HY000: Failed to read auto-increment value from storage engine
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
c1
|
c1
|
||||||
1
|
1
|
||||||
18446744073709551603
|
18446744073709551603
|
||||||
18446744073709551607
|
|
||||||
18446744073709551612
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||||
SET @@INSERT_ID=1;
|
SET @@INSERT_ID=1;
|
||||||
@ -572,12 +566,12 @@ SHOW VARIABLES LIKE "%auto_inc%";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
auto_increment_increment 65535
|
auto_increment_increment 65535
|
||||||
auto_increment_offset 65535
|
auto_increment_offset 65535
|
||||||
INSERT INTO t1 VALUES (NULL);
|
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||||
|
ERROR 22003: Out of range value for column 't1' at row 167
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
c1
|
c1
|
||||||
1
|
1
|
||||||
18446744073709551610
|
18446744073709551610
|
||||||
18446744073709551615
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||||
SET @@INSERT_ID=1;
|
SET @@INSERT_ID=1;
|
||||||
|
@ -74,3 +74,11 @@ a b
|
|||||||
4 14
|
4 14
|
||||||
5 15
|
5 15
|
||||||
drop table bug38999_1,bug38999_2;
|
drop table bug38999_1,bug38999_2;
|
||||||
|
#
|
||||||
|
# Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(f1 INT) ENGINE=INNODB;
|
||||||
|
INSERT INTO t1 VALUES(1);
|
||||||
|
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
|
||||||
|
ERROR 21000: Operand should contain 1 column(s)
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -293,21 +293,8 @@ INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||||
SHOW VARIABLES LIKE "%auto_inc%";
|
SHOW VARIABLES LIKE "%auto_inc%";
|
||||||
# This should fail because of overflow but it doesn't, it seems to be
|
--error ER_AUTOINC_READ_FAILED
|
||||||
# a MySQL server bug. It wraps around to 0 for the last value.
|
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||||
# See MySQL Bug# 39828
|
|
||||||
#
|
|
||||||
# Instead of wrapping around, it asserts when MySQL is compiled --with-debug
|
|
||||||
# (see sql/handler.cc:handler::update_auto_increment()). Don't test for
|
|
||||||
# overflow until Bug #39828 is fixed.
|
|
||||||
#
|
|
||||||
# Since this asserts when compiled --with-debug, we can't properly test this
|
|
||||||
# until Bug #39828 is fixed. For now, this test is meaningless.
|
|
||||||
#if Bug #39828 is fixed
|
|
||||||
#INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
|
||||||
#else
|
|
||||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
|
||||||
#endif
|
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
@ -325,20 +312,8 @@ INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7;
|
SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7;
|
||||||
SHOW VARIABLES LIKE "%auto_inc%";
|
SHOW VARIABLES LIKE "%auto_inc%";
|
||||||
# This should fail because of overflow but it doesn't. It fails with
|
--error ER_AUTOINC_READ_FAILED
|
||||||
# a duplicate entry message because of a MySQL server bug, it wraps
|
INSERT INTO t1 VALUES (NULL),(NULL), (NULL);
|
||||||
# around. See MySQL Bug# 39828, once MySQL fix the bug we can replace
|
|
||||||
# the ER_DUP_ENTRY, 1062 below with the appropriate error message
|
|
||||||
#
|
|
||||||
# Since this asserts when compiled --with-debug, we can't properly test this
|
|
||||||
# until Bug #39828 is fixed. For now, this test is meaningless.
|
|
||||||
#if Bug #39828 is fixed
|
|
||||||
# Still need to fix this error code, error should mention overflow
|
|
||||||
#-- error ER_DUP_ENTRY,1062
|
|
||||||
#INSERT INTO t1 VALUES (NULL),(NULL), (NULL);
|
|
||||||
#else
|
|
||||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
|
||||||
#endif
|
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
@ -376,20 +351,8 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976;
|
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976;
|
||||||
SHOW VARIABLES LIKE "%auto_inc%";
|
SHOW VARIABLES LIKE "%auto_inc%";
|
||||||
# This should fail because of overflow but it doesn't. It wraps around
|
--error ER_WARN_DATA_OUT_OF_RANGE
|
||||||
# and the autoinc values look bogus too.
|
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||||
# See MySQL Bug# 39828, once MySQL fix the bug we can enable the error
|
|
||||||
# code expected test.
|
|
||||||
# -- error ER_AUTOINC_READ_FAILED,1467
|
|
||||||
#
|
|
||||||
# Since this asserts when compiled --with-debug, we can't properly test this
|
|
||||||
# until Bug #39828 is fixed. For now, this test is meaningless.
|
|
||||||
#if Bug #39828 is fixed
|
|
||||||
#-- error ER_AUTOINC_READ_FAILED,1467
|
|
||||||
#INSERT INTO t1 VALUES (NULL),(NULL);
|
|
||||||
#else
|
|
||||||
INSERT INTO t1 VALUES (NULL);
|
|
||||||
#endif
|
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
@ -27,3 +27,12 @@ select * from bug38999_1;
|
|||||||
select * from bug38999_2;
|
select * from bug38999_2;
|
||||||
|
|
||||||
drop table bug38999_1,bug38999_2;
|
drop table bug38999_1,bug38999_2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1(f1 INT) ENGINE=INNODB;
|
||||||
|
INSERT INTO t1 VALUES(1);
|
||||||
|
--error ER_OPERAND_COLUMNS
|
||||||
|
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -39,29 +39,6 @@ let $val3 = 17 ;
|
|||||||
let $val4 = 15 ;
|
let $val4 = 15 ;
|
||||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||||
|
|
||||||
|
|
||||||
let $sqlfunc = ceiling(col1);
|
|
||||||
let $valsqlfunc = ceiling(15);
|
|
||||||
let $coltype = float(7,4);
|
|
||||||
let $infile = part_supported_sql_funcs_int_float.inc;
|
|
||||||
let $val1 = 5.1230;
|
|
||||||
let $val2 = 13.345;
|
|
||||||
let $val3 = 17.987;
|
|
||||||
let $val4 = 15.654 ;
|
|
||||||
# DISABLED due to bug 30577
|
|
||||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
|
||||||
|
|
||||||
let $sqlfunc = floor(col1);
|
|
||||||
let $valsqlfunc = floor(15.123);
|
|
||||||
let $coltype = float(7,4);
|
|
||||||
let $infile = part_supported_sql_funcs_int_float.inc;
|
|
||||||
let $val1 = 5.1230;
|
|
||||||
let $val2 = 13.345;
|
|
||||||
let $val3 = 17.987;
|
|
||||||
let $val4 = 15.654 ;
|
|
||||||
# DISABLED due to bug 30577
|
|
||||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
|
||||||
|
|
||||||
let $sqlfunc = mod(col1,10);
|
let $sqlfunc = mod(col1,10);
|
||||||
let $valsqlfunc = mod(15,10);
|
let $valsqlfunc = mod(15,10);
|
||||||
let $coltype = int;
|
let $coltype = int;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user