Merge branch 'github/10.3' into bb-10.3-temporal

This commit is contained in:
Sergei Golubchik 2018-01-17 00:45:02 +01:00
commit 8f102b584d
186 changed files with 3130 additions and 1853 deletions

View File

@ -97,7 +97,7 @@ shell>cd ../build
shell>cmake ../src
Note: if a directory was used for in-source build, out-of-source will
not work. To reenable out-of-source build, remove <source-root>/CMakeCache.txt
not work. To re-enable out-of-source build, remove <source-root>/CMakeCache.txt
file.

View File

@ -32,15 +32,19 @@ then
configure="$configure --verbose"
fi
commands=""
# git clean -fdX removes all ignored (build) files
commands="\
if test -d .git
then
commands="\
git clean -fdX
cd ./libmariadb
git submodule update
cd ../storage/rocksdb/rocksdb
git submodule update
cd ../../..
cd ../../.."
fi
commands="$commands
path=`dirname $0`
. \"$path/autorun.sh\""

View File

@ -40,6 +40,12 @@ check_compiler_cpu_flags () {
cc_major=$1
cc_minor=$2
cc_patch=$3
if test -z "$cc_minor"; then
cc_minor="0";
fi
if test -z "$cc_patch"; then
cc_minor="0";
fi
cc_comp=`expr $cc_major '*' 100 '+' $cc_minor`
fi

View File

@ -0,0 +1,24 @@
#! /bin/sh
# Copyright (c) 2018, MariaDB Corporation.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
export LDFLAGS="-ldl"
. "$path/FINISH.sh"

View File

@ -323,7 +323,7 @@
One "obvious" solution would be to simply push "mysql.proc" to the list
of tables used by the query, but this implies a "join" with this table
if the query is a select, so it doesn't work (and we can't exclude this
table easily; since a priviledged used might in fact want to search
table easily; since a privileged used might in fact want to search
the proc table).
Another solution would of course be to allow the opening and closing
of the mysql.proc table during a query execution, but this it not
@ -400,7 +400,7 @@
instruction.
Calling and returning from a CONTINUE handler poses some special
problems. Since we need to return to the point after its invokation,
problems. Since we need to return to the point after its invocation,
we push the return location on a stack in the sp_rcontext (this is
done by the exectution loop). The handler then ends with a special
instruction, sp_instr_hreturn, which returns to this location.

View File

@ -201,7 +201,7 @@ ALTERNATIVE_NAME("server" "mysql-server")
ALTERNATIVE_NAME("test" "mysql-test")
# Argh! Different distributions call packages differently, to be a drop-in
# replacement we have to fake distribution-speficic dependencies
# replacement we have to fake distribution-specificic dependencies
IF(RPM MATCHES "(rhel|centos)6")
ALTERNATIVE_NAME("client" "mysql")

View File

@ -176,7 +176,7 @@ SET(INSTALL_SYSCONF2DIR_DEB "/etc/mysql/conf.d")
SET(INSTALL_LIBDIR_DEB "lib")
SET(INSTALL_PLUGINDIR_DEB "lib/mysql/plugin")
#
SET(INSTALL_INCLUDEDIR_DEB "include/mysql")
SET(INSTALL_INCLUDEDIR_DEB "include/mariadb")
#
SET(INSTALL_DOCDIR_DEB "share/doc")
SET(INSTALL_DOCREADMEDIR_DEB "share/doc")

View File

@ -142,6 +142,11 @@ IF(MSVC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /we4700 /we4311 /we4477 /we4302 /we4090 /wd4267 ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099 /we4700 /we4311 /we4477 /we4302 /we4090 /wd4267")
IF(MYSQL_MAINTAINER_MODE MATCHES "ERR")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
ENDIF()
ENDIF()
# Always link with socket library

View File

@ -488,7 +488,7 @@ int main() {
#
# Test for endianess
# Test for endianness
#
INCLUDE(TestBigEndian)
IF(APPLE)

View File

@ -33,7 +33,7 @@ fi
# Look up distro-version specific stuff
#
# Always keep the actual packaging as up-to-date as possible following the latest
# Debian policy and targetting Debian Sid. Then case-by-case run in autobake-deb.sh
# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh
# tests for backwards compatibility and strip away parts on older builders.
# If iproute2 is not available (before Debian Jessie and Ubuntu Trusty)
@ -82,11 +82,20 @@ if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]] || [[ $TRAVIS ]]
then
sed '/Package: mariadb-plugin-rocksdb/,+13d' -i debian/control
fi
# AWS SDK requires c++11 -capable compiler
# Minimal supported versions are g++ 4.8 and clang 3.3.
if [[ $GCCVERSION -lt 40800 ]] || [[ $TRAVIS ]]
then
sed '/Package: mariadb-plugin-aws-key-management-10.3/,+15d' -i debian/control
sed '/Package: mariadb-plugin-aws-key-management/,+14d' -i debian/control
fi
# Mroonga, TokuDB never built on Travis CI anyway, see build flags above
if [[ $TRAVIS ]]
then
sed -i -e "/Package: mariadb-plugin-tokudb/,+17d" debian/control
sed -i -e "/Package: mariadb-plugin-mroonga/,+16d" debian/control
fi
# Adjust changelog, add new version
echo "Incrementing changelog and starting build scripts"
@ -102,12 +111,20 @@ dch -b -D ${CODENAME} -v "${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automatic build
echo "Creating package version ${UPSTREAM}${PATCHLEVEL}~${CODENAME} ... "
# On Travis CI, use -b to build binary only packages as there is no need to
# waste time on generating the source package.
if [[ $TRAVIS ]]
then
BUILDPACKAGE_FLAGS="-b"
fi
# Build the package
# Pass -I so that .git and other unnecessary temporary and source control files
# will be ignored by dpkg-source when creating the tar.gz source package.
# Use -b to build binary only packages as there is no need to waste time on
# generating the source package.
fakeroot dpkg-buildpackage -us -uc -I -b
fakeroot dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS
# If the step above fails due to missing dependencies, you can manually run
# sudo mk-build-deps debian/control -r -i
# Don't log package contents on Travis-CI to save time and log size
if [[ ! $TRAVIS ]]

206
debian/control vendored
View File

@ -13,17 +13,17 @@ Build-Depends: bison,
libaio-dev [linux-any],
libboost-dev,
libcrack2-dev (>= 2.9.0),
libcurl3-dev,
libjemalloc-dev (>= 3.0.0~) [linux-any],
libjudy-dev,
libkrb5-dev,
libcurl3-dev,
libncurses5-dev (>= 5.0-6~),
libnuma-dev,
libpam0g-dev,
libpcre3-dev (>= 2:8.35-3.2~),
libreadline-gplv2-dev,
libssl-dev | libssl1.0-dev,
libsnappy-dev,
libssl-dev | libssl1.0-dev,
libsystemd-dev,
libxml2-dev,
lsb-release,
@ -38,22 +38,71 @@ Homepage: http://mariadb.org/
Vcs-Git: https://github.com/MariaDB/server.git
Vcs-Browser: https://github.com/MariaDB/server/
Package: libmariadb-dev
Architecture: any
Section: libdevel
Depends: libmariadb3 (= ${binary:Version}),
zlib1g-dev,
${misc:Depends},
${shlibs:Depends}
Breaks: libmariadbclient-dev
Replaces: libmariadbclient-dev
Conflicts: libmariadbclient16-dev
Provides: libmariadbclient-dev
Description: MariaDB database development files
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This package includes development libraries and header files. To allow sources
expecting the MariaDB Connector/C to build. Sources that expect the MySQL
Client libraries should use files from the libmariadb-dev-compat package.
Package: libmariadb-dev-compat
Architecture: any
Multi-Arch: same
Section: libdevel
Priority: extra
Depends: libmariadb-dev (= ${binary:Version}),
${misc:Depends}
Conflicts: libmariadb-client-lgpl-dev-compat,
libmariadbclient-dev-compat,
libmysqlclient-dev,
libmysqlclient10-dev,
libmysqlclient12-dev,
libmysqlclient14-dev,
libmysqlclient15-dev,
libmysqlclient16-dev
Provides: libmariadb-client-lgpl-dev-compat,
libmariadbclient-dev-compat,
libmysqlclient-dev
Replaces: libmariadb-client-lgpl-dev-compat,
libmariadbclient-dev-compat,
libmysqlclient-dev
Description: MariaDB Connector/C, compatibility symlinks
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This package includes compatibility symlinks to allow sources expecting the
MySQL client libraries to be built against MariaDB Connector/C.
Package: libmariadb3
Architecture: any
Section: libs
Depends: mariadb-common, ${misc:Depends}, ${shlibs:Depends}
Conflicts: mariadb-galera-server-10.0 (<< 10.0.5),
Depends: mariadb-common,
${misc:Depends},
${shlibs:Depends}
Conflicts: libmariadbclient18 (<< 10.2.0),
mariadb-galera-server-10.0 (<< 10.0.5),
mariadb-galera-server-5.5 (<< 5.5.33),
mariadb-server-10.0 (<< 10.0.5),
mariadb-server-5.1,
mariadb-server-5.2,
mariadb-server-5.3,
mariadb-server-5.5 (<< 5.5.33),
libmariadbclient18 (<< 10.2.0)
Replaces: libmysqlclient19,
libmysqlclient20
Provides: libmysqlclient19,
libmysqlclient20
mariadb-server-5.5 (<< 5.5.33)
Description: MariaDB database client library
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@ -62,62 +111,84 @@ Description: MariaDB database client library
.
This package includes the client library.
Package: libmariadbclient18
Section: libs
Package: libmariadb3-compat
Architecture: any
Depends: libmariadb3 (= ${binary:Version}), ${misc:Depends}
Replaces: libmariadbclient18
Provides: libmariadbclient18
Description: Virtual package to satisfy external depends
Section: libs
Depends: libmariadb3,
mariadb-common,
${misc:Depends},
${shlibs:Depends}
Breaks: libmysqlclient19,
libmysqlclient20
Replaces: libmysqlclient19,
libmysqlclient20
Provides: libmysqlclient19,
libmysqlclient20
Description: MariaDB database client library MySQL compat package
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This package provides compatibility symlinks for libmariadb3
This package includes the client runtime libraries that simulate and replace
the equivalents found in MySQL 5.6 and 5.7 (mysqlclient19 and 20).
Package: libmariadbclient18
Section: libs
Architecture: any
Depends: libmariadb3 (= ${binary:Version}),
${misc:Depends}
Replaces: libmariadbclient18
Provides: libmariadbclient18
Description: Virtual package to satisfy external libmariadbclient18 depends
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This package provides compatibility symlinks for binaries that expect to find
libmariadbclient.so.18 will automatically use libmariadb.so.3 instead.
Package: libmysqlclient18
Section: libs
Architecture: any
Depends: libmariadb3 (= ${binary:Version}), ${misc:Depends}
Depends: libmariadb3 (= ${binary:Version}),
${misc:Depends}
Replaces: libmysqlclient18
Provides: libmysqlclient18
Description: Virtual package to satisfy external depends
Description: Virtual package to satisfy external libmysqlclient18 depends
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This package provides compatibility symlinks for libmariadb3
This package provides compatibility symlinks for binaries that expect to find
libmysqlclient.so.18 will automatically use libmariadb.so.3 instead.
Package: libmariadb-dev
Package: libmariadbd-dev
Architecture: any
Section: libdevel
Depends: libmariadb3 (= ${binary:Version}),
zlib1g-dev,
Provides: libmysqld-dev
Pre-Depends: ${misc:Pre-Depends}
Depends: libmariadb-dev (= ${binary:Version}),
libmariadbd19 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: libmariadbclient-dev, libmysqlclient-dev
Replaces: libmariadbclient-dev, libmysqlclient-dev
Conflicts: libmariadbclient16-dev,
libmysqlclient10-dev,
libmysqlclient12-dev,
libmysqlclient14-dev,
libmysqlclient15-dev,
libmysqlclient16-dev
Provides: libmariadbclient-dev, libmariadbclient-dev-compat, libmysqlclient-dev
Description: MariaDB database development files
Breaks: libmysqld-dev
Replaces: libmysqld-dev
Description: MariaDB embedded database, development files
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This package includes development libraries and header files.
This package includes the embedded server library development and header files.
Package: libmariadbd19
Architecture: any
Section: libs
Depends: ${misc:Depends}, ${shlibs:Depends}
Depends: ${misc:Depends},
${shlibs:Depends}
Multi-Arch: same
Breaks: libmariadbd-dev (<< ${source:Version})
Replaces: libmariadbd-dev (<< ${source:Version})
@ -129,28 +200,10 @@ Description: MariaDB embedded database, shared library
.
This package includes a shared library for embedded MariaDB applications
Package: libmariadbd-dev
Architecture: any
Section: libdevel
Provides: libmysqld-dev
Pre-Depends: ${misc:Pre-Depends}
Depends: libmariadb-dev (= ${binary:Version}),
libmariadbd19 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: libmysqld-dev
Replaces: libmysqld-dev
Description: MariaDB embedded database, development files
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This package includes the embedded server library development and header files.
Package: mysql-common
Architecture: all
Depends: ${misc:Depends}, ${shlibs:Depends}
Depends: ${misc:Depends},
${shlibs:Depends}
Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@ -162,7 +215,9 @@ Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
Package: mariadb-common
Architecture: all
Depends: mysql-common, ${misc:Depends}, ${shlibs:Depends}
Depends: mysql-common,
${misc:Depends},
${shlibs:Depends}
Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@ -284,7 +339,9 @@ Provides: default-mysql-client,
mysql-client-5.6,
mysql-client-5.7,
virtual-mysql-client
Recommends: libdbd-mysql-perl (>= 1.2202), libdbi-perl, libterm-readkey-perl
Recommends: libdbd-mysql-perl (>= 1.2202),
libdbi-perl,
libterm-readkey-perl
Description: MariaDB database client binaries
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@ -353,9 +410,14 @@ Description: MariaDB database core server files
Package: mariadb-server-10.3
Architecture: any
Suggests: mailx, mariadb-test, netcat-openbsd, tinyca
Suggests: mailx,
mariadb-test,
netcat-openbsd,
tinyca
Recommends: libhtml-template-perl
Pre-Depends: adduser (>= 3.40), debconf, mariadb-common (>= ${source:Version})
Pre-Depends: adduser (>= 3.40),
debconf,
mariadb-common (>= ${source:Version})
Depends: bsdutils,
coreutils,
findutils,
@ -416,7 +478,8 @@ Replaces: libmariadbclient-dev (<< 5.5.0),
mysql-server-5.6,
mysql-server-5.7,
virtual-mysql-server
Provides: default-mysql-server, virtual-mysql-server
Provides: default-mysql-server,
virtual-mysql-server
Description: MariaDB database server binaries
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@ -427,7 +490,8 @@ Description: MariaDB database server binaries
Package: mariadb-server
Architecture: all
Depends: mariadb-server-10.3 (>= ${source:Version}), ${misc:Depends}
Depends: mariadb-server-10.3 (>= ${source:Version}),
${misc:Depends}
Description: MariaDB database server (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of
mariadb-server (currently mariadb-server-10.3), as determined by the MariaDB
@ -442,7 +506,8 @@ Description: MariaDB database server (metapackage depending on the latest versio
Package: mariadb-client
Architecture: all
Depends: mariadb-client-10.3 (>= ${source:Version}), ${misc:Depends}
Depends: mariadb-client-10.3 (>= ${source:Version}),
${misc:Depends}
Description: MariaDB database client (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of
mariadb-client (currently mariadb-client-10.3), as determined by the MariaDB
@ -500,7 +565,7 @@ Description: OQGraph storage engine for MariaDB
This package contains the OQGraph plugin for MariaDB.
Package: mariadb-plugin-tokudb
Architecture: any
Architecture: amd64
Depends: mariadb-server-10.3 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
@ -519,7 +584,7 @@ Description: TokuDB storage engine for MariaDB
This package contains the TokuDB plugin for MariaDB.
Package: mariadb-plugin-mroonga
Architecture: any
Architecture: any-alpha any-amd64 any-arm any-arm64 any-i386 any-ia64 any-mips64el any-mips64r6el any-mipsel any-mipsr6el any-nios2 any-powerpcel any-ppc64el any-sh3 any-sh4 any-tilegx
Depends: mariadb-server-10.3 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
@ -589,6 +654,7 @@ Replaces: mariadb-gssapi-server-10.1,
mariadb-gssapi-server-10.2,
mariadb-gssapi-server-10.3
Description: GSSAPI authentication plugin for MariaDB server
This package contains the server components.
Package: mariadb-plugin-gssapi-client
Architecture: any
@ -603,18 +669,19 @@ Replaces: mariadb-gssapi-client-10.1,
mariadb-gssapi-client-10.2,
mariadb-gssapi-client-10.3
Description: GSSAPI authentication plugin for MariaDB client
This package contains the client components.
Package: mariadb-backup-10.3
Section: database
Architecture: any
Breaks: mariadb-backup-10.1,
mariadb-backup-10.2
Replaces: mariadb-backup-10.1,
mariadb-backup-10.2
mariadb-backup-10.2
Depends: mariadb-server-10.3,
${misc:Depends},
${shlibs:Depends}
Description: Backup tool for MariaDB server
This backup tool is guaranteed to be compatible with MariaDB.
Package: mariadb-plugin-cracklib-password-check
Architecture: any
@ -626,15 +693,14 @@ Description: CrackLib Password Validation Plugin for MariaDB
This password validation plugin uses cracklib to allow only
sufficiently secure (as defined by cracklib) user passwords in MariaDB.
Package: mariadb-plugin-aws-key-management-10.3
Section: database
Package: mariadb-plugin-aws-key-management
Architecture: any
Breaks: mariadb-aws-key-management-10.1,
mariadb-aws-key-management-10.2
Replaces: mariadb-aws-key-management-10.1,
mariadb-aws-key-management-10.2
Depends: mariadb-server-10.3,
libcurl3,
Depends: libcurl3,
mariadb-server-10.3,
${misc:Depends},
${shlibs:Depends}
Description: Amazon Web Service Key Management Service Plugin for MariaDB

4
debian/libmariadb-dev-compat.install vendored Normal file
View File

@ -0,0 +1,4 @@
usr/lib/*/libmysqlclient.a
usr/lib/*/libmysqlclient.so
usr/lib/*/libmysqlclient_r.a
usr/lib/*/libmysqlclient_r.so

3
debian/libmariadb-dev-compat.links vendored Normal file
View File

@ -0,0 +1,3 @@
usr/bin/mariadb_config usr/bin/mysql_config
usr/include/mariadb usr/include/mysql
usr/share/pkgconfig/mariadb.pc usr/share/pkgconfig/mysqlclient.pc

View File

@ -1,9 +1,9 @@
usr/bin/mysql_config
usr/include/mysql
usr/bin/mariadb_config
usr/include/mariadb
usr/lib/*/libmariadb.so
usr/lib/*/libmysqlclient.so
usr/lib/*/libmariadbclient.so
usr/lib/*/libmariadbclient.a
usr/lib/*/libmariadbclient.so
usr/lib/*/libmysqlservices.a
usr/share/aclocal/mysql.m4
usr/share/man/man1/mysql_config.1
usr/share/pkgconfig/mariadb.pc

1
debian/libmariadb-dev.links vendored Normal file
View File

@ -0,0 +1 @@
usr/share/man/man1/mysql_config.1.gz usr/share/man/man1/mariadb_config.1.gz

View File

@ -1 +0,0 @@
debian/tmp/usr/share/man/man1/mysql_config.1

2
debian/libmariadb3-compat.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/lib/*/libmysqlclient.so.19
usr/lib/*/libmysqlclient.so.20

View File

@ -1,5 +1,5 @@
usr/lib/*/libmysqlclient.so.19
usr/lib/*/libmysqlclient.so.20
usr/lib/*/libmariadb.so.*
usr/lib/mysql/plugin/client_ed25519.so
usr/lib/mysql/plugin/dialog.so
usr/lib/mysql/plugin/mysql_clear_password.so
usr/lib/mysql/plugin/sha256_password.so

View File

@ -1,3 +1,2 @@
usr/bin/mariadb_config
usr/lib/*/libmysqld.a
usr/lib/*/libmysqld.so

View File

@ -1,4 +1,4 @@
FAQ:
Q: My <tab> completition is gone, why?
Q: My <tab> completion is gone, why?
A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf!

View File

@ -1,2 +1,2 @@
debian/additions/innotop/changelog.innotop
README.md
debian/additions/innotop/changelog.innotop

View File

@ -10,3 +10,13 @@ usr/bin/mysqldumpslow
usr/bin/mysqlimport
usr/bin/mysqlshow
usr/bin/mysqlslap
usr/share/man/man1/mysql_find_rows.1
usr/share/man/man1/mysql_fix_extensions.1
usr/share/man/man1/mysql_waitpid.1
usr/share/man/man1/mysqlaccess.1
usr/share/man/man1/mysqladmin.1
usr/share/man/man1/mysqldump.1
usr/share/man/man1/mysqldumpslow.1
usr/share/man/man1/mysqlimport.1
usr/share/man/man1/mysqlshow.1
usr/share/man/man1/mysqlslap.1

View File

@ -1,6 +1,6 @@
usr/bin/mysqlcheck usr/bin/mysqlrepair
usr/bin/mysqlcheck usr/bin/mysqlanalyze
usr/bin/mysqlcheck usr/bin/mysqloptimize
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlrepair.1.gz
usr/bin/mysqlcheck usr/bin/mysqlrepair
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlanalyze.1.gz
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqloptimize.1.gz
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlrepair.1.gz

View File

@ -1,12 +1,2 @@
debian/additions/innotop/innotop.1
debian/tmp/usr/share/man/man1/mysqlaccess.1
debian/tmp/usr/share/man/man1/mysqladmin.1
debian/tmp/usr/share/man/man1/mysqldump.1
debian/tmp/usr/share/man/man1/mysqldumpslow.1
debian/tmp/usr/share/man/man1/mysql_find_rows.1
debian/tmp/usr/share/man/man1/mysql_fix_extensions.1
debian/tmp/usr/share/man/man1/mysqlimport.1
debian/additions/mysqlreport.1
debian/tmp/usr/share/man/man1/mysqlshow.1
debian/tmp/usr/share/man/man1/mysqlslap.1
debian/tmp/usr/share/man/man1/mysql_waitpid.1

View File

@ -1,2 +1,4 @@
usr/bin/mysql
usr/bin/mysqlcheck
usr/share/man/man1/mysql.1
usr/share/man/man1/mysqlcheck.1

View File

@ -1,2 +0,0 @@
debian/tmp/usr/share/man/man1/mysql.1
debian/tmp/usr/share/man/man1/mysqlcheck.1

View File

@ -1 +1 @@
debian/additions/mariadb.cnf etc/mysql/conf.d
debian/additions/mariadb.cnf etc/mysql/

View File

@ -1,2 +0,0 @@
usr/lib/mysql/plugin/aws_key_management.so
debian/additions/enable_encryption.preset etc/mysql/conf.d/

View File

@ -0,0 +1,3 @@
debian/additions/enable_encryption.preset etc/mysql/mariadb.conf.d
etc/mysql/conf.d/aws_key_management.cnf etc/mysql/mariadb.conf.d
usr/lib/mysql/plugin/aws_key_management.so

View File

@ -1,2 +1,2 @@
etc/mysql/conf.d/connect.cnf
etc/mysql/conf.d/connect.cnf etc/mysql/mariadb.conf.d
usr/lib/mysql/plugin/ha_connect.so

View File

@ -1,3 +1,5 @@
usr/lib/mysql/plugin/ha_mroonga.so
usr/share/mysql/mroonga/AUTHORS
usr/share/mysql/mroonga/COPYING
usr/share/mysql/mroonga/install.sql
usr/share/mysql/mroonga/uninstall.sql

View File

@ -1,4 +1,4 @@
etc/mysql/conf.d/rocksdb.cnf etc/mysql/mariadb.conf.d
usr/lib/mysql/plugin/ha_rocksdb.so
usr/bin/mysql_ldb
usr/bin/sst_dump
usr/lib/mysql/plugin/ha_rocksdb.so

View File

@ -1,4 +1,7 @@
etc/mysql/conf.d/tokudb.cnf etc/mysql/mariadb.conf.d
usr/bin/tokuft_logprint
usr/bin/tokuftdump
usr/lib/mysql/plugin/ha_tokudb.so
usr/share/doc/mariadb-server-10.3/README.md usr/share/doc/mariadb-plugin-tokudb/README.md
usr/share/man/man1/tokuft_logdump.1
usr/share/man/man1/tokuftdump.1

View File

@ -42,7 +42,7 @@ https://mariadb.com/kb
It is strongly recommended you create an admin users for your database
adminstration needs.
If your your local unix account is the one you want to have local super user
If your local unix account is the one you want to have local super user
access on your database with you can create the following account that will
only work for the local unix user connecting to the database locally.
@ -57,14 +57,14 @@ the DB server over the network:
sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION"
Scripts should run as a user have have the required grants and be identified via unix_socket.
Scripts should run as a user have the required grants and be identified via unix_socket.
If you are too tired to type the password in every time and unix_socket auth
doesn't suit your needs, you can store it in the file $HOME/.my.cnf. It should
be chmod 0600 (-rw------- username username .my.cnf) to ensure that nobody else
be chmod 0600 (-rw------- username usergroup .my.cnf) to ensure that nobody else
can read it. Every other configuration parameter can be stored there, too.
For more information in the MariaDB manual in/usr/share/doc/mariadb-doc or
For more information in the MariaDB manual in/usr/share/doc/mariadb-doc or
https://mariadb.com/kb/en/configuring-mariadb-with-mycnf/.
ATTENTION: It is necessary, that a ~/.my.cnf from root always contains a "user"

View File

@ -19,7 +19,6 @@ usr/bin/myisamchk
usr/bin/myisamlog
usr/bin/myisampack
usr/bin/mysql_convert_table_format
usr/bin/mysql_install_db
usr/bin/mysql_plugin
usr/bin/mysql_secure_installation
usr/bin/mysql_setpermission
@ -34,11 +33,12 @@ usr/bin/replace
usr/bin/resolve_stack_dump
usr/bin/resolveip
usr/bin/wsrep_sst_common
usr/bin/wsrep_sst_mariabackup
usr/bin/wsrep_sst_mysqldump
usr/bin/wsrep_sst_rsync
usr/bin/wsrep_sst_xtrabackup
usr/bin/wsrep_sst_xtrabackup-v2
usr/bin/wsrep_sst_mariabackup
usr/lib/mysql/plugin/auth_ed25519.so
usr/lib/mysql/plugin/auth_pam.so
usr/lib/mysql/plugin/auth_socket.so
usr/lib/mysql/plugin/file_key_management.so
@ -58,6 +58,39 @@ usr/lib/mysql/plugin/sql_errlog.so
usr/lib/mysql/plugin/wsrep_info.so
usr/share/apport/package-hooks/source_mariadb-10.3.py
usr/share/doc/mariadb-server-10.3/mysqld.sym.gz
usr/share/man/man1/aria_chk.1
usr/share/man/man1/aria_dump_log.1
usr/share/man/man1/aria_ftdump.1
usr/share/man/man1/aria_pack.1
usr/share/man/man1/aria_read_log.1
usr/share/man/man1/galera_new_cluster.1
usr/share/man/man1/galera_recovery.1
usr/share/man/man1/mariadb-service-convert.1
usr/share/man/man1/msql2mysql.1
usr/share/man/man1/my_print_defaults.1
usr/share/man/man1/myisam_ftdump.1
usr/share/man/man1/myisamchk.1
usr/share/man/man1/myisamlog.1
usr/share/man/man1/myisampack.1
usr/share/man/man1/mysql_convert_table_format.1
usr/share/man/man1/mysql_plugin.1
usr/share/man/man1/mysql_secure_installation.1
usr/share/man/man1/mysql_setpermission.1
usr/share/man/man1/mysql_tzinfo_to_sql.1
usr/share/man/man1/mysqlbinlog.1
usr/share/man/man1/mysqld_multi.1
usr/share/man/man1/mysqld_safe.1
usr/share/man/man1/mysqld_safe_helper.1
usr/share/man/man1/mysqlhotcopy.1
usr/share/man/man1/perror.1
usr/share/man/man1/replace.1
usr/share/man/man1/resolve_stack_dump.1
usr/share/man/man1/resolveip.1
usr/share/man/man1/wsrep_sst_common.1
usr/share/man/man1/wsrep_sst_mysqldump.1
usr/share/man/man1/wsrep_sst_rsync.1
usr/share/man/man1/wsrep_sst_xtrabackup-v2.1
usr/share/man/man1/wsrep_sst_xtrabackup.1
usr/share/mysql/errmsg-utf8.txt
usr/share/mysql/fill_help_tables.sql
usr/share/mysql/maria_add_gis_sp_bootstrap.sql

View File

@ -1,25 +0,0 @@
debian/tmp/usr/share/man/man1/aria_chk.1
debian/tmp/usr/share/man/man1/aria_dump_log.1
debian/tmp/usr/share/man/man1/aria_ftdump.1
debian/tmp/usr/share/man/man1/aria_pack.1
debian/tmp/usr/share/man/man1/aria_read_log.1
debian/tmp/usr/share/man/man1/msql2mysql.1
debian/tmp/usr/share/man/man1/myisamchk.1
debian/tmp/usr/share/man/man1/myisam_ftdump.1
debian/tmp/usr/share/man/man1/myisamlog.1
debian/tmp/usr/share/man/man1/myisampack.1
debian/tmp/usr/share/man/man1/my_print_defaults.1
debian/tmp/usr/share/man/man1/mysqlbinlog.1
debian/tmp/usr/share/man/man1/mysql_convert_table_format.1
debian/tmp/usr/share/man/man1/mysqld_multi.1
debian/tmp/usr/share/man/man1/mysqld_safe.1
debian/tmp/usr/share/man/man1/mysqlhotcopy.1
debian/tmp/usr/share/man/man1/mysql_install_db.1
debian/tmp/usr/share/man/man1/mysql_plugin.1
debian/tmp/usr/share/man/man1/mysql_secure_installation.1
debian/tmp/usr/share/man/man1/mysql_setpermission.1
debian/tmp/usr/share/man/man1/mysql_tzinfo_to_sql.1
debian/tmp/usr/share/man/man1/perror.1
debian/tmp/usr/share/man/man1/replace.1
debian/tmp/usr/share/man/man1/resolveip.1
debian/tmp/usr/share/man/man1/resolve_stack_dump.1

View File

@ -25,7 +25,7 @@ SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
# priority can be overriden and "-s" adds output to stderr
# priority can be overridden and "-s" adds output to stderr
ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i"
if [ -f /etc/default/mysql ]; then

View File

@ -1,6 +1,11 @@
usr/bin/innochecksum
usr/bin/mysql_install_db
usr/bin/mysql_upgrade
usr/sbin/mysqld
usr/share/man/man1/innochecksum.1
usr/share/man/man1/mysql_install_db.1
usr/share/man/man1/mysql_upgrade.1
usr/share/man/man8/mysqld.8
usr/share/mysql/charsets
usr/share/mysql/czech
usr/share/mysql/danish

View File

@ -1,3 +0,0 @@
debian/tmp/usr/share/man/man8/mysqld.8
debian/tmp/usr/share/man/man1/innochecksum.1
debian/tmp/usr/share/man/man1/mysql_upgrade.1

View File

@ -17,9 +17,16 @@ usr/lib/mysql/plugin/qa_auth_client.so
usr/lib/mysql/plugin/qa_auth_interface.so
usr/lib/mysql/plugin/qa_auth_server.so
usr/lib/mysql/plugin/test_versioning.so
usr/share/man/man1/mysql-stress-test.pl.1
usr/share/man/man1/mysql-test-run.pl.1
usr/share/man/man1/mysql_client_test.1
usr/share/man/man1/mysql_client_test_embedded.1
usr/share/man/man1/mysqltest.1
usr/share/man/man1/mysqltest_embedded.1
usr/share/mysql/mysql-test/README
usr/share/mysql/mysql-test/README-gcov
usr/share/mysql/mysql-test/README.stress
usr/share/mysql/mysql-test/dgcov.pl
usr/share/mysql/mysql-test/disabled.def
usr/share/mysql/mysql-test/lib
usr/share/mysql/mysql-test/mysql-stress-test.pl

View File

@ -1,2 +1,2 @@
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mtr
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run

View File

@ -1,4 +0,0 @@
debian/tmp/usr/share/man/man1/mysql_client_test.1
debian/tmp/usr/share/man/man1/mysql_client_test_embedded.1
debian/tmp/usr/share/man/man1/mysqltest.1
debian/tmp/usr/share/man/man1/mysqltest_embedded.1

View File

@ -1,2 +1,2 @@
debian/additions/my.cnf etc/mysql
usr/share/mysql-common/internal-use-only
usr/share/mysql-common/internal-use-only

127
debian/not-installed vendored Normal file
View File

@ -0,0 +1,127 @@
lib/systemd/system/mariadb.service # Installed by rules file
lib/systemd/system/mariadb@.service # Installed by rules file
usr/bin/mysql_config # We already have the MariaDB variant
usr/bin/mysql_embedded # Huge 500 MB file. Not intended for distribution via any disto package.
usr/bin/mytop # Mytop is distributed from a separate source package
usr/lib/sysusers.d/sysusers.conf
usr/lib/tmpfiles.d/tmpfiles.conf
usr/lib/mysql/plugin/JavaWrappers.jar # These are only built if JNI/libjawt.so is installed from e.g. openjdk-8-jre-headless
usr/lib/mysql/plugin/JdbcInterface.jar # These are only built if JNI/libjawt.so is installed from e.g. openjdk-8-jre-headless
usr/share/doc/mariadb-server-10.3/COPYING
usr/share/doc/mariadb-server-10.3/COPYING.AGPLv3
usr/share/doc/mariadb-server-10.3/COPYING.GPLv2
usr/share/doc/mariadb-server-10.3/COPYING.thirdparty
usr/share/doc/mariadb-server-10.3/CREDITS
usr/share/doc/mariadb-server-10.3/EXCEPTIONS-CLIENT
usr/share/doc/mariadb-server-10.3/INSTALL-BINARY
usr/share/doc/mariadb-server-10.3/PATENTS
usr/share/doc/mariadb-server-10.3/README-wsrep
usr/share/groonga/COPYING
usr/share/groonga-normalizer-mysql/lgpl-2.0.txt
usr/share/groonga-normalizer-mysql/README.md
usr/share/groonga/README.md
usr/share/man/man1/my_safe_process.1
usr/share/man/man1/mysql.server.1
usr/share/mysql/binary-configure
usr/share/mysql/magic
usr/share/mysql/maria_add_gis_sp.sql
usr/share/mysql/mysqld_multi.server
usr/share/mysql/mysql-log-rotate
usr/share/mysql/mysql.server
usr/share/mysql/mysql-test/mtr # Already created by mariadb-test.links
usr/share/mysql/mysql-test/mysql-test-run # Already created by mariadb-test.links
usr/share/mysql/mysql_to_mariadb.sql
usr/share/mysql/policy/apparmor/README # In MariaDB we don't want to use AppArmor at the moment
usr/share/mysql/policy/apparmor/usr.sbin.mysqld # In MariaDB we don't want to use AppArmor at the moment
usr/share/mysql/policy/apparmor/usr.sbin.mysqld.local # In MariaDB we don't want to use AppArmor at the moment
usr/share/mysql/policy/selinux/mariadb-server.fc # In MariaDB we don't want to use SELinux at the moment
usr/share/mysql/policy/selinux/mariadb-server.te # In MariaDB we don't want to use SELinux at the moment
usr/share/mysql/policy/selinux/mariadb.te # In MariaDB we don't want to use SELinux at the moment
usr/share/mysql/policy/selinux/README # In MariaDB we don't want to use SELinux at the moment
usr/share/mysql/systemd/mariadb.service # Installed by rules file
usr/share/mysql/systemd/mariadb@.service # Installed by rules file
usr/share/mysql/systemd/use_galera_new_cluster.conf
usr/share/mysql/wsrep.cnf
usr/sql-bench/bench-count-distinct
usr/sql-bench/bench-init.pl # SQL-bench is distributed from a separate source package
usr/sql-bench/compare-results
usr/sql-bench/copy-db
usr/sql-bench/crash-me
usr/sql-bench/Data/ATIS/aircraft.txt
usr/sql-bench/Data/ATIS/airline.txt
usr/sql-bench/Data/ATIS/airport_service.txt
usr/sql-bench/Data/ATIS/airport.txt
usr/sql-bench/Data/ATIS/city.txt
usr/sql-bench/Data/ATIS/class_of_service.txt
usr/sql-bench/Data/ATIS/code_description.txt
usr/sql-bench/Data/ATIS/compound_class.txt
usr/sql-bench/Data/ATIS/connect_leg.txt
usr/sql-bench/Data/ATIS/date_day.txt
usr/sql-bench/Data/ATIS/day_name.txt
usr/sql-bench/Data/ATIS/dual_carrier.txt
usr/sql-bench/Data/ATIS/fare.txt
usr/sql-bench/Data/ATIS/fconnection.txt
usr/sql-bench/Data/ATIS/flight_class.txt
usr/sql-bench/Data/ATIS/flight_day.txt
usr/sql-bench/Data/ATIS/flight_fare.txt
usr/sql-bench/Data/ATIS/flight.txt
usr/sql-bench/Data/ATIS/food_service.txt
usr/sql-bench/Data/ATIS/ground_service.txt
usr/sql-bench/Data/ATIS/month_name.txt
usr/sql-bench/Data/ATIS/restrict_carrier.txt
usr/sql-bench/Data/ATIS/restrict_class.txt
usr/sql-bench/Data/ATIS/restriction.txt
usr/sql-bench/Data/ATIS/state.txt
usr/sql-bench/Data/ATIS/stop1.txt
usr/sql-bench/Data/ATIS/stop.txt
usr/sql-bench/Data/ATIS/time_interval.txt
usr/sql-bench/Data/ATIS/time_zone.txt
usr/sql-bench/Data/ATIS/transport.txt
usr/sql-bench/Data/Wisconsin/onek.data
usr/sql-bench/Data/Wisconsin/tenk.data
usr/sql-bench/graph-compare-results
usr/sql-bench/innotest1
usr/sql-bench/innotest1a
usr/sql-bench/innotest1b
usr/sql-bench/innotest2
usr/sql-bench/innotest2a
usr/sql-bench/innotest2b
usr/sql-bench/limits/access.cfg
usr/sql-bench/limits/access_odbc.cfg
usr/sql-bench/limits/Adabas.cfg
usr/sql-bench/limits/db2.cfg
usr/sql-bench/limits/empress.cfg
usr/sql-bench/limits/frontbase.cfg
usr/sql-bench/limits/Informix.cfg
usr/sql-bench/limits/interbase.cfg
usr/sql-bench/limits/interbase-dialect1.cfg
usr/sql-bench/limits/interbase-dialect3.cfg
usr/sql-bench/limits/interbase-superserver.cfg
usr/sql-bench/limits/mimer.cfg
usr/sql-bench/limits/msql.cfg
usr/sql-bench/limits/ms-sql65.cfg
usr/sql-bench/limits/ms-sql.cfg
usr/sql-bench/limits/mysql-3.22.cfg
usr/sql-bench/limits/mysql-3.23.cfg
usr/sql-bench/limits/mysql-4.0.cfg
usr/sql-bench/limits/mysql-4.1.cfg
usr/sql-bench/limits/mysql.cfg
usr/sql-bench/limits/oracle.cfg
usr/sql-bench/limits/pg.cfg
usr/sql-bench/limits/solid.cfg
usr/sql-bench/limits/solid-nt4.cfg
usr/sql-bench/limits/sybase.cfg
usr/sql-bench/myisam.cnf
usr/sql-bench/README
usr/sql-bench/run-all-tests
usr/sql-bench/server-cfg
usr/sql-bench/test-alter-table
usr/sql-bench/test-ATIS
usr/sql-bench/test-big-tables
usr/sql-bench/test-connect
usr/sql-bench/test-create
usr/sql-bench/test-insert
usr/sql-bench/test-select
usr/sql-bench/test-table-elimination
usr/sql-bench/test-transactions
usr/sql-bench/test-wisconsin

23
debian/rules vendored
View File

@ -39,7 +39,7 @@ else
endif
# Ignore test suite exit code on unstable platforms
ifneq (,$(filter $(ARCH), mips mipsel))
ifneq (,$(filter $(ARCH),mips mipsel mips64el alpha powerpc sh4 hurd-i386 sparc64 kfreebsd-i386 kfreebsd-amd64))
TESTSUITE_FAIL_CMD:=true
else
TESTSUITE_FAIL_CMD:=exit 1
@ -114,11 +114,6 @@ override_dh_auto_install:
dh_testdir
dh_testroot
# Skip TokuDB if arch is not amd64
ifneq ($(ARCH), amd64)
sed -i -e "/Package: mariadb-plugin-tokudb/,+18d" debian/control
endif
# If libthrift-dev was available (manually installed, as it is
# not in Debian) and ha_cassandra.so was thus built, create package,
# otherwise skip it.
@ -153,13 +148,13 @@ endif
install -D -m 644 debian/mariadb-server-10.3.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.3.py
# Install libmariadbclient18 compatibility links
ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so
ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so.18
ln -s libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so
ln -s libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so.18
# Install libmysqlclientclientXX compatibility links
ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.18
ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.19
ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.20
ln -s libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.18
ln -s libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.19
ln -s libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.20
touch $@
@ -182,7 +177,11 @@ override_dh_installcron-arch:
get-orig-source:
uscan --force-download --verbose
# If a file is not supposed to be included anywhere, add it to the not-installed
# file and document the reason. Note that dh_install supports the above mentioned
# white list file only starting from Debian Stretch and Ubuntu Xenial.
# To find more, grep build logs for 'but is not installed to anywhere'.
%:
dh $@ --parallel --with dpatch --with systemd
dh $@ --parallel --with dpatch --with systemd --list-missing
# vim: ts=8

View File

@ -1461,6 +1461,9 @@ innodb_init_param(void)
srv_page_size = 0;
srv_page_size_shift = 0;
#ifdef BTR_CUR_HASH_ADAPT
btr_ahi_parts = 1;
#endif /* BTR_CUR_HASH_ADAPT */
if (innobase_page_size != (1LL << 14)) {
int n_shift = (int)get_bit_shift((ulint) innobase_page_size);

View File

@ -376,7 +376,7 @@ typedef size_t (*my_charset_conv_case)(CHARSET_INFO *,
A structure to return the statistics of a native string copying,
when no Unicode conversion is involved.
The stucture is OK to be unitialized before calling a copying routine.
The stucture is OK to be uninitialized before calling a copying routine.
A copying routine must populate the structure as follows:
- m_source_end_pos must be set by to a non-NULL value
in the range of the input string.
@ -425,7 +425,7 @@ struct my_charset_handler_st
my_charset_conv_case caseup;
my_charset_conv_case casedn;
/* Charset dependant snprintf() */
/* Charset dependent snprintf() */
size_t (*snprintf)(CHARSET_INFO *, char *to, size_t n,
const char *fmt,
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);

View File

@ -101,7 +101,7 @@
sequentially-consistent operation ordering.
We choose implementation as follows: on Windows using Visual C++ the native
implementation should be preferrable. When using gcc we prefer the Solaris
implementation should be preferable. When using gcc we prefer the Solaris
implementation before the gcc because of stability preference, we choose gcc
builtins if available.
*/

View File

@ -209,10 +209,14 @@ void debug_sync_point(const char* lock_name, uint lock_timeout);
#ifdef __cplusplus
}
/*
DBUG_LOG() was initially intended for InnoDB. To be able to use it elsewhere
one should #include <sstream>. We intentially avoid including it here to save
compilation time.
*/
# ifdef DBUG_OFF
# define DBUG_LOG(keyword, v) do {} while (0)
# else
# include <sstream>
# define DBUG_LOG(keyword, v) do { \
if (_db_pargs_(__LINE__, keyword)) { \
std::ostringstream _db_s; _db_s << v; \

View File

@ -178,7 +178,7 @@
/*
The macros below are borrowed from include/linux/compiler.h in the
Linux kernel. Use them to indicate the likelyhood of the truthfulness
Linux kernel. Use them to indicate the likelihood of the truthfulness
of a condition. This serves two purposes - newer versions of gcc will be
able to optimize for branch predication, which could yield siginficant
performance gains in frequently executed sections of the code, and the
@ -527,7 +527,7 @@ typedef SOCKET my_socket;
typedef int my_socket; /* File descriptor for sockets */
#define INVALID_SOCKET -1
#endif
/* Type for fuctions that handles signals */
/* Type for functions that handles signals */
#define sig_handler RETSIGTYPE
C_MODE_START
#ifdef HAVE_SIGHANDLER_T
@ -857,7 +857,7 @@ static inline double log2(double x)
/*
Max size that must be added to a so that we know Size to make
adressable obj.
addressable obj.
*/
#if SIZEOF_CHARP == 4
typedef long my_ptrdiff_t;
@ -869,7 +869,7 @@ typedef long long my_ptrdiff_t;
#define MY_ALIGN_DOWN(A,L) ((A) & ~((L) - 1))
#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
#define ALIGN_MAX_UNIT (sizeof(double))
/* Size to make adressable obj. */
/* Size to make addressable obj. */
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A), sizeof(double)))
#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))

View File

@ -196,7 +196,7 @@ int sigwait(sigset_t *set, int *sig);
#endif
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
int sigwait(sigset_t *setp, int *sigp); /* Use our implementation */
#endif
@ -393,7 +393,7 @@ typedef struct st_safe_mutex_deadlock_t
#ifdef SAFE_MUTEX_DETECT_DESTROY
/*
Used to track the destroying of mutexes. This needs to be a seperate
Used to track the destroying of mutexes. This needs to be a separate
structure because the safe_mutex_t structure could be freed before
the mutexes are destroyed.
*/

View File

@ -18,7 +18,7 @@
@file
This service provides access to the thd-local random number generator.
It's preferrable over the global one, because concurrent threads
It's preferable over the global one, because concurrent threads
can generate random numbers without fighting each other over the access
to the shared rnd state.
*/

View File

@ -152,7 +152,7 @@ enum enum_indicator_type
*/
#define SCRAMBLE_LENGTH 20
#define SCRAMBLE_LENGTH_323 8
/* length of password stored in the db: new passwords are preceeded with '*' */
/* length of password stored in the db: new passwords are preceded with '*' */
#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
@ -299,7 +299,7 @@ enum enum_indicator_type
#endif
/*
Gather all possible capabilites (flags) supported by the server
Gather all possible capabilities (flags) supported by the server
MARIADB_* flags supported only by MariaDB connector(s).
*/

@ -1 +1 @@
Subproject commit fe129ed39f33ba2b430aac91473baee84de88b12
Subproject commit f3944bbd36af729b2f13313587018679c57de67d

View File

@ -276,7 +276,7 @@ T}:T{
Setting of a timeout in minutes or seconds, corresponding to command
line option
\fB\-\-\fR\fB\fIname\fR\fR\fB\-timeout\fR\&.
Avaliable timeout names are TESTCASE,
Available timeout names are TESTCASE,
SUITE (both in minutes) and
START, SHUTDOWN
(both in seconds)\&. These variables are supported from
@ -1350,7 +1350,7 @@ for a description\&.
.\" noreorder option: mysql-test-run.pl
\fB\-\-noreorder\fR
.sp
Do not reorder tests to reduce number of restarts, but run them in exactly the order given\&. If a whole suite is to be run, the tests are run in alphabetical order, though similiar combinations will be grouped together\&. If more than one suite is listed, the tests are run one suite at a time, in the order listed\&.
Do not reorder tests to reduce number of restarts, but run them in exactly the order given\&. If a whole suite is to be run, the tests are run in alphabetical order, though similar combinations will be grouped together\&. If more than one suite is listed, the tests are run one suite at a time, in the order listed\&.
.RE
.sp
.RS 4

View File

@ -698,7 +698,7 @@ the section called \(lqMYSQL COMMANDS\(rq\&. Disabled by default\&.
.\}
.\" mysql: net-buffer-length option
.\" net-buffer-length option: mysql
\fB\-\-net\-buffer\-lenght=\fR\fB\fIsize\fR\fR
\fB\-\-net\-buffer\-length=\fR\fB\fIsize\fR\fR
.sp
Set the buffer size for TCP/IP and socket communication\&. (Default value is 16KB\&.)
.RE

View File

@ -26,7 +26,20 @@
#include <signal.h>
#include <stdlib.h>
#include <psapi.h>
#ifdef _MSC_VER
/* Silence warning in OS header dbghelp.h */
#pragma warning(push)
#pragma warning(disable : 4091)
#endif
#include <dbghelp.h>
#ifdef _MSC_VER
/* Silence warning in OS header dbghelp.h */
#pragma warning(pop)
#endif
#include <tlhelp32.h>
#include <vector>

View File

@ -1265,3 +1265,33 @@ a
4
deallocate prepare stmt;
drop table t1;
#
# MDEV-14852: CTE using temporary table in query
# with two references to the CTE
#
create temporary table t1 (i int);
insert into t1 values (5),(4),(1),(2),(3);
with
c1 as (select i from t1),
c2 as (select i from c1 where c1.i=2)
select i from c1 where i > 3 union select i from c2;
i
5
4
2
drop table t1;
create table t1 (term char(10));
create temporary table t2 (term char(10));
insert into t1 values ('TERM01'),('TERM02'),('TERM03');
insert into t2 values ('TERM02'),('TERM03'),('TERM04');
with c1 as (select * from t1), c2 as (select * from t2)
(select * from c1 left outer join c2 on c1.term = c2.term)
union all
(select * from c1 right outer join c2 on c1.term = c2.term
where c1.term is null);
term term
TERM02 TERM02
TERM03 TERM03
TERM01 NULL
NULL TERM04
drop table t1,t2;

View File

@ -2951,6 +2951,112 @@ limit 1
ERROR HY000: Unacceptable mutual recursion with anchored table 'cte_1'
drop table t1;
#
# mdev-14777: crash caused by the same as in mdev-14755
#
CREATE TABLE t1 (i1 int NOT NULL, i2 int);
CREATE TABLE t2 (d1 int NOT NULL PRIMARY KEY);
CREATE TABLE t3 (i int );
insert into t1 select seq,seq from seq_1_to_100000;
insert into t2 select seq from seq_1000_to_100000;
insert into t3 select seq from seq_1_to_1000;
SELECT *
FROM
(
SELECT *
FROM
(
WITH RECURSIVE rt AS
(
SELECT i2 P, i1 C FROM t1 WHERE i1 IN (SELECT d1 FROM t2)
UNION
SELECT t1.i2 P, rt.C C FROM t1, rt
)
SELECT C,P
FROM ( SELECT P,C FROM rt WHERE NOT EXISTS (SELECT 1 FROM t1) ) Y
) X
WHERE 1 = 1
) K, t3;
C P i
drop table t1,t2,t3;
#
# mdev-14879: subquery with recursive reference in WHERE of CTE
#
create table flights
(departure varchar(32),
arrival varchar(32),
carrier varchar(20),
flight_number char(7));
insert into flights values
('Seattle', 'Frankfurt', 'Lufthansa', 'LH 491'),
('Seattle', 'Chicago', 'American', 'AA 2573'),
('Seattle', 'Los Angeles', 'Alaska Air', 'AS 410'),
('Chicago', 'New York', 'American', 'AA 375'),
('Chicago', 'Montreal', 'Air Canada', 'AC 3053'),
('Los Angeles', 'New York', 'Delta', 'DL 1197'),
('Moscow', 'Tokyo', 'Aeroflot', 'SU 264'),
('New York', 'Paris', 'Air France', 'AF 23'),
('Frankfurt', 'Moscow', 'Lufthansa', 'LH 1444'),
('Tokyo', 'Seattle', 'ANA', 'NH 178'),
('Los Angeles', 'Tokyo', 'ANA', 'NH 175'),
('Moscow', 'Los Angeles', 'Aeroflot', 'SU 106'),
('Montreal', 'Paris', 'Air Canada', 'AC 870'),
('Cairo', 'Paris', 'Air France', 'AF 503'),
('New York', 'Seattle', 'American', 'AA 45'),
('Paris', 'Chicago', 'Air France', 'AF 6734');
with recursive destinations (city) as
( select a.arrival from flights a where a.departure='Cairo'
union
select b.arrival from destinations r, flights b where r.city=b.departure)
select * from destinations;
city
Paris
Chicago
New York
Montreal
Seattle
Frankfurt
Los Angeles
Moscow
Tokyo
set standard_compliant_cte=0;
with recursive destinations (city, legs) as
(
select a.arrival, 1 from flights a where a.departure='Cairo'
union
select b.arrival, r.legs + 1 from destinations r, flights b
where r.city=b.departure and b.arrival not in (select city from destinations)
)
select * from destinations;
city legs
Paris 1
Chicago 2
New York 3
Montreal 3
Seattle 4
Frankfurt 5
Los Angeles 5
Moscow 6
Tokyo 6
explain extended with recursive destinations (city, legs) as
(
select a.arrival, 1 from flights a where a.departure='Cairo'
union
select b.arrival, r.legs + 1 from destinations r, flights b
where r.city=b.departure and b.arrival not in (select city from destinations)
)
select * from destinations;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 16 100.00
2 DERIVED a ALL NULL NULL NULL NULL 16 100.00 Using where
3 RECURSIVE UNION b ALL NULL NULL NULL NULL 16 100.00 Using where
3 RECURSIVE UNION <derived2> ref key0 key0 35 test.b.departure 2 100.00
4 DEPENDENT SUBQUERY <derived2> ALL NULL NULL NULL NULL 16 100.00 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 with recursive destinations as (/* select#2 */ select `test`.`a`.`arrival` AS `city`,1 AS `legs` from `test`.`flights` `a` where `test`.`a`.`departure` = 'Cairo' union /* select#3 */ select `test`.`b`.`arrival` AS `arrival`,`r`.`legs` + 1 AS `r.legs + 1` from `destinations` `r` join `test`.`flights` `b` where `r`.`city` = `test`.`b`.`departure` and !<in_optimizer>(`test`.`b`.`arrival`,<exists>(/* select#4 */ select `destinations`.`city` from `destinations` where trigcond(`test`.`b`.`arrival` = `destinations`.`city` or `destinations`.`city` is null) having trigcond(`destinations`.`city` is null))))/* select#1 */ select `destinations`.`city` AS `city`,`destinations`.`legs` AS `legs` from `destinations`
set standard_compliant_cte=default;
drop table flights;
#
# MDEV-14217 [db crash] Recursive CTE when SELECT includes new field
#
CREATE TEMPORARY TABLE a_tbl (

View File

@ -12540,6 +12540,70 @@ EXPLAIN
}
drop table t1;
#
# MDEV-13454: consequence of mdev-14368 fixed for 5.5
#
SET sql_mode = 'ONLY_FULL_GROUP_BY';
create table t1 (id int, id2 int);
insert into t1 values (1,1),(2,3),(3,4),(7,2);
create table t2(id2 int);
insert t2 values (1),(2),(3);
SELECT * FROM t1
LEFT OUTER JOIN
(SELECT id2, COUNT(*) as ct FROM t2 GROUP BY id2) vc USING (id2)
WHERE (vc.ct>0);
id2 id ct
1 1 1
3 2 1
2 7 1
EXPLAIN FORMAT=JSON SELECT * FROM t1
LEFT OUTER JOIN
(SELECT id2, COUNT(*) as ct FROM t2 GROUP BY id2) vc USING (id2)
WHERE (vc.ct>0);
EXPLAIN
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "<derived2>",
"access_type": "ALL",
"rows": 3,
"filtered": 100,
"attached_condition": "vc.ct > 0",
"materialized": {
"query_block": {
"select_id": 2,
"having_condition": "ct > 0",
"filesort": {
"sort_key": "t2.id2",
"temporary_table": {
"table": {
"table_name": "t2",
"access_type": "ALL",
"rows": 3,
"filtered": 100
}
}
}
}
}
},
"block-nl-join": {
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 4,
"filtered": 100
},
"buffer_type": "flat",
"buffer_size": "256Kb",
"join_type": "BNL",
"attached_condition": "t1.id2 = vc.id2"
}
}
}
DROP TABLE t1,t2;
SET sql_mode = DEFAULT;
#
# MDEV-10855: Pushdown into derived with window functions
#
set @save_optimizer_switch= @@optimizer_switch;

View File

@ -7214,6 +7214,32 @@ NULL
# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2;
#
drop table t1, t2;
#
# MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_in
# (5.5 test)
#
SET @optimiser_switch_save= @@optimizer_switch;
CREATE TABLE t1 (a INT NOT NULL);
INSERT INTO t1 VALUES (1),(1),(1),(5),(5);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (5),(1);
CREATE TABLE t3 (c INT, KEY(c));
INSERT INTO t3 VALUES (5),(5);
SET optimizer_switch='semijoin=on';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET optimizer_switch='semijoin=off';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET @@optimizer_switch= @optimiser_switch_save;
DROP TABLE t1, t2, t3;
End of 5.5 tests
# End of 10.0 tests
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops

View File

@ -7214,6 +7214,32 @@ NULL
# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2;
#
drop table t1, t2;
#
# MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_in
# (5.5 test)
#
SET @optimiser_switch_save= @@optimizer_switch;
CREATE TABLE t1 (a INT NOT NULL);
INSERT INTO t1 VALUES (1),(1),(1),(5),(5);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (5),(1);
CREATE TABLE t3 (c INT, KEY(c));
INSERT INTO t3 VALUES (5),(5);
SET optimizer_switch='semijoin=on';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET optimizer_switch='semijoin=off';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET @@optimizer_switch= @optimiser_switch_save;
DROP TABLE t1, t2, t3;
End of 5.5 tests
# End of 10.0 tests
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops

View File

@ -7207,6 +7207,32 @@ NULL
# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2;
#
drop table t1, t2;
#
# MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_in
# (5.5 test)
#
SET @optimiser_switch_save= @@optimizer_switch;
CREATE TABLE t1 (a INT NOT NULL);
INSERT INTO t1 VALUES (1),(1),(1),(5),(5);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (5),(1);
CREATE TABLE t3 (c INT, KEY(c));
INSERT INTO t3 VALUES (5),(5);
SET optimizer_switch='semijoin=on';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET optimizer_switch='semijoin=off';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET @@optimizer_switch= @optimiser_switch_save;
DROP TABLE t1, t2, t3;
End of 5.5 tests
# End of 10.0 tests
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops

View File

@ -7205,6 +7205,32 @@ NULL
# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2;
#
drop table t1, t2;
#
# MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_in
# (5.5 test)
#
SET @optimiser_switch_save= @@optimizer_switch;
CREATE TABLE t1 (a INT NOT NULL);
INSERT INTO t1 VALUES (1),(1),(1),(5),(5);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (5),(1);
CREATE TABLE t3 (c INT, KEY(c));
INSERT INTO t3 VALUES (5),(5);
SET optimizer_switch='semijoin=on';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET optimizer_switch='semijoin=off';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET @@optimizer_switch= @optimiser_switch_save;
DROP TABLE t1, t2, t3;
End of 5.5 tests
# End of 10.0 tests
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops

View File

@ -7220,6 +7220,32 @@ NULL
# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2;
#
drop table t1, t2;
#
# MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_in
# (5.5 test)
#
SET @optimiser_switch_save= @@optimizer_switch;
CREATE TABLE t1 (a INT NOT NULL);
INSERT INTO t1 VALUES (1),(1),(1),(5),(5);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (5),(1);
CREATE TABLE t3 (c INT, KEY(c));
INSERT INTO t3 VALUES (5),(5);
SET optimizer_switch='semijoin=on';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET optimizer_switch='semijoin=off';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET @@optimizer_switch= @optimiser_switch_save;
DROP TABLE t1, t2, t3;
End of 5.5 tests
# End of 10.0 tests
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops

View File

@ -7205,6 +7205,32 @@ NULL
# SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2;
#
drop table t1, t2;
#
# MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_in
# (5.5 test)
#
SET @optimiser_switch_save= @@optimizer_switch;
CREATE TABLE t1 (a INT NOT NULL);
INSERT INTO t1 VALUES (1),(1),(1),(5),(5);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (5),(1);
CREATE TABLE t3 (c INT, KEY(c));
INSERT INTO t3 VALUES (5),(5);
SET optimizer_switch='semijoin=on';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET optimizer_switch='semijoin=off';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
a
5
5
SET @@optimizer_switch= @optimiser_switch_save;
DROP TABLE t1, t2, t3;
End of 5.5 tests
# End of 10.0 tests
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops

View File

@ -185,90 +185,88 @@ connection con3;
MI: MyISAM, INNODB
BEGIN;
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 2);
connection con1;
KILL ID;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
master-bin.000002 # Gtid_list # # [#-#-#]
master-bin.000002 # Binlog_checkpoint # # master-bin.000001
master-bin.000002 # Binlog_checkpoint # # master-bin.000002
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=3
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 1)
master-bin.000002 # Query # # COMMIT
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=4
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 2)
master-bin.000002 # Query # # ROLLBACK
disconnect con3;
connect con3, localhost, root,,;
connection con3;
IM: INNODB, MyISAM
BEGIN;
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 3);
INSERT INTO t2 VALUES (NULL, 4);
connection con1;
KILL ID;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=4
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 4)
master-bin.000002 # Query # # COMMIT
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=5
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 3)
master-bin.000002 # Query # # ROLLBACK
disconnect con3;
connect con3, localhost, root,,;
connection con3;
IMI: INNODB, MyISAM, INNODB
BEGIN;
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 5);
INSERT INTO t2 VALUES (NULL, 6);
INSERT INTO t1 VALUES (NULL, 7);
connection con1;
KILL ID;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=5
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 6)
master-bin.000002 # Query # # COMMIT
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=6
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 5)
master-bin.000002 # Intvar # # INSERT_ID=7
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 7)
master-bin.000002 # Query # # ROLLBACK
disconnect con3;
connect con3, localhost, root,,;
connection con3;
MI2: MyISAM, INNODB, MyISAM, INNODB
BEGIN;
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t2 VALUES (NULL, 8);
INSERT INTO t1 VALUES (NULL, 9);
INSERT INTO t2 VALUES (NULL, 10);
INSERT INTO t1 VALUES (NULL, 11);
connection con1;
KILL ID;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=6
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 8)
master-bin.000002 # Query # # COMMIT
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=7
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t2 VALUES (NULL, 10)
master-bin.000002 # Query # # COMMIT
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
master-bin.000002 # Intvar # # INSERT_ID=8
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 9)
master-bin.000002 # Intvar # # INSERT_ID=9
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 1)
master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES (NULL, 11)
master-bin.000002 # Query # # ROLLBACK
connection default;
disconnect con1;

View File

@ -10,6 +10,13 @@ call mtr.add_suppression("Unsafe statement written to the binary log using state
-- source include/not_embedded.inc
#
# Avoid printing binlog checkpoints
#
--let $skip_checkpoint_events=1
###
### bug#22725 : incorrect killed error in binlogged query
###
@ -362,16 +369,20 @@ connect (con3, localhost, root,,);
connection con3;
let $ID= `select connection_id()`;
--let $threads_connected=`select variable_value from information_schema.global_status where variable_name="threads_connected"`
--let wait_condition=select variable_value < $threads_connected from information_schema.global_status where variable_name="threads_connected"
--echo MI: MyISAM, INNODB
BEGIN;
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 2);
#Connection con1 as killer throughout the test
connection con1;
--replace_result $ID ID
--eval KILL $ID
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
--source include/wait_condition.inc
--let $binlog_start= 4
--source include/show_binlog_events.inc
--let $binlog_killed_pos=query_get_value(SHOW MASTER STATUS, Position, 1)
@ -383,12 +394,13 @@ let $ID= `select connection_id()`;
--echo IM: INNODB, MyISAM
BEGIN;
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 3);
INSERT INTO t2 VALUES (NULL, 4);
connection con1;
--replace_result $ID ID
--eval KILL $ID
--source include/wait_condition.inc
--let $binlog_start= $binlog_killed_pos
--source include/show_binlog_events.inc
--let $binlog_killed_pos=query_get_value(SHOW MASTER STATUS, Position, 1)
@ -400,13 +412,14 @@ let $ID= `select connection_id()`;
--echo IMI: INNODB, MyISAM, INNODB
BEGIN;
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 5);
INSERT INTO t2 VALUES (NULL, 6);
INSERT INTO t1 VALUES (NULL, 7);
connection con1;
--replace_result $ID ID
--eval KILL $ID
--source include/wait_condition.inc
--let $binlog_start= $binlog_killed_pos
--source include/show_binlog_events.inc
--let $binlog_killed_pos=query_get_value(SHOW MASTER STATUS, Position, 1)
@ -418,14 +431,15 @@ let $ID= `select connection_id()`;
--echo MI2: MyISAM, INNODB, MyISAM, INNODB
BEGIN;
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t2 VALUES (NULL, 1);
INSERT INTO t1 VALUES (NULL, 1);
INSERT INTO t2 VALUES (NULL, 8);
INSERT INTO t1 VALUES (NULL, 9);
INSERT INTO t2 VALUES (NULL, 10);
INSERT INTO t1 VALUES (NULL, 11);
connection con1;
--replace_result $ID ID
--eval KILL $ID
--source include/wait_condition.inc
--let $binlog_start= $binlog_killed_pos
--source include/show_binlog_events.inc

View File

@ -17,6 +17,13 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
# empty redo log from before MariaDB 10.2.2
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
@ -93,25 +100,38 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err
FOUND 1 /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
# missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
# 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
NOT FOUND /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42$/ in mysqld.1.err
# Clean 10.2 redo log
FOUND 1 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
# 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
FOUND 2 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
# Empty 10.3 redo log
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
FOUND 1 /InnoDB: .* started; log sequence number 1213970/ in mysqld.1.err
# Empty 10.2 redo log
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
1
FOUND 1 /InnoDB: Encrypting redo log/ in mysqld.1.err
FOUND 2 /InnoDB: Encrypting redo log/ in mysqld.1.err
ib_buffer_pool
ib_logfile0
ib_logfile1

View File

@ -8,21 +8,15 @@ PRIMARY KEY(id)
INSERT INTO t1 VALUES(1), (2), (3);
BEGIN;
SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
id
1
connect con1,localhost,root,,;
BEGIN;
SELECT * FROM t1 WHERE id = 2 FOR UPDATE;
id
2
SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
connection default;
SELECT * FROM t1 WHERE id = 2 FOR UPDATE;
connection con1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ROLLBACK;
connection default;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ROLLBACK;
DROP TABLE t1;
disconnect con1;

View File

@ -470,8 +470,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
ddl_log_file_alter_table 2
connection con1;
disconnect con1;
connection default;
SHOW CREATE TABLE t1;
Table Create Table
@ -498,6 +496,25 @@ ERROR 42000: Duplicate key name 'c2h'
SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_monitor_disable = module_ddl;
DROP TABLE t1;
#
# MDEV-13205 assertion !dict_index_is_online_ddl(index) upon ALTER TABLE
#
CREATE TABLE t1 (c VARCHAR(64)) ENGINE=InnoDB;
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL t1u_created WAIT_FOR dup_done';
ALTER TABLE t1 ADD UNIQUE(c);
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR t1u_created';
BEGIN;
INSERT INTO t1 VALUES('bar'),('bar');
SET DEBUG_SYNC = 'now SIGNAL dup_done';
connection default;
ERROR 23000: Duplicate entry 'bar' for key 'c'
SET DEBUG_SYNC = 'RESET';
disconnect con1;
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
DROP TABLE t2,t1;
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;

View File

@ -0,0 +1,10 @@
call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool");
SET @saved_debug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_lru_force_no_free_page";
CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB;
BEGIN;
INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
COMMIT;
SET debug_dbug = @saved_debug;
DROP TABLE t1;
FOUND 1 /InnoDB: Difficult to find free blocks / in mysqld.1.err

View File

@ -17,6 +17,13 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
# empty redo log from before MariaDB 10.2.2
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
@ -93,19 +100,32 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err
FOUND 1 /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
# missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
# 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
NOT FOUND /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42$/ in mysqld.1.err
# Clean 10.2 redo log
FOUND 1 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
# 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
FOUND 2 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
# Empty 10.3 redo log
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
FOUND 1 /InnoDB: .* started; log sequence number 1213970/ in mysqld.1.err
# Empty 10.2 redo log
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'

View File

@ -0,0 +1,114 @@
SET @save_dbug = @@SESSION.debug_dbug;
call mtr.add_suppression("InnoDB: Flagged corruption of .* in table `test`\\.`t` in TRUNCATE TABLE");
# 1. Error in assigning undo logs for truncate action
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c))
ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log';
truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
# 2. Error while preparing for truncate
SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate';
truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
# 3. Error while dropping/creating indexes
SET debug_dbug = '+d,ib_err_trunc_drop_index';
truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check Warning InnoDB: Index PRIMARY is marked as corrupted
test.t check error Corrupt
select * from t;
Got one of the listed errors
drop table t;
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c))
ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_create_index';
truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check Warning InnoDB: Index PRIMARY is marked as corrupted
test.t check error Corrupt
select * from t;
Got one of the listed errors
drop table t;
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c))
ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
select * from t;
i f c
drop table t;
# 4. Error while completing truncate of table involving FTS
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100),
FULLTEXT INDEX(c)) ENGINE = InnoDB;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
select * from t;
i f c
drop table t;
# 5. Error while updating sys-tables
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100),
FULLTEXT INDEX(c)) ENGINE = InnoDB;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
check table t;
Table Op Msg_type Msg_text
test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
select * from t order by i;
i f c
drop table t;

View File

@ -18,6 +18,8 @@ CREATE TABLE t1(
INSERT INTO t1 VALUES(1), (2), (3);
# We are not interested query results, only errors
--disable_result_log
BEGIN;
SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
@ -39,12 +41,22 @@ reap;
ROLLBACK;
#
# Note here that con1 is the older transaction as it
# query started wait first. Thus, con1 gets lock
# wait timeout first. There is possibility that
# default connection gets lock timeout also or
# as con1 is rolled back it gets the locks it waited
# and does the update.
#
connection default;
--error ER_LOCK_WAIT_TIMEOUT
--error 0,ER_LOCK_WAIT_TIMEOUT
reap;
ROLLBACK;
--enable_result_log
DROP TABLE t1;
disconnect con1;

View File

@ -457,8 +457,6 @@ connection default;
reap;
--enable_parsing
#remove below con1 disconnect if above test case is enabled
connection con1;
disconnect con1;
connection default;
SHOW CREATE TABLE t1;
@ -474,6 +472,31 @@ SET GLOBAL innodb_monitor_disable = module_ddl;
DROP TABLE t1;
--echo #
--echo # MDEV-13205 assertion !dict_index_is_online_ddl(index) upon ALTER TABLE
--echo #
CREATE TABLE t1 (c VARCHAR(64)) ENGINE=InnoDB;
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL t1u_created WAIT_FOR dup_done';
send ALTER TABLE t1 ADD UNIQUE(c);
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR t1u_created';
BEGIN;
INSERT INTO t1 VALUES('bar'),('bar');
SET DEBUG_SYNC = 'now SIGNAL dup_done';
connection default;
--error ER_DUP_ENTRY
reap;
SET DEBUG_SYNC = 'RESET';
disconnect con1;
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
DROP TABLE t2,t1;
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc

View File

@ -0,0 +1,24 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/not_embedded.inc
call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool");
SET @saved_debug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_lru_force_no_free_page";
CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB;
BEGIN;
INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
COMMIT;
SET debug_dbug = @saved_debug;
DROP TABLE t1;
#
# There should be only one message
#
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--let SEARCH_PATTERN=InnoDB: Difficult to find free blocks
--source include/search_pattern_in_file.inc

View File

@ -2,3 +2,5 @@
--default-storage-engine=MyISAM
--innodb-strict-mode=0
--innodb-file-per-table=0
--loose-innodb-track-changed-pages
--loose-innodb-log-archive

View File

@ -8,12 +8,10 @@
-- source include/not_encrypted.inc
--disable_query_log
call mtr.add_suppression("InnoDB: Table `test`.`t1` is corrupted. Please drop the table and recreate.");
call mtr.add_suppression("InnoDB: Cannot open table test/t1 from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.");
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \[page id: space=[0-9]+, page number=[0-9]+\]. You may have to recover from a backup.");
call mtr.add_suppression("InnoDB: We detected index corruption in an InnoDB type table.*");
call mtr.add_suppression("mysqld: Index for table 't1' is corrupt; try to repair it");
call mtr.add_suppression("mysqld.exe: Index for table 't1' is corrupt; try to repair it");
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted\\. Please drop the table and recreate\\.");
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page");
call mtr.add_suppression("InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it");
--enable_query_log
--echo # Ensure that purge will not crash on the table after we corrupt it.

View File

@ -16,7 +16,7 @@ call mtr.add_suppression("InnoDB: Log scan aborted at LSN");
call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42\\r?$");
call mtr.add_suppression("InnoDB: Obtaining redo log encryption key version 1 failed");
call mtr.add_suppression("InnoDB: Decrypting checkpoint failed");
call mtr.add_suppression("`mysql\\.transaction_registry` does not exist");
call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfiles to start up the database\\? Log sequence number in the ib_logfiles is 1213964,");
--enable_query_log
let bugdir= $MYSQLTEST_VARDIR/tmp/log_corruption;
@ -141,6 +141,24 @@ eval $check_no_innodb;
let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2, and it appears corrupted;
--source include/search_pattern_in_file.inc
--echo # empty redo log from before MariaDB 10.2.2
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
die unless seek(OUT, 0x800, 0);
print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 0, 0xb2a);
close OUT or die;
EOF
--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=1m
--source include/start_mysqld.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
--source include/shutdown_mysqld.inc
--let SEARCH_PATTERN= InnoDB: Upgrading redo log:
--source include/search_pattern_in_file.inc
--let $restart_parameters= $dirs
--echo # redo log from "after" MariaDB 10.2.2, but with invalid header checksum
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
@ -337,7 +355,7 @@ let SEARCH_PATTERN=InnoDB: MLOG_FILE_NAME incorrect:bigot;
--let SEARCH_PATTERN= len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;
--source include/search_pattern_in_file.inc
--echo # missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
--echo # 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
@ -365,27 +383,68 @@ EOF
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
--let SEARCH_PATTERN= InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42\$
--let SEARCH_PATTERN= InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42
--source include/search_pattern_in_file.inc
--echo # Clean 10.2 redo log
--echo # 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
print OUT pack("Nx[5]nx[5]", 103, 0x1286), "MariaDB 10.3.1";
print OUT pack("x[478]N", 0x85021a0f);
close OUT or die;
EOF
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
--let SEARCH_PATTERN= InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42
--source include/search_pattern_in_file.inc
--echo # Empty 10.3 redo log
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
die unless seek(OUT, 0x800, 0);
print OUT pack("H*", "800009440022000c00000001");
# dummy padding (MLOG_DUMMY_RECORD)
print OUT " " x 6;
# MLOG_CHECKPOINT record
print OUT pack("CNN", 56, 0, 0x12860c);
# padding (MLOG_DUMMY_RECORD) and block checksum
print OUT " " x 481, pack("N", 0xe9b21b7b);
print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 1, 0x46c8a2a2);
close OUT or die;
EOF
--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=1m
--source include/start_mysqld.inc
eval $check_no_innodb;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
--source include/shutdown_mysqld.inc
--let SEARCH_PATTERN= InnoDB: .* started; log sequence number 1213970
--source include/search_pattern_in_file.inc
--echo # Empty 10.2 redo log
perl;
die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
# header block
print OUT pack("Nx[5]nx[5]", 1, 0x1286);
print OUT "ibbackup was here!!!1!";
print OUT pack("x[470]N", 0x52b54540);
# In encryption.innodb_log_corruption the previous step would
# replace the block with an encrypted one and update the checkpoint.
# Restore them.
# invalid (all-zero) checkpoint page 1 and an empty log page
print OUT chr(0) x 1024;
# valid checkpoint block 2
print OUT pack("x[12]NNNx[264]", 0x12860c, 0, 0x80c);
# pointer to the MLOG_CHECKPOINT record, and checkpoint page checksum
print OUT pack("H*x[204]NNN", "590DBAACFE922582", 0x128612, 0, 0x101741b);
# log page
print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 1, 0x46c8a2a2);
close OUT or die;
EOF
--source include/start_mysqld.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
--source include/shutdown_mysqld.inc
--let SEARCH_PATTERN= InnoDB: Upgrading redo log:
--source include/search_pattern_in_file.inc

View File

@ -0,0 +1,97 @@
# This test is based on innodb_zip.wl6501_error_1 in MySQL 5.7.
--source include/have_innodb.inc
--source include/innodb_row_format.inc
--source include/have_debug.inc
SET @save_dbug = @@SESSION.debug_dbug;
call mtr.add_suppression("InnoDB: Flagged corruption of .* in table `test`\\.`t` in TRUNCATE TABLE");
--echo # 1. Error in assigning undo logs for truncate action
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c))
ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
#
SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log';
--error ER_GET_ERRNO
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
select * from t;
--echo # 2. Error while preparing for truncate
SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate';
--error ER_GET_ERRNO
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
select * from t;
--echo # 3. Error while dropping/creating indexes
SET debug_dbug = '+d,ib_err_trunc_drop_index';
--error ER_GET_ERRNO
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
--error ER_TABLE_CORRUPT,ER_GET_ERRNO
select * from t;
drop table t;
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c))
ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
SET debug_dbug = '+d,ib_err_trunc_create_index';
--error ER_GET_ERRNO
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
--error ER_TABLE_CORRUPT,ER_GET_ERRNO
select * from t;
drop table t;
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c))
ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
select * from t;
drop table t;
--echo # 4. Error while completing truncate of table involving FTS
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100),
FULLTEXT INDEX(c)) ENGINE = InnoDB;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
select * from t;
drop table t;
--echo # 5. Error while updating sys-tables
CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100),
FULLTEXT INDEX(c)) ENGINE = InnoDB;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t;
SET debug_dbug = @save_dbug;
check table t;
select * from t order by i;
drop table t;

View File

@ -162,11 +162,15 @@ INSERT INTO articles (FTS_DOC_ID, title, body) VALUES
(14,'1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
(19, 'MySQL vs. YourSQL','In the following database comparison ...'),
(20, 'MySQL Security','When configured properly, MySQL ...');
ALTER TABLE articles ADD FULLTEXT INDEX idx3 (title),
ADD FULLTEXT INDEX idx5 (title);
ERROR HY000: InnoDB presently supports one FULLTEXT index creation at a time
CREATE FULLTEXT INDEX idx on articles (title);
ALTER TABLE articles ADD FULLTEXT INDEX idx3 (title);
ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
ADD FULLTEXT INDEX idx3 (title), ALGORITHM=INPLACE;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
ADD FULLTEXT INDEX idx3 (title);
affected rows: 6
info: Records: 6 Duplicates: 0 Warnings: 1
Warnings:
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
ALTER TABLE articles ADD INDEX t20 (title(20)), LOCK=NONE;
ALTER TABLE articles DROP INDEX t20;
INSERT INTO articles (FTS_DOC_ID, title, body) VALUES

View File

@ -195,12 +195,13 @@ INSERT INTO articles (FTS_DOC_ID, title, body) VALUES
(19, 'MySQL vs. YourSQL','In the following database comparison ...'),
(20, 'MySQL Security','When configured properly, MySQL ...');
--error ER_INNODB_FT_LIMIT
ALTER TABLE articles ADD FULLTEXT INDEX idx3 (title),
ADD FULLTEXT INDEX idx5 (title);
CREATE FULLTEXT INDEX idx on articles (title);
ALTER TABLE articles ADD FULLTEXT INDEX idx3 (title);
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
ADD FULLTEXT INDEX idx3 (title), ALGORITHM=INPLACE;
--enable_info
ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
ADD FULLTEXT INDEX idx3 (title);
--disable_info
ALTER TABLE articles ADD INDEX t20 (title(20)), LOCK=NONE;
ALTER TABLE articles DROP INDEX t20;

View File

@ -1,225 +0,0 @@
#
# WL#6501: make truncate table atomic
#
--source include/have_innodb.inc
--source include/have_debug.inc
--disable_query_log
# suppress expected warnings
call mtr.add_suppression("Unable to truncate FTS index for table");
call mtr.add_suppression("Unable to assign a new identifier to table "
"`.*`\.`.*` after truncating it");
call mtr.add_suppression("Flagged corruption of .* in table "
"`.*`\.`.*` in TRUNCATE TABLE");
call mtr.add_suppression("Parent table of FTS auxiliary table "
".*\/.* not found");
--enable_query_log
################################################################################
#
# Will test following scenarios:
# 1. Error in assigning undo logs for truncate action.
# 2. Error while preparing for truncate.
# 3. Error while dropping/creating indexes.
# 4. Error while completing truncate of table involving FTS.
# 5. Error while updating sys-tables.
#
################################################################################
#-----------------------------------------------------------------------------
#
# create test-bed
#
let $per_table = `select @@innodb_file_per_table`;
eval set global innodb_file_per_table = on;
let $WL6501_TMP_DIR = `select @@tmpdir`;
let $WL6501_DATA_DIR = `select @@datadir`;
set innodb_strict_mode=off;
#-----------------------------------------------------------------------------
#
# 1. Error in assigning undo logs for truncate action.
#
--echo "1. Error in assigning undo logs for truncate action."
eval set global innodb_file_per_table = $wl6501_file_per_table;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = $wl6501_row_fmt
key_block_size = $wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select * from t;
#check table t;
#
set session debug = "+d,ib_err_trunc_assigning_undo_log";
--error ER_GET_ERRNO
truncate table t;
set session debug = "-d,ib_err_trunc_assigning_undo_log";
#
#check table t;
select * from t;
drop table t;
#-----------------------------------------------------------------------------
#
# 2. Error while preparing for truncate.
#
--echo "2. Error while preparing for truncate."
eval set global innodb_file_per_table = $wl6501_file_per_table;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = $wl6501_row_fmt
key_block_size = $wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select * from t;
#check table t;
#
set session debug = "+d,ib_err_trunc_preparing_for_truncate";
--error ER_GET_ERRNO
truncate table t;
set session debug = "-d,ib_err_trunc_preparing_for_truncate";
#
#check table t;
select * from t;
drop table t;
#-----------------------------------------------------------------------------
#
# 3. Error while dropping/creating indexes
#
--echo "3. Error while dropping/creating indexes"
eval set global innodb_file_per_table = $wl6501_file_per_table;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = $wl6501_row_fmt
key_block_size = $wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select * from t;
#check table t;
#
set session debug = "+d,ib_err_trunc_drop_index";
--error ER_GET_ERRNO
truncate table t;
set session debug = "-d,ib_err_trunc_drop_index";
#
#check table t;
--error ER_TABLE_CORRUPT, 1030
select * from t;
drop table t;
#
#
eval set global innodb_file_per_table = $wl6501_file_per_table;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = $wl6501_row_fmt
key_block_size = $wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select * from t;
#check table t;
#
set session debug = "+d,ib_err_trunc_create_index";
--error ER_GET_ERRNO
truncate table t;
set session debug = "-d,ib_err_trunc_create_index";
#
#check table t;
--error ER_TABLE_CORRUPT, 1030
select * from t;
drop table t;
#
#
eval set global innodb_file_per_table = $wl6501_file_per_table;
--disable_warnings
eval create temporary table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = $wl6501_row_fmt
key_block_size = $wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select * from t;
#check table t;
#
set session debug = "+d,ib_err_trunc_temp_recreate_index";
--error ER_GET_ERRNO
truncate table t;
set session debug = "-d,ib_err_trunc_temp_recreate_index";
#
#check table t;
--error ER_TABLE_CORRUPT, 1030
select * from t;
drop table t;
#-----------------------------------------------------------------------------
#
# 4. Error while completing truncate of table involving FTS.
#
--echo "4. Error while completing truncate of table involving FTS."
eval set global innodb_file_per_table = $wl6501_file_per_table;
--disable_warnings
eval create $wl6501_temp table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=$wl6501_row_fmt
key_block_size=$wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t;
#check table t;
#
set session debug = "+d,ib_err_trunc_during_fts_trunc";
--error ER_GET_ERRNO
truncate table t;
set session debug = "-d,ib_err_trunc_during_fts_trunc";
#
#check table t;
--error ER_TABLE_CORRUPT, 1030
select * from t;
drop table t;
#-----------------------------------------------------------------------------
#
# 5. Error while updating sys-tables.
#
--echo "5. Error while updating sys-tables."
eval set global innodb_file_per_table = $wl6501_file_per_table;
--disable_warnings
eval create $wl6501_temp table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=$wl6501_row_fmt
key_block_size=$wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t order by i;
#check table t;
#
set session debug = "+d,ib_err_trunc_during_sys_table_update";
--error ER_GET_ERRNO
truncate table t;
set session debug = "-d,ib_err_trunc_during_sys_table_update";
#
#check table t;
--error ER_TABLE_CORRUPT, 1030
select * from t order by i;
drop table t;
#-----------------------------------------------------------------------------
#
# remove test-bed
#
eval set global innodb_file_per_table = $per_table;

View File

@ -0,0 +1,6 @@
--innodb-encrypt-log=ON
--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
--loose-file-key-management
--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/filekeys-data.key
--loose-file-key-management-filename=$MTR_SUITE_DIR/filekeys-data.enc
--loose-file-key-management-encryption-algorithm=aes_cbc

View File

@ -1,10 +1,11 @@
#
# MDEV-13416 mariabackup fails with EFAULT "Bad Address"
#
FOUND 1 /InnoDB: 5\.7\.\d+ started; log sequence number 17592186044428/ in mysqld.1.err
FOUND 1 /InnoDB: New log files created, LSN=175964\d{8}/ in mysqld.1.err
CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1);
# xtrabackup backup
SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t VALUES(2);
# xtrabackup prepare
# shutdown server

View File

@ -1,4 +1,5 @@
--source include/not_embedded.inc
--source include/have_file_key_management.inc
--echo #
--echo # MDEV-13416 mariabackup fails with EFAULT "Bad Address"
@ -16,7 +17,7 @@ binmode FILE;
my $ps= $ENV{INNODB_PAGE_SIZE};
my $page;
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
substr($page,26,8) = pack("NN", 4096, 0);
substr($page,26,8) = pack("NN", 4096, ~1024);
substr($page,0,4)=pack("N",0xdeadbeef);
substr($page,$ps-8,4)=pack("N",0xdeadbeef);
sysseek(FILE, 0, 0) || die "Unable to rewind $file\n";
@ -27,8 +28,9 @@ EOF
--remove_files_wildcard $MYSQLD_DATADIR ib_logfile*
--source include/start_mysqld.inc
let SEARCH_RANGE= -50000;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--let SEARCH_PATTERN= InnoDB: 5\.7\.\d+ started; log sequence number 17592186044428
--let SEARCH_PATTERN= InnoDB: New log files created, LSN=175964\d{8}
--source include/search_pattern_in_file.inc
CREATE TABLE t(i INT) ENGINE INNODB;
@ -39,6 +41,7 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
--enable_result_log
SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t VALUES(2);
echo # xtrabackup prepare;
--disable_result_log

View File

@ -0,0 +1,42 @@
include/master-slave.inc
[connection master]
connection slave;
call mtr.add_suppression("Slave IO thread did not receive an expected Rows-log end-of-statement");
call mtr.add_suppression("Relay log write failure: could not queue event from master");
SET @save_debug= @@global.debug;
SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss";
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, MASTER_USE_GTID=SLAVE_POS;
connection master;
CREATE TABLE t (a INT, b text(8192));;
INSERT INTO t values (1, repeat('b', 8192)), (1, repeat('b', 8192));
connection slave;
START SLAVE IO_THREAD;
include/wait_for_slave_io_error.inc [errno=1595]
SET GLOBAL debug_dbug="-d,simulate_stmt_end_rows_event_loss";
include/start_slave.inc
connection master;
connection slave;
connection slave;
include/stop_slave.inc
connection master;
SET @save_log_bin_compress= @@GLOBAL.log_bin_compress;
SET @save_log_bin_compress_min_len= @@GLOBAL.log_bin_compress_min_len;
SET @@GLOBAL.log_bin_compress=ON;
SET @@GLOBAL.log_bin_compress_min_len=10;
INSERT INTO t values (2, repeat('b', 8192)), (2, repeat('b', 8192));
connection slave;
SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss";
START SLAVE IO_THREAD;
include/wait_for_slave_io_error.inc [errno=1595]
SET GLOBAL debug_dbug="-d,simulate_stmt_end_rows_event_loss";
include/start_slave.inc
connection master;
connection slave;
connection master;
SET @@GLOBAL.log_bin_compress= @save_log_bin_compress;
SET @@GLOBAL.log_bin_compress_min_len= @save_log_bin_compress_min_len;
DROP TABLE t;
connection slave;
SET GLOBAL debug_dbug= @save_debug;
include/rpl_end.inc

View File

@ -0,0 +1,2 @@
--binlog-row-event-max-size=8192

View File

@ -0,0 +1,66 @@
--source include/have_debug.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
# Loss of STMT_END flagged event must error out the IO thread
--connection slave
call mtr.add_suppression("Slave IO thread did not receive an expected Rows-log end-of-statement");
call mtr.add_suppression("Relay log write failure: could not queue event from master");
SET @save_debug= @@global.debug;
SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss";
--source include/stop_slave.inc
--replace_result $MASTER_MYPORT MASTER_PORT
--eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, MASTER_USE_GTID=SLAVE_POS
--connection master
--let $max_row_size=8192
--eval CREATE TABLE t (a INT, b text($max_row_size));
--eval INSERT INTO t values (1, repeat('b', $max_row_size)), (1, repeat('b', $max_row_size))
# Prove that the missed STMT_END marked rows-event causes the io thread stop.
--connection slave
START SLAVE IO_THREAD;
--let $slave_io_errno=1595
--source include/wait_for_slave_io_error.inc
SET GLOBAL debug_dbug="-d,simulate_stmt_end_rows_event_loss";
--source include/start_slave.inc
--connection master
sync_slave_with_master;
# Compressed version of the above
--connection slave
--source include/stop_slave.inc
--connection master
SET @save_log_bin_compress= @@GLOBAL.log_bin_compress;
SET @save_log_bin_compress_min_len= @@GLOBAL.log_bin_compress_min_len;
SET @@GLOBAL.log_bin_compress=ON;
SET @@GLOBAL.log_bin_compress_min_len=10;
--eval INSERT INTO t values (2, repeat('b', $max_row_size)), (2, repeat('b', $max_row_size))
# Prove that the missed STMT_END marked rows-event causes the io thread stop.
--connection slave
SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss";
START SLAVE IO_THREAD;
--let $slave_io_errno=1595
--source include/wait_for_slave_io_error.inc
SET GLOBAL debug_dbug="-d,simulate_stmt_end_rows_event_loss";
--source include/start_slave.inc
--connection master
sync_slave_with_master;
# cleanup
--connection master
SET @@GLOBAL.log_bin_compress= @save_log_bin_compress;
SET @@GLOBAL.log_bin_compress_min_len= @save_log_bin_compress_min_len;
DROP TABLE t;
sync_slave_with_master;
SET GLOBAL debug_dbug= @save_debug;
--source include/rpl_end.inc

View File

@ -482,6 +482,7 @@ select previous value for t1;
previous value for t1
1
CREATE TEMPORARY SEQUENCE t1 start with 100 minvalue 100 maxvalue 200 increment by 1 cache 10 engine=innodb;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
select previous value for t1;
previous value for t1
NULL

View File

@ -362,6 +362,7 @@ CREATE SEQUENCE t1 start with 1 minvalue 1 maxvalue 10 increment by 1 cache 10 e
select next value for t1;
select previous value for t1;
CREATE TEMPORARY SEQUENCE t1 start with 100 minvalue 100 maxvalue 200 increment by 1 cache 10 engine=innodb;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
select previous value for t1;
select next value for t1;
select previous value for t1;

View File

@ -853,3 +853,32 @@ execute stmt;
deallocate prepare stmt;
drop table t1;
--echo #
--echo # MDEV-14852: CTE using temporary table in query
--echo # with two references to the CTE
--echo #
create temporary table t1 (i int);
insert into t1 values (5),(4),(1),(2),(3);
with
c1 as (select i from t1),
c2 as (select i from c1 where c1.i=2)
select i from c1 where i > 3 union select i from c2;
drop table t1;
create table t1 (term char(10));
create temporary table t2 (term char(10));
insert into t1 values ('TERM01'),('TERM02'),('TERM03');
insert into t2 values ('TERM02'),('TERM03'),('TERM04');
with c1 as (select * from t1), c2 as (select * from t2)
(select * from c1 left outer join c2 on c1.term = c2.term)
union all
(select * from c1 right outer join c2 on c1.term = c2.term
where c1.term is null);
drop table t1,t2;

View File

@ -1999,6 +1999,93 @@ set @var=
drop table t1;
--echo #
--echo # mdev-14777: crash caused by the same as in mdev-14755
--echo #
--source include/have_sequence.inc
CREATE TABLE t1 (i1 int NOT NULL, i2 int);
CREATE TABLE t2 (d1 int NOT NULL PRIMARY KEY);
CREATE TABLE t3 (i int );
insert into t1 select seq,seq from seq_1_to_100000;
insert into t2 select seq from seq_1000_to_100000;
insert into t3 select seq from seq_1_to_1000;
SELECT *
FROM
(
SELECT *
FROM
(
WITH RECURSIVE rt AS
(
SELECT i2 P, i1 C FROM t1 WHERE i1 IN (SELECT d1 FROM t2)
UNION
SELECT t1.i2 P, rt.C C FROM t1, rt
)
SELECT C,P
FROM ( SELECT P,C FROM rt WHERE NOT EXISTS (SELECT 1 FROM t1) ) Y
) X
WHERE 1 = 1
) K, t3;
drop table t1,t2,t3;
--echo #
--echo # mdev-14879: subquery with recursive reference in WHERE of CTE
--echo #
create table flights
(departure varchar(32),
arrival varchar(32),
carrier varchar(20),
flight_number char(7));
insert into flights values
('Seattle', 'Frankfurt', 'Lufthansa', 'LH 491'),
('Seattle', 'Chicago', 'American', 'AA 2573'),
('Seattle', 'Los Angeles', 'Alaska Air', 'AS 410'),
('Chicago', 'New York', 'American', 'AA 375'),
('Chicago', 'Montreal', 'Air Canada', 'AC 3053'),
('Los Angeles', 'New York', 'Delta', 'DL 1197'),
('Moscow', 'Tokyo', 'Aeroflot', 'SU 264'),
('New York', 'Paris', 'Air France', 'AF 23'),
('Frankfurt', 'Moscow', 'Lufthansa', 'LH 1444'),
('Tokyo', 'Seattle', 'ANA', 'NH 178'),
('Los Angeles', 'Tokyo', 'ANA', 'NH 175'),
('Moscow', 'Los Angeles', 'Aeroflot', 'SU 106'),
('Montreal', 'Paris', 'Air Canada', 'AC 870'),
('Cairo', 'Paris', 'Air France', 'AF 503'),
('New York', 'Seattle', 'American', 'AA 45'),
('Paris', 'Chicago', 'Air France', 'AF 6734');
with recursive destinations (city) as
( select a.arrival from flights a where a.departure='Cairo'
union
select b.arrival from destinations r, flights b where r.city=b.departure)
select * from destinations;
set standard_compliant_cte=0;
let $q=
with recursive destinations (city, legs) as
(
select a.arrival, 1 from flights a where a.departure='Cairo'
union
select b.arrival, r.legs + 1 from destinations r, flights b
where r.city=b.departure and b.arrival not in (select city from destinations)
)
select * from destinations;
eval $q;
eval explain extended $q;
set standard_compliant_cte=default;
drop table flights;
--echo #
--echo # MDEV-14217 [db crash] Recursive CTE when SELECT includes new field
--echo #

View File

@ -2140,6 +2140,31 @@ eval explain format=json $q;
drop table t1;
--echo #
--echo # MDEV-13454: consequence of mdev-14368 fixed for 5.5
--echo #
SET sql_mode = 'ONLY_FULL_GROUP_BY';
create table t1 (id int, id2 int);
insert into t1 values (1,1),(2,3),(3,4),(7,2);
create table t2(id2 int);
insert t2 values (1),(2),(3);
let $q=
SELECT * FROM t1
LEFT OUTER JOIN
(SELECT id2, COUNT(*) as ct FROM t2 GROUP BY id2) vc USING (id2)
WHERE (vc.ct>0);
eval $q;
eval EXPLAIN FORMAT=JSON $q;
DROP TABLE t1,t2;
SET sql_mode = DEFAULT;
--echo #
--echo # MDEV-10855: Pushdown into derived with window functions
--echo #

View File

@ -6078,6 +6078,33 @@ SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2;
--echo #
drop table t1, t2;
--echo #
--echo # MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_in
--echo # (5.5 test)
--echo #
SET @optimiser_switch_save= @@optimizer_switch;
CREATE TABLE t1 (a INT NOT NULL);
INSERT INTO t1 VALUES (1),(1),(1),(5),(5);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (5),(1);
CREATE TABLE t3 (c INT, KEY(c));
INSERT INTO t3 VALUES (5),(5);
SET optimizer_switch='semijoin=on';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
SET optimizer_switch='semijoin=off';
select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`)
and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
SET @@optimizer_switch= @optimiser_switch_save;
DROP TABLE t1, t2, t3;
--echo End of 5.5 tests
--echo # End of 10.0 tests
--echo #

View File

@ -259,7 +259,7 @@ static my_bool shannon_has_atomic_write(File file, int page_size)
************************************************************************/
/*
Initalize automic write sub systems.
Initialize automic write sub systems.
Checks if we have any devices that supports atomic write
*/

View File

@ -707,7 +707,7 @@ my_context_continue(struct my_context *c)
{
/*
This seems to be a common trick to run ConvertThreadToFiber() only on the
first occurence in a thread, in a way that works on multiple Windows
first occurrence in a thread, in a way that works on multiple Windows
versions.
*/
void *current_fiber= GetCurrentFiber();

View File

@ -236,7 +236,7 @@ int handle_options(int *argc, char ***argv,
{
is_cmdline_arg= 1;
/* save the separator too if skip unkown options */
/* save the separator too if skip unknown options */
if (my_getopt_skip_unknown)
(*argv)[argvpos++]= cur_arg;
else

Some files were not shown because too many files have changed in this diff Show More