mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Auto-merge from mysql-5.5-merge.
This commit is contained in:
commit
2a778dcdb9
76 changed files with 1748 additions and 643 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)
|
||||
|
|
|
@ -5542,6 +5542,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");
|
||||
|
@ -5613,9 +5615,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:
|
||||
|
|
|
@ -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"
|
||||
])
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1057,6 +1057,13 @@ NULL
|
|||
SELECT Polygon(12345123,'');
|
||||
Polygon(12345123,'')
|
||||
NULL
|
||||
#
|
||||
# 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)
|
||||
#
|
||||
|
|
|
@ -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.
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2653,3 +2653,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;
|
||||
|
|
|
@ -830,3 +830,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-
|
||||
|
||||
|
|
|
@ -725,6 +725,16 @@ SELECT Polygon(123451,'');
|
|||
SELECT Polygon(1234512,'');
|
||||
SELECT Polygon(12345123,'');
|
||||
|
||||
|
||||
--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);
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
#
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
@ -163,7 +163,6 @@ int handle_options(int *argc, char ***argv,
|
|||
int error, i;
|
||||
my_bool is_cmdline_arg= 1;
|
||||
|
||||
LINT_INIT(opt_found);
|
||||
/* handle_options() assumes arg0 (program name) always exists */
|
||||
DBUG_ASSERT(argc && *argc >= 1);
|
||||
DBUG_ASSERT(argv && *argv);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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(),
|
||||
|
@ -5452,10 +5456,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 |
|
||||
|
@ -5471,24 +5497,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);
|
||||
|
|
|
@ -164,7 +164,17 @@ my_bool net_realloc(NET *net, size_t length)
|
|||
DBUG_ENTER("net_realloc");
|
||||
DBUG_PRINT("enter",("length: %lu", (ulong) length));
|
||||
|
||||
if (length >= net->max_packet_size)
|
||||
/*
|
||||
When compression is off, net->where_b is always 0.
|
||||
With compression turned on, net->where_b may indicate
|
||||
that we still have a piece of the previous logical
|
||||
packet in the buffer, unprocessed. Take it into account
|
||||
when checking that max_allowed_packet is not exceeded.
|
||||
This ensures that the client treats max_allowed_packet
|
||||
limit identically, regardless of compression being on
|
||||
or off.
|
||||
*/
|
||||
if (length >= (net->max_packet_size + net->where_b))
|
||||
{
|
||||
DBUG_PRINT("error", ("Packet too large. Max size: %lu",
|
||||
net->max_packet_size));
|
||||
|
|
|
@ -8550,9 +8550,14 @@ int QUICK_RANGE_SELECT::reset()
|
|||
in_range= FALSE;
|
||||
cur_range= (QUICK_RANGE**) ranges.buffer;
|
||||
|
||||
if (file->inited == handler::NONE && (error= file->ha_index_init(index,1)))
|
||||
DBUG_RETURN(error);
|
||||
|
||||
if (file->inited == handler::NONE)
|
||||
{
|
||||
if (in_ror_merged_scan)
|
||||
head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap);
|
||||
if ((error= file->ha_index_init(index,1)))
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
/* Do not allocate the buffers twice. */
|
||||
if (multi_range_length)
|
||||
{
|
||||
|
|
|
@ -511,7 +511,7 @@ uint Gis_line_string::init_from_wkb(const char *wkb, uint len,
|
|||
n_points= wkb_get_uint(wkb, bo);
|
||||
proper_length= 4 + n_points * POINT_DATA_SIZE;
|
||||
|
||||
if (len < proper_length || res->reserve(proper_length))
|
||||
if (!n_points || len < proper_length || res->reserve(proper_length))
|
||||
return 0;
|
||||
|
||||
res->q_append(n_points);
|
||||
|
@ -729,7 +729,9 @@ uint Gis_polygon::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
|
|||
if (len < 4)
|
||||
return 0;
|
||||
|
||||
n_linear_rings= wkb_get_uint(wkb, bo);
|
||||
if (!(n_linear_rings= wkb_get_uint(wkb, bo)))
|
||||
return 0;
|
||||
|
||||
if (res->reserve(4, 512))
|
||||
return 0;
|
||||
wkb+= 4;
|
||||
|
|
|
@ -104,9 +104,10 @@ mysql_mutex_t LOCK_dd_owns_lock_open;
|
|||
uint dd_owns_lock_open= 0;
|
||||
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
static PSI_mutex_key key_LOCK_open;
|
||||
static PSI_mutex_key key_LOCK_open, key_LOCK_dd_owns_lock_open;
|
||||
static PSI_mutex_info all_tdc_mutexes[]= {
|
||||
{ &key_LOCK_open, "LOCK_open", PSI_FLAG_GLOBAL }
|
||||
{ &key_LOCK_open, "LOCK_open", PSI_FLAG_GLOBAL },
|
||||
{ &key_LOCK_dd_owns_lock_open, "LOCK_dd_owns_lock_open", PSI_FLAG_GLOBAL }
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -300,7 +301,8 @@ bool table_def_init(void)
|
|||
init_tdc_psi_keys();
|
||||
#endif
|
||||
mysql_mutex_init(key_LOCK_open, &LOCK_open, MY_MUTEX_INIT_FAST);
|
||||
mysql_mutex_init(NULL, &LOCK_dd_owns_lock_open, MY_MUTEX_INIT_FAST);
|
||||
mysql_mutex_init(key_LOCK_dd_owns_lock_open, &LOCK_dd_owns_lock_open,
|
||||
MY_MUTEX_INIT_FAST);
|
||||
oldest_unused_share= &end_of_unused_share;
|
||||
end_of_unused_share.prev= &oldest_unused_share;
|
||||
|
||||
|
|
|
@ -1346,6 +1346,57 @@ end:
|
|||
}
|
||||
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
/**
|
||||
Send a single memory block from the query cache.
|
||||
|
||||
Respects the client/server protocol limits for the
|
||||
size of the network packet, and splits a large block
|
||||
in pieces to ensure that individual piece doesn't exceed
|
||||
the maximal allowed size of the network packet (16M).
|
||||
|
||||
@param[in] net NET handler
|
||||
@param[in] packet packet to send
|
||||
@param[in] len packet length
|
||||
|
||||
@return Operation status
|
||||
@retval FALSE On success
|
||||
@retval TRUE On error
|
||||
*/
|
||||
static bool
|
||||
send_data_in_chunks(NET *net, const uchar *packet, ulong len)
|
||||
{
|
||||
/*
|
||||
On the client we may require more memory than max_allowed_packet
|
||||
to keep, both, the truncated last logical packet, and the
|
||||
compressed next packet. This never (or in practice never)
|
||||
happens without compression, since without compression it's very
|
||||
unlikely that a) a truncated logical packet would remain on the
|
||||
client when it's time to read the next packet b) a subsequent
|
||||
logical packet that is being read would be so large that
|
||||
size-of-new-packet + size-of-old-packet-tail >
|
||||
max_allowed_packet. To remedy this issue, we send data in 1MB
|
||||
sized packets, that's below the current client default of 16MB
|
||||
for max_allowed_packet, but large enough to ensure there is no
|
||||
unnecessary overhead from too many syscalls per result set.
|
||||
*/
|
||||
static const ulong MAX_CHUNK_LENGTH= 1024*1024;
|
||||
|
||||
while (len > MAX_CHUNK_LENGTH)
|
||||
{
|
||||
if (net_real_write(net, packet, MAX_CHUNK_LENGTH))
|
||||
return TRUE;
|
||||
packet+= MAX_CHUNK_LENGTH;
|
||||
len-= MAX_CHUNK_LENGTH;
|
||||
}
|
||||
if (len && net_real_write(net, packet, len))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
Check if the query is in the cache. If it was cached, send it
|
||||
to the user.
|
||||
|
@ -1655,11 +1706,11 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
|||
ALIGN_SIZE(sizeof(Query_cache_result)))));
|
||||
|
||||
Query_cache_result *result = result_block->result();
|
||||
if (net_real_write(&thd->net, result->data(),
|
||||
result_block->used -
|
||||
result_block->headers_len() -
|
||||
ALIGN_SIZE(sizeof(Query_cache_result))))
|
||||
break; // Client aborted
|
||||
if (send_data_in_chunks(&thd->net, result->data(),
|
||||
result_block->used -
|
||||
result_block->headers_len() -
|
||||
ALIGN_SIZE(sizeof(Query_cache_result))))
|
||||
break; // Client aborted
|
||||
result_block = result_block->next;
|
||||
thd->net.pkt_nr= query->last_pkt_nr; // Keep packet number updated
|
||||
} while (result_block != first_result_block);
|
||||
|
|
|
@ -1522,6 +1522,15 @@ JOIN::optimize()
|
|||
}
|
||||
if (order)
|
||||
{
|
||||
/*
|
||||
Do we need a temporary table due to the ORDER BY not being equal to
|
||||
the GROUP BY? The call to test_if_skip_sort_order above tests for the
|
||||
GROUP BY clause only and hence is not valid in this case. So the
|
||||
estimated number of rows to be read from the first table is not valid.
|
||||
We clear it here so that it doesn't show up in EXPLAIN.
|
||||
*/
|
||||
if (need_tmp && (select_options & SELECT_DESCRIBE) != 0)
|
||||
join_tab[const_tables].limit= 0;
|
||||
/*
|
||||
Force using of tmp table if sorting by a SP or UDF function due to
|
||||
their expensive and probably non-deterministic nature.
|
||||
|
@ -16696,7 +16705,15 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
|
|||
if (tab->select && tab->select->quick)
|
||||
examined_rows= tab->select->quick->records;
|
||||
else if (tab->type == JT_NEXT || tab->type == JT_ALL)
|
||||
examined_rows= tab->limit ? tab->limit : tab->table->file->records();
|
||||
{
|
||||
if (tab->limit)
|
||||
examined_rows= tab->limit;
|
||||
else
|
||||
{
|
||||
tab->table->file->info(HA_STATUS_VARIABLE);
|
||||
examined_rows= tab->table->file->stats.records;
|
||||
}
|
||||
}
|
||||
else
|
||||
examined_rows=(ha_rows)join->best_positions[i].records_read;
|
||||
|
||||
|
|
|
@ -3536,6 +3536,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||
key_part_info->length=(uint16) length;
|
||||
/* Use packed keys for long strings on the first column */
|
||||
if (!((*db_options) & HA_OPTION_NO_PACK_KEYS) &&
|
||||
!((create_info->table_options & HA_OPTION_NO_PACK_KEYS)) &&
|
||||
(length >= KEY_DEFAULT_PACK_LENGTH &&
|
||||
(sql_field->sql_type == MYSQL_TYPE_STRING ||
|
||||
sql_field->sql_type == MYSQL_TYPE_VARCHAR ||
|
||||
|
|
|
@ -2006,6 +2006,7 @@ bool Table_triggers_list::process_triggers(THD *thd,
|
|||
bool err_status;
|
||||
Sub_statement_state statement_state;
|
||||
sp_head *sp_trigger= bodies[event][time_type];
|
||||
SELECT_LEX *save_current_select;
|
||||
|
||||
if (sp_trigger == NULL)
|
||||
return FALSE;
|
||||
|
@ -2029,11 +2030,19 @@ bool Table_triggers_list::process_triggers(THD *thd,
|
|||
|
||||
thd->reset_sub_statement_state(&statement_state, SUB_STMT_TRIGGER);
|
||||
|
||||
/*
|
||||
Reset current_select before call execute_trigger() and
|
||||
restore it after return from one. This way error is set
|
||||
in case of failure during trigger execution.
|
||||
*/
|
||||
save_current_select= thd->lex->current_select;
|
||||
thd->lex->current_select= NULL;
|
||||
err_status=
|
||||
sp_trigger->execute_trigger(thd,
|
||||
&trigger_table->s->db,
|
||||
&trigger_table->s->table_name,
|
||||
&subject_table_grants[event][time_type]);
|
||||
thd->lex->current_select= save_current_select;
|
||||
|
||||
thd->restore_sub_statement_state(&statement_state);
|
||||
|
||||
|
|
|
@ -193,12 +193,11 @@ static double _mi_search_pos(register MI_INFO *info,
|
|||
register my_off_t pos)
|
||||
{
|
||||
int flag;
|
||||
uint nod_flag,keynr,max_keynr;
|
||||
uint nod_flag,keynr,UNINIT_VAR(max_keynr);
|
||||
my_bool after_key;
|
||||
uchar *keypos,*buff;
|
||||
double offset;
|
||||
DBUG_ENTER("_mi_search_pos");
|
||||
LINT_INIT(max_keynr);
|
||||
|
||||
if (pos == HA_OFFSET_ERROR)
|
||||
DBUG_RETURN(0.5);
|
||||
|
|
|
@ -296,9 +296,9 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
|
|||
flag is the value returned by ha_key_cmp and as treated as final
|
||||
*/
|
||||
int flag=0, my_flag=-1;
|
||||
uint nod_flag, length, len, matched, cmplen, kseg_len;
|
||||
uint prefix_len,suffix_len;
|
||||
int key_len_skip, seg_len_pack, key_len_left;
|
||||
uint nod_flag, UNINIT_VAR(length), len, matched, cmplen, kseg_len;
|
||||
uint UNINIT_VAR(prefix_len), suffix_len;
|
||||
int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left;
|
||||
uchar *end, *kseg, *vseg;
|
||||
uchar *sort_order=keyinfo->seg->charset->sort_order;
|
||||
uchar tt_buff[MI_MAX_KEY_BUFF+2], *t_buff=tt_buff+2;
|
||||
|
@ -308,10 +308,6 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
|
|||
uint length_pack;
|
||||
DBUG_ENTER("_mi_prefix_search");
|
||||
|
||||
LINT_INIT(length);
|
||||
LINT_INIT(prefix_len);
|
||||
LINT_INIT(seg_len_pack);
|
||||
|
||||
t_buff[0]=0; /* Avoid bugs */
|
||||
end= page+mi_getint(page);
|
||||
nod_flag=mi_test_if_nod(page);
|
||||
|
|
|
@ -481,17 +481,13 @@ static uchar *rtree_pick_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
|
|||
uint key_length, uchar *page_buf, uint nod_flag)
|
||||
{
|
||||
double increase;
|
||||
double best_incr;
|
||||
double UNINIT_VAR(best_incr);
|
||||
double area;
|
||||
double best_area;
|
||||
double UNINIT_VAR(best_area);
|
||||
uchar *best_key= NULL;
|
||||
uchar *k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
|
||||
uchar *last = rt_PAGE_END(page_buf);
|
||||
|
||||
LINT_INIT(best_area);
|
||||
LINT_INIT(best_key);
|
||||
LINT_INIT(best_incr);
|
||||
|
||||
for (; k < last; k = rt_PAGE_NEXT_KEY(k, key_length, nod_flag))
|
||||
{
|
||||
/* The following is safe as -1.0 is an exact number */
|
||||
|
|
|
@ -178,18 +178,13 @@ static int split_rtree_node(SplitStruct *node, int n_entries,
|
|||
double **d_buffer, int n_dim)
|
||||
{
|
||||
SplitStruct *cur;
|
||||
SplitStruct *a;
|
||||
SplitStruct *b;
|
||||
SplitStruct *UNINIT_VAR(a), *UNINIT_VAR(b);
|
||||
double *g1 = reserve_coords(d_buffer, n_dim);
|
||||
double *g2 = reserve_coords(d_buffer, n_dim);
|
||||
SplitStruct *next;
|
||||
int next_node;
|
||||
SplitStruct *UNINIT_VAR(next);
|
||||
int UNINIT_VAR(next_node);
|
||||
int i;
|
||||
SplitStruct *end = node + n_entries;
|
||||
LINT_INIT(a);
|
||||
LINT_INIT(b);
|
||||
LINT_INIT(next);
|
||||
LINT_INIT(next_node);
|
||||
|
||||
if (all_size < min_size * 2)
|
||||
{
|
||||
|
|
|
@ -18937,6 +18937,107 @@ static void test_bug54041()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
Bug#47485: mysql_store_result returns a result set for a prepared statement
|
||||
*/
|
||||
static void test_bug47485()
|
||||
{
|
||||
MYSQL_STMT *stmt;
|
||||
MYSQL_RES *res;
|
||||
MYSQL_BIND bind[2];
|
||||
int rc;
|
||||
const char* sql_select = "SELECT 1, 'a'";
|
||||
int int_data;
|
||||
char str_data[16];
|
||||
my_bool is_null[2];
|
||||
my_bool error[2];
|
||||
unsigned long length[2];
|
||||
|
||||
DBUG_ENTER("test_bug47485");
|
||||
myheader("test_bug47485");
|
||||
|
||||
stmt= mysql_stmt_init(mysql);
|
||||
check_stmt(stmt);
|
||||
rc= mysql_stmt_prepare(stmt, sql_select, strlen(sql_select));
|
||||
check_execute(stmt, rc);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
res = mysql_store_result(mysql);
|
||||
DIE_UNLESS(res == NULL);
|
||||
|
||||
mysql_stmt_reset(stmt);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
res = mysql_use_result(mysql);
|
||||
DIE_UNLESS(res == NULL);
|
||||
|
||||
mysql_stmt_reset(stmt);
|
||||
|
||||
memset(bind, 0, sizeof(bind));
|
||||
bind[0].buffer_type= MYSQL_TYPE_LONG;
|
||||
bind[0].buffer= (char *)&int_data;
|
||||
bind[0].is_null= &is_null[0];
|
||||
bind[0].length= &length[0];
|
||||
bind[0].error= &error[0];
|
||||
|
||||
bind[1].buffer_type= MYSQL_TYPE_STRING;
|
||||
bind[1].buffer= (char *)str_data;
|
||||
bind[1].buffer_length= sizeof(str_data);
|
||||
bind[1].is_null= &is_null[1];
|
||||
bind[1].length= &length[1];
|
||||
bind[1].error= &error[1];
|
||||
|
||||
rc= mysql_stmt_bind_result(stmt, bind);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
rc= mysql_stmt_store_result(stmt);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
while (!(rc= mysql_stmt_fetch(stmt)))
|
||||
;
|
||||
|
||||
DIE_UNLESS(rc == MYSQL_NO_DATA);
|
||||
|
||||
mysql_stmt_reset(stmt);
|
||||
|
||||
memset(bind, 0, sizeof(bind));
|
||||
bind[0].buffer_type= MYSQL_TYPE_LONG;
|
||||
bind[0].buffer= (char *)&int_data;
|
||||
bind[0].is_null= &is_null[0];
|
||||
bind[0].length= &length[0];
|
||||
bind[0].error= &error[0];
|
||||
|
||||
bind[1].buffer_type= MYSQL_TYPE_STRING;
|
||||
bind[1].buffer= (char *)str_data;
|
||||
bind[1].buffer_length= sizeof(str_data);
|
||||
bind[1].is_null= &is_null[1];
|
||||
bind[1].length= &length[1];
|
||||
bind[1].error= &error[1];
|
||||
|
||||
rc= mysql_stmt_bind_result(stmt, bind);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
while (!(rc= mysql_stmt_fetch(stmt)))
|
||||
;
|
||||
|
||||
DIE_UNLESS(rc == MYSQL_NO_DATA);
|
||||
|
||||
mysql_stmt_close(stmt);
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Bug#49972: Crash in prepared statements.
|
||||
|
||||
|
@ -19378,6 +19479,7 @@ static struct my_tests_st my_tests[]= {
|
|||
{ "test_bug49972", test_bug49972 },
|
||||
{ "test_bug42373", test_bug42373 },
|
||||
{ "test_bug54041", test_bug54041 },
|
||||
{ "test_bug47485", test_bug47485 },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue