diff --git a/.travis.compiler.sh b/.travis.compiler.sh new file mode 100755 index 0000000000000..35e79e177ef3d --- /dev/null +++ b/.travis.compiler.sh @@ -0,0 +1,46 @@ +#!/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 diff --git a/.travis.yml b/.travis.yml index c2fa7283e9a1e..f33de07628962 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,103 @@ # vim ft=yaml # travis-ci.org definition -# non-container builds don't have enough RAM to reliably compile -sudo: required +sudo: false dist: trusty +git: + depth: 2 + language: cpp +os: + - linux + - osx +osx_image: xcode8.3 compiler: - gcc + - clang + cache: - - apt - - ccache + apt: true + ccache: true + directories: + - /usr/local/Cellar env: matrix: - - GCC_VERSION=4.8 - - GCC_VERSION=5 - - GCC_VERSION=6 +# - GCC_VERSION=4.8 TYPE=Debug MYSQL_TEST_SUITES=rpl +# - 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 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: apt: sources: - ubuntu-toolchain-r-test -# below requires https://github.com/travis-ci/apt-source-whitelist/pull/309 -# - llvm-toolchain-trusty-3.8 -# - llvm-toolchain-trusty-3.9 -# llvm urls awaiting fix -# https://github.com/travis-ci/apt-source-whitelist/pull/288 -# https://github.com/travis-ci/apt-source-whitelist/pull/309 + - llvm-toolchain-trusty + - llvm-toolchain-trusty-3.9 + - llvm-toolchain-trusty-4.0 packages: # make sure these match debian/control contents - gcc-5 - g++-5 - gcc-6 - g++-6 + - clang-3.9 + - llvm-3.9-dev + - clang-4.0 + - llvm-4.0-dev + - libasan0 - bison - chrpath - cmake @@ -41,6 +107,7 @@ addons: - gdb - libaio-dev - libboost-dev + - libcurl3-dev - libjudy-dev - libncurses5-dev - libpam0g-dev @@ -57,18 +124,40 @@ addons: - zlib1g-dev - libcrack2-dev - libjemalloc-dev + - libsnappy-dev + - liblzma-dev + - libzmq-dev + - libdistro-info-perl - 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 +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: - - export MYSQL_BUILD_CC=/usr/bin/gcc-${GCC_VERSION} MYSQL_BUILD_CXX=/usr/bin/g++-${GCC_VERSION} - - ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version - - cd "${TRAVIS_BUILD_DIR}" - - env DEB_BUILD_OPTIONS="parallel=3" debian/autobake-deb.sh; + - ccache --version +# Clang: +# mroonga just generates too many warnings with clang and travis stops the job +# 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: irc: diff --git a/VERSION b/VERSION index e90777ce978ad..ed825f4c577dd 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=2 -MYSQL_VERSION_PATCH=5 +MYSQL_VERSION_PATCH=6 diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index edbd2065f82b6..354ee53c7bbf6 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -201,9 +201,15 @@ MACRO(MYSQL_ADD_PLUGIN) # 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 # an additional dependency. - IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT ARG_CLIENT) - TARGET_LINK_LIBRARIES (${target} mysqld) + 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) + ENDIF() ENDIF() + ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES}) SET_TARGET_PROPERTIES(${target} PROPERTIES diff --git a/man/comp_err.1 b/man/comp_err.1 index c566e2d11e0e0..4ff91aac2e68d 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/galera_new_cluster.1 b/man/galera_new_cluster.1 index c351a5e0c5f12..72c46edc54a7a 100644 --- a/man/galera_new_cluster.1 +++ b/man/galera_new_cluster.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/galera_recovery.1 b/man/galera_recovery.1 index 12cb450da4619..6856d0a1c7d83 100644 --- a/man/galera_recovery.1 +++ b/man/galera_recovery.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 72614ad1617fb..70eb9875ac7ad 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/make_win_bin_dist.1 b/man/make_win_bin_dist.1 index 32043390059bf..7f041ce26b38c 100644 --- a/man/make_win_bin_dist.1 +++ b/man/make_win_bin_dist.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mariadb-service-convert.1 b/man/mariadb-service-convert.1 index 6301087208b13..35c9b001599c0 100644 --- a/man/mariadb-service-convert.1 +++ b/man/mariadb-service-convert.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index dfe5ebf4d89ed..87cedc5e80b99 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index 857566133e3d4..87e82f91023ef 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index eb383605084d5..889031c7e34df 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index e13df13488264..557ab1d6b3363 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/myisamlog.1 b/man/myisamlog.1 index 25e4b5d8640cf..bd318bedd9199 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index e3f301df15648..8baeb26285b56 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index 0e47538efbed4..ccd1a187fd1fb 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 784e62a3c663e..b99815778ee75 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql.1 b/man/mysql.1 index e4c0727d1ae5a..624e69a0d54d5 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 252d8002ca2ff..ed6fb51782059 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 21da6397b2bed..a1652d7b2dcd9 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_config.1 b/man/mysql_config.1 index 91b04b65f7552..f321ae937b6c7 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index 0d46fa4415130..3956609d547d9 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 0c38b91f5235b..9e3aca171918f 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index 04d96fd9058f0..6bb7f6375958f 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index 716fb56956d88..ea54477f5160c 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index 0326a7ddb0978..33530235afbad 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 71e9d67dee461..5c1fd70f956ec 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index 0ca22ca27dddc..5a3c6f1b811c1 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index ece013dd40f79..2063523ddc094 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index 62e3939324038..876e224aa8308 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index ae645be872f02..91acfec604deb 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 02b5169b50d0f..2d48214104321 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 786b288f1013a..85ab1e0e7dcd7 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 34cf246ff1b8e..9a00c64292a4c 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index abc8d64c2af24..d0a512711a4c9 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqld.8 b/man/mysqld.8 index b77b551bd48ac..04e631e72d006 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 6a52116fffe89..b82dd2182392f 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index eb31d05d4ef4a..7b9387f0a5f34 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqld_safe_helper.1 b/man/mysqld_safe_helper.1 index 63770a49d28b9..93b4fc35c53ec 100644 --- a/man/mysqld_safe_helper.1 +++ b/man/mysqld_safe_helper.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqldump.1 b/man/mysqldump.1 index ebd3b1fc896e7..7e7e455e02039 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- @@ -858,6 +858,22 @@ instead\&. .sp -1 .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 .\" flush-logs option: mysqldump \fB\-\-flush\-logs\fR, diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index 47dffef7edd78..78a85264627ad 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index bb6f83ac8102c..480b2d43a613f 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 4c4ed342d7a53..3478865c83fa0 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 1790978144a4e..d387f9dfdb52a 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index e3246e811bf18..07ec3a4a04234 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 772702e4091a5..4dce3d54db3d4 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/perror.1 b/man/perror.1 index 3a680c96201ec..6a929828201a9 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/replace.1 b/man/replace.1 index 5c63027535e91..e17ecedbcb81d 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index 693c84e8da021..d2f6e53d864c2 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/resolveip.1 b/man/resolveip.1 index 2f1c4a1a290e2..2a0155b1721d4 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/tokuftdump.1 b/man/tokuftdump.1 index d0a11a840a551..d88a1f076764c 100644 --- a/man/tokuftdump.1 +++ b/man/tokuftdump.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/wsrep_sst_common.1 b/man/wsrep_sst_common.1 index 05242e66c0000..6a73e69cbe6eb 100644 --- a/man/wsrep_sst_common.1 +++ b/man/wsrep_sst_common.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/wsrep_sst_mysqldump.1 b/man/wsrep_sst_mysqldump.1 index 17ad5b2cdf18b..da70ace00ac2e 100644 --- a/man/wsrep_sst_mysqldump.1 +++ b/man/wsrep_sst_mysqldump.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/wsrep_sst_rsync.1 b/man/wsrep_sst_rsync.1 index 95a80b20821c8..aa0a492d7c323 100644 --- a/man/wsrep_sst_rsync.1 +++ b/man/wsrep_sst_rsync.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/wsrep_sst_xtrabackup-v2.1 b/man/wsrep_sst_xtrabackup-v2.1 index d61ce803b939d..10352be2c1b36 100644 --- a/man/wsrep_sst_xtrabackup-v2.1 +++ b/man/wsrep_sst_xtrabackup-v2.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/man/wsrep_sst_xtrabackup.1 b/man/wsrep_sst_xtrabackup.1 index 9644a29c4ca72..ddbd8c7f6ec67 100644 --- a/man/wsrep_sst_xtrabackup.1 +++ b/man/wsrep_sst_xtrabackup.1 @@ -1,6 +1,6 @@ '\" 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 .\" ----------------------------------------------------------------- diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 8b997e8b096ed..12c0095e80e44 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -246,7 +246,7 @@ my @mysqld_rules= { '#host' => \&fix_host }, { 'port' => \&fix_port }, { 'socket' => \&fix_socket }, - { '#log-error' => \&fix_log_error }, + { 'log-error' => \&fix_log_error }, { 'general-log' => 1 }, { 'plugin-dir' => sub { $::plugindir } }, { 'general-log-file' => \&fix_log }, @@ -394,7 +394,7 @@ sub post_check_embedded_group { 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 'shared-memory-base-name', # No shared memory for embedded ); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 05169b2353136..0b61bfc9b7869 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2759,7 +2759,7 @@ ($) # Already started # Write start of testcase to log file - mark_log($mysqld->value('#log-error'), $tinfo); + mark_log($mysqld->value('log-error'), $tinfo); return; } @@ -2816,7 +2816,7 @@ ($) mkpath($tmpdir) unless -d $tmpdir; # Write start of testcase to log file - mark_log($mysqld->value('#log-error'), $tinfo); + mark_log($mysqld->value('log-error'), $tinfo); # Run -master.sh if ($mysqld->option('#!run-master-sh') and @@ -4261,7 +4261,7 @@ ($$) foreach my $mysqld (all_servers()) { 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" . "----------SERVER LOG START-----------\n". join ("", @srv_lines) . "----------SERVER LOG END-------------\n"; @@ -4468,7 +4468,7 @@ ($$) 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 $ENV{MTR_LOG_ERROR}= $log_error; extract_warning_lines($log_error, 0); @@ -4626,7 +4626,7 @@ sub check_warnings_post_shutdown { foreach my $mysqld ( mysqlds()) { 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; $report.= join('', @$match_lines); } @@ -5075,7 +5075,7 @@ ($$) # Remove the old pidfile if any unlink($mysqld->value('pid-file')); - my $output= $mysqld->value('#log-error'); + my $output= $mysqld->value('log-error'); if ( $opt_valgrind and $opt_debug ) { diff --git a/mysql-test/r/cte_nonrecursive.result b/mysql-test/r/cte_nonrecursive.result index 54184f8aba111..207df07f08368 100644 --- a/mysql-test/r/cte_nonrecursive.result +++ b/mysql-test/r/cte_nonrecursive.result @@ -961,3 +961,26 @@ show create view v1; 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 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; diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result index cb2f93dec3028..d74cfd4dd3f16 100644 --- a/mysql-test/r/ctype_utf8mb4.result +++ b/mysql-test/r/ctype_utf8mb4.result @@ -2387,7 +2387,7 @@ PRIMARY KEY (clipid), KEY tape(Tape(255)) ) CHARACTER SET=utf8mb4; 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; SHOW CREATE TABLE t1; Table Create Table diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result index 28ed7ed313d17..11d8915426941 100644 --- a/mysql-test/r/ctype_utf8mb4_innodb.result +++ b/mysql-test/r/ctype_utf8mb4_innodb.result @@ -2347,7 +2347,7 @@ PRIMARY KEY (clipid), KEY tape(Tape(255)) ) CHARACTER SET=utf8mb4 ENGINE InnoDB; 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; SHOW CREATE TABLE t1; Table Create Table diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result index 2c798102e5032..ef7bda0a79b3d 100644 --- a/mysql-test/r/ctype_utf8mb4_myisam.result +++ b/mysql-test/r/ctype_utf8mb4_myisam.result @@ -2347,7 +2347,7 @@ PRIMARY KEY (clipid), KEY tape(Tape(255)) ) CHARACTER SET=utf8mb4 ENGINE MyISAM; 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; SHOW CREATE TABLE t1; Table Create Table diff --git a/mysql-test/r/partition_default.result b/mysql-test/r/partition_default.result index 2833d92de323c..bb0a5d4061bd9 100644 --- a/mysql-test/r/partition_default.result +++ b/mysql-test/r/partition_default.result @@ -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 1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 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; Table Create Table t1 CREATE TABLE `t1` ( @@ -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 1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 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; Table Create Table t1 CREATE TABLE `t1` ( @@ -1125,10 +1119,10 @@ alter table t1 add partition (partition p0 VALUES IN (2,3)); select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1'; partition_name table_rows -p0 2 +p0 0 p1 1 p2 1 -pd 0 +pd 2 drop table t1; create table t1 (a int, b int) PARTITION BY LIST COLUMNS(a,b) @@ -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 1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 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; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index b2fe974acdb45..569ba65df3fe8 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -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 create table t1 (a text, key (a(2100))); 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; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 9c0732a81b031..f11ac3183fceb 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -5954,6 +5954,43 @@ a 2 DROP VIEW v1; 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. # ----------------------------------------------------------------- @@ -6429,5 +6466,18 @@ ERROR HY000: Can not modify more than one base table through a join view 'test.v drop view v; 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 # diff --git a/mysql-test/suite/innodb/r/alter_table.result b/mysql-test/suite/innodb/r/alter_table.result new file mode 100644 index 0000000000000..304bc865f7583 --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_table.result @@ -0,0 +1,13 @@ +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; diff --git a/mysql-test/suite/innodb/r/innodb-32k-crash.result b/mysql-test/suite/innodb/r/innodb-32k-crash.result index d0bc25968c69f..83b8054831ac4 100644 --- a/mysql-test/suite/innodb/r/innodb-32k-crash.result +++ b/mysql-test/suite/innodb/r/innodb-32k-crash.result @@ -119,7 +119,6 @@ BEGIN; INSERT INTO t1 SELECT * from t2; BEGIN; 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, 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, diff --git a/mysql-test/suite/innodb/r/innodb-64k-crash.result b/mysql-test/suite/innodb/r/innodb-64k-crash.result index bfeec58bda92a..138ad5345edd6 100644 --- a/mysql-test/suite/innodb/r/innodb-64k-crash.result +++ b/mysql-test/suite/innodb/r/innodb-64k-crash.result @@ -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, 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; -# 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, 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, diff --git a/mysql-test/suite/innodb/r/innodb-alter-debug.result b/mysql-test/suite/innodb/r/innodb-alter-debug.result new file mode 100644 index 0000000000000..d580a641d81d9 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-alter-debug.result @@ -0,0 +1,61 @@ +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; diff --git a/mysql-test/suite/innodb/r/innodb-alter-nullable.result b/mysql-test/suite/innodb/r/innodb-alter-nullable.result new file mode 100644 index 0000000000000..7048f49f4a2c3 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-alter-nullable.result @@ -0,0 +1,59 @@ +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; diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index 1b62854efefcf..2ce733042811f 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -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))) character set = latin1 engine = innodb; 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))) character set = latin1 engine = innodb; 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; 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 diff --git a/mysql-test/suite/innodb/r/innodb_defragment.result b/mysql-test/suite/innodb/r/innodb_defragment.result index c42cbd972f850..989d3ef33979c 100644 --- a/mysql-test/suite/innodb/r/innodb_defragment.result +++ b/mysql-test/suite/innodb/r/innodb_defragment.result @@ -1,4 +1,3 @@ -DROP TABLE if exists t1; 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; optimize table t1; diff --git a/mysql-test/suite/innodb/r/innodb_defragment_small.result b/mysql-test/suite/innodb/r/innodb_defragment_small.result new file mode 100644 index 0000000000000..7471c84bb446f --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_defragment_small.result @@ -0,0 +1,29 @@ +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; diff --git a/mysql-test/suite/innodb/t/alter_table.test b/mysql-test/suite/innodb/t/alter_table.test new file mode 100644 index 0000000000000..13fb574972af8 --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_table.test @@ -0,0 +1,10 @@ +--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; diff --git a/mysql-test/suite/innodb/t/innodb-32k-crash.test b/mysql-test/suite/innodb/t/innodb-32k-crash.test index c77e44ce9d6a2..b510c115dab65 100644 --- a/mysql-test/suite/innodb/t/innodb-32k-crash.test +++ b/mysql-test/suite/innodb/t/innodb-32k-crash.test @@ -144,7 +144,9 @@ INSERT INTO t1 SELECT * from t2; BEGIN; 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, k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f, diff --git a/mysql-test/suite/innodb/t/innodb-64k-crash.test b/mysql-test/suite/innodb/t/innodb-64k-crash.test index 78f14d539a531..8139b7ce4e4fb 100644 --- a/mysql-test/suite/innodb/t/innodb-64k-crash.test +++ b/mysql-test/suite/innodb/t/innodb-64k-crash.test @@ -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, 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, k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e, diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test new file mode 100644 index 0000000000000..70017ffba3543 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test @@ -0,0 +1,79 @@ +--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 diff --git a/mysql-test/suite/innodb/t/innodb-alter-nullable.test b/mysql-test/suite/innodb/t/innodb-alter-nullable.test new file mode 100644 index 0000000000000..3f1e82b3183d6 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-alter-nullable.test @@ -0,0 +1,76 @@ +--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 diff --git a/mysql-test/suite/innodb/t/innodb_defragment-master.opt b/mysql-test/suite/innodb/t/innodb_defragment-master.opt deleted file mode 100644 index 6fc7f343b2405..0000000000000 --- a/mysql-test/suite/innodb/t/innodb_defragment-master.opt +++ /dev/null @@ -1,2 +0,0 @@ ---innodb_file_per_table ---innodb-defragment=1 \ No newline at end of file diff --git a/mysql-test/suite/innodb/t/innodb_defragment.opt b/mysql-test/suite/innodb/t/innodb_defragment.opt index 6426bac41a07c..aea3d480c244b 100644 --- a/mysql-test/suite/innodb/t/innodb_defragment.opt +++ b/mysql-test/suite/innodb/t/innodb_defragment.opt @@ -1,4 +1,5 @@ --loose-innodb-buffer-pool-stats --loose-innodb-buffer-page --loose-innodb-buffer-page-lru +--innodb-file-per-table --innodb-defragment=1 \ No newline at end of file diff --git a/mysql-test/suite/innodb/t/innodb_defragment.test b/mysql-test/suite/innodb/t/innodb_defragment.test index 22b72a4aa6b76..d9f5f56316ef2 100644 --- a/mysql-test/suite/innodb/t/innodb_defragment.test +++ b/mysql-test/suite/innodb/t/innodb_defragment.test @@ -1,17 +1,7 @@ --source include/have_innodb.inc --source include/big_test.inc ---source include/not_valgrind.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; # Create table. @@ -47,12 +37,14 @@ delimiter ;// # Populate table. let $i = $data_size; --disable_query_log +BEGIN; while ($i) { eval INSERT INTO t1 VALUES ($data_size + 1 - $i, REPEAT('A', 256)); dec $i; } +COMMIT; --enable_query_log 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 DROP PROCEDURE defragment; 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 - diff --git a/mysql-test/suite/innodb/t/innodb_defragment_small.test b/mysql-test/suite/innodb/t/innodb_defragment_small.test new file mode 100644 index 0000000000000..8500c173af72a --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_defragment_small.test @@ -0,0 +1,32 @@ +--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; diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix.result b/mysql-test/suite/innodb_zip/r/index_large_prefix.result index 4e57b27dec870..df177e8ea2a0f 100644 --- a/mysql-test/suite/innodb_zip/r/index_large_prefix.result +++ b/mysql-test/suite/innodb_zip/r/index_large_prefix.result @@ -101,7 +101,7 @@ create index idx1 on worklog5743_1(a2(4000)); Got one of the listed errors show warnings; 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 set global innodb_large_prefix=1; Warnings: @@ -110,7 +110,7 @@ create index idx2 on worklog5743_1(a2(4000)); Got one of the listed errors show warnings; 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 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 @@ -134,10 +134,10 @@ Warning 131 Using innodb_large_prefix is deprecated and the parameter may be rem SET sql_mode= ''; create index idx1 on worklog5743_2(a2(4000)); 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; 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; 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 @@ -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 show warnings; 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 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 @@ -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 create index idx1 on worklog5743_4(a2(4000)); 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; 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; 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 @@ -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 show warnings; 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 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 @@ -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 create index idx1 on worklog5743_8(a2(1000)); 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; 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; 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 create index idx2 on worklog5743_8(a2(3073)); 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; 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)); Warnings: Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release @@ -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 create index idx1 on worklog5743_16(a2(1000)); 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; 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; 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 create index idx2 on worklog5743_16(a2(3073)); 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; 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)); Warnings: 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; SET sql_mode=''; create index idx1 on worklog5743(a(3073)); 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)); Warnings: Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release diff --git a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result index 20deee57d4695..5be18b840658a 100644 --- a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result +++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result @@ -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 show warnings; 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 set global innodb_large_prefix=1; Warnings: @@ -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 show warnings; 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 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 @@ -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 create index idx1 on worklog5743_2(a2(4000)); 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; 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; 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 @@ -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 show warnings; 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 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 @@ -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 create index idx1 on worklog5743_4(a2(4000)); 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; 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; 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 @@ -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 show warnings; 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 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 @@ -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 create index idx1 on worklog5743_8(a2(1000)); 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; 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; 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 create index idx2 on worklog5743_8(a2(3073)); 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; 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)); Warnings: Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release @@ -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 create index idx1 on worklog5743_16(a2(1000)); 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; 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; 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 create index idx2 on worklog5743_16(a2(3073)); 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; 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)); Warnings: 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; set statement sql_mode = '' for create index idx1 on worklog5743(a(3073)); 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)); Warnings: Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release diff --git a/mysql-test/suite/sys_vars/r/innodb_support_xa_func.result b/mysql-test/suite/sys_vars/r/innodb_support_xa_func.result index d86cf8960166c..376cc7dd0760d 100644 --- a/mysql-test/suite/sys_vars/r/innodb_support_xa_func.result +++ b/mysql-test/suite/sys_vars/r/innodb_support_xa_func.result @@ -85,4 +85,6 @@ xa rollback 'testb',0x2030405060,11; SELECT * from t1; a 30 +disconnect con1; +connection default; DROP table t1; diff --git a/mysql-test/suite/sys_vars/r/log_error_basic.result b/mysql-test/suite/sys_vars/r/log_error_basic.result deleted file mode 100644 index c18d43762bf46..0000000000000 --- a/mysql-test/suite/sys_vars/r/log_error_basic.result +++ /dev/null @@ -1,21 +0,0 @@ -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 diff --git a/mysql-test/suite/sys_vars/r/log_error_func.result b/mysql-test/suite/sys_vars/r/log_error_func.result index c787c5ceb4f8c..39127951789d8 100644 --- a/mysql-test/suite/sys_vars/r/log_error_func.result +++ b/mysql-test/suite/sys_vars/r/log_error_func.result @@ -1,6 +1,6 @@ select (@err_log:=variable_value)*0 from information_schema.global_variables where variable_name="log_error"; (@err_log:=variable_value)*0 0 -select instr(@err_log, "some_random_name5435413.err")>0; -instr(@err_log, "some_random_name5435413.err")>0 +select instr(@err_log, "mysqld.1.err")>0; +instr(@err_log, "mysqld.1.err")>0 1 diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result index f93f340b4fc7e..fcc93fbac8279 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -1817,8 +1817,8 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME LOG_ERROR SESSION_VALUE NULL -GLOBAL_VALUE -GLOBAL_VALUE_ORIGIN COMPILE-TIME +GLOBAL_VALUE PATH +GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE VARCHAR diff --git a/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test b/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test index 6668d48609023..30f3b0ef46bac 100644 --- a/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test @@ -26,14 +26,14 @@ --source include/have_innodb.inc --source include/load_sysvars.inc -######################################################################## +######################################################################## # START OF innodb_support_xa TESTS # -######################################################################## +######################################################################## -################################################################################ +################################################################################ # Saving initial value of innodb_support_xa in a temporary variable # -################################################################################ +################################################################################ SET @session_start_value = @@session.innodb_support_xa; @@ -46,9 +46,9 @@ SELECT @global_start_value; --echo '#--------------------FN_DYNVARS_046_01------------------------#' -######################################################################## +######################################################################## # Display the DEFAULT value of innodb_support_xa # -######################################################################## +######################################################################## SET @@session.innodb_support_xa = 0; SET @@session.innodb_support_xa = DEFAULT; @@ -83,9 +83,9 @@ SELECT @@global.innodb_support_xa; --echo '#--------------------FN_DYNVARS_046_03------------------------#' -########################################################################## +########################################################################## # change the value of innodb_support_xa to a valid value # -########################################################################## +########################################################################## # for session SET @@session.innodb_support_xa = 0; SELECT @@session.innodb_support_xa; @@ -150,9 +150,9 @@ SET @@global.innodb_support_xa = --echo '#-------------------FN_DYNVARS_046_05----------------------------#' -########################################################################### +########################################################################### # Test if changing global variable effects session and vice versa # -########################################################################### +########################################################################### SET @@global.innodb_support_xa = 0; SET @@session.innodb_support_xa = 1; @@ -162,7 +162,7 @@ SET @@global.innodb_support_xa = 0; SELECT @@session.innodb_support_xa AS res_is_1; --echo '#----------------------FN_DYNVARS_046_06------------------------#' -######################################################################### +######################################################################### # Check if the value in GLOBAL Table matches value in variable # ######################################################################### @@ -179,7 +179,7 @@ SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES --echo '#----------------------FN_DYNVARS_046_07------------------------#' -######################################################################### +######################################################################### # Check if the value in SESSION Table matches value in variable # ######################################################################### @@ -196,9 +196,9 @@ SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES --echo '#---------------------FN_DYNVARS_046_08-------------------------#' -################################################################### +################################################################### # Check if ON and OFF values can be used on variable # -################################################################### +################################################################### SET @@session.innodb_support_xa = OFF; SELECT @@session.innodb_support_xa; @@ -211,9 +211,9 @@ SET @@global.innodb_support_xa = ON; SELECT @@global.innodb_support_xa; --echo '#---------------------FN_DYNVARS_046_09----------------------#' -################################################################### +################################################################### # Check if TRUE and FALSE values can be used on variable # -################################################################### +################################################################### SET @@session.innodb_support_xa = TRUE; SELECT @@session.innodb_support_xa; @@ -225,7 +225,7 @@ SELECT @@global.innodb_support_xa; SET @@global.innodb_support_xa = FALSE; SELECT @@global.innodb_support_xa; -############################## +############################## # Restore initial value # ############################## @@ -237,4 +237,4 @@ SELECT @@global.innodb_support_xa; ############################################################### # END OF innodb_support_xa TESTS # -############################################################### +############################################################### diff --git a/mysql-test/suite/sys_vars/t/innodb_support_xa_func.test b/mysql-test/suite/sys_vars/t/innodb_support_xa_func.test index 693a21b2732f6..a6875ec780d33 100644 --- a/mysql-test/suite/sys_vars/t/innodb_support_xa_func.test +++ b/mysql-test/suite/sys_vars/t/innodb_support_xa_func.test @@ -20,9 +20,10 @@ ############################################################################### --source include/have_innodb.inc +--source include/count_sessions.inc --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 # #################################################################### SET @@global.innodb_support_xa = OFF; @@ -35,7 +36,7 @@ disconnect con1; --echo '#--------------------FN_DYNVARS_046_01-------------------------#' ########################################################### -# Begin the functionality Testing of innodb_support_xa # +# Begin the functionality Testing of innodb_support_xa # ########################################################### connection default; @@ -101,8 +102,8 @@ xa start 'testa','testb', 123; # gtrid [ , bqual [ , formatID ] ] xa start 0x7465737462, 0x2030405060, 0xb; INSERT t1 values (40); -xa end 'testb',' 0@P`',11; -xa prepare 'testb',0x2030405060,11; +xa end 'testb',' 0@P`',11; +xa prepare 'testb',0x2030405060,11; --Error ER_XAER_RMFAIL START TRANSACTION; @@ -112,18 +113,21 @@ xa recover; #disconnect con1; CONNECTION default; -xa prepare 'testa','testb'; +xa prepare 'testa','testb'; xa recover; --Error ER_XAER_NOTA xa commit 'testb',0x2030405060,11; xa commit 'testa','testb'; CONNECTION con1; -xa rollback 'testb',0x2030405060,11; +xa rollback 'testb',0x2030405060,11; SELECT * from t1; +disconnect con1; +connection default; DROP table t1; +--source include/wait_until_count_sessions.inc ######################################################## # End of functionality Testing for innodb_support_xa # diff --git a/mysql-test/suite/sys_vars/t/log_error_basic.test b/mysql-test/suite/sys_vars/t/log_error_basic.test deleted file mode 100644 index 67bd33cb31b67..0000000000000 --- a/mysql-test/suite/sys_vars/t/log_error_basic.test +++ /dev/null @@ -1,18 +0,0 @@ -# -# 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; diff --git a/mysql-test/suite/sys_vars/t/log_error_func.cnf b/mysql-test/suite/sys_vars/t/log_error_func.cnf deleted file mode 100644 index 7a030b5518d50..0000000000000 --- a/mysql-test/suite/sys_vars/t/log_error_func.cnf +++ /dev/null @@ -1,5 +0,0 @@ -# Use default setting for mysqld processes -!include include/default_mysqld.cnf - -[mysqld.1] -log-error=some_random_name5435413 diff --git a/mysql-test/suite/sys_vars/t/log_error_func.test b/mysql-test/suite/sys_vars/t/log_error_func.test index 1cd45a54ff776..926398a7d059d 100644 --- a/mysql-test/suite/sys_vars/t/log_error_func.test +++ b/mysql-test/suite/sys_vars/t/log_error_func.test @@ -1,10 +1,13 @@ +# 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" # when --log-error is used without argument # check displayed value. We can check only the base name, the rest # depends on paths, symbolic links, --vardir, etc... 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. let $err_log=`select @err_log`; diff --git a/mysql-test/suite/sys_vars/t/log_error_func2.cnf b/mysql-test/suite/sys_vars/t/log_error_func2.cnf deleted file mode 100644 index ff7e8f7a1015f..0000000000000 --- a/mysql-test/suite/sys_vars/t/log_error_func2.cnf +++ /dev/null @@ -1,5 +0,0 @@ -# Use default setting for mysqld processes -!include include/default_mysqld.cnf - -[mysqld.1] -log-error diff --git a/mysql-test/suite/sys_vars/t/log_error_func2.opt b/mysql-test/suite/sys_vars/t/log_error_func2.opt new file mode 100644 index 0000000000000..4658d62af608e --- /dev/null +++ b/mysql-test/suite/sys_vars/t/log_error_func2.opt @@ -0,0 +1 @@ +--log-error diff --git a/mysql-test/suite/sys_vars/t/log_error_func3.opt b/mysql-test/suite/sys_vars/t/log_error_func3.opt new file mode 100644 index 0000000000000..a236474f94789 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/log_error_func3.opt @@ -0,0 +1 @@ +--disable-log-error diff --git a/mysql-test/t/cte_nonrecursive.test b/mysql-test/t/cte_nonrecursive.test index 700111d5507ed..bcdc06afbadb7 100644 --- a/mysql-test/t/cte_nonrecursive.test +++ b/mysql-test/t/cte_nonrecursive.test @@ -642,3 +642,27 @@ select * from v1; show create 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 diff --git a/mysql-test/t/partition_default.test b/mysql-test/t/partition_default.test index 1110b311c2999..b0424f567e436 100644 --- a/mysql-test/t/partition_default.test +++ b/mysql-test/t/partition_default.test @@ -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=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; show create table t1; select * from t1; @@ -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=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; show create table t1; select * from t1; @@ -520,3 +514,29 @@ explain partitions select * from t1 where i is null; 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; diff --git a/mysql-test/t/plugin_loaderr.test b/mysql-test/t/plugin_loaderr.test index 7b98a94afd438..85621ad047da9 100644 --- a/mysql-test/t/plugin_loaderr.test +++ b/mysql-test/t/plugin_loaderr.test @@ -18,7 +18,7 @@ FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name = 'innodb'; --source include/wait_until_disconnected.inc --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 --enable_reconnect diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 137902c54f205..cd6ca108661c3 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -5779,6 +5779,44 @@ DROP VIEW v1; DROP TABLE t1; +--echo # +--echo # MDEV-8642: WHERE Clause not applied on View - Empty result set returned +--echo # + +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; + +drop view v1; +drop table t1; --echo # ----------------------------------------------------------------- --echo # -- End of 10.0 tests. @@ -6148,6 +6186,18 @@ REPLACE INTO v (f1,f2) VALUES (1,1); drop view v; drop table t1,t2,t3; + +--echo # +--echo # MDEV-12379: Server crashes in TABLE_LIST::is_with_table on +--echo # SHOW CREATE VIEW +--echo # + +CREATE TABLE t (i INT); +CREATE VIEW v AS SELECT * FROM ( SELECT * FROM t ) sq; +DROP TABLE IF EXISTS t; +SHOW CREATE VIEW v; +DROP VIEW v; + --echo # --echo # End of 10.2 tests --echo # diff --git a/plugin/aws_key_management/CMakeLists.txt b/plugin/aws_key_management/CMakeLists.txt index 66b8074406f40..59fdd1684f213 100644 --- a/plugin/aws_key_management/CMakeLists.txt +++ b/plugin/aws_key_management/CMakeLists.txt @@ -50,7 +50,6 @@ ENDIF() FIND_LIBRARY(AWS_CPP_SDK_CORE NAMES aws-cpp-sdk-core PATH_SUFFIXES "${SDK_INSTALL_BINARY_PREFIX}") FIND_LIBRARY(AWS_CPP_SDK_KMS NAMES aws-cpp-sdk-kms PATH_SUFFIXES "${SDK_INSTALL_BINARY_PREFIX}") -SET(CMAKE_REQUIRED_FLAGS ${CXX11_FLAGS}) FIND_PATH(AWS_CPP_SDK_INCLUDE_DIR NAMES aws/kms/KMSClient.h) IF(AWS_CPP_SDK_CORE AND AWS_CPP_SDK_KMS AND AWS_CPP_SDK_INCLUDE_DIR) @@ -121,6 +120,7 @@ ELSE() -DBUILD_ONLY=kms -DBUILD_SHARED_LIBS=OFF -DFORCE_SHARED_CRT=OFF + -DENABLE_TESTING=OFF "-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} ${PIC_FLAG}" "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${PIC_FLAG}" "-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} ${PIC_FLAG}" @@ -140,7 +140,11 @@ ELSE() ENDIF() ADD_DEFINITIONS(${SSL_DEFINES}) # Need to know whether openssl should be initialized -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}") +IF(CMAKE_VERSION GREATER "3.0") + SET(CMAKE_CXX_STANDARD 11) +ELSE() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}") +ENDIF() IF(WIN32) SET(AWS_CPP_SDK_DEPENDENCIES bcrypt winhttp wininet userenv version) ELSE() diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 1dfa313a70cee..c84867e1c4ff6 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -70,7 +70,6 @@ ENDIF() ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h COMMAND gen_lex_token > lex_token.h - DEPENDS gen_lex_token ) ADD_DEFINITIONS(-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER) @@ -188,6 +187,63 @@ ELSE() SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) ENDIF() + +IF(MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS) + + # mysqld.exe must to export symbols from some specific libs. + # These symbols are used by dynamic plugins, that "link" to mysqld. + # + # To do that, we + # + # 1. Generate mysqld_lib.def text file with all symbols from static + # libraries mysys, dbug, strings, sql. + # 2. Then we call + # lib.exe /DEF:mysqld_lib.def ... + # to create import library mysqld_lib.lib and export library mysqld_lib.exp + # 3. mysqld.exe links with mysqld_lib.exp (exporting symbols) + # 4. plugins link with mysqld_lib.lib (importing symbols) + # + # We do not not regenerate .def, .lib and .exp + # without necessity.E.g source modifications, that do not + # change list of exported symbols, will not result in a relink for plugins. + + SET(MYSQLD_DEF ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib.def) + SET(MYSQLD_EXP ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib.exp) + SET(MYSQLD_LIB ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib.lib) + SET(MYSQLD_CORELIBS sql mysys mysys_ssl dbug strings) + FOREACH (CORELIB ${MYSQLD_CORELIBS}) + GET_TARGET_PROPERTY(LOC ${CORELIB} LOCATION) + FILE(TO_NATIVE_PATH ${LOC} LOC) + SET (LIB_LOCATIONS ${LIB_LOCATIONS} ${LOC}) + ENDFOREACH (CORELIB) + + SET(_PLATFORM x86) + IF(CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(_PLATFORM x64) + ENDIF() + + ADD_CUSTOM_COMMAND( + OUTPUT ${MYSQLD_DEF} + COMMAND cscript ARGS //nologo ${PROJECT_SOURCE_DIR}/win/create_def_file.js + ${_PLATFORM} /forLib ${LIB_LOCATIONS} > mysqld_lib.def.tmp + COMMAND ${CMAKE_COMMAND} -E copy_if_different mysqld_lib.def.tmp mysqld_lib.def + COMMAND ${CMAKE_COMMAND} -E remove mysqld_lib.def.tmp + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DEPENDS ${MYSQLD_CORELIBS} + ) + + ADD_CUSTOM_COMMAND( + OUTPUT ${MYSQLD_LIB} + COMMAND lib + ARGS /NAME:mysqld.exe "/DEF:${MYSQLD_DEF}" "/MACHINE:${_PLATFORM}" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DEPENDS ${MYSQLD_DEF} + ) + ADD_CUSTOM_TARGET(gen_mysqld_lib DEPENDS ${MYSQLD_LIB}) + ADD_LIBRARY(mysqld_import_lib UNKNOWN IMPORTED GLOBAL) + SET_TARGET_PROPERTIES(mysqld_import_lib PROPERTIES IMPORTED_LOCATION ${MYSQLD_LIB}) +ENDIF() + MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server) IF(APPLE) @@ -208,25 +264,9 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS) SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} -Wl,--export-all-symbols") ENDIF() IF(MSVC) - # Set module definition file. Also use non-incremental linker, - # incremental appears to crash from time to time,if used with /DEF option - SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} /DEF:mysqld.def /INCREMENTAL:NO") - - FOREACH (CORELIB sql mysys mysys_ssl dbug strings) - GET_TARGET_PROPERTY(LOC ${CORELIB} LOCATION) - FILE(TO_NATIVE_PATH ${LOC} LOC) - SET (LIB_LOCATIONS ${LIB_LOCATIONS} ${LOC}) - ENDFOREACH (CORELIB ${MYSQLD_CORE_LIBS}) - SET(_PLATFORM x86) - IF(CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(_PLATFORM x64) - ENDIF() - ADD_CUSTOM_COMMAND(TARGET mysqld PRE_LINK - COMMAND echo ${_PLATFORM} && cscript ARGS //nologo ${PROJECT_SOURCE_DIR}/win/create_def_file.js - ${_PLATFORM} ${LIB_LOCATIONS} > mysqld.def - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - ADD_DEPENDENCIES(sql GenError) - ENDIF(MSVC) + SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} \"${MYSQLD_EXP}\"") + ADD_DEPENDENCIES(mysqld gen_mysqld_lib) + ENDIF() ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS) SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE) @@ -300,7 +340,6 @@ ENDIF() ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h COMMAND gen_lex_hash > lex_hash.h - DEPENDS gen_lex_hash ) MYSQL_ADD_EXECUTABLE(mysql_tzinfo_to_sql tztime.cc COMPONENT Server) @@ -419,7 +458,7 @@ IF(WIN32) ${CMAKE_CURRENT_BINARY_DIR}/my_bootstrap.sql mysql_bootstrap_sql.c WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS comp_sql ${my_bootstrap_sql} + DEPENDS ${my_bootstrap_sql} ) MYSQL_ADD_EXECUTABLE(mysql_install_db diff --git a/sql/item.cc b/sql/item.cc index fe51b2966ad00..6ebea475af42f 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -7806,18 +7806,6 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) last_checked_context->select_lex->nest_level); } } - else if (ref_type() != VIEW_REF) - { - /* - It could be that we're referring to something that's in ancestor selects. - We must make an appropriate mark_as_dependent() call for each such - outside reference. - */ - Dependency_marker dep_marker; - dep_marker.current_select= current_sel; - dep_marker.thd= thd; - (*ref)->walk(&Item::enumerate_field_refs_processor, FALSE, &dep_marker); - } DBUG_ASSERT(*ref); /* diff --git a/sql/log.cc b/sql/log.cc index 1f55b283a1307..ab6d90310043a 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1233,23 +1233,6 @@ void LOGGER::init_log_tables() } -bool LOGGER::flush_logs(THD *thd) -{ - /* - Now we lock logger, as nobody should be able to use logging routines while - log tables are closed - */ - logger.lock_exclusive(); - - /* reopen log files */ - file_log_handler->flush(); - - /* end of log flush */ - logger.unlock(); - return 0; -} - - /** Close and reopen the slow log (with locks). diff --git a/sql/log.h b/sql/log.h index ae8f8170a98b5..eaa63d4072df3 100644 --- a/sql/log.h +++ b/sql/log.h @@ -1018,7 +1018,6 @@ class LOGGER */ void init_base(); void init_log_tables(); - bool flush_logs(THD *thd); bool flush_slow_log(); bool flush_general_log(); /* Perform basic logger cleanup. this will leave e.g. error log open. */ diff --git a/sql/log_event.cc b/sql/log_event.cc index c7cbff9c61598..f1f9e65098d34 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -11326,6 +11326,7 @@ Annotate_rows_log_event::Annotate_rows_log_event(THD *thd, : Log_event(thd, 0, using_trans), m_save_thd_query_txt(0), m_save_thd_query_len(0), + m_saved_thd_query(false), m_used_query_txt(0) { m_query_txt= thd->query(); @@ -11341,6 +11342,7 @@ Annotate_rows_log_event::Annotate_rows_log_event(const char *buf, : Log_event(buf, desc), m_save_thd_query_txt(0), m_save_thd_query_len(0), + m_saved_thd_query(false), m_used_query_txt(0) { m_query_len= event_len - desc->common_header_len; @@ -11351,7 +11353,7 @@ Annotate_rows_log_event::~Annotate_rows_log_event() { DBUG_ENTER("Annotate_rows_log_event::~Annotate_rows_log_event"); #ifndef MYSQL_CLIENT - if (m_save_thd_query_txt) + if (m_saved_thd_query) thd->set_query(m_save_thd_query_txt, m_save_thd_query_len); else if (m_used_query_txt) thd->reset_query(); @@ -11438,8 +11440,10 @@ void Annotate_rows_log_event::print(FILE *file, PRINT_EVENT_INFO *pinfo) #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) int Annotate_rows_log_event::do_apply_event(rpl_group_info *rgi) { + rgi->free_annotate_event(); m_save_thd_query_txt= thd->query(); m_save_thd_query_len= thd->query_length(); + m_saved_thd_query= true; m_used_query_txt= 1; thd->set_query(m_query_txt, m_query_len); return 0; diff --git a/sql/log_event.h b/sql/log_event.h index e45151c85642e..ccbc0527bd2bb 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -3908,6 +3908,7 @@ class Annotate_rows_log_event: public Log_event uint m_query_len; char *m_save_thd_query_txt; uint m_save_thd_query_len; + bool m_saved_thd_query; bool m_used_query_txt; }; diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 93e7b869be033..448fc231b2b16 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -835,7 +835,7 @@ struct rpl_group_info */ inline void set_annotate_event(Annotate_rows_log_event *event) { - free_annotate_event(); + DBUG_ASSERT(m_annotate_event == NULL); m_annotate_event= event; this->thd->variables.binlog_annotate_row_events= 1; } diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index 1dded86c82400..d76ee13a010ac 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -780,6 +780,7 @@ st_select_lex_unit *With_element::clone_parsed_spec(THD *thd, with_table->next_global= spec_tables; } res= &lex->unit; + res->set_with_clause(owner); lex->unit.include_down(with_table->select_lex); lex->unit.set_slave(with_select); diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 4e71e792a0888..0a146aeb12beb 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -4842,8 +4842,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, my_error(ER_PARTITION_FUNCTION_FAILURE, MYF(0)); goto err; } - if ((flags & (HA_FAST_CHANGE_PARTITION | HA_PARTITION_ONE_PHASE)) != 0 && - !tab_part_info->has_default_partititon()) + if ((flags & (HA_FAST_CHANGE_PARTITION | HA_PARTITION_ONE_PHASE)) != 0) { /* "Fast" change of partitioning is supported in this case. diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e6cfd923d05f5..47c03023faaee 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -25044,7 +25044,7 @@ void TABLE_LIST::print(THD *thd, table_map eliminated_tables, String *str, } else if (derived) { - if (!derived->derived->is_with_table()) + if (!is_with_table()) { // A derived table str->append('('); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 5bd423b6ac789..ddf3f4d1b077b 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3856,7 +3856,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, if (key->type == Key::MULTIPLE) { /* not a critical problem */ - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, + push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, ER_TOO_LONG_KEY, ER_THD(thd, ER_TOO_LONG_KEY), key_part_length); diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc index 9820bf983caa5..42b7bc812612e 100644 --- a/sql/wsrep_binlog.cc +++ b/sql/wsrep_binlog.cc @@ -329,9 +329,13 @@ void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len) } FILE *of= fopen(filename, "wb"); + if (of) { - fwrite (rbr_buf, buf_len, 1, of); + if (fwrite(rbr_buf, buf_len, 1, of) == 0) + WSREP_ERROR("Failed to write buffer of length %llu to '%s'", + (unsigned long long)buf_len, filename); + fclose(of); } else diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index c0cf26b869c68..fcf6d55f660c1 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -206,19 +206,6 @@ buf_dblwr_create(void) ib::info() << "Doublewrite buffer not found: creating new"; - ulint min_doublewrite_size = - ( ( 2 * TRX_SYS_DOUBLEWRITE_BLOCK_SIZE - + FSP_EXTENT_SIZE / 2 - + 100) - * UNIV_PAGE_SIZE); - if (buf_pool_get_curr_size() < min_doublewrite_size) { - ib::error() << "Cannot create doublewrite buffer: you must" - " increase your buffer pool size. Cannot continue" - " operation."; - - return(false); - } - block2 = fseg_create(TRX_SYS_SPACE, TRX_SYS_PAGE_NO, TRX_SYS_DOUBLEWRITE + TRX_SYS_DOUBLEWRITE_FSEG, &mtr); @@ -233,9 +220,9 @@ buf_dblwr_create(void) " increase your tablespace size." " Cannot continue operation."; - /* We exit without committing the mtr to prevent - its modifications to the database getting to disk */ - + /* The mini-transaction did not write anything yet; + we merely failed to allocate a page. */ + mtr.commit(); return(false); } @@ -250,7 +237,12 @@ buf_dblwr_create(void) ib::error() << "Cannot create doublewrite buffer: " " you must increase your tablespace size." " Cannot continue operation."; - + /* This may essentially corrupt the doublewrite + buffer. However, usually the doublewrite buffer + is created at database initialization, and it + should not matter (just remove all newly created + InnoDB files and restart). */ + mtr.commit(); return(false); } diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index a61d7439e2cd6..db7efe89d37db 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -1767,7 +1767,7 @@ fil_crypt_rotate_page( return; } - if (space == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) { + if (space_id == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) { /* don't encrypt this as it contains address to dblwr buffer */ return; } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 927923263985c..789765dfe34ee 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -15277,6 +15277,25 @@ ha_innobase::defragment_table( for (index = dict_table_get_first_index(table); index; index = dict_table_get_next_index(index)) { + if (dict_index_is_corrupted(index)) { + continue; + } + + if (dict_index_is_spatial(index)) { + /* Do not try to defragment spatial indexes, + because doing it properly would require + appropriate logic around the SSN (split + sequence number). */ + continue; + } + + if (index->page == FIL_NULL) { + /* Do not defragment auxiliary tables related + to FULLTEXT INDEX. */ + ut_ad(index->type & DICT_FTS); + continue; + } + if (one_index && strcasecmp(index_name, index->name) != 0) { continue; } diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 27fa7e84aa334..a5b919b424d7e 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -300,7 +300,6 @@ my_error_innodb( break; case DB_OUT_OF_FILE_SPACE: my_error(ER_RECORD_FILE_FULL, MYF(0), table); - ut_error; break; case DB_TEMP_FILE_WRITE_FAIL: my_error(ER_TEMP_FILE_WRITE_FAILURE, MYF(0)); diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index d0a67a7ed284b..b08148578dc7a 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1043,7 +1043,6 @@ struct trx_t { for secondary indexes when we decide if we can use the insert buffer for them, we set this FALSE */ - bool support_xa; /*!< normally we do the XA two-phase */ bool flush_log_later;/* In 2PC, we hold the prepare_commit mutex across both phases. In that case, we diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index db09f7894a71e..36324c43970d6 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -145,8 +145,6 @@ trx_init( trx->check_unique_secondary = true; - trx->support_xa = true; - trx->lock.n_rec_locks = 0; trx->dict_operation = TRX_DICT_OP_NONE; diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index 308bd26592e49..3223e084709ab 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -54,7 +54,9 @@ ELSE() SKIP_ROCKSDB_PLUGIN("Compiler not supported") ENDIF() -IF(CXX11_FLAGS) +IF(CMAKE_VERSION GREATER 3.0) + SET(CMAKE_CXX_STANDARD 11) +ELSEIF(CXX11_FLAGS) ADD_DEFINITIONS(${CXX11_FLAGS}) ENDIF() diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake index 4b830bbdf32ec..8b7e64a8e0870 100644 --- a/storage/rocksdb/build_rocksdb.cmake +++ b/storage/rocksdb/build_rocksdb.cmake @@ -29,10 +29,6 @@ else() endif() endif() -include (CheckTypeSize) -check_type_size(size_t SIZEOF_SIZE_T) -set_property(SOURCE ha_rocksdb.cc APPEND PROPERTY COMPILE_DEFINITIONS - SIZEOF_SIZE_T=${SIZEOF_SIZE_T} SIZEOF_UINT64_T=8) # Optional compression libraries. @@ -136,7 +132,7 @@ find_package(Threads REQUIRED) if(WIN32) set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib) else() - set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT}) + set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIBRT}) endif() set(ROCKSDB_LIBS rocksdblib}) diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def index 8d3fc09027398..cff53e6370e46 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def +++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def @@ -57,3 +57,9 @@ unique_sec : Intermittent failures in BB allow_no_pk_concurrent_insert: stress test rocksdb_deadlock_stress_rc: stress test rocksdb_deadlock_stress_rr: stress test + +# MDEV-12474 Regularly failing tests on Buildbot +autoinc_vars_thread : MDEV-12474 Regularly fails on buildbot +validate_datadic : MDEV-12474 Regularly fails on buildbot +unique_check : MDEV-12474 Regularly fails on buildbot +bloomfilter : MDEV-12474 Regularly fails on buildbot diff --git a/storage/rocksdb/rdb_buff.h b/storage/rocksdb/rdb_buff.h index c2d039b46c57b..4b5850137f652 100644 --- a/storage/rocksdb/rdb_buff.h +++ b/storage/rocksdb/rdb_buff.h @@ -30,6 +30,16 @@ #define be16toh _byteswap_ushort #endif +#if __APPLE__ +#include +#define htobe64(x) OSSwapHostToBigInt64(x) +#define be64toh(x) OSSwapBigToHostInt64(x) +#define htobe32(x) OSSwapHostToBigInt32(x) +#define be32toh(x) OSSwapBigToHostInt32(x) +#define htobe16(x) OSSwapHostToBigInt16(x) +#define be16toh(x) OSSwapBigToHostInt16(x) +#endif + namespace myrocks { /* diff --git a/storage/rocksdb/ut0counter.h b/storage/rocksdb/ut0counter.h index af2e023af27eb..cfa474e7a99b1 100644 --- a/storage/rocksdb/ut0counter.h +++ b/storage/rocksdb/ut0counter.h @@ -78,7 +78,7 @@ struct thread_id_indexer_t : public generic_indexer_t { thread id is represented as a pointer, it may not work as effectively. */ size_t get_rnd_index() const { - return get_curr_thread_id(); + return (size_t)get_curr_thread_id(); } }; diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc index 454b085862cd0..78683f35028b3 100644 --- a/storage/xtradb/btr/btr0cur.cc +++ b/storage/xtradb/btr/btr0cur.cc @@ -3948,7 +3948,7 @@ static const unsigned rows_in_range_max_retries = 4; /** We pretend that a range has that many records if the tree keeps changing for rows_in_range_max_retries retries while we try to estimate the records in a given range. */ -static const int64_t rows_in_range_arbitrary_ret_val = 10; +static const ib_int64_t rows_in_range_arbitrary_ret_val = 10; /** Estimates the number of rows in a given index range. @param[in] index index @@ -3966,7 +3966,7 @@ rows_in_range_arbitrary_ret_val as a result (if nth_attempt >= rows_in_range_max_retries and the tree is modified between the two dives). */ static -int64_t +ib_int64_t btr_estimate_n_rows_in_range_low( dict_index_t* index, const dtuple_t* tuple1, @@ -4102,7 +4102,7 @@ btr_estimate_n_rows_in_range_low( return(rows_in_range_arbitrary_ret_val); } - const int64_t ret = + const ib_int64_t ret = btr_estimate_n_rows_in_range_low( index, tuple1, mode1, tuple2, mode2, trx, @@ -4168,7 +4168,7 @@ btr_estimate_n_rows_in_range_low( @param[in] mode2 search mode for range end @param[in] trx trx @return estimated number of rows */ -int64_t +ib_int64_t btr_estimate_n_rows_in_range( dict_index_t* index, const dtuple_t* tuple1, @@ -4177,7 +4177,7 @@ btr_estimate_n_rows_in_range( ulint mode2, trx_t* trx) { - const int64_t ret = btr_estimate_n_rows_in_range_low( + const ib_int64_t ret = btr_estimate_n_rows_in_range_low( index, tuple1, mode1, tuple2, mode2, trx, 1 /* first attempt */); diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc index 60ab067d105e9..aa95de7efeacf 100644 --- a/storage/xtradb/fil/fil0crypt.cc +++ b/storage/xtradb/fil/fil0crypt.cc @@ -1951,7 +1951,7 @@ fil_crypt_rotate_page( return; } - if (space == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) { + if (space_id == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) { /* don't encrypt this as it contains address to dblwr buffer */ return; } diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 742c03b5404b1..11779a66e7c60 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -13277,6 +13277,17 @@ ha_innobase::defragment_table( for (index = dict_table_get_first_index(table); index; index = dict_table_get_next_index(index)) { + if (dict_index_is_corrupted(index)) { + continue; + } + + if (index->page == FIL_NULL) { + /* Do not defragment auxiliary tables related + to FULLTEXT INDEX. */ + ut_ad(index->type & DICT_FTS); + continue; + } + if (one_index && strcasecmp(index_name, index->name) != 0) { continue; } diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc index 8aaf5cd83bc73..a521db3ce2580 100644 --- a/storage/xtradb/handler/handler0alter.cc +++ b/storage/xtradb/handler/handler0alter.cc @@ -134,7 +134,6 @@ my_error_innodb( break; case DB_OUT_OF_FILE_SPACE: my_error(ER_RECORD_FILE_FULL, MYF(0), table); - ut_error; break; case DB_TEMP_FILE_WRITE_FAILURE: my_error(ER_GET_ERRMSG, MYF(0), diff --git a/win/create_def_file.js b/win/create_def_file.js index 5fb28ef0bee8f..25bbbb4eb3d50 100644 --- a/win/create_def_file.js +++ b/win/create_def_file.js @@ -54,6 +54,22 @@ var is64 = args.Item(0).toLowerCase() == "x64"; var shell = new ActiveXObject("WScript.Shell"); var fso = new ActiveXObject("Scripting.FileSystemObject"); +/* + If .def file is used with together with lib.exe + the name mangling for stdcall is slightly different. + + Undescore prefix for stdcall function name must be removed for + lib.exe but not link.exe (see ScrubSymbol()) + + This difference is not documented anywhere and could + be a bug in compiler tools. + + We use a parameter /forLib, if the resulting .def file is used + with lib.exe . +*/ +var forLib = false; + + OutputSymbols(CollectSymbols()); @@ -62,8 +78,8 @@ function OutputSymbols(symbols) { var out = WScript.StdOut; out.WriteLine("EXPORTS"); - for (var sym in symbols) - out.WriteLine(sym); + for (var i= 0; i < symbols.length; i++) + out.WriteLine(symbols[i]); } function echo(message) @@ -72,9 +88,10 @@ function echo(message) } // Extract global symbol names and type from objects +// Returns string array with symbol names function CollectSymbols() { - var uniqueSymbols = new Array(); + var uniqueSymbols = new Object(); try { @@ -146,7 +163,19 @@ function CollectSymbols() uniqueSymbols[symbol] = 1; } fso.DeleteFile(rspfilename); - return uniqueSymbols; + // Sort symbols names + var keys=[]; + var sorted = {}; + for (key in uniqueSymbols) + { + if (uniqueSymbols.hasOwnProperty(key)) + { + keys.push(key); + } + } + keys.sort(); + + return keys; } // performs necessary cleanup on the symbol name @@ -156,6 +185,9 @@ function ScrubSymbol(symbol) if (symbol.charAt(0) != "_") return symbol; + if (forLib) + return symbol.substring(1, symbol.length); + var atSign = symbol.indexOf("@"); if (atSign != -1) { @@ -189,7 +221,11 @@ function CreateResponseFile(filename) var index = 1; for (; index < args.length; index++) { - addToResponseFile(args.Item(index),responseFile); + var param = args.Item(index); + if (param == "/forLib") + forLib = true; + else + addToResponseFile(args.Item(index),responseFile); } responseFile.Close(); }