Commit 949faa2e authored by Alexander Barkov's avatar Alexander Barkov

Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext

parents 012fbc15 eecce3d7
#!/bin/sh
set -v -x
if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then
if [[ "${CXX}" == 'clang++' ]]; then
CMAKE_OPT="-DWITHOUT_TOKUDB_STORAGE_ENGINE=ON -DWITHOUT_MROONGA_STORAGE_ENGINE=ON"
#CMAKE_OPT="${CMAKE_OPT} -DWITH_ASAN=ON"
if which ccache ; then
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi
case ${GCC_VERSION} in
5) CXX=clang++-3.9 ;;
6) CXX=clang++-4.0 ;;
esac
export CXX CC=${CXX/++/}
elif [[ "${CXX}" == 'g++' ]]; then
CMAKE_OPT=""
export CXX=g++-${GCC_VERSION}
export CC=gcc-${GCC_VERSION}
fi
if [[ ${GCC_VERSION} == 6 ]]; then
wget http://mirrors.kernel.org/ubuntu/pool/universe/p/percona-xtradb-cluster-galera-2.x/percona-xtradb-cluster-galera-2.x_165-0ubuntu1_amd64.deb ;
ar vx percona-xtradb-cluster-galera-2.x_165-0ubuntu1_amd64.deb
tar -xJvf data.tar.xz
export WSREP_PROVIDER=$PWD/usr/lib/libgalera_smm.so
MYSQL_TEST_SUITES="${MYSQL_TEST_SUITES},wsrep"
#elif [[ ${GCC_VERSION} != 5 ]]; then
#CMAKE_OPT="${CMAKE_OPT} -DWITH_ASAN=ON"
fi
else
# osx_image based tests
CMAKE_OPT="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl"
#CMAKE_OPT="${CMAKE_OPT} -DWITH_ASAN=ON"
if which ccache ; then
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_MROONGA_STORAGE_ENGINE=ON"
if [[ "${TYPE}" == "Debug" ]]; then
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON"
fi
fi
# main.mysqlhotcopy_myisam consitently failed in travis containers
# https://travis-ci.org/grooverdan/mariadb-server/builds/217661580
echo 'main.mysqlhotcopy_myisam : unstable in containers' >> ${TRAVIS_BUILD_DIR}/mysql-test/unstable-tests
echo 'archive.mysqlhotcopy_archive : unstable in containers' >> ${TRAVIS_BUILD_DIR}/mysql-test/unstable-tests
set +v +x
# vim ft=yaml # vim ft=yaml
# travis-ci.org definition # travis-ci.org definition
# non-container builds don't have enough RAM to reliably compile sudo: false
sudo: required
dist: trusty dist: trusty
git:
depth: 2
language: cpp language: cpp
os:
- linux
- osx
osx_image: xcode8.3
compiler: compiler:
- gcc - gcc
- clang
cache: cache:
- apt apt: true
- ccache ccache: true
directories:
- /usr/local/Cellar
env: env:
matrix: matrix:
- GCC_VERSION=4.8 # - GCC_VERSION=4.8 TYPE=Debug MYSQL_TEST_SUITES=rpl
- GCC_VERSION=5 # - GCC_VERSION=5 TYPE=Debug MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
- GCC_VERSION=6 # - GCC_VERSION=6 TYPE=Debug MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
# - GCC_VERSION=6 TYPE=Debug MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
- GCC_VERSION=4.8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
- GCC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
- GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
- GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
matrix:
exclude:
- os: osx
compiler: gcc
include:
- os: linux
compiler: gcc
script:
- ${CC} --version ; ${CXX} --version
# Just for disabling hotcopy tests for now
- source .travis.compiler.sh
# https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable
# in trusty containers
- export MTR_MEM=/tmp
- env DEB_BUILD_OPTIONS="parallel=6" debian/autobake-deb.sh;
- ccache --show-stats
# Matrix include for coverity
# - env:
# - GCC_VERSION=6
# addon:
# coverity_scan:
# # ref: https://scan.coverity.com/travis_ci
# # GitHub project metadata
# project:
# - name: MariaDB/server
# - description: MariaDB Server
#
# # Where email notification of build analysis results will be sent
# notification_email: security@mariadb.org
#
# # Commands to prepare for build_command
# build_command_prepend:
# - source .travis.compiler.sh
# - ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version
# - cmake .
# -DCMAKE_BUILD_TYPE=Debug
# -DWITH_SSL=system -DWITH_ZLIB=system
# -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON -DWITHOUT_MROONGA_STORAGE_ENGINE=ON
#
# # The command that will be added as an argument to "cov-build" to compile your project for analysis,
# build_command: make -j 4
#
# # Pattern to match selecting branches that will run analysis.
# # Take care in resource usage, and consider the build frequency allowances per
# # https://scan.coverity.com/faq#frequency - 7 per week is the current limit.
# branch_pattern: .*coverity.*
addons: addons:
apt: apt:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
# below requires https://github.com/travis-ci/apt-source-whitelist/pull/309 - llvm-toolchain-trusty
# - llvm-toolchain-trusty-3.8 - llvm-toolchain-trusty-3.9
# - llvm-toolchain-trusty-3.9 - llvm-toolchain-trusty-4.0
# llvm urls awaiting fix
# https://github.com/travis-ci/apt-source-whitelist/pull/288
# https://github.com/travis-ci/apt-source-whitelist/pull/309
packages: # make sure these match debian/control contents packages: # make sure these match debian/control contents
- gcc-5 - gcc-5
- g++-5 - g++-5
- gcc-6 - gcc-6
- g++-6 - g++-6
- clang-3.9
- llvm-3.9-dev
- clang-4.0
- llvm-4.0-dev
- libasan0
- bison - bison
- chrpath - chrpath
- cmake - cmake
...@@ -41,6 +107,7 @@ addons: ...@@ -41,6 +107,7 @@ addons:
- gdb - gdb
- libaio-dev - libaio-dev
- libboost-dev - libboost-dev
- libcurl3-dev
- libjudy-dev - libjudy-dev
- libncurses5-dev - libncurses5-dev
- libpam0g-dev - libpam0g-dev
...@@ -57,18 +124,40 @@ addons: ...@@ -57,18 +124,40 @@ addons:
- zlib1g-dev - zlib1g-dev
- libcrack2-dev - libcrack2-dev
- libjemalloc-dev - libjemalloc-dev
- libsnappy-dev
- liblzma-dev
- libzmq-dev
- libdistro-info-perl
- devscripts # implicit for any build on Ubuntu - devscripts # implicit for any build on Ubuntu
# libsnappy-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3880
# liblzma-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3879
# libzmq-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3881
# libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882 # libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882
before_install:
- if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then
brew update;
brew install gnutls lz4 lzo xz snappy ccache jemalloc curl ossp-uuid pcre;
brew link ccache;
fi
script: script:
- export MYSQL_BUILD_CC=/usr/bin/gcc-${GCC_VERSION} MYSQL_BUILD_CXX=/usr/bin/g++-${GCC_VERSION} - ccache --version
- ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version # Clang:
- cd "${TRAVIS_BUILD_DIR}" # mroonga just generates too many warnings with clang and travis stops the job
- env DEB_BUILD_OPTIONS="parallel=3" debian/autobake-deb.sh; # tokudb has fatal warnings
- source .travis.compiler.sh
- cmake .
-DCMAKE_BUILD_TYPE=${TYPE}
${CMAKE_OPT}
-DWITH_SSL=system -DWITH_ZLIB=system -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC -DAWS_SDK_EXTERNAL_PROJECT=ON
- make -j 6
- cd mysql-test
# With ASAN --thread-stack=400K to account for overhead
# Test timeout needs to be 10(minutes) or less due to travis out timeout
- ./mtr --force --max-test-fail=20 --parallel=6 --testcase-timeout=2
--suite=${MYSQL_TEST_SUITES}
--skip-test-list=unstable-tests
--skip-test=binlog.binlog_unsafe
- ccache --show-stats
notifications: notifications:
irc: irc:
......
MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=2 MYSQL_VERSION_MINOR=2
MYSQL_VERSION_PATCH=5 MYSQL_VERSION_PATCH=6
...@@ -201,9 +201,15 @@ MACRO(MYSQL_ADD_PLUGIN) ...@@ -201,9 +201,15 @@ MACRO(MYSQL_ADD_PLUGIN)
# executable to the linker command line (it would result into link error). # executable to the linker command line (it would result into link error).
# Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate # Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate
# an additional dependency. # an additional dependency.
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT ARG_CLIENT) IF(NOT ARG_CLIENT)
IF(MSVC)
ADD_DEPENDENCIES(${target} gen_mysqld_lib)
TARGET_LINK_LIBRARIES(${target} mysqld_import_lib)
ELSEIF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
TARGET_LINK_LIBRARIES (${target} mysqld) TARGET_LINK_LIBRARIES (${target} mysqld)
ENDIF() ENDIF()
ENDIF()
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES}) ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
SET_TARGET_PROPERTIES(${target} PROPERTIES SET_TARGET_PROPERTIES(${target} PROPERTIES
......
'\" t '\" t
.\" .\"
.TH "\FBCOMP_ERR\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBCOMP_ERR\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBGALERA_NEW_CLUSTER\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBGALERA_NEW_CLUSTER\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBGALERA_RECOVERY\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBGALERA_RECOVERY\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBINNOCHECKSUM\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBINNOCHECKSUM\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMAKE_WIN_BIN_DIST" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMAKE_WIN_BIN_DIST" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMARIADB-SERVICE-CONVERT\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBMARIADB-SERVICE-CONVERT\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMSQL2MYSQL\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMSQL2MYSQL\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMY_PRINT_DEFAULTS" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMY_PRINT_DEFAULTS" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYISAM_FTDUMP\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYISAM_FTDUMP\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYISAMCHK\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYISAMCHK\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYISAMLOG\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYISAMLOG\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYISAMPACK\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYISAMPACK\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL\-STRESS\-TE" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL\-STRESS\-TE" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL\-TEST\-RUN\" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL\-TEST\-RUN\" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL\&.SERVER\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL\&.SERVER\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_CLIENT_TEST" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_CLIENT_TEST" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_CONFIG\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_CONFIG\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_CONVERT_TAB" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_CONVERT_TAB" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_FIND_ROWS\F" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_FIND_ROWS\F" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_FIX_EXTENSI" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_FIX_EXTENSI" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_INSTALL_DB\" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_INSTALL_DB\" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_PLUGIN\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_PLUGIN\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_SECURE_INST" "1" "3 January 2017" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_SECURE_INST" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_SETPERMISSI" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_SETPERMISSI" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_TZINFO_TO_S" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_TZINFO_TO_S" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_UPGRADE\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_UPGRADE\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQL_WAITPID\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQL_WAITPID\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLACCESS\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLACCESS\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLADMIN\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLADMIN\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLBINLOG\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLBINLOG\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLCHECK\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLCHECK\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLD\FR" "8" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLD\FR" "8" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLD_MULTI\FR" "1" "7 December 2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLD_MULTI\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLD_SAFE\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLD_SAFE\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLD_SAFE_HELPER\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBMYSQLD_SAFE_HELPER\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLDUMP\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLDUMP\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
...@@ -858,6 +858,22 @@ instead\&. ...@@ -858,6 +858,22 @@ instead\&.
.sp -1 .sp -1
.IP \(bu 2.3 .IP \(bu 2.3
.\} .\}
.\" mysqldump: flashback option
.\" flashback option: mysqldump
\fB\-\-flashback\fR,
\fB\-B\fR
.sp
Support flashback mode\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysqldump: flush-logs option .\" mysqldump: flush-logs option
.\" flush-logs option: mysqldump .\" flush-logs option: mysqldump
\fB\-\-flush\-logs\fR, \fB\-\-flush\-logs\fR,
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLDUMPSLOW\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLDUMPSLOW\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLHOTCOPY\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLHOTCOPY\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLIMPORT\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLIMPORT\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLSHOW\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLSHOW\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLSLAP\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLSLAP\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLTEST\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBMYSQLTEST\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBPERROR\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBPERROR\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBREPLACE\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBREPLACE\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBRESOLVE_STACK_DUM" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBRESOLVE_STACK_DUM" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBRESOLVEIP\FR" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" .TH "\FBRESOLVEIP\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBTOKUFTDUMP\FR" "1" "9 March 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBTOKUFTDUMP\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBWSREP_SST_COMMON\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBWSREP_SST_COMMON\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBWSREP_SST_MYSQLDUMP\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBWSREP_SST_MYSQLDUMP\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBWSREP_SST_RSYNC\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBWSREP_SST_RSYNC\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBWSREP_SST_XTRABACKUP-V2\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBWSREP_SST_XTRABACKUP-V2\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
'\" t '\" t
.\" .\"
.TH "\FBWSREP_SST_XTRABACKUP\FR" "1" "24 January 2017" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBWSREP_SST_XTRABACKUP\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
......
...@@ -246,7 +246,7 @@ my @mysqld_rules= ...@@ -246,7 +246,7 @@ my @mysqld_rules=
{ '#host' => \&fix_host }, { '#host' => \&fix_host },
{ 'port' => \&fix_port }, { 'port' => \&fix_port },
{ 'socket' => \&fix_socket }, { 'socket' => \&fix_socket },
{ '#log-error' => \&fix_log_error }, { 'log-error' => \&fix_log_error },
{ 'general-log' => 1 }, { 'general-log' => 1 },
{ 'plugin-dir' => sub { $::plugindir } }, { 'plugin-dir' => sub { $::plugindir } },
{ 'general-log-file' => \&fix_log }, { 'general-log-file' => \&fix_log },
...@@ -394,7 +394,7 @@ sub post_check_embedded_group { ...@@ -394,7 +394,7 @@ sub post_check_embedded_group {
my %no_copy = map { $_ => 1 } my %no_copy = map { $_ => 1 }
( (
'#log-error', # Embedded server writes stderr to mysqltest's log file 'log-error', # Embedded server writes stderr to mysqltest's log file
'slave-net-timeout', # Embedded server are not build with replication 'slave-net-timeout', # Embedded server are not build with replication
'shared-memory-base-name', # No shared memory for embedded 'shared-memory-base-name', # No shared memory for embedded
); );
......
...@@ -2759,7 +2759,7 @@ sub mysql_server_start($) { ...@@ -2759,7 +2759,7 @@ sub mysql_server_start($) {
# Already started # Already started
# Write start of testcase to log file # Write start of testcase to log file
mark_log($mysqld->value('#log-error'), $tinfo); mark_log($mysqld->value('log-error'), $tinfo);
return; return;
} }
...@@ -2816,7 +2816,7 @@ sub mysql_server_start($) { ...@@ -2816,7 +2816,7 @@ sub mysql_server_start($) {
mkpath($tmpdir) unless -d $tmpdir; mkpath($tmpdir) unless -d $tmpdir;
# Write start of testcase to log file # Write start of testcase to log file
mark_log($mysqld->value('#log-error'), $tinfo); mark_log($mysqld->value('log-error'), $tinfo);
# Run <tname>-master.sh # Run <tname>-master.sh
if ($mysqld->option('#!run-master-sh') and if ($mysqld->option('#!run-master-sh') and
...@@ -4261,7 +4261,7 @@ sub get_log_from_proc ($$) { ...@@ -4261,7 +4261,7 @@ sub get_log_from_proc ($$) {
foreach my $mysqld (all_servers()) { foreach my $mysqld (all_servers()) {
if ($mysqld->{proc} eq $proc) { if ($mysqld->{proc} eq $proc) {
my @srv_lines= extract_server_log($mysqld->if_exist('#log-error'), $name); my @srv_lines= extract_server_log($mysqld->if_exist('log-error'), $name);
$srv_log= "\nServer log from this test:\n" . $srv_log= "\nServer log from this test:\n" .
"----------SERVER LOG START-----------\n". join ("", @srv_lines) . "----------SERVER LOG START-----------\n". join ("", @srv_lines) .
"----------SERVER LOG END-------------\n"; "----------SERVER LOG END-------------\n";
...@@ -4468,7 +4468,7 @@ sub start_check_warnings ($$) { ...@@ -4468,7 +4468,7 @@ sub start_check_warnings ($$) {
my $name= "warnings-".$mysqld->name(); my $name= "warnings-".$mysqld->name();
my $log_error= $mysqld->value('#log-error'); my $log_error= $mysqld->value('log-error');
# To be communicated to the test # To be communicated to the test
$ENV{MTR_LOG_ERROR}= $log_error; $ENV{MTR_LOG_ERROR}= $log_error;
extract_warning_lines($log_error, 0); extract_warning_lines($log_error, 0);
...@@ -4626,7 +4626,7 @@ sub check_warnings_post_shutdown { ...@@ -4626,7 +4626,7 @@ sub check_warnings_post_shutdown {
foreach my $mysqld ( mysqlds()) foreach my $mysqld ( mysqlds())
{ {
my ($testlist, $match_lines)= my ($testlist, $match_lines)=
extract_warning_lines($mysqld->value('#log-error'), 1); extract_warning_lines($mysqld->value('log-error'), 1);
$testname_hash->{$_}= 1 for @$testlist; $testname_hash->{$_}= 1 for @$testlist;
$report.= join('', @$match_lines); $report.= join('', @$match_lines);
} }
...@@ -5075,7 +5075,7 @@ sub mysqld_start ($$) { ...@@ -5075,7 +5075,7 @@ sub mysqld_start ($$) {
# Remove the old pidfile if any # Remove the old pidfile if any
unlink($mysqld->value('pid-file')); unlink($mysqld->value('pid-file'));
my $output= $mysqld->value('#log-error'); my $output= $mysqld->value('log-error');
if ( $opt_valgrind and $opt_debug ) if ( $opt_valgrind and $opt_debug )
{ {
......
...@@ -961,3 +961,26 @@ show create view v1; ...@@ -961,3 +961,26 @@ show create view v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with alias1 as (select 1 AS `one`), alias2 as (select 2 AS `two`)select `alias1`.`one` AS `one`,`alias2`.`two` AS `two` from (`alias1` join `alias2`) latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with alias1 as (select 1 AS `one`), alias2 as (select 2 AS `two`)select `alias1`.`one` AS `one`,`alias2`.`two` AS `two` from (`alias1` join `alias2`) latin1 latin1_swedish_ci
drop view v1; drop view v1;
#
# MDEV-12440: the same CTE table is used in twice
#
create table t1 (a int, b varchar(32));
insert into t1 values
(4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd');
# cte2 is used in the main query and in the spec for ct3
with
cte1 as (select * from t1 where b >= 'c'),
cte2 as (select * from cte1 where a < 7),
cte3 as (select * from cte2 where a > 1)
select * from cte2, cte3 where cte2.a = cte3.a;
a b a b
4 dd 4 dd
# cte2 is used twice in the spec for ct3
with
cte1 as (select * from t1 where b >= 'b'),
cte2 as (select * from cte1 where b > 'c'),
cte3 as (select * from cte2 where a > 1 union select * from cte2 where a > 1)
select * from cte3;
a b
4 dd
drop table t1;
...@@ -2387,7 +2387,7 @@ PRIMARY KEY (clipid), ...@@ -2387,7 +2387,7 @@ PRIMARY KEY (clipid),
KEY tape(Tape(255)) KEY tape(Tape(255))
) CHARACTER SET=utf8mb4; ) CHARACTER SET=utf8mb4;
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes Note 1071 Specified key was too long; max key length is 1000 bytes
ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid; ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
......
...@@ -2347,7 +2347,7 @@ PRIMARY KEY (clipid), ...@@ -2347,7 +2347,7 @@ PRIMARY KEY (clipid),
KEY tape(Tape(255)) KEY tape(Tape(255))
) CHARACTER SET=utf8mb4 ENGINE InnoDB; ) CHARACTER SET=utf8mb4 ENGINE InnoDB;
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid; ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
......
...@@ -2347,7 +2347,7 @@ PRIMARY KEY (clipid), ...@@ -2347,7 +2347,7 @@ PRIMARY KEY (clipid),
KEY tape(Tape(255)) KEY tape(Tape(255))
) CHARACTER SET=utf8mb4 ENGINE MyISAM; ) CHARACTER SET=utf8mb4 ENGINE MyISAM;
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes Note 1071 Specified key was too long; max key length is 1000 bytes
ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid; ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
......
...@@ -921,9 +921,6 @@ explain partitions select * from t1 where a=10 and b=10; ...@@ -921,9 +921,6 @@ explain partitions select * from t1 where a=10 and b=10;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
alter table t1 drop partition p2; alter table t1 drop partition p2;
ERROR HY000: Table has no partition for value 2
delete from t1 where a=2;
alter table t1 drop partition p2;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -1069,9 +1066,6 @@ explain partitions select * from t1 where a=10 and b=10; ...@@ -1069,9 +1066,6 @@ explain partitions select * from t1 where a=10 and b=10;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
alter table t1 drop partition p2; alter table t1 drop partition p2;
ERROR HY000: Table has no partition for value from column_list
delete from t1 where a=2;
alter table t1 drop partition p2;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -1125,10 +1119,10 @@ alter table t1 add partition ...@@ -1125,10 +1119,10 @@ alter table t1 add partition
(partition p0 VALUES IN (2,3)); (partition p0 VALUES IN (2,3));
select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1'; select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
partition_name table_rows partition_name table_rows
p0 2 p0 0
p1 1 p1 1
p2 1 p2 1
pd 0 pd 2
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
PARTITION BY LIST COLUMNS(a,b) PARTITION BY LIST COLUMNS(a,b)
...@@ -1233,3 +1227,41 @@ select * from t1 where i is null; ...@@ -1233,3 +1227,41 @@ select * from t1 where i is null;
id select_type table partitions type possible_keys key key_len ref rows Extra id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
drop table t1; drop table t1;
#
# MDEV-12395: DROP PARTITION does not work as expected when
# table has DEFAULT LIST partition
#
CREATE TABLE t1 (i INT)
PARTITION BY LIST (i)
(PARTITION p VALUES IN (1,2,3,4),
PARTITION pdef DEFAULT);
INSERT INTO t1 VALUES (1),(10);
ALTER TABLE t1 DROP PARTITION p;
SELECT * FROM t1;
i
10
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY LIST (i)
(PARTITION pdef DEFAULT ENGINE = MyISAM)
DROP TABLE t1;
CREATE TABLE t1 (i INT)
PARTITION BY LIST (i)
(PARTITION p VALUES IN (1,2,3,4),
PARTITION pdef DEFAULT);
INSERT INTO t1 VALUES (1),(10);
ALTER TABLE t1 DROP PARTITION pdef;
SELECT * FROM t1;
i
1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY LIST (i)
(PARTITION p VALUES IN (1,2,3,4) ENGINE = MyISAM)
DROP TABLE t1;
...@@ -373,7 +373,7 @@ create table t1 (a text, unique (a(2100))); ...@@ -373,7 +373,7 @@ create table t1 (a text, unique (a(2100)));
ERROR 42000: Specified key was too long; max key length is 1000 bytes ERROR 42000: Specified key was too long; max key length is 1000 bytes
create table t1 (a text, key (a(2100))); create table t1 (a text, key (a(2100)));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes Note 1071 Specified key was too long; max key length is 1000 bytes
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -5954,6 +5954,43 @@ a ...@@ -5954,6 +5954,43 @@ a
2 2
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-8642: WHERE Clause not applied on View - Empty result set returned
#
CREATE TABLE `t1` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`use_case` int(11) DEFAULT NULL,
`current_deadline` date DEFAULT NULL,
`ts_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13976 DEFAULT CHARSET=latin1;
INSERT INTO `t1` VALUES (1,10,'2015-12-18','2015-08-18 08:38:16');
INSERT INTO `t1` VALUES (2,20,'2015-10-18','2015-08-18 08:43:30');
CREATE VIEW v1 AS SELECT
use_case as use_case_id,
(
SELECT
deadline_sub.current_deadline
FROM
t1 deadline_sub
WHERE
deadline_sub.use_case = use_case_id
AND ts_create = (SELECT
MIN(ts_create)
FROM
t1 startdate_sub
WHERE
startdate_sub.use_case = use_case_id
)
) AS InitialDeadline
FROM
t1;
SELECT * FROM v1 where use_case_id = 10;
use_case_id InitialDeadline
10 2015-12-18
drop view v1;
drop table t1;
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# -- End of 10.0 tests. # -- End of 10.0 tests.
# ----------------------------------------------------------------- # -----------------------------------------------------------------
...@@ -6429,5 +6466,18 @@ ERROR HY000: Can not modify more than one base table through a join view 'test.v ...@@ -6429,5 +6466,18 @@ ERROR HY000: Can not modify more than one base table through a join view 'test.v
drop view v; drop view v;
drop table t1,t2,t3; drop table t1,t2,t3;
# #
# MDEV-12379: Server crashes in TABLE_LIST::is_with_table on
# SHOW CREATE VIEW
#
CREATE TABLE t (i INT);
CREATE VIEW v AS SELECT * FROM ( SELECT * FROM t ) sq;
DROP TABLE IF EXISTS t;
SHOW CREATE VIEW v;
View Create View character_set_client collation_connection
v CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `sq`.`i` AS `i` from (select `test`.`t`.`i` AS `i` from `test`.`t`) `sq` latin1 latin1_swedish_ci
Warnings:
Warning 1356 View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DROP VIEW v;
#
# End of 10.2 tests # End of 10.2 tests
# #
set @@sql_mode=strict_trans_tables;
create table t1(a text not null) row_format=dynamic engine=innodb;
create index idx1 on t1(a(3073));
Warnings:
Note 1071 Specified key was too long; max key length is 3072 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text NOT NULL,
KEY `idx1` (`a`(3072))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
drop table t1;
set @@sql_mode=default;
...@@ -119,7 +119,6 @@ BEGIN; ...@@ -119,7 +119,6 @@ BEGIN;
INSERT INTO t1 SELECT * from t2; INSERT INTO t1 SELECT * from t2;
BEGIN; BEGIN;
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e; UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e;
# Kill and restart
UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f, UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f,
k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f, k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f,
v=@f,w=@f,x=@b,y=@f,z=@f, v=@f,w=@f,x=@b,y=@f,z=@f,
......
...@@ -271,7 +271,6 @@ vb=@c,wb=@c,xb=@c,yb=@c,zb=@c, ...@@ -271,7 +271,6 @@ vb=@c,wb=@c,xb=@c,yb=@c,zb=@c,
ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c, ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c,
kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c, kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c,
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c; vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
# Kill and restart
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e, UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e,
k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e, k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e,
v=@e,w=@e,x=@e,y=@e,z=@e, v=@e,w=@e,x=@e,y=@e,z=@e,
......
SET NAMES utf8;
CREATE TABLE ① (
c1 INT PRIMARY KEY, c2 INT DEFAULT 1, ct TEXT, INDEX(c2))
ENGINE = InnoDB;
CREATE TABLE t1ć (c1 INT PRIMARY KEY, c2 INT, INDEX(c2),
CONSTRAINT t1c2 FOREIGN KEY (c2) REFERENCES ①(c2))
ENGINE=InnoDB;
INSERT INTO ① SET c1 = 1;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG = '+d,ib_drop_foreign_error';
ALTER TABLE t1ć DROP FOREIGN KEY t1c2, RENAME TO ②;
ERROR HY000: The table 't1ć' is full
SET DEBUG_DBUG = @saved_debug_dbug;
SET DEBUG_DBUG = '+d,ib_rename_column_error';
ALTER TABLE ① CHANGE c2 š INT;
ERROR HY000: The table '①' is full
SET DEBUG_DBUG = @saved_debug_dbug;
SHOW CREATE TABLE t1ć;
Table Create Table
t1ć CREATE TABLE `t1ć` (
`c1` int(11) NOT NULL,
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `c2` (`c2`),
CONSTRAINT `t1c2` FOREIGN KEY (`c2`) REFERENCES `①` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1ć, ①;
#
# Bug #21364096 THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL
# WITH INCORRECT KEY NAME
create table t1 (id int auto_increment primary key, a int, unique key uk(a))
engine = innodb;
insert into t1 select 1, 1;
insert into t1 select 2, 2;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
alter table t1 add b int, ALGORITHM=inplace;
/* connection con1 */
connect con1,localhost,root,,;
SET DEBUG_SYNC = 'now WAIT_FOR s1';
insert into t1 select NULL, 1;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'now SIGNAL s2';
/* connection default */
connection default;
/* reap */ alter table t1 add b int, ALGORITHM=inplace;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
alter table t1 add b int, ALGORITHM=inplace;;
/* connection con1 */
connection con1;
set DEBUG_SYNC = 'now WAIT_FOR s1';
update t1 set a=1 where id=2;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'now SIGNAL s2';
disconnect con1;
/* connection default */
connection default;
/* reap */ alter table t1 add b int, ALGORITHM=inplace;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'RESET';
drop table t1;
CREATE TABLE t (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 INT) ENGINE=InnoDB;
INSERT INTO t VALUES (1,2,3),(4,5,6),(7,8,9);
ALTER TABLE t CHANGE c1 c1 INT NULL FIRST, ALGORITHM=INPLACE;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
set @old_sql_mode = @@sql_mode;
set @@sql_mode = 'STRICT_TRANS_TABLES';
ALTER TABLE t MODIFY c3 INT NOT NULL, ALGORITHM=INPLACE;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
set @@sql_mode = @old_sql_mode;
ALTER TABLE t CHANGE c2 c2 INT, CHANGE c2 c2 INT NOT NULL;
ERROR 42S22: Unknown column 'c2' in 't'
ALTER TABLE t MODIFY c2 INT, MODIFY c2 INT NOT NULL;
ERROR 42S22: Unknown column 'c2' in 't'
ALTER TABLE t MODIFY c2 INT UNSIGNED, MODIFY c2 INT;
ERROR 42S22: Unknown column 'c2' in 't'
ALTER TABLE t MODIFY c2 CHAR(1) NOT NULL, MODIFY c2 INT NOT NULL;
ERROR 42S22: Unknown column 'c2' in 't'
ALTER TABLE t CHANGE c2 c2 INT NOT NULL;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t MODIFY c2 INT NOT NULL;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
connect con1,localhost,root,,;
connection con1;
SET SQL_MODE='STRICT_ALL_TABLES';
UPDATE t SET c2=NULL;
ERROR 23000: Column 'c2' cannot be null
SELECT * FROM t;
c1 c2 c3
1 2 3
4 5 6
7 8 9
connection default;
ALTER TABLE t MODIFY c2 INT, ALGORITHM=INPLACE;
connection con1;
BEGIN;
UPDATE t SET c2=NULL;
SELECT * FROM t;
c1 c2 c3
1 NULL 3
4 NULL 6
7 NULL 9
ROLLBACK;
SELECT * FROM t;
c1 c2 c3
1 2 3
4 5 6
7 8 9
disconnect con1;
connection default;
ALTER TABLE t MODIFY c2 INT NULL, ALGORITHM=INPLACE;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE NAME='test/t';
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
# test/t 33 6 # Barracuda Dynamic 0 Single
DROP TABLE t;
...@@ -2543,11 +2543,11 @@ Warning 1071 Specified key was too long; max key length is 767 bytes ...@@ -2543,11 +2543,11 @@ Warning 1071 Specified key was too long; max key length is 767 bytes
create table t3 (col1 text, index(col1(768))) create table t3 (col1 text, index(col1(768)))
character set = latin1 engine = innodb; character set = latin1 engine = innodb;
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
create table t4 (col1 blob, index(col1(768))) create table t4 (col1 blob, index(col1(768)))
character set = latin1 engine = innodb; character set = latin1 engine = innodb;
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
SET GLOBAL innodb_large_prefix=default; SET GLOBAL innodb_large_prefix=default;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
......
DROP TABLE if exists t1;
set global innodb_defragment_stats_accuracy = 80; set global innodb_defragment_stats_accuracy = 80;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(256), KEY SECOND(a, b)) ENGINE=INNODB; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(256), KEY SECOND(a, b)) ENGINE=INNODB;
optimize table t1; optimize table t1;
......
SET @innodb_defragment_orig=@@GLOBAL.innodb_defragment;
SET GLOBAL innodb_defragment = 1;
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256), KEY(a, b)) ENGINE=INNODB;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
INSERT INTO t1 VALUES (100000, REPEAT('A', 256));
INSERT INTO t1 VALUES (200000, REPEAT('A', 256));
INSERT INTO t1 VALUES (300000, REPEAT('A', 256));
INSERT INTO t1 VALUES (400000, REPEAT('A', 256));
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
#
# MDEV-12198 innodb_defragment=1 crashes server on
# OPTIMIZE TABLE when FULLTEXT index exists
#
CREATE TABLE t1 (c TEXT, FULLTEXT KEY (c)) ENGINE=InnoDB;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
CREATE TABLE t1 (c POINT PRIMARY KEY, SPATIAL INDEX(c)) ENGINE=InnoDB;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
SET GLOBAL innodb_defragment = @innodb_defragment_orig;
--source include/have_innodb.inc
#
# MDEV-11995 ALTER TABLE proceeds despite reporting ER_TOO_LONG_KEY error
#
set @@sql_mode=strict_trans_tables;
create table t1(a text not null) row_format=dynamic engine=innodb;
create index idx1 on t1(a(3073));
show create table t1;
drop table t1;
set @@sql_mode=default;
...@@ -144,7 +144,9 @@ INSERT INTO t1 SELECT * from t2; ...@@ -144,7 +144,9 @@ INSERT INTO t1 SELECT * from t2;
BEGIN; BEGIN;
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e; UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e;
--source include/kill_and_restart_mysqld.inc --let $shutdown_timeout=0
--source include/restart_mysqld.inc
--let $shutdown_timeout=
UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f, UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f,
k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f, k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f,
......
...@@ -300,7 +300,9 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, ...@@ -300,7 +300,9 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c, kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c,
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c; vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
--source include/kill_and_restart_mysqld.inc --let $shutdown_timeout=0
--source include/restart_mysqld.inc
--let $shutdown_timeout=
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e, UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e,
k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e, k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e,
......
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/count_sessions.inc
SET NAMES utf8;
CREATE TABLE (
c1 INT PRIMARY KEY, c2 INT DEFAULT 1, ct TEXT, INDEX(c2))
ENGINE = InnoDB;
CREATE TABLE t1ć (c1 INT PRIMARY KEY, c2 INT, INDEX(c2),
CONSTRAINT t1c2 FOREIGN KEY (c2) REFERENCES (c2))
ENGINE=InnoDB;
INSERT INTO SET c1 = 1;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG = '+d,ib_drop_foreign_error';
--error ER_RECORD_FILE_FULL
ALTER TABLE t1ć DROP FOREIGN KEY t1c2, RENAME TO ;
SET DEBUG_DBUG = @saved_debug_dbug;
SET DEBUG_DBUG = '+d,ib_rename_column_error';
--error ER_RECORD_FILE_FULL
ALTER TABLE CHANGE c2 š INT;
SET DEBUG_DBUG = @saved_debug_dbug;
SHOW CREATE TABLE t1ć;
DROP TABLE t1ć, ;
--echo #
--echo # Bug #21364096 THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL
--echo # WITH INCORRECT KEY NAME
create table t1 (id int auto_increment primary key, a int, unique key uk(a))
engine = innodb;
insert into t1 select 1, 1;
insert into t1 select 2, 2;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
--send alter table t1 add b int, ALGORITHM=inplace
--echo /* connection con1 */
connect (con1,localhost,root,,);
SET DEBUG_SYNC = 'now WAIT_FOR s1';
--error ER_DUP_ENTRY
insert into t1 select NULL, 1;
SET DEBUG_SYNC = 'now SIGNAL s2';
--echo /* connection default */
connection default;
--echo /* reap */ alter table t1 add b int, ALGORITHM=inplace;
--error ER_DUP_ENTRY
--reap
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
--send alter table t1 add b int, ALGORITHM=inplace;
--echo /* connection con1 */
connection con1;
set DEBUG_SYNC = 'now WAIT_FOR s1';
--error ER_DUP_ENTRY
update t1 set a=1 where id=2;
SET DEBUG_SYNC = 'now SIGNAL s2';
disconnect con1;
--echo /* connection default */
connection default;
--echo /* reap */ alter table t1 add b int, ALGORITHM=inplace;
--error ER_DUP_ENTRY
--reap
SET DEBUG_SYNC = 'RESET';
drop table t1;
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
--source include/have_innodb.inc
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
CREATE TABLE t (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 INT) ENGINE=InnoDB;
INSERT INTO t VALUES (1,2,3),(4,5,6),(7,8,9);
--enable_info
# This one will be a no-op.
# MySQL should perhaps issue an error, because it refuses to modify
# the PRIMARY KEY column c1 from NOT NULL to NULL.
ALTER TABLE t CHANGE c1 c1 INT NULL FIRST, ALGORITHM=INPLACE;
# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
--disable_info
set @old_sql_mode = @@sql_mode;
set @@sql_mode = 'STRICT_TRANS_TABLES';
--enable_info
ALTER TABLE t MODIFY c3 INT NOT NULL, ALGORITHM=INPLACE;
--disable_info
set @@sql_mode = @old_sql_mode;
--enable_info
# Request some conflicting changes for a single column.
--error ER_BAD_FIELD_ERROR
ALTER TABLE t CHANGE c2 c2 INT, CHANGE c2 c2 INT NOT NULL;
--error ER_BAD_FIELD_ERROR
ALTER TABLE t MODIFY c2 INT, MODIFY c2 INT NOT NULL;
--error ER_BAD_FIELD_ERROR
ALTER TABLE t MODIFY c2 INT UNSIGNED, MODIFY c2 INT;
--error ER_BAD_FIELD_ERROR
ALTER TABLE t MODIFY c2 CHAR(1) NOT NULL, MODIFY c2 INT NOT NULL;
# No-ops.
ALTER TABLE t CHANGE c2 c2 INT NOT NULL;
ALTER TABLE t MODIFY c2 INT NOT NULL;
--disable_info
connect (con1,localhost,root,,);
connection con1;
SET SQL_MODE='STRICT_ALL_TABLES';
--error ER_BAD_NULL_ERROR
UPDATE t SET c2=NULL;
SELECT * FROM t;
connection default;
# This should change the column to NULL.
ALTER TABLE t MODIFY c2 INT, ALGORITHM=INPLACE;
connection con1;
BEGIN;
UPDATE t SET c2=NULL;
SELECT * FROM t;
ROLLBACK;
SELECT * FROM t;
disconnect con1;
connection default;
# This should be no-op.
ALTER TABLE t MODIFY c2 INT NULL, ALGORITHM=INPLACE;
--replace_column 1 # 5 #
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE NAME='test/t';
DROP TABLE t;
# 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
--innodb_file_per_table
--innodb-defragment=1
\ No newline at end of file
--loose-innodb-buffer-pool-stats --loose-innodb-buffer-pool-stats
--loose-innodb-buffer-page --loose-innodb-buffer-page
--loose-innodb-buffer-page-lru --loose-innodb-buffer-page-lru
--innodb-file-per-table
--innodb-defragment=1 --innodb-defragment=1
\ No newline at end of file
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/big_test.inc --source include/big_test.inc
--source include/not_valgrind.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--disable_warnings
DROP TABLE if exists t1;
--enable_warnings
--disable_query_log
let $innodb_defragment_n_pages_orig=`select @@innodb_defragment_n_pages`;
let $innodb_defragment_stats_accuracy_orig=`select @@innodb_defragment_stats_accuracy`;
--enable_query_log
set global innodb_defragment_stats_accuracy = 80; set global innodb_defragment_stats_accuracy = 80;
# Create table. # Create table.
...@@ -47,12 +37,14 @@ delimiter ;// ...@@ -47,12 +37,14 @@ delimiter ;//
# Populate table. # Populate table.
let $i = $data_size; let $i = $data_size;
--disable_query_log --disable_query_log
BEGIN;
while ($i) while ($i)
{ {
eval eval
INSERT INTO t1 VALUES ($data_size + 1 - $i, REPEAT('A', 256)); INSERT INTO t1 VALUES ($data_size + 1 - $i, REPEAT('A', 256));
dec $i; dec $i;
} }
COMMIT;
--enable_query_log --enable_query_log
select count(stat_value) from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_pages_freed'); select count(stat_value) from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_pages_freed');
...@@ -161,10 +153,3 @@ select count(stat_value) = 0 from mysql.innodb_index_stats where table_name like ...@@ -161,10 +153,3 @@ select count(stat_value) = 0 from mysql.innodb_index_stats where table_name like
DROP PROCEDURE defragment; DROP PROCEDURE defragment;
DROP TABLE t1; DROP TABLE t1;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_defragment_n_pages = $innodb_defragment_n_pages_orig;
EVAL SET GLOBAL innodb_defragment_stats_accuracy = $innodb_defragment_stats_accuracy_orig;
--enable_query_log
--source include/have_innodb.inc
SET @innodb_defragment_orig=@@GLOBAL.innodb_defragment;
SET GLOBAL innodb_defragment = 1;
# Small tests copied from innodb.innodb_defragment
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256), KEY(a, b)) ENGINE=INNODB;
OPTIMIZE TABLE t1;
INSERT INTO t1 VALUES (100000, REPEAT('A', 256));
INSERT INTO t1 VALUES (200000, REPEAT('A', 256));
INSERT INTO t1 VALUES (300000, REPEAT('A', 256));
INSERT INTO t1 VALUES (400000, REPEAT('A', 256));
OPTIMIZE TABLE t1;
DROP TABLE t1;
--echo #
--echo # MDEV-12198 innodb_defragment=1 crashes server on
--echo # OPTIMIZE TABLE when FULLTEXT index exists
--echo #
CREATE TABLE t1 (c TEXT, FULLTEXT KEY (c)) ENGINE=InnoDB;
OPTIMIZE TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (c POINT PRIMARY KEY, SPATIAL INDEX(c)) ENGINE=InnoDB;
OPTIMIZE TABLE t1;
DROP TABLE t1;
SET GLOBAL innodb_defragment = @innodb_defragment_orig;
...@@ -101,7 +101,7 @@ create index idx1 on worklog5743_1(a2(4000)); ...@@ -101,7 +101,7 @@ create index idx1 on worklog5743_1(a2(4000));
Got one of the listed errors Got one of the listed errors
show warnings; show warnings;
Level Code Message Level Code Message
Error 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
...@@ -110,7 +110,7 @@ create index idx2 on worklog5743_1(a2(4000)); ...@@ -110,7 +110,7 @@ create index idx2 on worklog5743_1(a2(4000));
Got one of the listed errors Got one of the listed errors
show warnings; show warnings;
Level Code Message Level Code Message
Error 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_1(a2(436)); create index idx3 on worklog5743_1(a2(436));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
...@@ -134,10 +134,10 @@ Warning 131 Using innodb_large_prefix is deprecated and the parameter may be rem ...@@ -134,10 +134,10 @@ Warning 131 Using innodb_large_prefix is deprecated and the parameter may be rem
SET sql_mode= ''; SET sql_mode= '';
create index idx1 on worklog5743_2(a2(4000)); create index idx1 on worklog5743_2(a2(4000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
...@@ -145,7 +145,7 @@ create index idx2 on worklog5743_2(a2(4000)); ...@@ -145,7 +145,7 @@ create index idx2 on worklog5743_2(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_2(a2(948)); create index idx3 on worklog5743_2(a2(948));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
...@@ -168,10 +168,10 @@ Warnings: ...@@ -168,10 +168,10 @@ Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_4(a2(4000)); create index idx1 on worklog5743_4(a2(4000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
...@@ -179,7 +179,7 @@ create index idx2 on worklog5743_4(a2(4000)); ...@@ -179,7 +179,7 @@ create index idx2 on worklog5743_4(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_4(a2(1972)); create index idx3 on worklog5743_4(a2(1972));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
...@@ -202,19 +202,19 @@ Warnings: ...@@ -202,19 +202,19 @@ Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_8(a2(1000)); create index idx1 on worklog5743_8(a2(1000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_8(a2(3073)); create index idx2 on worklog5743_8(a2(3073));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743_8(a2(3072)); create index idx3 on worklog5743_8(a2(3072));
Warnings: Warnings:
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
...@@ -242,19 +242,19 @@ Warnings: ...@@ -242,19 +242,19 @@ Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_16(a2(1000)); create index idx1 on worklog5743_16(a2(1000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_16(a2(3073)); create index idx2 on worklog5743_16(a2(3073));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743_16(a2(3072)); create index idx3 on worklog5743_16(a2(3072));
Warnings: Warnings:
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
...@@ -508,7 +508,7 @@ create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC; ...@@ -508,7 +508,7 @@ create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
SET sql_mode=''; SET sql_mode='';
create index idx1 on worklog5743(a(3073)); create index idx1 on worklog5743(a(3073));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx2 on worklog5743(a(3072)); create index idx2 on worklog5743(a(3072));
Warnings: Warnings:
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
......
...@@ -106,7 +106,7 @@ create index idx1 on worklog5743_1(a2(4000)); ...@@ -106,7 +106,7 @@ create index idx1 on worklog5743_1(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
...@@ -115,7 +115,7 @@ create index idx2 on worklog5743_1(a2(4000)); ...@@ -115,7 +115,7 @@ create index idx2 on worklog5743_1(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_1(a2(436)); create index idx3 on worklog5743_1(a2(436));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
...@@ -138,10 +138,10 @@ Warnings: ...@@ -138,10 +138,10 @@ Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_2(a2(4000)); create index idx1 on worklog5743_2(a2(4000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
...@@ -149,7 +149,7 @@ create index idx2 on worklog5743_2(a2(4000)); ...@@ -149,7 +149,7 @@ create index idx2 on worklog5743_2(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_2(a2(948)); create index idx3 on worklog5743_2(a2(948));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
...@@ -172,10 +172,10 @@ Warnings: ...@@ -172,10 +172,10 @@ Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_4(a2(4000)); create index idx1 on worklog5743_4(a2(4000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
...@@ -183,7 +183,7 @@ create index idx2 on worklog5743_4(a2(4000)); ...@@ -183,7 +183,7 @@ create index idx2 on worklog5743_4(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_4(a2(1972)); create index idx3 on worklog5743_4(a2(1972));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
...@@ -206,19 +206,19 @@ Warnings: ...@@ -206,19 +206,19 @@ Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_8(a2(1000)); create index idx1 on worklog5743_8(a2(1000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_8(a2(3073)); create index idx2 on worklog5743_8(a2(3073));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743_8(a2(3072)); create index idx3 on worklog5743_8(a2(3072));
Warnings: Warnings:
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
...@@ -246,19 +246,19 @@ Warnings: ...@@ -246,19 +246,19 @@ Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_16(a2(1000)); create index idx1 on worklog5743_16(a2(1000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1; set global innodb_large_prefix=1;
Warnings: Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_16(a2(3073)); create index idx2 on worklog5743_16(a2(3073));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743_16(a2(3072)); create index idx3 on worklog5743_16(a2(3072));
Warnings: Warnings:
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
...@@ -510,7 +510,7 @@ create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC; ...@@ -510,7 +510,7 @@ create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
set statement sql_mode = '' for set statement sql_mode = '' for
create index idx1 on worklog5743(a(3073)); create index idx1 on worklog5743(a(3073));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx2 on worklog5743(a(3072)); create index idx2 on worklog5743(a(3072));
Warnings: Warnings:
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
......
...@@ -85,4 +85,6 @@ xa rollback 'testb',0x2030405060,11; ...@@ -85,4 +85,6 @@ xa rollback 'testb',0x2030405060,11;
SELECT * from t1; SELECT * from t1;
a a
30 30
disconnect con1;
connection default;
DROP table t1; DROP table t1;
select @@global.log_error;
@@global.log_error
select @@session.log_error;
ERROR HY000: Variable 'log_error' is a GLOBAL variable
show global variables like 'log_error';
Variable_name Value
log_error
show session variables like 'log_error';
Variable_name Value
log_error
select * from information_schema.global_variables where variable_name='log_error';
VARIABLE_NAME VARIABLE_VALUE
LOG_ERROR
select * from information_schema.session_variables where variable_name='log_error';
VARIABLE_NAME VARIABLE_VALUE
LOG_ERROR
set global log_error=1;
ERROR HY000: Variable 'log_error' is a read only variable
set session log_error=1;
ERROR HY000: Variable 'log_error' is a read only variable
select (@err_log:=variable_value)*0 from information_schema.global_variables where variable_name="log_error"; select (@err_log:=variable_value)*0 from information_schema.global_variables where variable_name="log_error";
(@err_log:=variable_value)*0 (@err_log:=variable_value)*0
0 0
select instr(@err_log, "some_random_name5435413.err")>0; select instr(@err_log, "mysqld.1.err")>0;
instr(@err_log, "some_random_name5435413.err")>0 instr(@err_log, "mysqld.1.err")>0
1 1
...@@ -1817,8 +1817,8 @@ READ_ONLY NO ...@@ -1817,8 +1817,8 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME LOG_ERROR VARIABLE_NAME LOG_ERROR
SESSION_VALUE NULL SESSION_VALUE NULL
GLOBAL_VALUE GLOBAL_VALUE PATH
GLOBAL_VALUE_ORIGIN COMPILE-TIME GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 0 DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR VARIABLE_TYPE VARCHAR
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
############################################################################### ###############################################################################
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/count_sessions.inc
--echo '#--------------------FN_DYNVARS_046_01-------------------------#' --echo '#--------------------FN_DYNVARS_046_01-------------------------#'
#################################################################### ####################################################################
# Check if setting innodb_support_xa is changed in new connection # # Check if setting innodb_support_xa is changed in new connection #
...@@ -123,7 +124,10 @@ xa rollback 'testb',0x2030405060,11; ...@@ -123,7 +124,10 @@ xa rollback 'testb',0x2030405060,11;
SELECT * from t1; SELECT * from t1;
disconnect con1;
connection default;
DROP table t1; DROP table t1;
--source include/wait_until_count_sessions.inc
######################################################## ########################################################
# End of functionality Testing for innodb_support_xa # # End of functionality Testing for innodb_support_xa #
......
#
# only global
#
select @@global.log_error;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.log_error;
show global variables like 'log_error';
show session variables like 'log_error';
select * from information_schema.global_variables where variable_name='log_error';
select * from information_schema.session_variables where variable_name='log_error';
#
# show that it's read-only
#
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global log_error=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set session log_error=1;
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
[mysqld.1]
log-error=some_random_name5435413
# embedded .cnf doesn't have log-error option
source include/not_embedded.inc;
# Test for BUG#51215 "log-error partially works with version 5.5" # Test for BUG#51215 "log-error partially works with version 5.5"
# when --log-error is used without argument # when --log-error is used without argument
# check displayed value. We can check only the base name, the rest # check displayed value. We can check only the base name, the rest
# depends on paths, symbolic links, --vardir, etc... # depends on paths, symbolic links, --vardir, etc...
select (@err_log:=variable_value)*0 from information_schema.global_variables where variable_name="log_error"; select (@err_log:=variable_value)*0 from information_schema.global_variables where variable_name="log_error";
select instr(@err_log, "some_random_name5435413.err")>0; select instr(@err_log, "mysqld.1.err")>0;
# Check file's existence. The displayed value may be relative or not. # Check file's existence. The displayed value may be relative or not.
let $err_log=`select @err_log`; let $err_log=`select @err_log`;
......
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
[mysqld.1]
log-error
...@@ -642,3 +642,27 @@ select * from v1; ...@@ -642,3 +642,27 @@ select * from v1;
show create view v1; show create view v1;
drop view v1; drop view v1;
--echo #
--echo # MDEV-12440: the same CTE table is used in twice
--echo #
create table t1 (a int, b varchar(32));
insert into t1 values
(4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd');
--echo # cte2 is used in the main query and in the spec for ct3
with
cte1 as (select * from t1 where b >= 'c'),
cte2 as (select * from cte1 where a < 7),
cte3 as (select * from cte2 where a > 1)
select * from cte2, cte3 where cte2.a = cte3.a;
--echo # cte2 is used twice in the spec for ct3
with
cte1 as (select * from t1 where b >= 'b'),
cte2 as (select * from cte1 where b > 'c'),
cte3 as (select * from cte2 where a > 1 union select * from cte2 where a > 1)
select * from cte3;
drop table t1;
\ No newline at end of file
...@@ -326,9 +326,6 @@ select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table ...@@ -326,9 +326,6 @@ select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table
explain partitions select * from t1 where a=2 and b=5; explain partitions select * from t1 where a=2 and b=5;
explain partitions select * from t1 where a=10 and b=10; explain partitions select * from t1 where a=10 and b=10;
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
alter table t1 drop partition p2;
delete from t1 where a=2;
alter table t1 drop partition p2; alter table t1 drop partition p2;
show create table t1; show create table t1;
select * from t1; select * from t1;
...@@ -395,9 +392,6 @@ select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table ...@@ -395,9 +392,6 @@ select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table
explain partitions select * from t1 where a=2 and b=5; explain partitions select * from t1 where a=2 and b=5;
explain partitions select * from t1 where a=10 and b=10; explain partitions select * from t1 where a=10 and b=10;
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
alter table t1 drop partition p2;
delete from t1 where a=2;
alter table t1 drop partition p2; alter table t1 drop partition p2;
show create table t1; show create table t1;
select * from t1; select * from t1;
...@@ -520,3 +514,29 @@ explain partitions ...@@ -520,3 +514,29 @@ explain partitions
select * from t1 where i is null; select * from t1 where i is null;
drop table t1; drop table t1;
--echo #
--echo # MDEV-12395: DROP PARTITION does not work as expected when
--echo # table has DEFAULT LIST partition
--echo #
CREATE TABLE t1 (i INT)
PARTITION BY LIST (i)
(PARTITION p VALUES IN (1,2,3,4),
PARTITION pdef DEFAULT);
INSERT INTO t1 VALUES (1),(10);
ALTER TABLE t1 DROP PARTITION p;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (i INT)
PARTITION BY LIST (i)
(PARTITION p VALUES IN (1,2,3,4),
PARTITION pdef DEFAULT);
INSERT INTO t1 VALUES (1),(10);
ALTER TABLE t1 DROP PARTITION pdef;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
...@@ -18,7 +18,7 @@ FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name = 'innodb'; ...@@ -18,7 +18,7 @@ FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name = 'innodb';
--source include/wait_until_disconnected.inc --source include/wait_until_disconnected.inc
--error 1 --error 1
--exec $MYSQLD_CMD --innodb=force --innodb-page-size=6000 --exec $MYSQLD_CMD --innodb=force --innodb-page-size=6000 --disable-log-error
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect --enable_reconnect
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment