mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Merge from mysql-5.5-bugteam to mysql-5.5-runtime
This commit is contained in:
commit
a53f61e6e8
127 changed files with 2375 additions and 796 deletions
|
@ -71,9 +71,10 @@ cat <<EOF
|
|||
same type as that on which you intend to run MySQL/MySQL Cluster.
|
||||
|
||||
The simplest possible way to run this script is to allow it to use the
|
||||
built-in defaults everywhere, invoking it simply as:
|
||||
built-in defaults everywhere, invoking it simply as (from top-level
|
||||
MySQL directory):
|
||||
|
||||
shell> ./build_mccge.sh
|
||||
shell> BUILD/build_mccge.sh
|
||||
|
||||
This performs the following operations:
|
||||
1) Detects the operating system. Currently, Linux, FreeBSD, Solaris
|
||||
|
@ -128,7 +129,7 @@ cat <<EOF
|
|||
information in the binary then use --debug.
|
||||
|
||||
If your aim is not to build MySQL Cluster Carrier Grade Edition, you
|
||||
can also use this script to build MySQL Classic and MySQL Pro
|
||||
can also use this script to build MySQL Classic and MySQL Enterprise Pro
|
||||
versions; see the --extended-help for descriptions of these packages.
|
||||
EOF
|
||||
}
|
||||
|
@ -147,7 +148,13 @@ Usage: $0 [options]
|
|||
configure
|
||||
--extended-help Show extended help message
|
||||
--without-debug Build non-debug version
|
||||
--use-comment Set the comment in the build
|
||||
--with-fast-mutexes Use try/retry method of acquiring mutex
|
||||
--with-debug Build debug version
|
||||
--with-link-time-optimizer
|
||||
Link time optimizations enabled (Requires GCC 4.5
|
||||
if GCC used), available for icc as well. This flag
|
||||
is only considered if also fast is set.
|
||||
--configure-only Stop after running configure.
|
||||
--use-autotools Start by running autoconf, automake,.. tools
|
||||
--no-autotools Start from configure
|
||||
|
@ -297,6 +304,7 @@ extended_usage()
|
|||
by MySQL (cannot be overridden).
|
||||
|
||||
--with-ssl: Enable use of yaSSL library included in the MySQL source
|
||||
if possible (GCC and same CC and CXX).
|
||||
(cannot be overridden).
|
||||
|
||||
--with-pic: Build all binaries using position independent assembler
|
||||
|
@ -377,17 +385,17 @@ extended_usage()
|
|||
Compiler options:
|
||||
-----------------
|
||||
|
||||
This section describes the compiler options for each of the different
|
||||
platforms supported by this script.
|
||||
This section describes the compiler options for each of the different
|
||||
platforms supported by this script.
|
||||
|
||||
The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
|
||||
support for Nocona, K8, and other processors).
|
||||
The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
|
||||
support for Nocona, K8, and other processors).
|
||||
|
||||
Use of the --debug option adds -g to the C/C++ flags.
|
||||
Use of the --debug option adds -g to the C/C++ flags.
|
||||
|
||||
In all cases it is possible to override the definition of CC and CXX
|
||||
by calling the script as follows:
|
||||
CC="/usr/local/bin/gcc" CXX="/usr/local/bin/gcc" BUILD/build_mccge.sh
|
||||
In all cases it is possible to override the definition of CC and CXX
|
||||
by calling the script as follows:
|
||||
CC="/usr/local/bin/gcc" CXX="/usr/local/bin/gcc" BUILD/build_mccge.sh
|
||||
|
||||
FreeBSD/x86/gcc
|
||||
---------------
|
||||
|
@ -411,15 +419,19 @@ extended_usage()
|
|||
|
||||
On Itanium we also add -no-ftz and to CC and C++ flags.
|
||||
|
||||
The non-debug versions also add the following:
|
||||
C/C++ flags += -O3 unroll2 -ip
|
||||
Note that if the user of this script sets CC or CXX explicitly then
|
||||
also -static-libgcc and -static-intel needs to be set in the CC and
|
||||
CXX.
|
||||
|
||||
The fast version adds:
|
||||
C/C++ flags += -ipo
|
||||
The non-debug versions also add the following:
|
||||
C/C++ flags += -O3 unroll2 -ip
|
||||
|
||||
On discovery of a Core 2 Duo architecture while using icc, -xT is also
|
||||
added to the C/C++ flags; this provides optimisations specific to Core
|
||||
2 Duo. This is added only when the --fast flag is set.
|
||||
The fast version adds (if --with-link-time-optimizer is used):
|
||||
C/C++ flags += -ipo
|
||||
|
||||
On discovery of a Core 2 Duo architecture while using icc, -xT is also
|
||||
added to the C/C++ flags; this provides optimisations specific to Core
|
||||
2 Duo. This is added only when the --fast flag is set.
|
||||
|
||||
Solaris/x86/gcc
|
||||
---------------
|
||||
|
@ -445,7 +457,7 @@ extended_usage()
|
|||
Sparc v9 binaries, also -mt is set in all those since we're always
|
||||
building a multithreaded program.
|
||||
|
||||
C flags = -xstrconst
|
||||
C flags = -xstrconst This flag is set only on SPARC
|
||||
C++ flags = -noex
|
||||
|
||||
Set the following C/C++ flags:
|
||||
|
@ -458,8 +470,10 @@ extended_usage()
|
|||
|
||||
Set the C++ flag:
|
||||
-noex
|
||||
-features=no%except This flag is set only on x86
|
||||
|
||||
When compiling with fast we set:
|
||||
When compiling with fast we set (-ipo only used if we have
|
||||
set --with-link-time-optimizer):
|
||||
C/C++ flags: -xtarget=native -xunroll=3 -xipo
|
||||
LDFLAGS: -xipo
|
||||
|
||||
|
@ -471,6 +485,11 @@ extended_usage()
|
|||
|
||||
When compiling with fast on x86 we also set:
|
||||
C/C++ flags: -xregs=frameptr
|
||||
When not compiling with fast we set on x86
|
||||
C/C++ flags: -xregs=no%frameptr
|
||||
|
||||
On SPARC we set
|
||||
ASFLAGS = LDFLAGS = C/C++ flags = -xarch=sparc
|
||||
|
||||
The optimisation level is
|
||||
-xO Debug builds
|
||||
|
@ -480,17 +499,19 @@ extended_usage()
|
|||
|
||||
MacOSX/x86/gcc
|
||||
--------------
|
||||
C/C++ flags include -fno-common -arch i386.
|
||||
C/C++ flags include -fno-common -arch i386.
|
||||
When 64-bits builds then i386 is replaced by x86_64.
|
||||
|
||||
Non-debug versions also add -Os -felide-constructors, where "-Os"
|
||||
means the build is space-optimised as long as the space optimisations
|
||||
do not negatively affect performance. Debug versions use -O.
|
||||
Non-debug versions also add -Os -felide-constructors, where "-Os"
|
||||
means the build is space-optimised as long as the space optimisations
|
||||
do not negatively affect performance. Debug versions use -O.
|
||||
|
||||
Mac OS X builds will always be 32-bit by default, when --64 is added
|
||||
the build will be 64 bit instead. Thus the flag --m64 is added only
|
||||
when specifically given as an option.
|
||||
Mac OS X builds will always be 32-bit by default, when --64 is added
|
||||
the build will be 64 bit instead. Thus the flag --m64 is added only
|
||||
when specifically given as an option.
|
||||
EOF
|
||||
}
|
||||
|
||||
with_usage()
|
||||
{
|
||||
cat <<EOF
|
||||
|
@ -593,13 +614,13 @@ parse_cpu_type()
|
|||
case "$cpu_type" in
|
||||
x86 )
|
||||
cpu_type="x86"
|
||||
if test "x$m64" != "x" ; then
|
||||
if test "x$m64" = "x" ; then
|
||||
m64="no"
|
||||
fi
|
||||
;;
|
||||
x86_64 )
|
||||
cpu_type="x86"
|
||||
if test "x$m64" != "x" ; then
|
||||
if test "x$m64" = "x" ; then
|
||||
m64="yes"
|
||||
fi
|
||||
;;
|
||||
|
@ -629,10 +650,7 @@ parse_compiler()
|
|||
icc )
|
||||
compiler="icc"
|
||||
;;
|
||||
forte )
|
||||
compiler="forte"
|
||||
;;
|
||||
SunStudio | sunstudio )
|
||||
forte | SunStudio | sunstudio )
|
||||
compiler="forte"
|
||||
;;
|
||||
*)
|
||||
|
@ -653,12 +671,21 @@ parse_options()
|
|||
--datadir=*)
|
||||
datadir=`get_key_value "$1"`
|
||||
;;
|
||||
--with-link-time-optimizer)
|
||||
with_link_time_optimizer="yes"
|
||||
;;
|
||||
--without-debug)
|
||||
with_debug_flag="no"
|
||||
if test "x$fast_flag" != "xyes" ; then
|
||||
fast_flag="generic"
|
||||
fi
|
||||
;;
|
||||
--use-comment)
|
||||
without_comment="no"
|
||||
;;
|
||||
--with-fast-mutexes)
|
||||
with_fast_mutexes="yes"
|
||||
;;
|
||||
--use-tcmalloc)
|
||||
use_tcmalloc="yes"
|
||||
;;
|
||||
|
@ -817,9 +844,11 @@ set_cpu_base()
|
|||
fi
|
||||
case "$cpu_arg" in
|
||||
core2 | nocona | prescott | pentium* | i*86 )
|
||||
# Intel CPU
|
||||
cpu_base_type="x86"
|
||||
;;
|
||||
athlon* | opteron* )
|
||||
athlon* | opteron* | k6 | k8 )
|
||||
# AMD CPU
|
||||
cpu_base_type="x86"
|
||||
;;
|
||||
sparc )
|
||||
|
@ -871,15 +900,15 @@ init_configure_commands()
|
|||
cxxflags="$cxx_warnings $base_cxxflags $compiler_flags"
|
||||
configure="./configure $base_configs $with_flags"
|
||||
|
||||
flags="CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\""
|
||||
env_flags="CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\""
|
||||
if test "x$LDFLAGS" != "x" ; then
|
||||
flags="$flags LDFLAGS=\"$LDFLAGS\""
|
||||
env_flags="$env_flags LDFLAGS=\"$LDFLAGS\""
|
||||
fi
|
||||
if test "x$ASFLAGS" != "x" ; then
|
||||
flags="$flags ASFLAGS=\"$ASFLAGS\""
|
||||
env_flags="$env_flags ASFLAGS=\"$ASFLAGS\""
|
||||
fi
|
||||
commands="$commands
|
||||
$flags $configure"
|
||||
$env_flags $configure"
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -1081,6 +1110,18 @@ set_debug_flag()
|
|||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# We compile in SSL support if we can, this isn't possible if CXX
|
||||
# and CC aren't the same and we're not using GCC.
|
||||
#
|
||||
set_ssl()
|
||||
{
|
||||
if test "x$compiler" = "xgcc" && \
|
||||
test "x$CC" = "x$CXX" ; then
|
||||
base_configs="$base_configs --with-ssl"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Base options used by all packages
|
||||
#
|
||||
|
@ -1105,10 +1146,13 @@ set_base_configs()
|
|||
base_configs="$base_configs --enable-local-infile"
|
||||
base_configs="$base_configs --enable-thread-safe-client"
|
||||
base_configs="$base_configs --with-big-tables"
|
||||
base_configs="$base_configs --with-extra-charsets=complex"
|
||||
base_configs="$base_configs --with-ssl"
|
||||
base_configs="$base_configs --with-extra-charsets=all"
|
||||
if test "x$with_fast_mutexes" = "xyes" ; then
|
||||
base_configs="$base_configs --with-fast-mutexes"
|
||||
fi
|
||||
base_configs="$base_configs --with-pic"
|
||||
base_configs="$base_configs --with-csv-storage-engine"
|
||||
base_configs="$base_configs --with-perfschema"
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -1139,7 +1183,9 @@ set_ndb_engine()
|
|||
|
||||
set_pro_package()
|
||||
{
|
||||
base_configs="$base_configs --with-comment=\"MySQL Pro $version_text built from source\""
|
||||
if test "x$without_comment" != "xyes" ; then
|
||||
base_configs="$base_configs --with-comment=\"MySQL Enterprise Pro $version_text built from source\""
|
||||
fi
|
||||
if test "x$with_debug_flag" = "xyes" ; then
|
||||
base_configs="$base_configs --with-server-suffix=\"-debug\""
|
||||
fi
|
||||
|
@ -1147,33 +1193,37 @@ set_pro_package()
|
|||
|
||||
set_cge_extended_package()
|
||||
{
|
||||
if test "x$gpl" = "xno" ; then
|
||||
echo "Cannot build Extended Carrier Grade Edition as Commercial version"
|
||||
if test "x$without_comment" != "xyes" ; then
|
||||
base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Extended Edition $version_text built from source\""
|
||||
fi
|
||||
base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Extended Edition $version_text built from source\""
|
||||
if test "x$with_debug_flag" = "xyes" ; then
|
||||
base_configs="$base_configs --with-server-suffix=\"-cge-extended-debug\""
|
||||
else
|
||||
base_configs="$base_configs --with-server-suffix=\"-cge-extended"\"
|
||||
base_configs="$base_configs --with-server-suffix=\"-cge-extended\""
|
||||
fi
|
||||
}
|
||||
|
||||
set_cge_package()
|
||||
{
|
||||
base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Edition $version_text built from source\""
|
||||
if test "x$without_comment" != "xyes" ; then
|
||||
base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Edition $version_text built from source\""
|
||||
fi
|
||||
if test "x$with_debug_flag" = "xyes" ; then
|
||||
base_configs="$base_configs --with-server-suffix=\"-cge-debug\""
|
||||
else
|
||||
base_configs="$base_configs --with-server-suffix=\"-cge"\"
|
||||
base_configs="$base_configs --with-server-suffix=\"-cge\""
|
||||
fi
|
||||
}
|
||||
|
||||
set_classic_package()
|
||||
{
|
||||
base_configs="$base_configs --with-comment=\"MySQL Classic $version_text built from source\""
|
||||
if test "x$without_comment" != "xyes" ; then
|
||||
base_configs="$base_configs --with-comment=\"MySQL Classic $version_text built from source\""
|
||||
fi
|
||||
if test "x$with_debug_flag" = "xyes" ; then
|
||||
base_configs="$base_configs --with-server-suffix=\"-debug\""
|
||||
fi
|
||||
base_configs="$base_configs --without-example-storage-engine"
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -1204,10 +1254,10 @@ set_gcc_special_options()
|
|||
set_cc_and_cxx_for_gcc()
|
||||
{
|
||||
if test "x$CC" = "x" ; then
|
||||
CC="gcc -static-libgcc"
|
||||
CC="gcc -static-libgcc -fno-exceptions"
|
||||
fi
|
||||
if test "x$CXX" = "x" ; then
|
||||
CXX="gcc -static-libgcc"
|
||||
CXX="gcc -static-libgcc -fno-exceptions"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1266,6 +1316,61 @@ set_bsd_configs()
|
|||
set_cc_and_cxx_for_gcc
|
||||
}
|
||||
|
||||
check_64_bits()
|
||||
{
|
||||
echo "Checking for 32/64-bits compilation"
|
||||
echo "int main() { return 0; }" > temp_test.c
|
||||
if test "x$m64" = "xyes" ; then
|
||||
cmd="$CC $compile_flags -m64 temp_test.c"
|
||||
if ! $cmd 2>1 ; then
|
||||
m64="no"
|
||||
echo "Changing to 32-bits since 64-bits didn't work"
|
||||
else
|
||||
echo "Will use 64-bits"
|
||||
fi
|
||||
else
|
||||
cmd="$CC $compile_flags -m32 temp_test.c"
|
||||
if ! $cmd 2>1 ; then
|
||||
m64="yes"
|
||||
echo "Changing to 64-bits since 32-bits didn't work"
|
||||
else
|
||||
echo "Will use 32-bits"
|
||||
fi
|
||||
fi
|
||||
rm temp_test.c
|
||||
}
|
||||
|
||||
#
|
||||
# Get GCC version
|
||||
#
|
||||
get_gcc_version()
|
||||
{
|
||||
# check if compiler is gcc and dump its version
|
||||
cc_verno=`$cc -dumpversion 2>/dev/null`
|
||||
if test "x$?" = "x0" ; then
|
||||
set -- `echo $cc_verno | tr '.' ' '`
|
||||
cc_ver="GCC"
|
||||
cc_major=$1
|
||||
cc_minor=$2
|
||||
cc_patch=$3
|
||||
gcc_version=`expr $cc_major '*' 100 '+' $cc_minor`
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Link Time Optimizer in GCC (LTO) uses a parameter -flto
|
||||
# which was added to GCC 4.5, if --with-link-time-optimizer
|
||||
# is set then use this feature
|
||||
#
|
||||
check_for_link_time_optimizer()
|
||||
{
|
||||
get_gcc_version
|
||||
if test "$gcc_version" -ge 405 && \
|
||||
test "x$with_link_time_optimizer" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -flto"
|
||||
LDFLAGS="$LDFLAGS -flto"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# Linux Section
|
||||
#
|
||||
|
@ -1284,20 +1389,22 @@ set_linux_configs()
|
|||
fi
|
||||
if test "x$compiler" = "xgcc" ; then
|
||||
set_cc_and_cxx_for_gcc
|
||||
if test "x$m64" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -m64"
|
||||
else
|
||||
compiler_flags="$compiler_flags -m32"
|
||||
fi
|
||||
if test "x$fast_flag" != "xno" ; then
|
||||
if test "x$fast_flag" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -O3"
|
||||
check_for_link_time_optimizer
|
||||
else
|
||||
compiler_flags="$compiler_flags -O2"
|
||||
fi
|
||||
else
|
||||
compiler_flags="$compiler_flags -O0"
|
||||
fi
|
||||
check_64_bits
|
||||
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
|
||||
elif test "x$compiler" = "xicc" ; then
|
||||
compiler_flags="$compiler_flags -mp -restrict"
|
||||
|
@ -1307,8 +1414,10 @@ set_linux_configs()
|
|||
fi
|
||||
if test "x$fast_flag" != "xno" ; then
|
||||
compiler_flags="$compiler_flags -O3 -unroll2 -ip"
|
||||
if test "x$fast_flag" = "xyes" ; then
|
||||
if test "x$fast_flag" = "xyes" && \
|
||||
test "x$with_link_time_optimizer" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -ipo"
|
||||
LDFLAGS="$LDFLAGS -ipo"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
@ -1323,11 +1432,16 @@ set_linux_configs()
|
|||
set_solaris_configs()
|
||||
{
|
||||
# Use mtmalloc as malloc, see Tim Cook blog
|
||||
base_configs="$base_configs --with-mysqld-libs=-lmtmalloc"
|
||||
# For information on optimal compiler settings, see article at
|
||||
# http://developers.sun.com/solaris/articles/mysql_perf_tune.html
|
||||
# by Luojia Chen at Sun.
|
||||
base_configs="$base_configs --with-named-curses=-lcurses"
|
||||
case "`uname -a`" in
|
||||
*5.8* | *5.9* | *5.10* | *5.11*)
|
||||
*5.8* | *5.9* )
|
||||
;;
|
||||
|
||||
*5.10* | *5.11*)
|
||||
base_configs="$base_configs --with-mysqld-libs=-lmtmalloc"
|
||||
;;
|
||||
*)
|
||||
usage "Only versions 8,9, 10 and 11 supported for Solaris"
|
||||
|
@ -1361,6 +1475,7 @@ set_solaris_configs()
|
|||
if test "x$fast_flag" = "xyes" ; then
|
||||
LDFLAGS="$LDFLAGS -O3"
|
||||
compiler_flags="$compiler_flags -O3"
|
||||
check_for_link_time_optimizer
|
||||
else
|
||||
if test "x$fast_flag" = "xgeneric" ; then
|
||||
LDFLAGS="$LDFLAGS -O2"
|
||||
|
@ -1373,44 +1488,50 @@ set_solaris_configs()
|
|||
else
|
||||
#Using Forte compiler (SunStudio)
|
||||
set_cc_and_cxx_for_forte
|
||||
base_cflags="$base_cflags -xstrconst"
|
||||
compiler_flags="$compiler_flags -mt"
|
||||
LD_FLAGS="$LD_FLAGS -mt"
|
||||
LDFLAGS="$LDFLAGS -mt"
|
||||
compiler_flags="$compiler_flags -fsimple=1"
|
||||
compiler_flags="$compiler_flags -ftrap=%none"
|
||||
compiler_flags="$compiler_flags -xbuiltin=%all"
|
||||
compiler_flags="$compiler_flags -xlibmil"
|
||||
compiler_flags="$compiler_flags -xlibmopt"
|
||||
base_cxxflags="$base_cxxflags -noex"
|
||||
if test "x$fast_flag" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -xtarget=native"
|
||||
compiler_flags="$compiler_flags -xipo"
|
||||
compiler_flags="$compiler_flags -xunroll=3"
|
||||
LD_FLAGS="$LD_FLAGS -xipo"
|
||||
if test "x$with_link_time_optimizer" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -xipo"
|
||||
LDFLAGS="$LDFLAGS -xipo"
|
||||
fi
|
||||
else
|
||||
compiler_flags="$compiler_flags -xtarget=generic"
|
||||
fi
|
||||
if test "x$cpu_base_type" = "xx86" ; then
|
||||
compiler_flags="$compiler_flags -nofstore"
|
||||
base_cxx_flags="$base_cxx_flags -features=no%except"
|
||||
if test "x$fast_flag" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -xregs=frameptr"
|
||||
compiler_flags="$compiler_flags -xO4"
|
||||
elif test "x$fast_flag" = "xgeneric" ; then
|
||||
compiler_flags="$compiler_flags -xO2"
|
||||
else
|
||||
compiler_flags="$compiler_flags -xO0"
|
||||
compiler_flags="$compiler_flags -xregs=no%frameptr"
|
||||
if test "x$fast_flag" = "xgeneric" ; then
|
||||
compiler_flags="$compiler_flags -xO2"
|
||||
else
|
||||
compiler_flags="$compiler_flags -xO0"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
#Using SPARC cpu with SunStudio (Forte) compiler
|
||||
ASFLAGS="$ASFLAGS -xarch=sparc"
|
||||
LDFLAGS="$LDFLAGS -xarch=sparc"
|
||||
base_cxxflags="$base_cxxflags -noex"
|
||||
base_cflags="$base_cflags -xstrconst"
|
||||
compiler_flags="$compiler_flags -xarch=sparc"
|
||||
if test "x$fast_flag" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -xbinopt=prepare"
|
||||
LDFLAGS="$LDFLAGS -xbinopt=prepare"
|
||||
compiler_flags="$compiler_flags -xO4"
|
||||
elif test "x$fast_flag" = "xgeneric" ; then
|
||||
compiler_flags="$compiler_flags -xO2"
|
||||
compiler_flags="$compiler_flags -xO3"
|
||||
else
|
||||
compiler_flags="$compiler_flags -xO0"
|
||||
fi
|
||||
|
@ -1432,7 +1553,7 @@ set_macosx_configs()
|
|||
# optimisations also when not in fast mode.
|
||||
#
|
||||
base_cxxflags="$base_cxxflags -felide-constructors"
|
||||
base_cxxflags="$base_cxxflags -fno-common"
|
||||
compiler_flags="$compiler_flags -fno-common"
|
||||
if test "x$m64" = "xyes" ; then
|
||||
compiler_flags="$compiler_flags -m64"
|
||||
compiler_flags="$compiler_flags -arch x86_64"
|
||||
|
@ -1526,7 +1647,7 @@ fi
|
|||
cpu_type=
|
||||
package=
|
||||
prefix="/usr/local/mysql"
|
||||
parallelism="4"
|
||||
parallelism="8"
|
||||
fast_flag="generic"
|
||||
compiler="gcc"
|
||||
gpl="yes"
|
||||
|
@ -1562,6 +1683,10 @@ engine_configs=
|
|||
ASFLAGS=
|
||||
LDFLAGS=
|
||||
use_tcmalloc=
|
||||
without_comment="yes"
|
||||
with_fast_mutexes=
|
||||
with_link_time_optimizer=
|
||||
gcc_version="0"
|
||||
|
||||
set_defaults_based_on_environment
|
||||
|
||||
|
@ -1656,7 +1781,7 @@ elif test "x$os" = "xbsd" ; then
|
|||
else
|
||||
die "Operating system not supported by this script"
|
||||
fi
|
||||
|
||||
set_ssl
|
||||
#
|
||||
# Final step before setting up commands is to set up proper make and
|
||||
# proper libtoolize versions, and to determine whether to use ccache.
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# best compiler optimization flags for gcc
|
||||
# Will return result in:
|
||||
# cpu_arg : Type of CPU
|
||||
# low_cpu_arg : Type of CPU used up until GCC v3.3
|
||||
# check_cpu_args : Arguments for GCC compiler settings
|
||||
#
|
||||
|
||||
|
@ -33,7 +34,7 @@ check_compiler_cpu_flags () {
|
|||
case `gcc -dumpmachine` in
|
||||
i?86-* | x86_64-*)
|
||||
if test "$cc_comp" -lt 304 ; then
|
||||
check_cpu_cflags="-mcpu=${cpu_arg}"
|
||||
check_cpu_cflags="-mcpu=${low_cpu_arg}"
|
||||
elif test "$cc_comp" -ge 402 ; then
|
||||
check_cpu_cflags="-mtune=native"
|
||||
else
|
||||
|
@ -141,9 +142,10 @@ check_cpu () {
|
|||
# detect CPU shortname as used by gcc options
|
||||
# this list is not complete, feel free to add further entries
|
||||
cpu_arg=""
|
||||
case "$cpu_family--$model_name--$spu_arch" in
|
||||
low_cpu_arg=""
|
||||
case "$cpu_vendor--$cpu_family--$model_name--$spu_arch" in
|
||||
# DEC Alpha
|
||||
Alpha*EV6*)
|
||||
*Alpha*EV6*)
|
||||
cpu_arg="ev6";
|
||||
;;
|
||||
#Core 2 Duo
|
||||
|
@ -172,6 +174,13 @@ check_cpu () {
|
|||
*Pentium*4*Mobile*)
|
||||
cpu_arg="pentium4m"
|
||||
;;
|
||||
*Pentium\(R\)*\ M*)
|
||||
cpu_arg="pentium-m"
|
||||
low_cpu_arg="pentium3"
|
||||
;;
|
||||
*Pentium\(R\)*\ D*)
|
||||
cpu_arg="prescott"
|
||||
;;
|
||||
*Pentium*4*)
|
||||
cpu_arg="pentium4"
|
||||
;;
|
||||
|
@ -196,6 +205,12 @@ check_cpu () {
|
|||
*Celeron*)
|
||||
cpu_arg="pentium2"
|
||||
;;
|
||||
*Atom*)
|
||||
cpu_arg="prescott"
|
||||
;;
|
||||
*GenuineIntel*)
|
||||
cpu_arg="pentium"
|
||||
;;
|
||||
*Turion*)
|
||||
cpu_arg="athlon64"
|
||||
;;
|
||||
|
@ -205,9 +220,30 @@ check_cpu () {
|
|||
*Athlon*)
|
||||
cpu_arg="athlon"
|
||||
;;
|
||||
*AMD-K7*)
|
||||
cpu_arg="athlon"
|
||||
;;
|
||||
*Athlon*XP\ *)
|
||||
cpu_arg="athlon-xp"
|
||||
;;
|
||||
*AMD*Sempron\(tm\)*)
|
||||
cpu_arg="athlon-mp"
|
||||
;;
|
||||
*AMD*Athlon\(tm\)\ 64*)
|
||||
cpu_arg="k8"
|
||||
;;
|
||||
*Opteron*)
|
||||
cpu_arg="opteron"
|
||||
;;
|
||||
*Phenom*)
|
||||
cpu_arg="k8"
|
||||
;;
|
||||
*AuthenticAMD*)
|
||||
cpu_arg="k6"
|
||||
;;
|
||||
*VIA\ *)
|
||||
cpu_arg="i686"
|
||||
;;
|
||||
# MacOSX / Intel
|
||||
*i386*i486*)
|
||||
cpu_arg="pentium-m"
|
||||
|
@ -239,6 +275,10 @@ check_cpu () {
|
|||
;;
|
||||
esac
|
||||
|
||||
if test "x$low_cpu_arg" = "x" ; then
|
||||
low_cpu_arg="$cpu_arg"
|
||||
fi
|
||||
|
||||
if test -z "$cpu_arg" ; then
|
||||
if test "$CPUINFO" != " " ; then
|
||||
# fallback to uname if necessary
|
||||
|
|
|
@ -112,7 +112,8 @@ OPTION(MYSQL_MAINTAINER_MODE "MySQL maintainer-specific development environment"
|
|||
# Whether the maintainer mode should be enabled.
|
||||
IF(MYSQL_MAINTAINER_MODE)
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(MY_MAINTAINER_C_WARNINGS "-Wall -Wextra -Wunused -Wwrite-strings -Werror"
|
||||
SET(MY_MAINTAINER_C_WARNINGS
|
||||
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
|
||||
CACHE STRING "C warning options used in maintainer builds.")
|
||||
ENDIF()
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
|
|
@ -64,7 +64,10 @@ MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c)
|
|||
SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
|
||||
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient)
|
||||
|
||||
ADD_EXECUTABLE(echo echo.c)
|
||||
# "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/".
|
||||
IF(WIN32)
|
||||
MYSQL_ADD_EXECUTABLE(echo echo.c)
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap
|
||||
PROPERTIES HAS_CXX TRUE)
|
||||
|
|
|
@ -5631,6 +5631,8 @@ int read_line(char *buf, int size)
|
|||
char c, UNINIT_VAR(last_quote), last_char= 0;
|
||||
char *p= buf, *buf_end= buf + size - 1;
|
||||
int skip_char= 0;
|
||||
my_bool have_slash= FALSE;
|
||||
|
||||
enum {R_NORMAL, R_Q, R_SLASH_IN_Q,
|
||||
R_COMMENT, R_LINE_START} state= R_LINE_START;
|
||||
DBUG_ENTER("read_line");
|
||||
|
@ -5702,9 +5704,13 @@ int read_line(char *buf, int size)
|
|||
}
|
||||
else if (c == '\'' || c == '"' || c == '`')
|
||||
{
|
||||
last_quote= c;
|
||||
state= R_Q;
|
||||
if (! have_slash)
|
||||
{
|
||||
last_quote= c;
|
||||
state= R_Q;
|
||||
}
|
||||
}
|
||||
have_slash= (c == '\\');
|
||||
break;
|
||||
|
||||
case R_COMMENT:
|
||||
|
|
|
@ -31,9 +31,12 @@
|
|||
** String functions
|
||||
*****************************************************************************/
|
||||
|
||||
bool String::real_alloc(uint32 arg_length)
|
||||
bool String::real_alloc(uint32 length)
|
||||
{
|
||||
arg_length=ALIGN_SIZE(arg_length+1);
|
||||
uint32 arg_length= ALIGN_SIZE(length + 1);
|
||||
DBUG_ASSERT(arg_length > length);
|
||||
if (arg_length <= length)
|
||||
return TRUE; /* Overflow */
|
||||
str_length=0;
|
||||
if (Alloced_length < arg_length)
|
||||
{
|
||||
|
@ -56,6 +59,9 @@ bool String::real_alloc(uint32 arg_length)
|
|||
bool String::realloc(uint32 alloc_length)
|
||||
{
|
||||
uint32 len=ALIGN_SIZE(alloc_length+1);
|
||||
DBUG_ASSERT(len > alloc_length);
|
||||
if (len <= alloc_length)
|
||||
return TRUE; /* Overflow */
|
||||
if (Alloced_length < len)
|
||||
{
|
||||
char *new_ptr;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Handy macro to parse macro arguments
|
||||
MACRO(CMAKE_PARSE_ARGUMENTS prefix arg_names option_names)
|
||||
MACRO(MYSQL_PARSE_ARGUMENTS prefix arg_names option_names)
|
||||
SET(DEFAULT_ARGS)
|
||||
FOREACH(arg_name ${arg_names})
|
||||
SET(${prefix}_${arg_name})
|
||||
|
|
|
@ -83,7 +83,7 @@ FUNCTION(INSTALL_MANPAGE file)
|
|||
ENDFUNCTION()
|
||||
|
||||
FUNCTION(INSTALL_SCRIPT)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
"DESTINATION;COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
|
@ -205,7 +205,7 @@ ENDMACRO()
|
|||
#
|
||||
|
||||
FUNCTION(MYSQL_INSTALL_TARGETS)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
"DESTINATION;COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
|
@ -249,7 +249,7 @@ SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug
|
|||
|
||||
|
||||
FUNCTION(INSTALL_DEBUG_TARGET target)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
"DESTINATION;RENAME;PDB_DESTINATION;COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
|
|
|
@ -213,7 +213,7 @@ ENDMACRO()
|
|||
# [OUTPUT_NAME output_name]
|
||||
#)
|
||||
MACRO(MERGE_LIBRARIES)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
"EXPORTS;OUTPUT_NAME;COMPONENT"
|
||||
"STATIC;SHARED;MODULE;NOINSTALL"
|
||||
${ARGN}
|
||||
|
|
|
@ -28,7 +28,7 @@ INCLUDE(cmake_parse_arguments)
|
|||
|
||||
FUNCTION (MYSQL_ADD_EXECUTABLE)
|
||||
# Pass-through arguments for ADD_EXECUTABLE
|
||||
CMAKE_PARSE_ARGUMENTS(ARG
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
|
|
|
@ -28,7 +28,7 @@ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake)
|
|||
# [DEPENDENCIES target1...targetN]
|
||||
|
||||
MACRO(MYSQL_ADD_PLUGIN)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
"LINK_LIBRARIES;DEPENDENCIES;MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME"
|
||||
"STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;RECOMPILE_FOR_EMBEDDED"
|
||||
${ARGN}
|
||||
|
|
|
@ -16,7 +16,7 @@ AC_DEFUN([MY_MAINTAINER_MODE], [
|
|||
AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
|
||||
# Setup GCC warning options.
|
||||
AS_IF([test "$GCC" = "yes"], [
|
||||
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Werror"
|
||||
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
|
||||
CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
|
||||
])
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ dnl
|
|||
dnl When changing the major version number please also check the switch
|
||||
dnl statement in mysqlbinlog::check_master_version(). You may also need
|
||||
dnl to update version.c in ndb.
|
||||
AC_INIT([MySQL Server], [5.5.7-m3], [], [mysql])
|
||||
AC_INIT([MySQL Server], [5.5.7-rc], [], [mysql])
|
||||
|
||||
AC_CONFIG_SRCDIR([sql/mysqld.cc])
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
|
|
@ -54,6 +54,7 @@ SET(HEADERS
|
|||
keycache.h
|
||||
m_ctype.h
|
||||
my_attribute.h
|
||||
my_compiler.h
|
||||
${HEADERS_GEN_CONFIGURE}
|
||||
)
|
||||
|
||||
|
|
|
@ -32,8 +32,9 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
|
|||
decimal.h errmsg.h my_global.h my_net.h \
|
||||
my_getopt.h sslopt-longopts.h my_dir.h \
|
||||
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
|
||||
m_ctype.h my_attribute.h $(HEADERS_GEN_CONFIGURE) \
|
||||
$(HEADERS_GEN_MAKE) probes_mysql.h probes_mysql_nodtrace.h
|
||||
m_ctype.h my_attribute.h my_compiler.h \
|
||||
$(HEADERS_GEN_CONFIGURE) $(HEADERS_GEN_MAKE) \
|
||||
probes_mysql.h probes_mysql_nodtrace.h
|
||||
|
||||
noinst_HEADERS = lf.h my_bit.h \
|
||||
heap.h my_bitmap.h my_uctype.h password.h \
|
||||
|
@ -47,7 +48,7 @@ noinst_HEADERS = lf.h my_bit.h \
|
|||
my_user.h my_atomic.h atomic/nolock.h \
|
||||
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
|
||||
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
|
||||
atomic/solaris.h mysql/innodb_priv.h my_compiler.h
|
||||
atomic/solaris.h mysql/innodb_priv.h
|
||||
|
||||
pkgpsiinclude_HEADERS = mysql/psi/psi.h mysql/psi/mysql_thread.h \
|
||||
mysql/psi/mysql_file.h
|
||||
|
|
|
@ -111,9 +111,9 @@
|
|||
On some platforms (e.g. Mac OS X and Solaris) the ebx register
|
||||
is held as a pointer to the global offset table. Thus we're not
|
||||
allowed to use the b-register on those platforms when compiling
|
||||
PIC code, to avoid this we push ebx and pop ebx and add a movl
|
||||
instruction to avoid having ebx in the interface of the assembler
|
||||
instruction.
|
||||
PIC code, to avoid this we push ebx and pop ebx. The new value
|
||||
is copied directly from memory to avoid problems with a implicit
|
||||
manipulation of the stack pointer by the push.
|
||||
|
||||
cmpxchg8b works on both 32-bit platforms and 64-bit platforms but
|
||||
the code here is only used on 32-bit platforms, on 64-bit
|
||||
|
@ -121,11 +121,13 @@
|
|||
fine.
|
||||
*/
|
||||
#define make_atomic_cas_body64 \
|
||||
int32 ebx=(set & 0xFFFFFFFF), ecx=(set >> 32); \
|
||||
asm volatile ("push %%ebx; movl %3, %%ebx;" \
|
||||
LOCK_prefix "; cmpxchg8b %0; setz %2; pop %%ebx" \
|
||||
: "=m" (*a), "+A" (*cmp), "=c" (ret) \
|
||||
: "m" (ebx), "c" (ecx), "m" (*a) \
|
||||
asm volatile ("push %%ebx;" \
|
||||
"movl (%%ecx), %%ebx;" \
|
||||
"movl 4(%%ecx), %%ecx;" \
|
||||
LOCK_prefix "; cmpxchg8b %0;" \
|
||||
"setz %2; pop %%ebx" \
|
||||
: "=m" (*a), "+A" (*cmp), "=c" (ret) \
|
||||
: "c" (&set), "m" (*a) \
|
||||
: "memory", "esp")
|
||||
#endif
|
||||
|
||||
|
|
|
@ -208,7 +208,8 @@ struct st_mysql_options {
|
|||
|
||||
enum mysql_status
|
||||
{
|
||||
MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
|
||||
MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
|
||||
MYSQL_STATUS_STATEMENT_GET_RESULT
|
||||
};
|
||||
|
||||
enum mysql_protocol_type
|
||||
|
|
|
@ -297,7 +297,8 @@ struct st_mysql_options {
|
|||
};
|
||||
enum mysql_status
|
||||
{
|
||||
MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
|
||||
MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
|
||||
MYSQL_STATUS_STATEMENT_GET_RESULT
|
||||
};
|
||||
enum mysql_protocol_type
|
||||
{
|
||||
|
|
|
@ -2118,6 +2118,8 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
|||
set_stmt_errmsg(stmt, net);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
else if (mysql->status == MYSQL_STATUS_GET_RESULT)
|
||||
stmt->mysql->status= MYSQL_STATUS_STATEMENT_GET_RESULT;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -2256,7 +2258,7 @@ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row)
|
|||
set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
|
||||
return 1;
|
||||
}
|
||||
if (mysql->status != MYSQL_STATUS_GET_RESULT)
|
||||
if (mysql->status != MYSQL_STATUS_STATEMENT_GET_RESULT)
|
||||
{
|
||||
set_stmt_error(stmt, stmt->unbuffered_fetch_cancelled ?
|
||||
CR_FETCH_CANCELED : CR_COMMANDS_OUT_OF_SYNC,
|
||||
|
@ -4448,7 +4450,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
|
|||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
else if (mysql->status != MYSQL_STATUS_GET_RESULT)
|
||||
else if (mysql->status != MYSQL_STATUS_STATEMENT_GET_RESULT)
|
||||
{
|
||||
set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL);
|
||||
DBUG_RETURN(1);
|
||||
|
@ -4872,6 +4874,9 @@ int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
|
|||
DBUG_RETURN(rc);
|
||||
}
|
||||
|
||||
if (mysql->status == MYSQL_STATUS_GET_RESULT)
|
||||
mysql->status= MYSQL_STATUS_STATEMENT_GET_RESULT;
|
||||
|
||||
stmt->state= MYSQL_STMT_EXECUTE_DONE;
|
||||
stmt->bind_result_done= FALSE;
|
||||
|
||||
|
|
|
@ -92,3 +92,6 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
|
|||
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
main.gis-rtree # svoj: due to BUG#38965
|
||||
main.type_float # svoj: due to BUG#38965
|
||||
main.type_newdecimal # svoj: due to BUG#38965
|
||||
|
|
|
@ -126,3 +126,19 @@ WHERE
|
|||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
|
||||
--echo #
|
||||
CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
|
||||
PRIMARY KEY (f1), KEY (f2), KEY (f3) );
|
||||
INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
|
||||
|
||||
SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
|
||||
EXPLAIN SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
|
|
@ -701,6 +701,13 @@ sub process_opts_file {
|
|||
next;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--testcase-timeout=");
|
||||
if ( defined $value ) {
|
||||
# Overrides test case timeout for this test
|
||||
$tinfo->{'case-timeout'}= $value;
|
||||
next;
|
||||
}
|
||||
|
||||
# Ok, this was a real option, add it
|
||||
push(@{$tinfo->{$opt_name}}, $opt);
|
||||
}
|
||||
|
|
|
@ -231,7 +231,6 @@ my $opt_suite_timeout = $ENV{MTR_SUITE_TIMEOUT} || 300; # minutes
|
|||
my $opt_shutdown_timeout= $ENV{MTR_SHUTDOWN_TIMEOUT} || 10; # seconds
|
||||
my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds
|
||||
|
||||
sub testcase_timeout { return $opt_testcase_timeout * 60; };
|
||||
sub suite_timeout { return $opt_suite_timeout * 60; };
|
||||
sub check_timeout { return $opt_testcase_timeout * 6; };
|
||||
|
||||
|
@ -245,6 +244,7 @@ my $opt_repeat= 1;
|
|||
my $opt_retry= 3;
|
||||
my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2);
|
||||
my $opt_reorder= 1;
|
||||
my $opt_force_restart= 0;
|
||||
|
||||
my $opt_strace_client;
|
||||
|
||||
|
@ -260,6 +260,17 @@ my $opt_callgrind;
|
|||
my %mysqld_logs;
|
||||
my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
|
||||
|
||||
sub testcase_timeout ($) {
|
||||
my ($tinfo)= @_;
|
||||
if (exists $tinfo->{'case-timeout'}) {
|
||||
# Return test specific timeout if *longer* that the general timeout
|
||||
my $test_to= $tinfo->{'case-timeout'};
|
||||
$test_to*= 10 if $opt_valgrind;
|
||||
return $test_to * 60 if $test_to > $opt_testcase_timeout;
|
||||
}
|
||||
return $opt_testcase_timeout * 60;
|
||||
}
|
||||
|
||||
our $opt_warnings= 1;
|
||||
|
||||
our $opt_skip_ndbcluster= 0;
|
||||
|
@ -934,6 +945,7 @@ sub command_line_setup {
|
|||
'report-features' => \$opt_report_features,
|
||||
'comment=s' => \$opt_comment,
|
||||
'fast' => \$opt_fast,
|
||||
'force-restart' => \$opt_force_restart,
|
||||
'reorder!' => \$opt_reorder,
|
||||
'enable-disabled' => \&collect_option,
|
||||
'verbose+' => \$opt_verbose,
|
||||
|
@ -3552,7 +3564,7 @@ sub run_testcase ($) {
|
|||
}
|
||||
}
|
||||
|
||||
my $test_timeout= start_timer(testcase_timeout());
|
||||
my $test_timeout= start_timer(testcase_timeout($tinfo));
|
||||
|
||||
do_before_run_mysqltest($tinfo);
|
||||
|
||||
|
@ -3752,7 +3764,7 @@ sub run_testcase ($) {
|
|||
{
|
||||
my $log_file_name= $opt_vardir."/log/".$tinfo->{shortname}.".log";
|
||||
$tinfo->{comment}=
|
||||
"Test case timeout after ".testcase_timeout().
|
||||
"Test case timeout after ".testcase_timeout($tinfo).
|
||||
" seconds\n\n";
|
||||
# Add 20 last executed commands from test case log file
|
||||
if (-e $log_file_name)
|
||||
|
@ -3761,7 +3773,7 @@ sub run_testcase ($) {
|
|||
"== $log_file_name == \n".
|
||||
mtr_lastlinesfromfile($log_file_name, 20)."\n";
|
||||
}
|
||||
$tinfo->{'timeout'}= testcase_timeout(); # Mark as timeout
|
||||
$tinfo->{'timeout'}= testcase_timeout($tinfo); # Mark as timeout
|
||||
run_on_all($tinfo, 'analyze-timeout');
|
||||
|
||||
report_failure_and_restart($tinfo);
|
||||
|
@ -4567,6 +4579,11 @@ sub server_need_restart {
|
|||
return 1;
|
||||
}
|
||||
|
||||
if ( $opt_force_restart ) {
|
||||
mtr_verbose_restart($server, "forced restart turned on");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( $tinfo->{template_path} ne $current_config_name)
|
||||
{
|
||||
mtr_verbose_restart($server, "using different config file");
|
||||
|
@ -5595,6 +5612,7 @@ Misc options
|
|||
servers to exit before finishing the process
|
||||
fast Run as fast as possible, dont't wait for servers
|
||||
to shutdown etc.
|
||||
force-restart Always restart servers between tests
|
||||
parallel=N Run tests in N parallel threads (default=1)
|
||||
Use parallel=auto for auto-setting of N
|
||||
repeat=N Run each test N number of times
|
||||
|
|
|
@ -186,3 +186,13 @@ MAX(IFNULL(CAST(c AS UNSIGNED), 0))
|
|||
12345678901234567890
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug#55077: Assertion failed: width > 0 && to != ((void *)0), file .\dtoa.c
|
||||
#
|
||||
CREATE TABLE t1 (a LONGBLOB, b DOUBLE);
|
||||
INSERT INTO t1 VALUES (NULL, 0), (NULL, 1);
|
||||
SELECT IF(b, (SELECT a FROM t1 LIMIT 1), b) c FROM t1 GROUP BY c;
|
||||
c
|
||||
NULL
|
||||
0
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -360,4 +360,19 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1;
|
|||
COALESCE(a) = COALESCE(b)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of tests
|
||||
#
|
||||
# Bug #54461: crash with longblob and union or update with subquery
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b LONGBLOB);
|
||||
INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
|
||||
SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
LEAST(a, (SELECT b FROM t1 LIMIT 1))
|
||||
1
|
||||
2
|
||||
SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
GREATEST(a, (SELECT b FROM t1 LIMIT 1))
|
||||
2
|
||||
3
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -707,10 +707,7 @@ numgeometries(b) IS NULL, numinteriorrings(b) IS NULL, numpoints(b) IS NULL,
|
|||
area(b) IS NULL, glength(b) IS NULL, srid(b) IS NULL, x(b) IS NULL,
|
||||
y(b) IS NULL
|
||||
from t1;
|
||||
geometryfromtext(b) IS NULL geometryfromwkb(b) IS NULL astext(b) IS NULL aswkb(b) IS NULL geometrytype(b) IS NULL centroid(b) IS NULL envelope(b) IS NULL startpoint(b) IS NULL endpoint(b) IS NULL exteriorring(b) IS NULL pointn(b, 1) IS NULL geometryn(b, 1) IS NULL interiorringn(b, 1) IS NULL multipoint(b) IS NULL isempty(b) IS NULL issimple(b) IS NULL isclosed(b) IS NULL dimension(b) IS NULL numgeometries(b) IS NULL numinteriorrings(b) IS NULL numpoints(b) IS NULL area(b) IS NULL glength(b) IS NULL srid(b) IS NULL x(b) IS NULL y(b) IS NULL
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
ERROR 22007: Illegal non geometric '`test`.`t1`.`b`' value found during parsing
|
||||
select
|
||||
within(b, b) IS NULL, contains(b, b) IS NULL, overlaps(b, b) IS NULL,
|
||||
equals(b, b) IS NULL, disjoint(b, b) IS NULL, touches(b, b) IS NULL,
|
||||
|
@ -725,10 +722,7 @@ point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS
|
|||
multilinestring(b) IS NULL, multipolygon(b) IS NULL,
|
||||
geometrycollection(b) IS NULL
|
||||
from t1;
|
||||
point(b, b) IS NULL linestring(b) IS NULL polygon(b) IS NULL multipoint(b) IS NULL multilinestring(b) IS NULL multipolygon(b) IS NULL geometrycollection(b) IS NULL
|
||||
0 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1
|
||||
0 1 1 1 1 1 1
|
||||
ERROR 22007: Illegal non geometric '`test`.`t1`.`b`' value found during parsing
|
||||
drop table t1;
|
||||
CREATE TABLE t1(a POINT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
|
@ -1010,53 +1004,16 @@ f5 datetime YES NULL
|
|||
drop view v1;
|
||||
drop table t1;
|
||||
SELECT MultiPoint(12345,'');
|
||||
MultiPoint(12345,'')
|
||||
NULL
|
||||
SELECT MultiPoint(123451,'');
|
||||
MultiPoint(123451,'')
|
||||
NULL
|
||||
SELECT MultiPoint(1234512,'');
|
||||
MultiPoint(1234512,'')
|
||||
NULL
|
||||
SELECT MultiPoint(12345123,'');
|
||||
MultiPoint(12345123,'')
|
||||
NULL
|
||||
SELECT MultiLineString(12345,'');
|
||||
MultiLineString(12345,'')
|
||||
NULL
|
||||
SELECT MultiLineString(123451,'');
|
||||
MultiLineString(123451,'')
|
||||
NULL
|
||||
SELECT MultiLineString(1234512,'');
|
||||
MultiLineString(1234512,'')
|
||||
NULL
|
||||
SELECT MultiLineString(12345123,'');
|
||||
MultiLineString(12345123,'')
|
||||
NULL
|
||||
SELECT LineString(12345,'');
|
||||
LineString(12345,'')
|
||||
NULL
|
||||
SELECT LineString(123451,'');
|
||||
LineString(123451,'')
|
||||
NULL
|
||||
SELECT LineString(1234512,'');
|
||||
LineString(1234512,'')
|
||||
NULL
|
||||
SELECT LineString(12345123,'');
|
||||
LineString(12345123,'')
|
||||
NULL
|
||||
SELECT Polygon(12345,'');
|
||||
Polygon(12345,'')
|
||||
NULL
|
||||
SELECT Polygon(123451,'');
|
||||
Polygon(123451,'')
|
||||
NULL
|
||||
SELECT Polygon(1234512,'');
|
||||
Polygon(1234512,'')
|
||||
NULL
|
||||
SELECT Polygon(12345123,'');
|
||||
Polygon(12345123,'')
|
||||
NULL
|
||||
ERROR 22007: Illegal non geometric '12345' value found during parsing
|
||||
SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b));
|
||||
ERROR 22007: Illegal non geometric ''00000'' value found during parsing
|
||||
#
|
||||
# BUG#51875: crash when loading data into geometry function polyfromwkb
|
||||
#
|
||||
SET @a=0x00000000030000000100000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
|
||||
SET @a=POLYFROMWKB(@a);
|
||||
SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
|
||||
SET @a=POLYFROMWKB(@a);
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t1(
|
||||
col0 BINARY NOT NULL,
|
||||
|
|
|
@ -255,3 +255,21 @@ WHERE
|
|||
`RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND
|
||||
`TESTID`='' AND `UCCHECK`='';
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
|
||||
PRIMARY KEY (f1), KEY (f2), KEY (f3) );
|
||||
INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
|
||||
SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
f1
|
||||
2
|
||||
EXPLAIN SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
|
||||
2 DEPENDENT SUBQUERY t2 index_merge f2,f3 f3,f2 2,5 NULL 1 Using intersect(f3,f2); Using where; Using index
|
||||
DROP TABLE t1,t2;
|
||||
|
|
|
@ -1414,6 +1414,24 @@ WHERE
|
|||
`TESTID`='' AND `UCCHECK`='';
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
|
||||
PRIMARY KEY (f1), KEY (f2), KEY (f3) );
|
||||
INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
|
||||
SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
f1
|
||||
2
|
||||
EXPLAIN SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
|
||||
2 DEPENDENT SUBQUERY t2 ref f2,f3 f2 5 1 Using where
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Generic @@optimizer_switch tests (move those into a separate file if
|
||||
# we get another @@optimizer_switch user)
|
||||
#
|
||||
|
|
|
@ -1185,4 +1185,40 @@ NULL
|
|||
NULL
|
||||
1
|
||||
DROP TABLE t1, t2, mm1;
|
||||
#
|
||||
# Bug #54468: crash after item's print() function when ordering/grouping
|
||||
# by subquery
|
||||
#
|
||||
CREATE TABLE t1(a INT, b INT);
|
||||
INSERT INTO t1 VALUES (), ();
|
||||
SELECT 1 FROM t1
|
||||
GROUP BY
|
||||
GREATEST(t1.a,
|
||||
(SELECT 1 FROM
|
||||
(SELECT t1.b FROM t1,t1 t2
|
||||
ORDER BY t1.a, t1.a LIMIT 1) AS d)
|
||||
);
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #53544: Server hangs during JOIN query in stored procedure called
|
||||
# twice in a row
|
||||
#
|
||||
CREATE TABLE t1(c INT);
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
PREPARE stmt FROM "SELECT t2.c AS f1 FROM t1 LEFT JOIN
|
||||
t1 t2 ON t1.c=t2.c RIGHT JOIN
|
||||
t1 t3 ON t1.c=t3.c
|
||||
GROUP BY f1;";
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
1
|
||||
2
|
||||
EXECUTE stmt;
|
||||
f1
|
||||
1
|
||||
2
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -649,4 +649,24 @@ SET SESSION sql_safe_updates = 1;
|
|||
UPDATE IGNORE t1, t1 t1a SET t1.a = 1 WHERE t1a.a = 1;
|
||||
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54543: update ignore with incorrect subquery leads to assertion
|
||||
# failure: inited==INDEX
|
||||
#
|
||||
SET SESSION sql_safe_updates = 0;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
CREATE TABLE t2 ( a INT );
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
CREATE TABLE t3 ( a INT );
|
||||
INSERT INTO t3 VALUES (1), (2);
|
||||
# Should not crash
|
||||
UPDATE IGNORE
|
||||
( SELECT ( SELECT COUNT(*) FROM t1 GROUP BY a, @v ) a FROM t2 ) x, t3
|
||||
SET t3.a = 0;
|
||||
Warnings:
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
DROP TABLE t1, t2, t3;
|
||||
SET SESSION sql_safe_updates = DEFAULT;
|
||||
end of tests
|
||||
|
|
|
@ -262,6 +262,9 @@ a long \$where variable content
|
|||
|
||||
banana = banana
|
||||
Not a banana: ba\$cat\$cat
|
||||
with\`some"escaped\'quotes
|
||||
with\`some"escaped\'quotes
|
||||
single'tick`backtick
|
||||
mysqltest: At line 1: Missing arguments to let
|
||||
mysqltest: At line 1: Missing variable name in let
|
||||
mysqltest: At line 1: Missing assignment operator in let
|
||||
|
|
|
@ -1617,6 +1617,27 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 range a a 5 NULL 2 Using where; Using temporary; Using filesort
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 10 Using join buffer
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #50394: Regression in EXPLAIN with index scan, LIMIT, GROUP BY and
|
||||
# ORDER BY computed col
|
||||
#
|
||||
CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, KEY( a, b ) );
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
|
||||
CREATE TABLE t2( a INT PRIMARY KEY, b INT );
|
||||
INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
INSERT INTO t2 SELECT a + 5, b + 5 FROM t2;
|
||||
EXPLAIN
|
||||
SELECT count(*) AS c, t1.a
|
||||
FROM t1 JOIN t2 ON t1.b = t2.a
|
||||
WHERE t2.b = 1
|
||||
GROUP BY t1.a
|
||||
ORDER by c
|
||||
LIMIT 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 8 NULL 10 Using index; Using temporary; Using filesort
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Using where
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY
|
||||
|
|
|
@ -1,4 +1,29 @@
|
|||
drop table if exists t1, t2;
|
||||
#
|
||||
# Bug#55458: Partitioned MyISAM table gets crashed by multi-table update
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
`id` int NOT NULL,
|
||||
`user_num` int DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1,8601);
|
||||
INSERT INTO t1 VALUES (2,8601);
|
||||
INSERT INTO t1 VALUES (3,8601);
|
||||
INSERT INTO t1 VALUES (4,8601);
|
||||
CREATE TABLE t2 (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_num` int DEFAULT NULL,
|
||||
`name` varchar(64) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=latin1
|
||||
PARTITION BY HASH (id)
|
||||
PARTITIONS 2;
|
||||
INSERT INTO t2 VALUES (1,8601,'John');
|
||||
INSERT INTO t2 VALUES (2,8601,'JS');
|
||||
INSERT INTO t2 VALUES (3,8601,'John S');
|
||||
UPDATE t1, t2 SET t2.name = 'John Smith' WHERE t1.user_num = t2.user_num;
|
||||
DROP TABLE t1, t2;
|
||||
# Bug#39338: Fieldnames in
|
||||
# INFORMATIONSCHEMA.PARTITIONS.PARTITION_EXPRESSION become unescaped
|
||||
# NOTE: the partition expression is saved as a string, so changing from
|
||||
|
@ -1472,7 +1497,7 @@ NULL
|
|||
2
|
||||
explain partitions select * from t1 where a is null or a < 0 or a > 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 pn,p2 ALL NULL NULL NULL NULL 4 Using where
|
||||
1 SIMPLE t1 pn,p2 ALL NULL NULL NULL NULL 2 Using where
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, name VARCHAR(20))
|
||||
ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
|
|
|
@ -611,7 +611,7 @@ partition p1 values less than (3,3),
|
|||
partition p2 values less than (9,5));
|
||||
explain partitions select * from t1 where b < 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 5 Using where
|
||||
select * from t1 where b < 2;
|
||||
a b
|
||||
0 1
|
||||
|
@ -647,7 +647,7 @@ alter table t1 reorganize partition p2 into
|
|||
partition p22 values less than (9,5));
|
||||
explain partitions select * from t1 where b < 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p11,p12,p21 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 p0,p11,p12,p21 ALL NULL NULL NULL NULL 6 Using where
|
||||
select * from t1 where b < 4;
|
||||
a b
|
||||
0 1
|
||||
|
|
|
@ -59,8 +59,8 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 p01,p02,p03,p11 ALL NULL NULL NULL NULL 8 Using where
|
||||
explain partitions select * from t1 where a=4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p11,p12,p13,p21 ALL NULL NULL NULL NULL 14 Using where
|
||||
1 SIMPLE t1 p11,p12,p13,p21 ALL NULL NULL NULL NULL 8 Using where
|
||||
explain partitions select * from t1 where a=2 and b < 22;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p01,p02,p03 ALL NULL NULL NULL NULL 14 Using where
|
||||
1 SIMPLE t1 p01,p02,p03 ALL NULL NULL NULL NULL 6 Using where
|
||||
drop table t1;
|
||||
|
|
|
@ -69,31 +69,31 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where
|
||||
explain partitions select * from t1 where a is null or (a >= 5 and a <= 7);
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p2,p3 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 p0,p2,p3 ALL NULL NULL NULL NULL 7 Using where
|
||||
explain partitions select * from t1 where a is null;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where
|
||||
explain partitions select * from t1 where a is not null;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where
|
||||
explain partitions select * from t1 where a >= 1 and a < 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 5 Using where
|
||||
explain partitions select * from t1 where a >= 3 and a <= 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 p1,p2 ALL NULL NULL NULL NULL 4 Using where
|
||||
explain partitions select * from t1 where a > 2 and a < 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 2 Using where
|
||||
explain partitions select * from t1 where a > 3 and a <= 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2,p3 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 p2,p3 ALL NULL NULL NULL NULL 4 Using where
|
||||
explain partitions select * from t1 where a > 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where
|
||||
explain partitions select * from t1 where a >= 1 and a <= 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 7 Using where
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
|
|
|
@ -120,31 +120,31 @@ insert INTO t1 VALUES (110);
|
|||
ERROR HY000: Table has no partition for value 110
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 90;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 90;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 90;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 89;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p90 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 p90 ALL NULL NULL NULL NULL 3 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 89;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p90 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 p90 ALL NULL NULL NULL NULL 3 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 89;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 100;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 100;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 100;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#50104: Partitioned table with just 1 partion works with fk
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -53,10 +53,10 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 4 Using where
|
||||
explain partitions select * from t1 where a <= '2007-03-07 23:59:59';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where
|
||||
explain partitions select * from t1 where a < '2007-03-07 23:59:59';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -203,13 +203,13 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 pnull system NULL NULL NULL NULL 1
|
||||
explain partitions select * from t1 where a >= 0;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 3 Using where
|
||||
1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 2 Using where
|
||||
explain partitions select * from t1 where a < 0;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
explain partitions select * from t1 where a <= 0;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 pnull,p0 ALL NULL NULL NULL NULL 3 Using where
|
||||
1 SIMPLE t1 pnull,p0 ALL NULL NULL NULL NULL 2 Using where
|
||||
explain partitions select * from t1 where a > 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
|
@ -242,16 +242,16 @@ select * from t1 where a > 1;
|
|||
a b
|
||||
explain partitions select * from t1 where a is null;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1 ALL NULL NULL NULL NULL 2 Using where
|
||||
explain partitions select * from t1 where a >= 0;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t1 p0_p0sp0,p0_p0sp1,p1_p1sp0,p1_p1sp1 ALL NULL NULL NULL NULL 4 Using where
|
||||
explain partitions select * from t1 where a < 0;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1 ALL NULL NULL NULL NULL 2 Using where
|
||||
explain partitions select * from t1 where a <= 0;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1 ALL NULL NULL NULL NULL 4 Using where
|
||||
explain partitions select * from t1 where a > 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
|
|
|
@ -466,3 +466,26 @@ SELECT 1 FROM t1 WHERE ROW(a, b) >=
|
|||
ROW('1', (SELECT 1 FROM t1 WHERE a > 1234));
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #54190: Comparison to row subquery produces incorrect result
|
||||
#
|
||||
SELECT ROW(1,2) = (SELECT 1,2 FROM DUAL WHERE 1 = 0);
|
||||
ROW(1,2) = (SELECT 1,2 FROM DUAL WHERE 1 = 0)
|
||||
NULL
|
||||
SELECT ROW(1,2) = (SELECT 1,3 FROM DUAL WHERE 1 = 0);
|
||||
ROW(1,2) = (SELECT 1,3 FROM DUAL WHERE 1 = 0)
|
||||
NULL
|
||||
CREATE TABLE t1 (i INT);
|
||||
INSERT INTO t1 () VALUES (1), (2), (3);
|
||||
SELECT ROW(1,2) = (SELECT 1,2 FROM t1 WHERE 1 = 0);
|
||||
ROW(1,2) = (SELECT 1,2 FROM t1 WHERE 1 = 0)
|
||||
NULL
|
||||
SELECT ROW(1,2) = (SELECT 1,3 FROM t1 WHERE 1 = 0);
|
||||
ROW(1,2) = (SELECT 1,3 FROM t1 WHERE 1 = 0)
|
||||
NULL
|
||||
SELECT i FROM t1 WHERE ROW(1,2) = (SELECT 1,2 FROM DUAL WHERE 1 = 0);
|
||||
i
|
||||
SELECT i FROM t1 WHERE ROW(1,2) = (SELECT 1,3 FROM DUAL WHERE 1 = 0);
|
||||
i
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -4430,11 +4430,6 @@ SELECT 1 FROM t1 WHERE a <> 1 AND NOT
|
|||
ROW(1,a) <=> ROW(1,(SELECT 1 FROM t1))
|
||||
INTO @var0;
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
SELECT 1 FROM t1 WHERE a <> 1 AND NOT
|
||||
ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1));
|
||||
1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #48458: simple query tries to allocate enormous amount of
|
||||
|
|
|
@ -922,7 +922,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a'),(select c from t
|
|||
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a') (select c from t1 where a=t2.a)
|
||||
1 1 a
|
||||
2 0 b
|
||||
NULL 0 NULL
|
||||
NULL NULL NULL
|
||||
select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2;
|
||||
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b') (select c from t1 where a=t2.a)
|
||||
1 0 a
|
||||
|
@ -932,7 +932,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c'),(select c from t
|
|||
a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c') (select c from t1 where a=t2.a)
|
||||
1 0 a
|
||||
2 0 b
|
||||
NULL 0 NULL
|
||||
NULL NULL NULL
|
||||
drop table t1,t2;
|
||||
create table t1 (a int, b real, c varchar(10));
|
||||
insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b');
|
||||
|
|
|
@ -77,6 +77,92 @@ Note 1249 Select 2 was reduced during optimization
|
|||
CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
|
||||
CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) );
|
||||
DROP VIEW v1, v2;
|
||||
#
|
||||
# Bug#51070: Query with a NOT IN subquery predicate returns a wrong
|
||||
# result set
|
||||
#
|
||||
CREATE TABLE t1 ( a INT, b INT );
|
||||
INSERT INTO t1 VALUES ( 1, NULL ), ( 2, NULL );
|
||||
CREATE TABLE t2 ( c INT, d INT );
|
||||
INSERT INTO t2 VALUES ( NULL, 3 ), ( NULL, 4 );
|
||||
CREATE TABLE t3 ( e INT, f INT );
|
||||
INSERT INTO t3 VALUES ( NULL, NULL ), ( NULL, NULL );
|
||||
CREATE TABLE t4 ( a INT );
|
||||
INSERT INTO t4 VALUES (1), (2), (3);
|
||||
CREATE TABLE t5 ( a INT );
|
||||
INSERT INTO t5 VALUES (NULL), (2);
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x PRIMARY x x x x x x x x
|
||||
x DEPENDENT SUBQUERY x x x x x x x x
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 );
|
||||
a b
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS NULL;
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
SELECT * FROM t1 WHERE ( a, b ) IN ( SELECT c, d FROM t2 ) IS NULL;
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS UNKNOWN;
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
SELECT * FROM t1 WHERE (( a, b ) NOT IN ( SELECT c, d FROM t2 )) IS UNKNOWN;
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
SELECT * FROM t1 WHERE 1 = 1 AND ( a, b ) NOT IN ( SELECT c, d FROM t2 );
|
||||
a b
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT e, f FROM t3 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x PRIMARY x x x x x x x x
|
||||
x DEPENDENT SUBQUERY x x x x x x x x
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT e, f FROM t3 );
|
||||
a b
|
||||
EXPLAIN
|
||||
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT a, b FROM t1 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x PRIMARY x x x x x x x x
|
||||
x DEPENDENT SUBQUERY x x x x x x x x
|
||||
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT a, b FROM t1 );
|
||||
c d
|
||||
EXPLAIN
|
||||
SELECT * FROM t3 WHERE ( e, f ) NOT IN ( SELECT c, d FROM t2 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x PRIMARY x x x x x x x x
|
||||
x DEPENDENT SUBQUERY x x x x x x x x
|
||||
SELECT * FROM t3 WHERE ( e, f ) NOT IN ( SELECT c, d FROM t2 );
|
||||
e f
|
||||
EXPLAIN
|
||||
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT e, f FROM t3 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x PRIMARY x x x x x x x x
|
||||
x DEPENDENT SUBQUERY x x x x x x x x
|
||||
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT e, f FROM t3 );
|
||||
c d
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN
|
||||
( SELECT c, d FROM t2 WHERE c = 1 AND c <> 1 );
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
SELECT * FROM t1 WHERE b NOT IN ( SELECT c FROM t2 WHERE c = 1 );
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
SELECT * FROM t1 WHERE NULL NOT IN ( SELECT c FROM t2 WHERE c = 1 AND c <> 1 );
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
DROP TABLE t1, t2, t3, t4, t5;
|
||||
#
|
||||
# End of 5.1 tests.
|
||||
#
|
||||
|
|
|
@ -296,4 +296,16 @@ CONVERT_TZ(NOW(), 'UTC', 'Europe/Moscow') IS NULL
|
|||
UPDATE t1 SET t = CONVERT_TZ(t, 'UTC', 'Europe/Moscow');
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #55424: convert_tz crashes when fed invalid data
|
||||
#
|
||||
CREATE TABLE t1 (a SET('x') NOT NULL);
|
||||
INSERT INTO t1 VALUES ('');
|
||||
SELECT CONVERT_TZ(1, a, 1) FROM t1;
|
||||
CONVERT_TZ(1, a, 1)
|
||||
NULL
|
||||
SELECT CONVERT_TZ(1, 1, a) FROM t1;
|
||||
CONVERT_TZ(1, 1, a)
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -472,4 +472,25 @@ SHOW CREATE TRIGGER db1.trg;
|
|||
ERROR 42000: Access denied; you need (at least one of) the TRIGGER privilege(s) for this operation
|
||||
DROP USER 'no_rights'@'localhost';
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE IF EXISTS mysqltest_db1;
|
||||
CREATE DATABASE mysqltest_db1;
|
||||
USE mysqltest_db1;
|
||||
GRANT ALL ON mysqltest_db1.* TO mysqltest_u1@localhost;
|
||||
CREATE TABLE t1 (
|
||||
a1 int,
|
||||
a2 int
|
||||
);
|
||||
INSERT INTO t1 VALUES (1, 20);
|
||||
CREATE TRIGGER mysqltest_db1.upd_t1
|
||||
BEFORE UPDATE ON t1 FOR EACH ROW SET new.a2 = 200;
|
||||
CREATE TABLE t2 (
|
||||
a1 int
|
||||
);
|
||||
INSERT INTO t2 VALUES (2);
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost;
|
||||
UPDATE IGNORE t1, t2 SET t1.a1 = 2, t2.a1 = 3 WHERE t1.a1 = 1 AND t2.a1 = 2;
|
||||
ERROR 42000: TRIGGER command denied to user 'mysqltest_u1'@'localhost' for table 't1'
|
||||
DROP DATABASE mysqltest_db1;
|
||||
DROP USER mysqltest_u1@localhost;
|
||||
USE test;
|
||||
End of 5.1 tests.
|
||||
|
|
|
@ -503,6 +503,27 @@ f1 f2-f3
|
|||
5 0
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug #55779: select does not work properly in mysql server
|
||||
# Version "5.1.42 SUSE MySQL RPM"
|
||||
#
|
||||
CREATE TABLE t1 (a TIMESTAMP, KEY (a));
|
||||
INSERT INTO t1 VALUES ('2000-01-01 00:00:00'), ('2000-01-01 00:00:00'),
|
||||
('2000-01-01 00:00:01'), ('2000-01-01 00:00:01');
|
||||
SELECT a FROM t1 WHERE a >= 20000101000000;
|
||||
a
|
||||
2000-01-01 00:00:00
|
||||
2000-01-01 00:00:00
|
||||
2000-01-01 00:00:01
|
||||
2000-01-01 00:00:01
|
||||
SELECT a FROM t1 WHERE a >= '20000101000000';
|
||||
a
|
||||
2000-01-01 00:00:00
|
||||
2000-01-01 00:00:00
|
||||
2000-01-01 00:00:01
|
||||
2000-01-01 00:00:01
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
||||
Bug#50888 valgrind warnings in Field_timestamp::val_str
|
||||
|
||||
|
|
|
@ -428,6 +428,23 @@ CREATE TRIGGER t_after_insert AFTER INSERT ON t1 FOR EACH ROW SET @bug42188 = 10
|
|||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
# BUG#55615 : should not crash
|
||||
SELECT (@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1) FROM t1 GROUP BY @a;
|
||||
(@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1)
|
||||
1
|
||||
1
|
||||
# BUG#55564 : should not crash
|
||||
SELECT IF(
|
||||
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
|
||||
count(*), 1)
|
||||
FROM t1 GROUP BY a LIMIT 1;
|
||||
IF(
|
||||
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
|
||||
count(*), 1)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(f1 INT AUTO_INCREMENT, PRIMARY KEY(f1));
|
||||
|
|
|
@ -53,10 +53,10 @@ master-bin.000001 # Query # # COMMIT
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT my_savepoint
|
||||
master-bin.000001 # Query # # SAVEPOINT `my_savepoint`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO my_savepoint
|
||||
master-bin.000001 # Query # # ROLLBACK TO `my_savepoint`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
|
@ -84,10 +84,10 @@ master-bin.000001 # Query # # COMMIT
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT my_savepoint
|
||||
master-bin.000001 # Query # # SAVEPOINT `my_savepoint`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO my_savepoint
|
||||
master-bin.000001 # Query # # ROLLBACK TO `my_savepoint`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
|
|
|
@ -51,10 +51,10 @@ show binlog events from <binlog_start>;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values(3)
|
||||
master-bin.000001 # Query # # SAVEPOINT my_savepoint
|
||||
master-bin.000001 # Query # # SAVEPOINT `my_savepoint`
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values(4)
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 # Query # # ROLLBACK TO my_savepoint
|
||||
master-bin.000001 # Query # # ROLLBACK TO `my_savepoint`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
|
@ -79,10 +79,10 @@ show binlog events from <binlog_start>;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values(5)
|
||||
master-bin.000001 # Query # # SAVEPOINT my_savepoint
|
||||
master-bin.000001 # Query # # SAVEPOINT `my_savepoint`
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values(6)
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 # Query # # ROLLBACK TO my_savepoint
|
||||
master-bin.000001 # Query # # ROLLBACK TO `my_savepoint`
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values(7)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
delete from t1;
|
||||
|
|
|
@ -1244,3 +1244,16 @@ t1 CREATE TABLE `t1` (
|
|||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (18446744073709551615);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -2607,6 +2607,18 @@ rows 3
|
|||
Extra Using index
|
||||
DROP TABLE t1;
|
||||
#
|
||||
#
|
||||
# Bug#55826: create table .. select crashes with when KILL_BAD_DATA
|
||||
# is returned
|
||||
#
|
||||
CREATE TABLE t1(a INT) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SET SQL_MODE='STRICT_ALL_TABLES';
|
||||
CREATE TABLE t2
|
||||
SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
|
||||
ERROR 22007: Incorrect datetime value: '' for column 'NOW()' at row 2
|
||||
DROP TABLE t1;
|
||||
SET SQL_MODE=DEFAULT;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Test for bug #39932 "create table fails if column for FK is in different
|
||||
|
@ -2653,3 +2665,13 @@ COMMIT;
|
|||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
#
|
||||
# Bug#54606 innodb fast alter table + pack_keys=0
|
||||
# prevents adding new indexes
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b CHAR(9), c INT, key(b))
|
||||
ENGINE=InnoDB
|
||||
PACK_KEYS=0;
|
||||
CREATE INDEX a ON t1 (a);
|
||||
CREATE INDEX c on t1 (c);
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -665,7 +665,17 @@ SELECT * FROM t1;
|
|||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
##
|
||||
# 55277: Failing assertion: auto_inc > 0
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (18446744073709551615);
|
||||
# Restart the server
|
||||
-- source include/restart_mysqld.inc
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
#
|
||||
|
|
|
@ -771,6 +771,20 @@ DROP TABLE t1;
|
|||
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55826: create table .. select crashes with when KILL_BAD_DATA
|
||||
--echo # is returned
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SET SQL_MODE='STRICT_ALL_TABLES';
|
||||
--error ER_TRUNCATED_WRONG_VALUE
|
||||
CREATE TABLE t2
|
||||
SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
|
||||
DROP TABLE t1;
|
||||
SET SQL_MODE=DEFAULT;
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
@ -830,3 +844,16 @@ connection default;
|
|||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54606 innodb fast alter table + pack_keys=0
|
||||
--echo # prevents adding new indexes
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b CHAR(9), c INT, key(b))
|
||||
ENGINE=InnoDB
|
||||
PACK_KEYS=0;
|
||||
CREATE INDEX a ON t1 (a);
|
||||
CREATE INDEX c on t1 (c);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -148,7 +148,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -176,7 +176,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -209,7 +209,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -252,7 +252,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -280,7 +280,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 4 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -306,7 +306,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -330,7 +330,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -352,7 +352,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -372,7 +372,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -505,7 +505,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -533,7 +533,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -569,7 +569,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -610,7 +610,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -641,7 +641,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 3 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -670,7 +670,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 23 Using where
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 10 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -697,7 +697,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -722,7 +722,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -745,7 +745,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
|
|
@ -155,7 +155,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -187,7 +187,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -228,7 +228,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -278,7 +278,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -312,7 +312,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 4 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -343,7 +343,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -371,7 +371,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -396,7 +396,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -418,7 +418,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -552,7 +552,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -584,7 +584,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -628,7 +628,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -676,7 +676,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -713,7 +713,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 3 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -747,7 +747,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 10 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -778,7 +778,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -806,7 +806,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
@ -831,7 +831,7 @@ t1.frm
|
|||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
|
|
|
@ -13,7 +13,7 @@ wait/synch/mutex/sql/LOCK_active_mi YES YES
|
|||
wait/synch/mutex/sql/LOCK_audit_mask YES YES
|
||||
wait/synch/mutex/sql/LOCK_connection_count YES YES
|
||||
wait/synch/mutex/sql/LOCK_crypt YES YES
|
||||
wait/synch/mutex/sql/LOCK_delayed_create YES YES
|
||||
wait/synch/mutex/sql/LOCK_dd_owns_lock_open YES YES
|
||||
select * from performance_schema.SETUP_INSTRUMENTS
|
||||
where name like 'Wait/Synch/Rwlock/sql/%'
|
||||
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
|
||||
|
|
|
@ -150,14 +150,14 @@ show binlog events from <binlog_start>;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO db1.t1 VALUES(20)
|
||||
master-bin.000001 # Query # # SAVEPOINT has_comment
|
||||
master-bin.000001 # Query # # SAVEPOINT `has_comment`
|
||||
master-bin.000001 # Query # # use `db1`; INSERT INTO db1.t1 VALUES(30)
|
||||
master-bin.000001 # Query # # use `db1`; INSERT INTO db1.t2 VALUES("in savepoint has_comment")
|
||||
master-bin.000001 # Query # # SAVEPOINT mixed_cases
|
||||
master-bin.000001 # Query # # SAVEPOINT `mixed_cases`
|
||||
master-bin.000001 # Query # # use `db1`; INSERT INTO db1.t2 VALUES("in savepoint mixed_cases")
|
||||
master-bin.000001 # Query # # use `db1`; INSERT INTO db1.t1 VALUES(40)
|
||||
master-bin.000001 # Query # # ROLLBACK TO mixed_cases
|
||||
master-bin.000001 # Query # # ROLLBACK TO has_comment
|
||||
master-bin.000001 # Query # # ROLLBACK TO `mixed_cases`
|
||||
master-bin.000001 # Query # # ROLLBACK TO `has_comment`
|
||||
master-bin.000001 # Query # # use `db1`; INSERT INTO db1.t2 VALUES("after rollback to")
|
||||
master-bin.000001 # Query # # use `db1`; INSERT INTO db1.t1 VALUES(50)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
|
|
|
@ -995,7 +995,7 @@ master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (3, 'before
|
|||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (5, 'before savepoint s2')
|
||||
master-bin.000001 # Query # # SAVEPOINT s2
|
||||
master-bin.000001 # Query # # SAVEPOINT `s2`
|
||||
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2')
|
||||
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
|
|
|
@ -10260,9 +10260,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B N T S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10272,9 +10272,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VA
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N T S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -10312,9 +10312,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T N S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10324,9 +10324,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VA
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T N S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -10364,9 +10364,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 N T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10376,9 +10376,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VA
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 N T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -11346,20 +11346,20 @@ ROLLBACK;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 T CT R1 R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 T CT R1 R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
|
|
@ -10628,9 +10628,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B N T S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10640,9 +10640,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VA
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N T S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -10681,9 +10681,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T N S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10694,9 +10694,9 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T N S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -10735,9 +10735,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 N T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10748,9 +10748,9 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 N T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -11718,20 +11718,20 @@ ROLLBACK;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 T CT R1 R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 T CT R1 R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
|
|
@ -12240,10 +12240,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B N T S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -12255,10 +12255,10 @@ master-bin.000001 # Query # # COMMIT
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N T S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -12298,10 +12298,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T N S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -12313,10 +12313,10 @@ master-bin.000001 # Query # # COMMIT
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T N S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -12356,10 +12356,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 N T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -12371,10 +12371,10 @@ master-bin.000001 # Query # # COMMIT
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 N T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -13579,10 +13579,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 T CT R1 R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -13590,10 +13590,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 T CT R1 R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
|
|
@ -9878,9 +9878,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B N T S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -9890,9 +9890,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VA
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N T S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -9930,9 +9930,9 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T N S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -9940,9 +9940,9 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T N S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -9979,20 +9979,20 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 N T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 N T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -10908,20 +10908,20 @@ ROLLBACK;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 T CT R1 R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 T CT R1 R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
|
|
@ -12240,10 +12240,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B N T S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -12255,10 +12255,10 @@ master-bin.000001 # Query # # COMMIT
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N T S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -12298,10 +12298,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T N S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -12313,10 +12313,10 @@ master-bin.000001 # Query # # COMMIT
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T N S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -12356,10 +12356,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 N T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -12371,10 +12371,10 @@ master-bin.000001 # Query # # COMMIT
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 N T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -13579,10 +13579,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 T CT R1 R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -13590,10 +13590,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Table_map # # table_id: # (test.tt_1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 T CT R1 R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
|
|
@ -10010,9 +10010,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B N T S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10022,9 +10022,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VA
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N T S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -10062,9 +10062,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T N S1 T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10074,9 +10074,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VA
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T N S1 T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -10114,9 +10114,9 @@ COMMIT;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 N T R1 C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
|
@ -10126,9 +10126,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VA
|
|||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7)
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 N T R1 C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
@ -11051,20 +11051,20 @@ ROLLBACK;
|
|||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
-b-b-b-b-b-b-b-b-b-b-b- >> B T S1 T CT R1 R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
|
||||
master-bin.000001 # Query # # SAVEPOINT s1
|
||||
master-bin.000001 # Query # # SAVEPOINT `s1`
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
|
||||
master-bin.000001 # Query # # ROLLBACK TO s1
|
||||
master-bin.000001 # Query # # ROLLBACK TO `s1`
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T S1 T CT R1 R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
|
||||
|
|
|
@ -14,3 +14,4 @@ rpl_failed_optimize : WL#4284: Can't optimize table used by a pending tran
|
|||
rpl_read_only : WL#4284: Setting Read only won't succeed until all metadata locks are released.
|
||||
rpl_row_create_table : Bug#51574 2010-02-27 andrei failed different way than earlier with bug#45576
|
||||
rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
|
||||
rpl_log_pos : BUG#55675 2010-09-10 alfranio rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle
|
||||
|
|
|
@ -10,4 +10,3 @@ drop table t1, t2;
|
|||
sync_slave_with_master;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
|
|
|
@ -742,7 +742,6 @@ DROP TABLE t1;
|
|||
--echo End of 5.1 tests
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Bug#36785: Wrong error message when group_concat() exceeds max length
|
||||
#
|
||||
|
|
|
@ -165,3 +165,15 @@ DROP TABLE t1;
|
|||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55077: Assertion failed: width > 0 && to != ((void *)0), file .\dtoa.c
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a LONGBLOB, b DOUBLE);
|
||||
INSERT INTO t1 VALUES (NULL, 0), (NULL, 1);
|
||||
|
||||
SELECT IF(b, (SELECT a FROM t1 LIMIT 1), b) c FROM t1 GROUP BY c;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -492,4 +492,16 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1;
|
|||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of tests
|
||||
--echo #
|
||||
--echo # Bug #54461: crash with longblob and union or update with subquery
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b LONGBLOB);
|
||||
INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
|
||||
|
||||
SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -404,6 +404,7 @@ create table t1 (a int, b blob);
|
|||
insert into t1 values (1, ''), (2, NULL), (3, '1');
|
||||
select * from t1;
|
||||
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
select
|
||||
geometryfromtext(b) IS NULL, geometryfromwkb(b) IS NULL, astext(b) IS NULL,
|
||||
aswkb(b) IS NULL, geometrytype(b) IS NULL, centroid(b) IS NULL,
|
||||
|
@ -422,6 +423,7 @@ select
|
|||
intersects(b, b) IS NULL, crosses(b, b) IS NULL
|
||||
from t1;
|
||||
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
select
|
||||
point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS NULL,
|
||||
multilinestring(b) IS NULL, multipolygon(b) IS NULL,
|
||||
|
@ -705,25 +707,45 @@ drop table t1;
|
|||
# Bug#44684: valgrind reports invalid reads in
|
||||
# Item_func_spatial_collection::val_str
|
||||
#
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
SELECT MultiPoint(12345,'');
|
||||
SELECT MultiPoint(123451,'');
|
||||
SELECT MultiPoint(1234512,'');
|
||||
SELECT MultiPoint(12345123,'');
|
||||
#SELECT MultiPoint(123451,'');
|
||||
#SELECT MultiPoint(1234512,'');
|
||||
#SELECT MultiPoint(12345123,'');
|
||||
|
||||
SELECT MultiLineString(12345,'');
|
||||
SELECT MultiLineString(123451,'');
|
||||
SELECT MultiLineString(1234512,'');
|
||||
SELECT MultiLineString(12345123,'');
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
#SELECT MultiLineString(12345,'');
|
||||
#SELECT MultiLineString(123451,'');
|
||||
#SELECT MultiLineString(1234512,'');
|
||||
#SELECT MultiLineString(12345123,'');
|
||||
|
||||
SELECT LineString(12345,'');
|
||||
SELECT LineString(123451,'');
|
||||
SELECT LineString(1234512,'');
|
||||
SELECT LineString(12345123,'');
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
#SELECT LineString(12345,'');
|
||||
#SELECT LineString(123451,'');
|
||||
#SELECT LineString(1234512,'');
|
||||
#SELECT LineString(12345123,'');
|
||||
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
#SELECT Polygon(12345,'');
|
||||
#SELECT Polygon(123451,'');
|
||||
#SELECT Polygon(1234512,'');
|
||||
#SELECT Polygon(12345123,'');
|
||||
|
||||
#
|
||||
# Bug55531 crash with conversions of geometry types / strings
|
||||
#
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # BUG#51875: crash when loading data into geometry function polyfromwkb
|
||||
--echo #
|
||||
SET @a=0x00000000030000000100000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
|
||||
SET @a=POLYFROMWKB(@a);
|
||||
SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
|
||||
SET @a=POLYFROMWKB(@a);
|
||||
|
||||
SELECT Polygon(12345,'');
|
||||
SELECT Polygon(123451,'');
|
||||
SELECT Polygon(1234512,'');
|
||||
SELECT Polygon(12345123,'');
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
|
|
@ -851,4 +851,74 @@ ENGINE=MERGE UNION=(t1,t2);
|
|||
SELECT t1.a FROM mm1,t1;
|
||||
DROP TABLE t1, t2, mm1;
|
||||
|
||||
#--echo #
|
||||
#--echo # Bug #55568: user variable assignments crash server when used within
|
||||
#--echo # query
|
||||
#--echo #
|
||||
#
|
||||
#
|
||||
# This test case is invalidated because of fix of bug 55531
|
||||
# The reason is that {1} is not a valid geometric collection.
|
||||
#
|
||||
#CREATE TABLE t1 (a INT);
|
||||
|
||||
#INSERT INTO t1 VALUES (0), (1);
|
||||
|
||||
#let $i=2;
|
||||
#while ($i)
|
||||
#{
|
||||
# SELECT MULTIPOINT(
|
||||
# 1,
|
||||
# (
|
||||
# SELECT MULTIPOINT(
|
||||
# MULTIPOINT(
|
||||
# 1,
|
||||
# (SELECT COUNT(*) FROM (SELECT 1 FROM t1 GROUP BY a,a) d)
|
||||
# )
|
||||
# ) FROM t1
|
||||
# )
|
||||
# ) != COUNT(*) q FROM t1 GROUP BY a;
|
||||
# dec $i;
|
||||
#}
|
||||
#
|
||||
#DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #54468: crash after item's print() function when ordering/grouping
|
||||
--echo # by subquery
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT, b INT);
|
||||
INSERT INTO t1 VALUES (), ();
|
||||
|
||||
SELECT 1 FROM t1
|
||||
GROUP BY
|
||||
GREATEST(t1.a,
|
||||
(SELECT 1 FROM
|
||||
(SELECT t1.b FROM t1,t1 t2
|
||||
ORDER BY t1.a, t1.a LIMIT 1) AS d)
|
||||
);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #53544: Server hangs during JOIN query in stored procedure called
|
||||
--echo # twice in a row
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(c INT);
|
||||
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
|
||||
PREPARE stmt FROM "SELECT t2.c AS f1 FROM t1 LEFT JOIN
|
||||
t1 t2 ON t1.c=t2.c RIGHT JOIN
|
||||
t1 t3 ON t1.c=t3.c
|
||||
GROUP BY f1;";
|
||||
|
||||
EXECUTE stmt;
|
||||
EXECUTE stmt;
|
||||
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
# changed (see explanation in log_state.test)
|
||||
let $fixed_bug38124 = 0;
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
# Several subtests modify global variables. Save the initial values only here,
|
||||
|
|
|
@ -650,5 +650,26 @@ SET SESSION sql_safe_updates = 1;
|
|||
UPDATE IGNORE t1, t1 t1a SET t1.a = 1 WHERE t1a.a = 1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54543: update ignore with incorrect subquery leads to assertion
|
||||
--echo # failure: inited==INDEX
|
||||
--echo #
|
||||
SET SESSION sql_safe_updates = 0;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
|
||||
CREATE TABLE t2 ( a INT );
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
|
||||
CREATE TABLE t3 ( a INT );
|
||||
INSERT INTO t3 VALUES (1), (2);
|
||||
|
||||
--echo # Should not crash
|
||||
UPDATE IGNORE
|
||||
( SELECT ( SELECT COUNT(*) FROM t1 GROUP BY a, @v ) a FROM t2 ) x, t3
|
||||
SET t3.a = 0;
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
||||
SET SESSION sql_safe_updates = DEFAULT;
|
||||
|
||||
--echo end of tests
|
||||
|
|
|
@ -701,6 +701,16 @@ echo banana = $cat;
|
|||
let $cat=ba\\\$cat\\\$cat;
|
||||
echo Not a banana: $cat;
|
||||
|
||||
# Bug #55413 would cause this to fail
|
||||
let $escape= with\`some\"escaped\'quotes;
|
||||
echo $escape;
|
||||
|
||||
--let $escape= with\`some\"escaped\'quotes
|
||||
echo $escape;
|
||||
|
||||
# This only works with "--let" syntax
|
||||
--let $tick= single'tick`backtick
|
||||
echo $tick;
|
||||
|
||||
# Test illegal uses of let
|
||||
|
||||
|
|
|
@ -1467,6 +1467,31 @@ SELECT * FROM t1 FORCE INDEX FOR JOIN (a), t2 WHERE t1.a < 2 ORDER BY t1.a;
|
|||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #50394: Regression in EXPLAIN with index scan, LIMIT, GROUP BY and
|
||||
--echo # ORDER BY computed col
|
||||
--echo #
|
||||
CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, KEY( a, b ) );
|
||||
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
|
||||
|
||||
CREATE TABLE t2( a INT PRIMARY KEY, b INT );
|
||||
|
||||
INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
INSERT INTO t2 SELECT a + 5, b + 5 FROM t2;
|
||||
|
||||
EXPLAIN
|
||||
SELECT count(*) AS c, t1.a
|
||||
FROM t1 JOIN t2 ON t1.b = t2.a
|
||||
WHERE t2.b = 1
|
||||
GROUP BY t1.a
|
||||
ORDER by c
|
||||
LIMIT 2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,34 @@
|
|||
drop table if exists t1, t2;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55458: Partitioned MyISAM table gets crashed by multi-table update
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
`id` int NOT NULL,
|
||||
`user_num` int DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1,8601);
|
||||
INSERT INTO t1 VALUES (2,8601);
|
||||
INSERT INTO t1 VALUES (3,8601);
|
||||
INSERT INTO t1 VALUES (4,8601);
|
||||
CREATE TABLE t2 (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_num` int DEFAULT NULL,
|
||||
`name` varchar(64) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=latin1
|
||||
PARTITION BY HASH (id)
|
||||
PARTITIONS 2;
|
||||
INSERT INTO t2 VALUES (1,8601,'John');
|
||||
INSERT INTO t2 VALUES (2,8601,'JS');
|
||||
INSERT INTO t2 VALUES (3,8601,'John S');
|
||||
|
||||
UPDATE t1, t2 SET t2.name = 'John Smith' WHERE t1.user_num = t2.user_num;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo # Bug#39338: Fieldnames in
|
||||
--echo # INFORMATIONSCHEMA.PARTITIONS.PARTITION_EXPRESSION become unescaped
|
||||
--echo # NOTE: the partition expression is saved as a string, so changing from
|
||||
|
|
|
@ -8,6 +8,30 @@
|
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # Bug#53806: Wrong estimates for range query in partitioned MyISAM table
|
||||
--echo # Bug#46754: 'rows' field doesn't reflect partition pruning
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY)
|
||||
PARTITION BY RANGE (a) (
|
||||
PARTITION p0 VALUES LESS THAN (1),
|
||||
PARTITION p1 VALUES LESS THAN (2),
|
||||
PARTITION p2 VALUES LESS THAN (3),
|
||||
PARTITION p3 VALUES LESS THAN (4),
|
||||
PARTITION p4 VALUES LESS THAN (5),
|
||||
PARTITION p5 VALUES LESS THAN (6),
|
||||
PARTITION max VALUES LESS THAN MAXVALUE);
|
||||
|
||||
INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7),(8);
|
||||
|
||||
--replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 11 #
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
|
||||
--replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 11 #
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7;
|
||||
--replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 11 #
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#49742: Partition Pruning not working correctly for RANGE
|
||||
--echo #
|
||||
|
|
|
@ -266,3 +266,22 @@ SELECT 1 FROM t1 WHERE ROW(a, b) >=
|
|||
ROW('1', (SELECT 1 FROM t1 WHERE a > 1234));
|
||||
--enable_warnings
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #54190: Comparison to row subquery produces incorrect result
|
||||
--echo #
|
||||
|
||||
SELECT ROW(1,2) = (SELECT 1,2 FROM DUAL WHERE 1 = 0);
|
||||
SELECT ROW(1,2) = (SELECT 1,3 FROM DUAL WHERE 1 = 0);
|
||||
|
||||
CREATE TABLE t1 (i INT);
|
||||
INSERT INTO t1 () VALUES (1), (2), (3);
|
||||
|
||||
SELECT ROW(1,2) = (SELECT 1,2 FROM t1 WHERE 1 = 0);
|
||||
SELECT ROW(1,2) = (SELECT 1,3 FROM t1 WHERE 1 = 0);
|
||||
SELECT i FROM t1 WHERE ROW(1,2) = (SELECT 1,2 FROM DUAL WHERE 1 = 0);
|
||||
SELECT i FROM t1 WHERE ROW(1,2) = (SELECT 1,3 FROM DUAL WHERE 1 = 0);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -3772,11 +3772,6 @@ SELECT 1 FROM t1 WHERE a <> 1 AND NOT
|
|||
ROW(1,a) <=> ROW(1,(SELECT 1 FROM t1))
|
||||
INTO @var0;
|
||||
|
||||
# Query correctly return 2 rows since comparison a <=> fisrt_subquery is
|
||||
# always false, thus the second query is never executed.
|
||||
SELECT 1 FROM t1 WHERE a <> 1 AND NOT
|
||||
ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1));
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
|
|
|
@ -74,6 +74,68 @@ CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
|
|||
CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) );
|
||||
DROP VIEW v1, v2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#51070: Query with a NOT IN subquery predicate returns a wrong
|
||||
--echo # result set
|
||||
--echo #
|
||||
CREATE TABLE t1 ( a INT, b INT );
|
||||
INSERT INTO t1 VALUES ( 1, NULL ), ( 2, NULL );
|
||||
|
||||
CREATE TABLE t2 ( c INT, d INT );
|
||||
INSERT INTO t2 VALUES ( NULL, 3 ), ( NULL, 4 );
|
||||
|
||||
CREATE TABLE t3 ( e INT, f INT );
|
||||
INSERT INTO t3 VALUES ( NULL, NULL ), ( NULL, NULL );
|
||||
|
||||
CREATE TABLE t4 ( a INT );
|
||||
INSERT INTO t4 VALUES (1), (2), (3);
|
||||
|
||||
CREATE TABLE t5 ( a INT );
|
||||
INSERT INTO t5 VALUES (NULL), (2);
|
||||
|
||||
--replace_column 1 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 );
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 );
|
||||
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS NULL;
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS NULL;
|
||||
SELECT * FROM t1 WHERE ( a, b ) IN ( SELECT c, d FROM t2 ) IS NULL;
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS UNKNOWN;
|
||||
SELECT * FROM t1 WHERE (( a, b ) NOT IN ( SELECT c, d FROM t2 )) IS UNKNOWN;
|
||||
|
||||
SELECT * FROM t1 WHERE 1 = 1 AND ( a, b ) NOT IN ( SELECT c, d FROM t2 );
|
||||
|
||||
--replace_column 1 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT e, f FROM t3 );
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT e, f FROM t3 );
|
||||
|
||||
--replace_column 1 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x
|
||||
EXPLAIN
|
||||
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT a, b FROM t1 );
|
||||
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT a, b FROM t1 );
|
||||
|
||||
--replace_column 1 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x
|
||||
EXPLAIN
|
||||
SELECT * FROM t3 WHERE ( e, f ) NOT IN ( SELECT c, d FROM t2 );
|
||||
SELECT * FROM t3 WHERE ( e, f ) NOT IN ( SELECT c, d FROM t2 );
|
||||
|
||||
--replace_column 1 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x
|
||||
EXPLAIN
|
||||
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT e, f FROM t3 );
|
||||
SELECT * FROM t2 WHERE ( c, d ) NOT IN ( SELECT e, f FROM t3 );
|
||||
|
||||
SELECT * FROM t1 WHERE ( a, b ) NOT IN
|
||||
( SELECT c, d FROM t2 WHERE c = 1 AND c <> 1 );
|
||||
|
||||
SELECT * FROM t1 WHERE b NOT IN ( SELECT c FROM t2 WHERE c = 1 );
|
||||
|
||||
SELECT * FROM t1 WHERE NULL NOT IN ( SELECT c FROM t2 WHERE c = 1 AND c <> 1 );
|
||||
|
||||
DROP TABLE t1, t2, t3, t4, t5;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests.
|
||||
|
|
|
@ -273,5 +273,14 @@ UNLOCK TABLES;
|
|||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #55424: convert_tz crashes when fed invalid data
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a SET('x') NOT NULL);
|
||||
INSERT INTO t1 VALUES ('');
|
||||
SELECT CONVERT_TZ(1, a, 1) FROM t1;
|
||||
SELECT CONVERT_TZ(1, 1, a) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -932,4 +932,52 @@ disconnect con1;
|
|||
DROP USER 'no_rights'@'localhost';
|
||||
DROP DATABASE db1;
|
||||
|
||||
#
|
||||
# Bug#55421 Protocol::end_statement(): Assertion `0' on multi-table UPDATE IGNORE
|
||||
# To reproduce a crash we need to provoke a trigger execution with
|
||||
# the following conditions:
|
||||
# - active SELECT statement during trigger execution
|
||||
# (i.e. LEX::current_select != NULL);
|
||||
# - IGNORE option (i.e. LEX::current_select->no_error == TRUE);
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mysqltest_db1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mysqltest_db1;
|
||||
USE mysqltest_db1;
|
||||
|
||||
GRANT ALL ON mysqltest_db1.* TO mysqltest_u1@localhost;
|
||||
|
||||
--connect(con1,localhost,mysqltest_u1,,mysqltest_db1)
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a1 int,
|
||||
a2 int
|
||||
);
|
||||
INSERT INTO t1 VALUES (1, 20);
|
||||
|
||||
CREATE TRIGGER mysqltest_db1.upd_t1
|
||||
BEFORE UPDATE ON t1 FOR EACH ROW SET new.a2 = 200;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
a1 int
|
||||
);
|
||||
|
||||
INSERT INTO t2 VALUES (2);
|
||||
|
||||
--connection default
|
||||
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE IGNORE t1, t2 SET t1.a1 = 2, t2.a1 = 3 WHERE t1.a1 = 1 AND t2.a1 = 2;
|
||||
# Cleanup
|
||||
|
||||
DROP DATABASE mysqltest_db1;
|
||||
DROP USER mysqltest_u1@localhost;
|
||||
|
||||
--disconnect con1
|
||||
--connection default
|
||||
USE test;
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
|
|
|
@ -347,6 +347,23 @@ DROP TABLE t1;
|
|||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #55779: select does not work properly in mysql server
|
||||
--echo # Version "5.1.42 SUSE MySQL RPM"
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a TIMESTAMP, KEY (a));
|
||||
|
||||
INSERT INTO t1 VALUES ('2000-01-01 00:00:00'), ('2000-01-01 00:00:00'),
|
||||
('2000-01-01 00:00:01'), ('2000-01-01 00:00:01');
|
||||
|
||||
SELECT a FROM t1 WHERE a >= 20000101000000;
|
||||
SELECT a FROM t1 WHERE a >= '20000101000000';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo
|
||||
--echo Bug#50888 valgrind warnings in Field_timestamp::val_str
|
||||
--echo
|
||||
|
|
|
@ -326,6 +326,24 @@ INSERT INTO t1 VALUES (1);
|
|||
INSERT INTO t1 VALUES (1);
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #55615: debug assertion after using variable in assignment and
|
||||
# referred to
|
||||
# Bug #55564: crash with user variables, assignments, joins...
|
||||
#
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
--echo # BUG#55615 : should not crash
|
||||
SELECT (@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1) FROM t1 GROUP BY @a;
|
||||
--echo # BUG#55564 : should not crash
|
||||
SELECT IF(
|
||||
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
|
||||
count(*), 1)
|
||||
FROM t1 GROUP BY a LIMIT 1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
#
|
||||
|
|
|
@ -770,3 +770,13 @@
|
|||
fun:lf_hash_insert
|
||||
}
|
||||
|
||||
{
|
||||
missing shutdown_performance_schema 3
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
fun:my_malloc
|
||||
fun:initialize_bucket
|
||||
fun:lf_hash_search
|
||||
fun:_Z19find_or_create_fileP10PFS_threadP14PFS_file_classPKcj
|
||||
}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ int handle_options(int *argc, char ***argv,
|
|||
const struct my_option *longopts,
|
||||
my_get_one_option get_one_option)
|
||||
{
|
||||
uint opt_found, argvpos= 0, length;
|
||||
uint UNINIT_VAR(opt_found), argvpos= 0, length;
|
||||
my_bool end_of_options= 0, must_be_var, set_maximum_value,
|
||||
option_is_loose;
|
||||
char **pos, **pos_end, *optend, *opt_str, key_name[FN_REFLEN];
|
||||
|
|
|
@ -139,6 +139,7 @@ ELSE()
|
|||
ENDIF()
|
||||
|
||||
SET(HOSTNAME "hostname")
|
||||
SET(MYSQLD_USER "mysql")
|
||||
|
||||
# Required for mysqlbug until autotools are deprecated, once done remove these
|
||||
# and expand default cmake variables
|
||||
|
|
|
@ -260,6 +260,7 @@ cp include/mysql.h \
|
|||
include/keycache.h \
|
||||
include/m_ctype.h \
|
||||
include/my_attribute.h \
|
||||
include/my_compiler.h \
|
||||
include/mysqld_error.h \
|
||||
include/sql_state.h \
|
||||
include/mysqld_ername.h \
|
||||
|
|
23
sql/field.cc
23
sql/field.cc
|
@ -1564,7 +1564,7 @@ void Field::make_field(Send_field *field)
|
|||
}
|
||||
else
|
||||
field->org_table_name= field->db_name= "";
|
||||
if (orig_table)
|
||||
if (orig_table && orig_table->alias)
|
||||
{
|
||||
field->table_name= orig_table->alias;
|
||||
field->org_col_name= field_name;
|
||||
|
@ -4189,6 +4189,7 @@ String *Field_float::val_str(String *val_buffer,
|
|||
String *val_ptr __attribute__((unused)))
|
||||
{
|
||||
ASSERT_COLUMN_MARKED_FOR_READ;
|
||||
DBUG_ASSERT(field_length <= MAX_FIELD_CHARLENGTH);
|
||||
float nr;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
if (table->s->db_low_byte_first)
|
||||
|
@ -4199,8 +4200,13 @@ String *Field_float::val_str(String *val_buffer,
|
|||
#endif
|
||||
memcpy(&nr, ptr, sizeof(nr));
|
||||
|
||||
uint to_length=max(field_length,70);
|
||||
val_buffer->alloc(to_length);
|
||||
uint to_length= 70;
|
||||
if (val_buffer->alloc(to_length))
|
||||
{
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(0));
|
||||
return val_buffer;
|
||||
}
|
||||
|
||||
char *to=(char*) val_buffer->ptr();
|
||||
size_t len;
|
||||
|
||||
|
@ -4209,7 +4215,7 @@ String *Field_float::val_str(String *val_buffer,
|
|||
else
|
||||
{
|
||||
/*
|
||||
We are safe here because the buffer length is >= 70, and
|
||||
We are safe here because the buffer length is 70, and
|
||||
fabs(float) < 10^39, dec < NOT_FIXED_DEC. So the resulting string
|
||||
will be not longer than 69 chars + terminating '\0'.
|
||||
*/
|
||||
|
@ -4506,6 +4512,7 @@ String *Field_double::val_str(String *val_buffer,
|
|||
String *val_ptr __attribute__((unused)))
|
||||
{
|
||||
ASSERT_COLUMN_MARKED_FOR_READ;
|
||||
DBUG_ASSERT(field_length <= MAX_FIELD_CHARLENGTH);
|
||||
double nr;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
if (table->s->db_low_byte_first)
|
||||
|
@ -4515,9 +4522,13 @@ String *Field_double::val_str(String *val_buffer,
|
|||
else
|
||||
#endif
|
||||
doubleget(nr,ptr);
|
||||
uint to_length= DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE;
|
||||
if (val_buffer->alloc(to_length))
|
||||
{
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(0));
|
||||
return val_buffer;
|
||||
}
|
||||
|
||||
uint to_length=max(field_length, DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE);
|
||||
val_buffer->alloc(to_length);
|
||||
char *to=(char*) val_buffer->ptr();
|
||||
size_t len;
|
||||
|
||||
|
|
|
@ -231,6 +231,8 @@ void ha_partition::init_handler_variables()
|
|||
m_innodb= FALSE;
|
||||
m_extra_cache= FALSE;
|
||||
m_extra_cache_size= 0;
|
||||
m_extra_prepare_for_update= FALSE;
|
||||
m_extra_cache_part_id= NO_CURRENT_PART_ID;
|
||||
m_handler_status= handler_not_initialized;
|
||||
m_low_byte_first= 1;
|
||||
m_part_field_array= NULL;
|
||||
|
@ -5515,9 +5517,6 @@ void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info,
|
|||
when performing the sequential scan we will check this recorded value
|
||||
and call extra_opt whenever we start scanning a new partition.
|
||||
|
||||
monty: Neads to be fixed so that it's passed to all handlers when we
|
||||
move to another partition during table scan.
|
||||
|
||||
HA_EXTRA_NO_CACHE:
|
||||
When performing a UNION SELECT HA_EXTRA_NO_CACHE is called from the
|
||||
flush method in the select_union class.
|
||||
|
@ -5529,7 +5528,7 @@ void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info,
|
|||
for. If no cache is in use they will quickly return after finding
|
||||
this out. And we also ensure that all caches are disabled and no one
|
||||
is left by mistake.
|
||||
In the future this call will probably be deleted an we will instead call
|
||||
In the future this call will probably be deleted and we will instead call
|
||||
::reset();
|
||||
|
||||
HA_EXTRA_WRITE_CACHE:
|
||||
|
@ -5541,8 +5540,9 @@ void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info,
|
|||
This is called as part of a multi-table update. When the table to be
|
||||
updated is also scanned then this informs MyISAM handler to drop any
|
||||
caches if dynamic records are used (fixed size records do not care
|
||||
about this call). We pass this along to all underlying MyISAM handlers
|
||||
and ignore it for the rest.
|
||||
about this call). We pass this along to the first partition to scan, and
|
||||
flag that it is to be called after HA_EXTRA_CACHE when moving to the next
|
||||
partition to scan.
|
||||
|
||||
HA_EXTRA_PREPARE_FOR_DROP:
|
||||
Only used by MyISAM, called in preparation for a DROP TABLE.
|
||||
|
@ -5697,9 +5697,21 @@ int ha_partition::extra(enum ha_extra_function operation)
|
|||
case HA_EXTRA_PREPARE_FOR_RENAME:
|
||||
DBUG_RETURN(prepare_for_rename());
|
||||
break;
|
||||
case HA_EXTRA_PREPARE_FOR_UPDATE:
|
||||
DBUG_ASSERT(m_extra_cache);
|
||||
/*
|
||||
Needs to be run on the first partition in the range now, and
|
||||
later in late_extra_cache, when switching to a new partition to scan.
|
||||
*/
|
||||
m_extra_prepare_for_update= TRUE;
|
||||
if (m_part_spec.start_part != NO_CURRENT_PART_ID)
|
||||
{
|
||||
DBUG_ASSERT(m_extra_cache_part_id == m_part_spec.start_part);
|
||||
(void) m_file[m_part_spec.start_part]->extra(HA_EXTRA_PREPARE_FOR_UPDATE);
|
||||
}
|
||||
break;
|
||||
case HA_EXTRA_NORMAL:
|
||||
case HA_EXTRA_QUICK:
|
||||
case HA_EXTRA_PREPARE_FOR_UPDATE:
|
||||
case HA_EXTRA_FORCE_REOPEN:
|
||||
case HA_EXTRA_PREPARE_FOR_DROP:
|
||||
case HA_EXTRA_FLUSH_CACHE:
|
||||
|
@ -5722,10 +5734,22 @@ int ha_partition::extra(enum ha_extra_function operation)
|
|||
break;
|
||||
}
|
||||
case HA_EXTRA_NO_CACHE:
|
||||
{
|
||||
int ret= 0;
|
||||
if (m_extra_cache_part_id != NO_CURRENT_PART_ID)
|
||||
ret= m_file[m_extra_cache_part_id]->extra(HA_EXTRA_NO_CACHE);
|
||||
m_extra_cache= FALSE;
|
||||
m_extra_cache_size= 0;
|
||||
m_extra_prepare_for_update= FALSE;
|
||||
m_extra_cache_part_id= NO_CURRENT_PART_ID;
|
||||
DBUG_RETURN(ret);
|
||||
}
|
||||
case HA_EXTRA_WRITE_CACHE:
|
||||
{
|
||||
m_extra_cache= FALSE;
|
||||
m_extra_cache_size= 0;
|
||||
m_extra_prepare_for_update= FALSE;
|
||||
m_extra_cache_part_id= NO_CURRENT_PART_ID;
|
||||
DBUG_RETURN(loop_extra(operation));
|
||||
}
|
||||
case HA_EXTRA_IGNORE_NO_KEY:
|
||||
|
@ -5862,6 +5886,7 @@ int ha_partition::extra_opt(enum ha_extra_function operation, ulong cachesize)
|
|||
void ha_partition::prepare_extra_cache(uint cachesize)
|
||||
{
|
||||
DBUG_ENTER("ha_partition::prepare_extra_cache()");
|
||||
DBUG_PRINT("info", ("cachesize %u", cachesize));
|
||||
|
||||
m_extra_cache= TRUE;
|
||||
m_extra_cache_size= cachesize;
|
||||
|
@ -5920,16 +5945,18 @@ int ha_partition::loop_extra(enum ha_extra_function operation)
|
|||
{
|
||||
int result= 0, tmp;
|
||||
handler **file;
|
||||
bool is_select;
|
||||
DBUG_ENTER("ha_partition::loop_extra()");
|
||||
|
||||
/*
|
||||
TODO, 5.2: this is where you could possibly add optimisations to add the bitmap
|
||||
_if_ a SELECT.
|
||||
*/
|
||||
is_select= (thd_sql_command(ha_thd()) == SQLCOM_SELECT);
|
||||
for (file= m_file; *file; file++)
|
||||
{
|
||||
if ((tmp= (*file)->extra(operation)))
|
||||
result= tmp;
|
||||
if (!is_select ||
|
||||
bitmap_is_set(&(m_part_info->used_partitions), file - m_file))
|
||||
{
|
||||
if ((tmp= (*file)->extra(operation)))
|
||||
result= tmp;
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
|
@ -5950,14 +5977,22 @@ void ha_partition::late_extra_cache(uint partition_id)
|
|||
{
|
||||
handler *file;
|
||||
DBUG_ENTER("ha_partition::late_extra_cache");
|
||||
DBUG_PRINT("info", ("extra_cache %u partid %u size %u", m_extra_cache,
|
||||
partition_id, m_extra_cache_size));
|
||||
|
||||
if (!m_extra_cache)
|
||||
if (!m_extra_cache && !m_extra_prepare_for_update)
|
||||
DBUG_VOID_RETURN;
|
||||
file= m_file[partition_id];
|
||||
if (m_extra_cache_size == 0)
|
||||
(void) file->extra(HA_EXTRA_CACHE);
|
||||
else
|
||||
(void) file->extra_opt(HA_EXTRA_CACHE, m_extra_cache_size);
|
||||
if (m_extra_prepare_for_update)
|
||||
{
|
||||
DBUG_ASSERT(m_extra_cache);
|
||||
(void) file->extra(HA_EXTRA_PREPARE_FOR_UPDATE);
|
||||
}
|
||||
m_extra_cache_part_id= partition_id;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
@ -5978,10 +6013,12 @@ void ha_partition::late_extra_no_cache(uint partition_id)
|
|||
handler *file;
|
||||
DBUG_ENTER("ha_partition::late_extra_no_cache");
|
||||
|
||||
if (!m_extra_cache)
|
||||
if (!m_extra_cache && !m_extra_prepare_for_update)
|
||||
DBUG_VOID_RETURN;
|
||||
file= m_file[partition_id];
|
||||
(void) file->extra(HA_EXTRA_NO_CACHE);
|
||||
DBUG_ASSERT(partition_id == m_extra_cache_part_id);
|
||||
m_extra_cache_part_id= NO_CURRENT_PART_ID;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,6 +137,10 @@ private:
|
|||
*/
|
||||
bool m_extra_cache;
|
||||
uint m_extra_cache_size;
|
||||
/* The same goes for HA_EXTRA_PREPARE_FOR_UPDATE */
|
||||
bool m_extra_prepare_for_update;
|
||||
/* Which partition has active cache */
|
||||
uint m_extra_cache_part_id;
|
||||
|
||||
void init_handler_variables();
|
||||
/*
|
||||
|
|
11
sql/item.cc
11
sql/item.cc
|
@ -7287,14 +7287,16 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
|
|||
|
||||
enum_field_types field_type= field->type();
|
||||
|
||||
if (field_type == MYSQL_TYPE_DATE || field_type == MYSQL_TYPE_DATETIME)
|
||||
if (field_type == MYSQL_TYPE_DATE || field_type == MYSQL_TYPE_DATETIME ||
|
||||
field_type == MYSQL_TYPE_TIMESTAMP)
|
||||
{
|
||||
enum_mysql_timestamp_type type= MYSQL_TIMESTAMP_ERROR;
|
||||
|
||||
if (field_type == MYSQL_TYPE_DATE)
|
||||
type= MYSQL_TIMESTAMP_DATE;
|
||||
|
||||
if (field_type == MYSQL_TYPE_DATETIME)
|
||||
if (field_type == MYSQL_TYPE_DATETIME ||
|
||||
field_type == MYSQL_TYPE_TIMESTAMP)
|
||||
type= MYSQL_TIMESTAMP_DATETIME;
|
||||
|
||||
const char *field_name= field->field_name;
|
||||
|
@ -7850,9 +7852,12 @@ bool Item_cache_row::null_inside()
|
|||
|
||||
void Item_cache_row::bring_value()
|
||||
{
|
||||
if (!example)
|
||||
return;
|
||||
example->bring_value();
|
||||
null_value= example->null_value;
|
||||
for (uint i= 0; i < item_count; i++)
|
||||
values[i]->bring_value();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1595,6 +1595,13 @@ int Arg_comparator::compare_row()
|
|||
bool was_null= 0;
|
||||
(*a)->bring_value();
|
||||
(*b)->bring_value();
|
||||
|
||||
if ((*a)->null_value || (*b)->null_value)
|
||||
{
|
||||
owner->null_value= 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint n= (*a)->cols();
|
||||
for (uint i= 0; i<n; i++)
|
||||
{
|
||||
|
@ -1763,6 +1770,76 @@ bool Item_in_optimizer::fix_fields(THD *thd, Item **ref)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
The implementation of optimized \<outer expression\> [NOT] IN \<subquery\>
|
||||
predicates. The implementation works as follows.
|
||||
|
||||
For the current value of the outer expression
|
||||
|
||||
- If it contains only NULL values, the original (before rewrite by the
|
||||
Item_in_subselect rewrite methods) inner subquery is non-correlated and
|
||||
was previously executed, there is no need to re-execute it, and the
|
||||
previous return value is returned.
|
||||
|
||||
- If it contains NULL values, check if there is a partial match for the
|
||||
inner query block by evaluating it. For clarity we repeat here the
|
||||
transformation previously performed on the sub-query. The expression
|
||||
|
||||
<tt>
|
||||
( oc_1, ..., oc_n )
|
||||
\<in predicate\>
|
||||
( SELECT ic_1, ..., ic_n
|
||||
FROM \<table\>
|
||||
WHERE \<inner where\>
|
||||
)
|
||||
</tt>
|
||||
|
||||
was transformed into
|
||||
|
||||
<tt>
|
||||
( oc_1, ..., oc_n )
|
||||
\<in predicate\>
|
||||
( SELECT ic_1, ..., ic_n
|
||||
FROM \<table\>
|
||||
WHERE \<inner where\> AND ... ( ic_k = oc_k OR ic_k IS NULL )
|
||||
HAVING ... NOT ic_k IS NULL
|
||||
)
|
||||
</tt>
|
||||
|
||||
The evaluation will now proceed according to special rules set up
|
||||
elsewhere. These rules include:
|
||||
|
||||
- The HAVING NOT \<inner column\> IS NULL conditions added by the
|
||||
aforementioned rewrite methods will detect whether they evaluated (and
|
||||
rejected) a NULL value and if so, will cause the subquery to evaluate
|
||||
to NULL.
|
||||
|
||||
- The added WHERE and HAVING conditions are present only for those inner
|
||||
columns that correspond to outer column that are not NULL at the moment.
|
||||
|
||||
- If there is an eligible index for executing the subquery, the special
|
||||
access method "Full scan on NULL key" is employed which ensures that
|
||||
the inner query will detect if there are NULL values resulting from the
|
||||
inner query. This access method will quietly resort to table scan if it
|
||||
needs to find NULL values as well.
|
||||
|
||||
- Under these conditions, the sub-query need only be evaluated in order to
|
||||
find out whether it produced any rows.
|
||||
|
||||
- If it did, we know that there was a partial match since there are
|
||||
NULL values in the outer row expression.
|
||||
|
||||
- If it did not, the result is FALSE or UNKNOWN. If at least one of the
|
||||
HAVING sub-predicates rejected a NULL value corresponding to an outer
|
||||
non-NULL, and hence the inner query block returns UNKNOWN upon
|
||||
evaluation, there was a partial match and the result is UNKNOWN.
|
||||
|
||||
- If it contains no NULL values, the call is forwarded to the inner query
|
||||
block.
|
||||
|
||||
@see Item_in_subselect::val_bool()
|
||||
@see Item_is_not_null_test::val_int()
|
||||
*/
|
||||
longlong Item_in_optimizer::val_int()
|
||||
{
|
||||
bool tmp;
|
||||
|
@ -1816,7 +1893,7 @@ longlong Item_in_optimizer::val_int()
|
|||
all_left_cols_null= false;
|
||||
}
|
||||
|
||||
if (!((Item_in_subselect*)args[1])->is_correlated &&
|
||||
if (!item_subs->is_correlated &&
|
||||
all_left_cols_null && result_for_null_param != UNKNOWN)
|
||||
{
|
||||
/*
|
||||
|
@ -1830,8 +1907,11 @@ longlong Item_in_optimizer::val_int()
|
|||
else
|
||||
{
|
||||
/* The subquery has to be evaluated */
|
||||
(void) args[1]->val_bool_result();
|
||||
null_value= !item_subs->engine->no_rows();
|
||||
(void) item_subs->val_bool_result();
|
||||
if (item_subs->engine->no_rows())
|
||||
null_value= item_subs->null_value;
|
||||
else
|
||||
null_value= TRUE;
|
||||
if (all_left_cols_null)
|
||||
result_for_null_param= null_value;
|
||||
}
|
||||
|
@ -2560,27 +2640,30 @@ Item_func_if::fix_length_and_dec()
|
|||
cached_result_type= arg2_type;
|
||||
collation.set(args[2]->collation.collation);
|
||||
cached_field_type= args[2]->field_type();
|
||||
max_length= args[2]->max_length;
|
||||
return;
|
||||
}
|
||||
else if (null2)
|
||||
|
||||
if (null2)
|
||||
{
|
||||
cached_result_type= arg1_type;
|
||||
collation.set(args[1]->collation.collation);
|
||||
cached_field_type= args[1]->field_type();
|
||||
max_length= args[1]->max_length;
|
||||
return;
|
||||
}
|
||||
|
||||
agg_result_type(&cached_result_type, args + 1, 2);
|
||||
if (cached_result_type == STRING_RESULT)
|
||||
{
|
||||
if (agg_arg_charsets_for_string_result(collation, args + 1, 2))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
agg_result_type(&cached_result_type, args+1, 2);
|
||||
if (cached_result_type == STRING_RESULT)
|
||||
{
|
||||
if (agg_arg_charsets_for_string_result(collation, args + 1, 2))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
collation.set_numeric(); // Number
|
||||
}
|
||||
cached_field_type= agg_field_type(args + 1, 2);
|
||||
collation.set_numeric(); // Number
|
||||
}
|
||||
cached_field_type= agg_field_type(args + 1, 2);
|
||||
|
||||
uint32 char_length;
|
||||
if ((cached_result_type == DECIMAL_RESULT )
|
||||
|
|
|
@ -2553,7 +2553,7 @@ void Item_func_min_max::fix_length_and_dec()
|
|||
stored to the value pointer, if latter is provided.
|
||||
|
||||
RETURN
|
||||
0 If one of arguments is NULL
|
||||
0 If one of arguments is NULL or there was a execution error
|
||||
# index of the least/greatest argument
|
||||
*/
|
||||
|
||||
|
@ -2567,6 +2567,14 @@ uint Item_func_min_max::cmp_datetimes(ulonglong *value)
|
|||
Item **arg= args + i;
|
||||
bool is_null;
|
||||
longlong res= get_datetime_value(thd, &arg, 0, datetime_item, &is_null);
|
||||
|
||||
/* Check if we need to stop (because of error or KILL) and stop the loop */
|
||||
if (thd->is_error())
|
||||
{
|
||||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((null_value= args[i]->null_value))
|
||||
return 0;
|
||||
if (i == 0 || (res < min_max ? cmp_sign : -cmp_sign) > 0)
|
||||
|
@ -2595,6 +2603,12 @@ String *Item_func_min_max::val_str(String *str)
|
|||
if (null_value)
|
||||
return 0;
|
||||
str_res= args[min_max_idx]->val_str(str);
|
||||
if (args[min_max_idx]->null_value)
|
||||
{
|
||||
// check if the call to val_str() above returns a NULL value
|
||||
null_value= 1;
|
||||
return NULL;
|
||||
}
|
||||
str_res->set_charset(collation.collation);
|
||||
return str_res;
|
||||
}
|
||||
|
@ -4623,6 +4637,14 @@ longlong Item_func_set_user_var::val_int_result()
|
|||
return entry->val_int(&null_value);
|
||||
}
|
||||
|
||||
bool Item_func_set_user_var::val_bool_result()
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
check(TRUE);
|
||||
update(); // Store expression
|
||||
return entry->val_int(&null_value) != 0;
|
||||
}
|
||||
|
||||
String *Item_func_set_user_var::str_result(String *str)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
|
|
|
@ -1416,6 +1416,7 @@ public:
|
|||
my_decimal *val_decimal(my_decimal *);
|
||||
double val_result();
|
||||
longlong val_int_result();
|
||||
bool val_bool_result();
|
||||
String *str_result(String *str);
|
||||
my_decimal *val_decimal_result(my_decimal *);
|
||||
bool is_null_result();
|
||||
|
|
|
@ -179,6 +179,21 @@ public:
|
|||
item_type=it;
|
||||
}
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
for (unsigned int i= 0; i < arg_count; ++i)
|
||||
{
|
||||
if (args[i]->fixed && args[i]->field_type() != MYSQL_TYPE_GEOMETRY)
|
||||
{
|
||||
String str;
|
||||
args[i]->print(&str, QT_ORDINARY);
|
||||
str.append('\0');
|
||||
my_error(ER_ILLEGAL_VALUE_FOR_TYPE, MYF(0), "non geometric",
|
||||
str.ptr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const char *func_name() const { return "multipoint"; }
|
||||
};
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ Item_subselect::Item_subselect():
|
|||
item value is NULL if select_subselect not changed this value
|
||||
(i.e. some rows will be found returned)
|
||||
*/
|
||||
null_value= 1;
|
||||
null_value= TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -435,9 +435,9 @@ void Item_maxmin_subselect::print(String *str, enum_query_type query_type)
|
|||
|
||||
void Item_singlerow_subselect::reset()
|
||||
{
|
||||
null_value= 1;
|
||||
null_value= TRUE;
|
||||
if (value)
|
||||
value->null_value= 1;
|
||||
value->null_value= TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -574,7 +574,10 @@ bool Item_singlerow_subselect::null_inside()
|
|||
|
||||
void Item_singlerow_subselect::bring_value()
|
||||
{
|
||||
exec();
|
||||
if (!exec() && assigned())
|
||||
null_value= 0;
|
||||
else
|
||||
reset();
|
||||
}
|
||||
|
||||
double Item_singlerow_subselect::val_real()
|
||||
|
@ -582,7 +585,7 @@ double Item_singlerow_subselect::val_real()
|
|||
DBUG_ASSERT(fixed == 1);
|
||||
if (!exec() && !value->null_value)
|
||||
{
|
||||
null_value= 0;
|
||||
null_value= FALSE;
|
||||
return value->val_real();
|
||||
}
|
||||
else
|
||||
|
@ -597,7 +600,7 @@ longlong Item_singlerow_subselect::val_int()
|
|||
DBUG_ASSERT(fixed == 1);
|
||||
if (!exec() && !value->null_value)
|
||||
{
|
||||
null_value= 0;
|
||||
null_value= FALSE;
|
||||
return value->val_int();
|
||||
}
|
||||
else
|
||||
|
@ -611,7 +614,7 @@ String *Item_singlerow_subselect::val_str(String *str)
|
|||
{
|
||||
if (!exec() && !value->null_value)
|
||||
{
|
||||
null_value= 0;
|
||||
null_value= FALSE;
|
||||
return value->val_str(str);
|
||||
}
|
||||
else
|
||||
|
@ -626,7 +629,7 @@ my_decimal *Item_singlerow_subselect::val_decimal(my_decimal *decimal_value)
|
|||
{
|
||||
if (!exec() && !value->null_value)
|
||||
{
|
||||
null_value= 0;
|
||||
null_value= FALSE;
|
||||
return value->val_decimal(decimal_value);
|
||||
}
|
||||
else
|
||||
|
@ -641,7 +644,7 @@ bool Item_singlerow_subselect::val_bool()
|
|||
{
|
||||
if (!exec() && !value->null_value)
|
||||
{
|
||||
null_value= 0;
|
||||
null_value= FALSE;
|
||||
return value->val_bool();
|
||||
}
|
||||
else
|
||||
|
@ -659,7 +662,7 @@ Item_exists_subselect::Item_exists_subselect(st_select_lex *select_lex):
|
|||
bool val_bool();
|
||||
init(select_lex, new select_exists_subselect(this));
|
||||
max_columns= UINT_MAX;
|
||||
null_value= 0; //can't be NULL
|
||||
null_value= FALSE; //can't be NULL
|
||||
maybe_null= 0; //can't be NULL
|
||||
value= 0;
|
||||
DBUG_VOID_RETURN;
|
||||
|
@ -822,15 +825,14 @@ double Item_in_subselect::val_real()
|
|||
*/
|
||||
DBUG_ASSERT(0);
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
null_value= 0;
|
||||
null_value= was_null= FALSE;
|
||||
if (exec())
|
||||
{
|
||||
reset();
|
||||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
if (was_null && !value)
|
||||
null_value= 1;
|
||||
null_value= TRUE;
|
||||
return (double) value;
|
||||
}
|
||||
|
||||
|
@ -843,15 +845,14 @@ longlong Item_in_subselect::val_int()
|
|||
*/
|
||||
DBUG_ASSERT(0);
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
null_value= 0;
|
||||
null_value= was_null= FALSE;
|
||||
if (exec())
|
||||
{
|
||||
reset();
|
||||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
if (was_null && !value)
|
||||
null_value= 1;
|
||||
null_value= TRUE;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -864,16 +865,15 @@ String *Item_in_subselect::val_str(String *str)
|
|||
*/
|
||||
DBUG_ASSERT(0);
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
null_value= 0;
|
||||
null_value= was_null= FALSE;
|
||||
if (exec())
|
||||
{
|
||||
reset();
|
||||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
if (was_null && !value)
|
||||
{
|
||||
null_value= 1;
|
||||
null_value= TRUE;
|
||||
return 0;
|
||||
}
|
||||
str->set((ulonglong)value, &my_charset_bin);
|
||||
|
@ -884,20 +884,14 @@ String *Item_in_subselect::val_str(String *str)
|
|||
bool Item_in_subselect::val_bool()
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
null_value= 0;
|
||||
null_value= was_null= FALSE;
|
||||
if (exec())
|
||||
{
|
||||
reset();
|
||||
/*
|
||||
Must mark the IN predicate as NULL so as to make sure an enclosing NOT
|
||||
predicate will return FALSE. See the comments in
|
||||
subselect_uniquesubquery_engine::copy_ref_key for further details.
|
||||
*/
|
||||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
if (was_null && !value)
|
||||
null_value= 1;
|
||||
null_value= TRUE;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -908,16 +902,15 @@ my_decimal *Item_in_subselect::val_decimal(my_decimal *decimal_value)
|
|||
method should not be used
|
||||
*/
|
||||
DBUG_ASSERT(0);
|
||||
null_value= 0;
|
||||
null_value= was_null= FALSE;
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
if (exec())
|
||||
{
|
||||
reset();
|
||||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
if (was_null && !value)
|
||||
null_value= 1;
|
||||
null_value= TRUE;
|
||||
int2my_decimal(E_DEC_FATAL_ERROR, value, 0, decimal_value);
|
||||
return decimal_value;
|
||||
}
|
||||
|
|
54
sql/log.cc
54
sql/log.cc
|
@ -1907,7 +1907,9 @@ static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv)
|
|||
|
||||
String log_query;
|
||||
if (log_query.append(STRING_WITH_LEN("SAVEPOINT ")) ||
|
||||
log_query.append(thd->lex->ident.str, thd->lex->ident.length))
|
||||
log_query.append("`") ||
|
||||
log_query.append(thd->lex->ident.str, thd->lex->ident.length) ||
|
||||
log_query.append("`"))
|
||||
DBUG_RETURN(1);
|
||||
int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED);
|
||||
Query_log_event qinfo(thd, log_query.c_ptr_safe(), log_query.length(),
|
||||
|
@ -1929,7 +1931,9 @@ static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv)
|
|||
{
|
||||
String log_query;
|
||||
if (log_query.append(STRING_WITH_LEN("ROLLBACK TO ")) ||
|
||||
log_query.append(thd->lex->ident.str, thd->lex->ident.length))
|
||||
log_query.append("`") ||
|
||||
log_query.append(thd->lex->ident.str, thd->lex->ident.length) ||
|
||||
log_query.append("`"))
|
||||
DBUG_RETURN(1);
|
||||
int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED);
|
||||
Query_log_event qinfo(thd, log_query.c_ptr_safe(), log_query.length(),
|
||||
|
@ -5449,10 +5453,32 @@ extern "C" my_bool reopen_fstreams(const char *filename,
|
|||
FILE *outstream, FILE *errstream)
|
||||
{
|
||||
int handle_fd;
|
||||
int stream_fd;
|
||||
int err_fd, out_fd;
|
||||
HANDLE osfh;
|
||||
|
||||
DBUG_ASSERT(filename && (outstream || errstream));
|
||||
DBUG_ASSERT(filename && errstream);
|
||||
|
||||
// Services don't have stdout/stderr on Windows, so _fileno returns -1.
|
||||
err_fd= _fileno(errstream);
|
||||
if (err_fd < 0)
|
||||
{
|
||||
if (!freopen(filename, "a+", errstream))
|
||||
return TRUE;
|
||||
|
||||
setbuf(errstream, NULL);
|
||||
err_fd= _fileno(errstream);
|
||||
}
|
||||
|
||||
if (outstream)
|
||||
{
|
||||
out_fd= _fileno(outstream);
|
||||
if (out_fd < 0)
|
||||
{
|
||||
if (!freopen(filename, "a+", outstream))
|
||||
return TRUE;
|
||||
out_fd= _fileno(outstream);
|
||||
}
|
||||
}
|
||||
|
||||
if ((osfh= CreateFile(filename, GENERIC_READ | GENERIC_WRITE,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE |
|
||||
|
@ -5468,24 +5494,16 @@ extern "C" my_bool reopen_fstreams(const char *filename,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (outstream)
|
||||
if (_dup2(handle_fd, err_fd) < 0)
|
||||
{
|
||||
stream_fd= _fileno(outstream);
|
||||
if (_dup2(handle_fd, stream_fd) < 0)
|
||||
{
|
||||
CloseHandle(osfh);
|
||||
return TRUE;
|
||||
}
|
||||
CloseHandle(osfh);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (errstream)
|
||||
if (outstream && _dup2(handle_fd, out_fd) < 0)
|
||||
{
|
||||
stream_fd= _fileno(errstream);
|
||||
if (_dup2(handle_fd, stream_fd) < 0)
|
||||
{
|
||||
CloseHandle(osfh);
|
||||
return TRUE;
|
||||
}
|
||||
CloseHandle(osfh);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
_close(handle_fd);
|
||||
|
|
|
@ -396,8 +396,8 @@ public:
|
|||
|
||||
bool write(Log_event* event_info); // binary log write
|
||||
bool write(THD *thd, IO_CACHE *cache, Log_event *commit_event, bool incident);
|
||||
|
||||
bool write_incident(THD *thd, bool lock);
|
||||
|
||||
int write_cache(IO_CACHE *cache, bool lock_log, bool flush_and_sync);
|
||||
void set_write_error(THD *thd);
|
||||
bool check_write_error(THD *thd);
|
||||
|
|
34
sql/mdl.cc
34
sql/mdl.cc
|
@ -124,7 +124,6 @@ public:
|
|||
Deadlock_detection_visitor(MDL_context *start_node_arg)
|
||||
: m_start_node(start_node_arg),
|
||||
m_victim(NULL),
|
||||
m_current_search_depth(0),
|
||||
m_found_deadlock(FALSE)
|
||||
{}
|
||||
virtual bool enter_node(MDL_context *node);
|
||||
|
@ -133,6 +132,8 @@ public:
|
|||
virtual bool inspect_edge(MDL_context *dest);
|
||||
|
||||
MDL_context *get_victim() const { return m_victim; }
|
||||
|
||||
void abort_traversal(MDL_context *node);
|
||||
private:
|
||||
/**
|
||||
Change the deadlock victim to a new one if it has lower deadlock
|
||||
|
@ -147,13 +148,6 @@ private:
|
|||
MDL_context *m_start_node;
|
||||
/** If a deadlock is found, the context that identifies the victim. */
|
||||
MDL_context *m_victim;
|
||||
/** Set to the 0 at start. Increased whenever
|
||||
we descend into another MDL context (aka traverse to the next
|
||||
wait-for graph node). When MAX_SEARCH_DEPTH is reached, we
|
||||
assume that a deadlock is found, even if we have not found a
|
||||
loop.
|
||||
*/
|
||||
uint m_current_search_depth;
|
||||
/** TRUE if we found a deadlock. */
|
||||
bool m_found_deadlock;
|
||||
/**
|
||||
|
@ -187,7 +181,7 @@ private:
|
|||
|
||||
bool Deadlock_detection_visitor::enter_node(MDL_context *node)
|
||||
{
|
||||
m_found_deadlock= ++m_current_search_depth >= MAX_SEARCH_DEPTH;
|
||||
m_found_deadlock= m_current_search_depth >= MAX_SEARCH_DEPTH;
|
||||
if (m_found_deadlock)
|
||||
{
|
||||
DBUG_ASSERT(! m_victim);
|
||||
|
@ -207,7 +201,6 @@ bool Deadlock_detection_visitor::enter_node(MDL_context *node)
|
|||
|
||||
void Deadlock_detection_visitor::leave_node(MDL_context *node)
|
||||
{
|
||||
--m_current_search_depth;
|
||||
if (m_found_deadlock)
|
||||
opt_change_victim_to(node);
|
||||
}
|
||||
|
@ -251,6 +244,21 @@ Deadlock_detection_visitor::opt_change_victim_to(MDL_context *new_victim)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
Abort traversal of a wait-for graph and report a deadlock.
|
||||
|
||||
@param node Node which we were about to visit when abort
|
||||
was initiated.
|
||||
*/
|
||||
|
||||
void Deadlock_detection_visitor::abort_traversal(MDL_context *node)
|
||||
{
|
||||
DBUG_ASSERT(! m_victim);
|
||||
m_found_deadlock= TRUE;
|
||||
opt_change_victim_to(node);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Get a bit corresponding to enum_mdl_type value in a granted/waiting bitmaps
|
||||
and compatibility matrices.
|
||||
|
@ -2056,8 +2064,13 @@ bool MDL_lock::visit_subgraph(MDL_ticket *waiting_ticket,
|
|||
are visiting it but this is OK: in the worst case we might do some
|
||||
extra work and one more context might be chosen as a victim.
|
||||
*/
|
||||
++gvisitor->m_current_search_depth;
|
||||
|
||||
if (gvisitor->enter_node(src_ctx))
|
||||
{
|
||||
--gvisitor->m_current_search_depth;
|
||||
goto end;
|
||||
}
|
||||
|
||||
/*
|
||||
We do a breadth-first search first -- that is, inspect all
|
||||
|
@ -2114,6 +2127,7 @@ bool MDL_lock::visit_subgraph(MDL_ticket *waiting_ticket,
|
|||
|
||||
end_leave_node:
|
||||
gvisitor->leave_node(src_ctx);
|
||||
--gvisitor->m_current_search_depth;
|
||||
|
||||
end:
|
||||
mysql_prlock_unlock(&m_rwlock);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue