diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27bcc150eee..fe5ba113d46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,7 +44,7 @@ variables: # Major version dictates which branches share the same ccache. E.g. 10.6-abc # and 10.6-xyz will have the same cache. MARIADB_MAJOR_VERSION: "11.1" - # NOTE! Currently ccache is only used on the Centos8 build. As each job has + # NOTE! Currently ccache is only used on the Centos 9 build. As each job has # sufficiently different environments they are unable to benefit from each # other's ccaches. As each build generates about 1 GB of ccache, having # multiple caches would quickly consume all free storage on Gitlab-CI and @@ -53,7 +53,7 @@ variables: # cache:policy are not flexible enough to have a system where the cache is # uploaded only once a week and not on every build. Having ccache on at least # one build still helps ensure that ccache compatibility is at least tested - # and if the Centos 8 build is always significantly faster than all other + # and if the Centos 9 build is always significantly faster than all other # builds (e.g. on self-hosted Gitlab instances) then users would at least be # able to discover it. # @@ -209,26 +209,20 @@ fedora-sanitizer: matrix: - SANITIZER: [-DWITH_ASAN=YES, -DWITH_TSAN=YES, -DWITH_UBSAN=YES] -centos8: +centos9: stage: build - image: quay.io/centos/centos:stream8 # CentOS 8 is deprecated, use this Stream8 instead + image: quay.io/centos/centos:stream9 # CentOS 9 is deprecated, use this Stream9 instead variables: GIT_STRATEGY: fetch GIT_SUBMODULE_STRATEGY: normal script: - - yum install -y yum-utils rpm-build openssl-devel pcre2-devel - - yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm - # dnf --enablerepo=powertools install Judy-devel #--> not found - - dnf config-manager --set-enabled powertools - # Error: - # Problem: conflicting requests - # - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.i686 is filtered out by modular filtering - # - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64 is filtered out by modular filtering - # Solution: install Judy-devel directly from downloaded rpm file: - - yum install -y http://vault.centos.org/centos/8/PowerTools/x86_64/os/Packages/Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64.rpm - # Use eatmydata to speed up build - - yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm - - yum install -y ccache # From EPEL + - yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + - yum install -y yum-utils rpm-build openssl-devel libeatmydata ccache + # Install missing dependencies + - yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/Judy-devel-1.0.5-28.el9.x86_64.rpm + - yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/bison-devel-3.7.4-5.el9.x86_64.rpm + - yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/multilib-rpm-config-1-19.el9.noarch.rpm + # Configure ccache - source /etc/profile.d/ccache.sh - export CCACHE_DIR="$(pwd)/.ccache"; ccache --zero-stats # This repository does not have any .spec files, so install dependencies based on CentOS spec file diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 2f1cb0e1976..373aeb9dd6a 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1053,7 +1053,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, case QUERY_COMPRESSED_EVENT: { Query_log_event *qe= (Query_log_event*)ev; - if (!qe->is_trans_keyword()) + if (!qe->is_trans_keyword(print_event_info->is_xa_trans())) { if (shall_skip_database(qe->db)) goto end; diff --git a/client/mysqldump.c b/client/mysqldump.c index 42ecbb4cbcd..a09720dac72 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -740,7 +740,7 @@ static void write_header(FILE *sql_file, const char *db_name) } else { - fprintf(sql_file, "/*!999999\\- enable the sandbox mode */ \n"); + fprintf(sql_file, "/*M!999999\\- enable the sandbox mode */ \n"); if (!opt_compact) { print_comment(sql_file, 0, "-- MariaDB dump %s-%s, for %s (%s)\n--\n", @@ -6136,8 +6136,11 @@ static int dump_selected_tables(char *db, char **table_names, int tables) } /* dump_selected_tables */ +const char fmt_gtid_pos[]= "%sSET GLOBAL gtid_slave_pos='%s';\n"; + static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos, - int have_mariadb_gtid, int use_gtid) + int have_mariadb_gtid, int use_gtid, + char *set_gtid_pos) { MYSQL_ROW row; MYSQL_RES *UNINIT_VAR(master); @@ -6198,15 +6201,21 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos, /* gtid */ if (have_mariadb_gtid) { - print_comment(md_result_file, 0, - "\n-- Preferably use GTID to start replication from GTID " - "position:\n\n"); if (use_gtid) + { fprintf(md_result_file, "%sCHANGE MASTER TO MASTER_USE_GTID=slave_pos;\n", comment_prefix); - fprintf(md_result_file, - "%sSET GLOBAL gtid_slave_pos='%s';\n", + /* + When --gtid is specified defer print of SET gtid_slave_pos until + after its placeholder table is guaranteed to have been dumped. + */ + print_comment(md_result_file, 0, + "\n-- A corresponding to the above master-data " + "CHANGE-MASTER settings to the slave gtid state is printed " + "later in the file.\n"); + } + sprintf(set_gtid_pos, fmt_gtid_pos, (!use_gtid ? "-- " : comment_prefix), gtid_pos); } @@ -6222,6 +6231,11 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos, fprintf(md_result_file, "%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", (use_gtid ? "-- " : comment_prefix), file, offset); + if (have_mariadb_gtid && !use_gtid) + print_comment(md_result_file, 0, + "\n-- A corresponding to the above master-data CHANGE-MASTER " + "settings to the slave gtid state is printed as comments " + "later in the file.\n"); check_io(md_result_file); if (!consistent_binlog_pos) @@ -6291,8 +6305,8 @@ static int add_slave_statements(void) return(0); } -static int do_show_slave_status(MYSQL *mysql_con, int use_gtid, - int have_mariadb_gtid) +static int do_show_slave_status(MYSQL *mysql_con, int have_mariadb_gtid, + int use_gtid, char* set_gtid_pos) { MYSQL_RES *UNINIT_VAR(slave); MYSQL_ROW row; @@ -6332,10 +6346,12 @@ static int do_show_slave_status(MYSQL *mysql_con, int use_gtid, mysql_free_result(slave); return 1; } + /* defer print similarly to do_show_master_status */ print_comment(md_result_file, 0, - "-- GTID position to start replication:\n"); - fprintf(md_result_file, "%sSET GLOBAL gtid_slave_pos='%s';\n", - gtid_comment_prefix, gtid_pos); + "\n-- A corresponding to the below dump-slave " + "CHANGE-MASTER settings to the slave gtid state is printed " + "later in the file.\n"); + sprintf(set_gtid_pos, fmt_gtid_pos, gtid_comment_prefix, gtid_pos); } if (use_gtid) print_comment(md_result_file, 0, @@ -7056,6 +7072,34 @@ static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size) die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); } +/** + Print earlier prepared SET @@global.gtid_slave_pos. + + @param set_gtid_pos[in] formatted sql set statement +**/ +static void do_print_set_gtid_slave_pos(const char *set_gtid_pos, + my_bool is_master_data) +{ + DBUG_ASSERT(opt_master_data || opt_slave_data); + if (is_master_data) + { + print_comment(md_result_file, 0, + "\n-- The deferred gtid setting for slave corresponding to " + "the master-data CHANGE-MASTER follows\n"); + print_comment(md_result_file, 0, + "\n-- Preferably use GTID to start replication from GTID " + "position:\n\n"); + } + else + { + print_comment(md_result_file, 0, + "\n-- The deferred gtid setting for slave corresponding to " + "the dump-slave CHANGE-MASTER follows\n"); + print_comment(md_result_file, 0, + "-- GTID position to start replication:\n"); + } + fprintf(md_result_file, "%s", set_gtid_pos); +} int main(int argc, char **argv) { @@ -7064,6 +7108,12 @@ int main(int argc, char **argv) int exit_code; int consistent_binlog_pos= 0; int have_mariadb_gtid= 0; + /* + to hold SET @@global.gtid_slave_pos which is deferred to print + until the function epilogue. + */ + char master_set_gtid_pos[3 + sizeof(fmt_gtid_pos) + MAX_GTID_LENGTH]= {0}; + char slave_set_gtid_pos[3 + sizeof(fmt_gtid_pos) + MAX_GTID_LENGTH]= {0}; MY_INIT(argv[0]); sf_leaking_memory=1; /* don't report memory leaks on early exits */ @@ -7102,11 +7152,11 @@ int main(int argc, char **argv) write_header(md_result_file, *argv); /* Set MAX_STATEMENT_TIME to 0 unless set in client */ - my_snprintf(query, sizeof(query), "/*!100100 SET @@MAX_STATEMENT_TIME=%f */", opt_max_statement_time); + my_snprintf(query, sizeof(query), "/*M!100100 SET @@MAX_STATEMENT_TIME=%f */", opt_max_statement_time); mysql_query(mysql, query); /* Set server side timeout between client commands to server compiled-in default */ - mysql_query(mysql, "/*!100100 SET WAIT_TIMEOUT=DEFAULT */"); + mysql_query(mysql, "/*M!100100 SET WAIT_TIMEOUT=DEFAULT */"); /* Check if the server support multi source */ if (mysql_get_server_version(mysql) >= 100000) @@ -7167,10 +7217,12 @@ int main(int argc, char **argv) goto err; if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos, - have_mariadb_gtid, opt_use_gtid)) + have_mariadb_gtid, + opt_use_gtid, master_set_gtid_pos)) goto err; - if (opt_slave_data && do_show_slave_status(mysql, opt_use_gtid, - have_mariadb_gtid)) + if (opt_slave_data && do_show_slave_status(mysql, + have_mariadb_gtid, + opt_use_gtid, slave_set_gtid_pos)) goto err; if (opt_single_transaction && do_unlock_tables(mysql)) /* unlock but no commit! */ goto err; @@ -7238,6 +7290,11 @@ int main(int argc, char **argv) if (opt_system & OPT_SYSTEM_TIMEZONES) dump_all_timezones(); + if (opt_master_data && master_set_gtid_pos[0]) + do_print_set_gtid_slave_pos(master_set_gtid_pos, TRUE); + if (opt_slave_data && slave_set_gtid_pos[0]) + do_print_set_gtid_slave_pos(slave_set_gtid_pos, FALSE); + /* add 'START SLAVE' to end of dump */ if (opt_slave_apply && add_slave_statements()) goto err; diff --git a/cmake/libfmt.cmake b/cmake/libfmt.cmake index da3479424b1..911fb75385e 100644 --- a/cmake/libfmt.cmake +++ b/cmake/libfmt.cmake @@ -15,8 +15,8 @@ MACRO(BUNDLE_LIBFMT) ExternalProject_Add( libfmt PREFIX "${dir}" - URL "https://github.com/fmtlib/fmt/archive/refs/tags/8.0.1.zip" - URL_MD5 e77873199e897ca9f780479ad68e25b1 + URL "https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip" + URL_MD5 5f3915e2eff60e7f70c558120592100d INSTALL_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index f951eed7651..ec1029e20ac 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -273,6 +273,7 @@ IF(MSVC) STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " /d2OptimizeHugeFunctions") STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /d2OptimizeHugeFunctions") ENDIF() + ADD_COMPILE_OPTIONS($<$:/utf-8>) ENDIF() # Always link with socket/synchronization libraries diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index f42db939bd3..2e444b770eb 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -57,8 +57,8 @@ MACRO(BUNDLE_PCRE2) ExternalProject_Add( pcre2 PREFIX "${dir}" - URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.zip" - URL_MD5 b58f050f2fdd6f2ca5774a2975377a85 + URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.zip" + URL_MD5 dfab8313154b3377a6959c3b6377841e INSTALL_COMMAND "" CMAKE_ARGS "-DCMAKE_WARN_DEPRECATED=FALSE" diff --git a/configure.cmake b/configure.cmake index 5aefb67386a..273c155158e 100644 --- a/configure.cmake +++ b/configure.cmake @@ -414,6 +414,10 @@ CHECK_FUNCTION_EXISTS (vasprintf HAVE_VASPRINTF) CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF) CHECK_FUNCTION_EXISTS (nl_langinfo HAVE_NL_LANGINFO) +IF(NOT HAVE_PTHREAD_RWLOCK_RDLOCK AND NOT HAVE_RWLOCK_INIT AND NOT WIN32) + MESSAGE(FATAL_ERROR "No usable rwlock implementation found") +ENDIF() + IF(HAVE_SYS_EVENT_H) CHECK_FUNCTION_EXISTS (kqueue HAVE_KQUEUE) ENDIF() diff --git a/debian/additions/debian-start b/debian/additions/debian-start index 2b897e913cf..282cd2093ed 100755 --- a/debian/additions/debian-start +++ b/debian/additions/debian-start @@ -6,14 +6,19 @@ # Changes to this file will be preserved when updating the Debian package. # +# shellcheck source=debian/additions/debian-start.inc.sh source /usr/share/mariadb/debian-start.inc.sh # Read default/mysql first and then default/mariadb just like the init.d file does -if [ -f /etc/default/mysql ]; then +if [ -f /etc/default/mysql ] +then + # shellcheck source=/dev/null . /etc/default/mysql fi -if [ -f /etc/default/mariadb ]; then +if [ -f /etc/default/mariadb ] +then + # shellcheck source=/dev/null . /etc/default/mariadb fi @@ -21,9 +26,7 @@ MARIADB="/usr/bin/mariadb --defaults-file=/etc/mysql/debian.cnf" MYADMIN="/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf" # Don't run full mariadb-upgrade on every server restart, use --version-check to do it only once MYUPGRADE="/usr/bin/mariadb-upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent" -MYCHECK="/usr/bin/mariadb-check --defaults-file=/etc/mysql/debian.cnf" MYCHECK_SUBJECT="WARNING: mariadb-check has found corrupt tables" -MYCHECK_PARAMS="--all-databases --fast --silent" MYCHECK_RCPT="${MYCHECK_RCPT:-root}" ## Checking for corrupt, not cleanly closed (only for MyISAM and Aria engines) and upgrade needing tables. diff --git a/debian/additions/debian-start.inc.sh b/debian/additions/debian-start.inc.sh index 74340e78480..94fc81296cf 100755 --- a/debian/additions/debian-start.inc.sh +++ b/debian/additions/debian-start.inc.sh @@ -3,7 +3,7 @@ # This file is included by /etc/mysql/debian-start # -## Check MyISAM and Aria unclosed tables. +## Is there MyISAM or Aria unclosed tables. # - Requires the server to be up. # - Is supposed to run silently in background. function check_for_crashed_tables() { @@ -21,26 +21,38 @@ function check_for_crashed_tables() { # spaces in the thing to be looped over. # If a crashed table is encountered, the "mariadb" command will return with a status different from 0 + # + # The first query will generate lines like. + # select count(*) into @discard from 'mysql'.'db' + # The second line will load all tables without printing any actual results, + # but may show warnings and definitely is expected to have some error and + # exit code if crashed tables are encountered. + # + # Note that inside single quotes must be quoted with '\'' (to be outside of single quotes). set +e - - LC_ALL=C $MARIADB --skip-column-names --batch -e ' - select concat('\''select count(*) into @discard from `'\'', - TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'') - from information_schema.TABLES where TABLE_SCHEMA<>'\''INFORMATION_SCHEMA'\'' and TABLE_SCHEMA<>'\''PERFORMANCE_SCHEMA'\'' and ( ENGINE='\''MyISAM'\'' or ENGINE='\''Aria'\'' )' | \ - xargs -i ${MARIADB} --skip-column-names --silent --batch \ - --force -e "{}" &>"${tempfile}" + # The $MARIADB is intentionally used to expand into a command and arguments + # shellcheck disable=SC2086 + echo ' + SELECT CONCAT("select count(*) into @discard from '\''", TABLE_SCHEMA, "'\''.'\''", TABLE_NAME, "'\''") + FROM information_schema.TABLES WHERE TABLE_SCHEMA<>"INFORMATION_SCHEMA" AND TABLE_SCHEMA<>"PERFORMANCE_SCHEMA" + AND (ENGINE="MyISAM" OR ENGINE="Aria") + ' | \ + LC_ALL=C $MARIADB --skip-column-names --batch | \ + xargs --no-run-if-empty -i $MARIADB --skip-column-names --silent --batch --force -e "{}" &> "${tempfile}" set -e - if [ -s "$tempfile" ]; then + if [ -s "$tempfile" ] + then ( /bin/echo -e "\n" \ "Improperly closed tables are also reported if clients are accessing\n" \ - "the tables *now*. A list of current connections is below.\n"; - $MYADMIN processlist status + "the tables *now*. A list of current connections is below.\n"; + $MYADMIN processlist status ) >> "${tempfile}" # Check for presence as a dependency on mailx would require an MTA. - if [ -x /usr/bin/mailx ]; then - mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < "$tempfile" + if [ -x /usr/bin/mailx ] + then + mailx -e -s"$MYCHECK_SUBJECT" "$MYCHECK_RCPT" < "$tempfile" fi (echo "$MYCHECK_SUBJECT"; cat "${tempfile}") | logger -p daemon.warn -i -t"$0" fi @@ -54,13 +66,13 @@ function upgrade_system_tables_if_necessary() { set -e set -u - logger -p daemon.info -i -t"$0" "Upgrading MySQL tables if necessary." + logger -p daemon.info -i -t"$0" "Upgrading MariaDB tables if necessary." # Filter all "duplicate column", "duplicate key" and "unknown column" # errors as the script is designed to be idempotent. LC_ALL=C $MYUPGRADE \ 2>&1 \ - | egrep -v '^(1|@had|ERROR (1051|1054|1060|1061|1146|1347|1348))' \ + | grep -E -v '^(1|@had|ERROR (1051|1054|1060|1061|1146|1347|1348))' \ | logger -p daemon.warn -i -t"$0" } @@ -72,8 +84,9 @@ function check_root_accounts() { logger -p daemon.info -i -t"$0" "Checking for insecure root accounts." - ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and plugin in ('', 'mysql_native_password', 'mysql_old_password');" | $MARIADB --skip-column-names ) - if [ "$ret" -ne "0" ]; then + ret=$(echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password');" | $MARIADB --skip-column-names) + if [ "$ret" -ne "0" ] + then logger -p daemon.warn -i -t"$0" "WARNING: mysql.user contains $ret root accounts without password!" fi } diff --git a/debian/additions/mariadb.conf.d/50-server.cnf b/debian/additions/mariadb.conf.d/50-server.cnf index c01a35f11f5..82eae6adabb 100644 --- a/debian/additions/mariadb.conf.d/50-server.cnf +++ b/debian/additions/mariadb.conf.d/50-server.cnf @@ -44,6 +44,11 @@ bind-address = 127.0.0.1 # * Logging and Replication # +# Note: The configured log file or its directory need to be created +# and be writable by the mysql user, e.g.: +# $ sudo mkdir -m 2750 /var/log/mysql +# $ sudo chown mysql /var/log/mysql + # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # Recommend only changing this at runtime for short testing periods if needed! diff --git a/debian/additions/source_mariadb.py b/debian/additions/source_mariadb.py index 74c3633512b..a91695a7048 100644 --- a/debian/additions/source_mariadb.py +++ b/debian/additions/source_mariadb.py @@ -7,7 +7,7 @@ Author: Mathias Gug from __future__ import print_function, unicode_literals import os, os.path -from apport.hookutils import * +from apport.hookutils import path_to_key, read_file, attach_conffiles, attach_mac_events, attach_file def _add_my_conf_files(report, filename): key = 'MySQLConf' + path_to_key(filename) diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index a09c10c6c0a..058f3fb73e7 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -184,7 +184,7 @@ fi # Use eatmydata is available to build faster with less I/O, skipping fsync() # during the entire build process (safe because a build can always be restarted) -if which eatmydata > /dev/null +if command -v eatmydata > /dev/null then BUILDPACKAGE_DPKGCMD+=("eatmydata") fi diff --git a/debian/compat b/debian/compat index ec635144f60..f599e28b8ab 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +10 diff --git a/debian/control b/debian/control index d4606b24118..b35550a3d78 100644 --- a/debian/control +++ b/debian/control @@ -86,7 +86,6 @@ Description: MariaDB database development files Package: libmariadb-dev-compat Architecture: any -Multi-Arch: same Section: libdevel Depends: libmariadb-dev (= ${binary:Version}), ${misc:Depends} @@ -206,6 +205,7 @@ Section: libs Depends: ${misc:Depends}, ${shlibs:Depends} Breaks: libmariadbd-dev (<< ${source:Version}) +Conflicts: libmariadbd19t64 Replaces: libmariadbd-dev (<< ${source:Version}) Multi-Arch: same Description: MariaDB embedded database, shared library @@ -236,7 +236,8 @@ Description: MariaDB embedded database, development files package language in the world. The main goals of MariaDB are speed, robustness and ease of use. . - This package includes the MariaDB embedded server library development and header files. + This package includes the MariaDB embedded server library development + and header files. Package: mysql-common Architecture: all @@ -973,7 +974,7 @@ Description: Amazon S3 archival storage engine for MariaDB them accessible in MariaDB in read-only mode. Package: mariadb-plugin-rocksdb -Architecture: amd64 arm64 mips64el ppc64el +Architecture: amd64 arm64 mips64el ppc64el riscv64 Depends: mariadb-server (= ${server:Version}), python3:any, rocksdb-tools, @@ -1083,7 +1084,6 @@ Description: GSSAPI authentication plugin for MariaDB server Package: mariadb-plugin-gssapi-client Architecture: any -Multi-Arch: same Depends: libgssapi-krb5-2, mariadb-client (= ${binary:Version}), ${misc:Depends}, @@ -1110,9 +1110,11 @@ Depends: libcrack2 (>= 2.9.0), ${shlibs:Depends} Description: CrackLib Password Validation Plugin for MariaDB server This password validation plugin uses cracklib to allow only - sufficiently secure (as defined by cracklib) user passwords in MariaDB server. + sufficiently secure (as defined by cracklib) user passwords in + MariaDB server. . - Install and configure this to enforce stronger passwords for MariaDB server users. + Install and configure this to enforce stronger passwords for + MariaDB server users. Package: mariadb-plugin-hashicorp-key-management Architecture: any @@ -1206,8 +1208,7 @@ Depends: mariadb-client (= ${binary:Version}), Conflicts: mariadb-server-5.5, mysql-server-5.7, mysql-server-core-8.0 -Breaks: mariadb-server-5.5, - mariadb-test-10.0, +Breaks: mariadb-test-10.0, mariadb-test-10.1, mariadb-test-10.2, mariadb-test-10.3, diff --git a/debian/copyright b/debian/copyright index a35a25dcdbe..7f9071f89b6 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,3 @@ - == MariaDB == The Debian package of MySQL was first debianzed on 1997-04-12 by Christian diff --git a/debian/libmariadb-dev-compat.lintian-overrides b/debian/libmariadb-dev-compat.lintian-overrides new file mode 100644 index 00000000000..0c0aae31573 --- /dev/null +++ b/debian/libmariadb-dev-compat.lintian-overrides @@ -0,0 +1,2 @@ +# Needed conflict +conflicts-with-version libmariadbclient-dev (<< 1:10.11.8+maria~deb11) diff --git a/debian/libmariadb-dev.lintian-overrides b/debian/libmariadb-dev.lintian-overrides index 6a162120f24..b3f979df54a 100644 --- a/debian/libmariadb-dev.lintian-overrides +++ b/debian/libmariadb-dev.lintian-overrides @@ -1,2 +1,774 @@ -# This is how upstream does it, wont' fix -arch-dependent-file-not-in-arch-specific-directory usr/bin/mariadb_config +# Needed conflict +conflicts-with-version libmariadb-dev-compat (<< 3.0.0) + +# This is intended one +repeated-path-segment mariadb [usr/include/mariadb/mariadb/] + +# These are handled when groff messages are corrected +typo-in-manual-page handshak handshake [usr/share/man/man3/mariadb_get_infov.3.gz:173] +typo-in-manual-page occured occurred [usr/share/man/man3/mysql_ping.3.gz:39] +typo-in-manual-page occured occurred [usr/share/man/man3/mysql_set_character_set.3.gz:37] +typo-in-manual-page occured occurred [usr/share/man/man3/mysql_stmt_error.3.gz:30] +typo-in-manual-page occured occurred [usr/share/man/man3/mysql_stmt_reset.3.gz:27] +typo-in-manual-page occured occurred [usr/share/man/man3/mysql_store_result.3.gz:34] +typo-in-manual-page releated related [usr/share/man/man3/mariadb_get_infov.3.gz:8] +typo-in-manual-page reponse response [usr/share/man/man3/mysql_send_query.3.gz:8] +typo-in-manual-page seperated separated [usr/share/man/man3/mysql_real_connect.3.gz:144] +typo-in-manual-page seperated separated [usr/share/man/man3/mysql_real_connect.3.gz:148] +typo-in-manual-page sucess success [usr/share/man/man3/mariadb_reconnect.3.gz:25] + +# Probably fixed in newer pandoc +# man pages should be regenerated +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mysql_stmt_attr_set.3.gz:20] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mysql_real_connect.3.gz:18] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mysql_set_character_set.3.gz:5] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mysql_set_server_option.3.gz:4] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mariadb_rpl_get_optionsv.3.gz:4] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mariadb_rpl_optionsv.3.gz:4] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mysql_info.3.gz:10] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mysql_refresh.3.gz:13] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mysql_optionsv.3.gz:48] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mysql_stmt_attr_get.3.gz:20] +groff-message an.tmac::*: tbl preprocessor failed, or it or soelim was not run; table(s) likely not rendered (TE macro called with TW register undefined) [usr/share/man/man3/mariadb_get_infov.3.gz:43] + +# Until man pages are regenerated they just pollute +# lintian output +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1043256 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041809 +# https://github.com/jgm/pandoc/issues/9020 +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:45] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:16] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:51] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:46] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:17] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:52] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:21] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:22] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:47] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:53] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:54] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_cancel.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_check.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_cmp_named.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_count.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_named.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_num.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_free.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_named.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_num.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_reconnect.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_close.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_fetch.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_open.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_stmt_fetch_fields.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_autocommit.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_change_user.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_close.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_commit.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_data_seek.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field_direct.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_fields.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_row.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_seek.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_tell.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_free_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_character_set_info.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_client_version.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_host_info.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_proto_info.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_server_info.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_server_version.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_ssl_cipher.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_hex_string.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_kill.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_more_results.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_next_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_num_fields.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_num_rows.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_query.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_read_query_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_query.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_reset_connection.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_rollback.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_row_seek.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_row_tell.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_select_db.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_server_end.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_server_init.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_shutdown.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_sqlstate.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ssl_set.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stat.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_bind_param.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_bind_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_close.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_errno.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_execute.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch_column.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_field_count.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_init.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_param_count.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_param_metadata.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_prepare.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_reset.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_row_seek.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_row_tell.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_send_long_data.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_store_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_thread_end.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_thread_id.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_thread_init.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_use_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_warning_count.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:48] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:55] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:49] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_connection.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_named.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_num.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_named.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_num.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_get_optionsv.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_optionsv.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_stmt_execute_direct.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_affected_rows.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_errno.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_error.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_lengths.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_count.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_client_info.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_socket.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_options.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_options4.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ping.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_escape_string.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_send_query.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_set_character_set.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_set_server_option.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_affected_rows.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_data_seek.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_error.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_free_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_insert_id.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_more_results.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_next_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_num_rows.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_result_metadata.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_sqlstate.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_store_result.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_warning_count.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:56] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:57] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:50] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:58] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:51] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:59] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:60] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:52] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:61] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:62] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:63] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:64] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:53] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:19] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:20] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:65] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:54] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:66] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:55] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:67] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:56] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:68] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:57] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:69] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:58] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:70] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:59] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:71] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:60] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_reconnect.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_server_info.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:61] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:72] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_check.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_get_optionsv.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_optionsv.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field_direct.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_lengths.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_row.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_insert_id.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:62] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:73] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:63] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:74] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_cancel.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_cmp_named.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_affected_rows.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_shutdown.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_param_count.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:64] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:75] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:65] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_cancel.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_named.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_num.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_free.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_free.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_close.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_fetch.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_open.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_affected_rows.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_affected_rows.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_affected_rows.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_close.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field_direct.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_lengths.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_proto_info.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_server_info.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_server_version.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_hex_string.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_num_fields.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_num_rows.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_init.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_insert_id.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_reset.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_sqlstate.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_warning_count.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:76] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:66] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_connection.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_get_optionsv.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_optionsv.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_autocommit.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_commit.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_free_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_host_info.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_socket.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_ssl_cipher.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_more_results.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_read_query_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_rollback.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stat.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_errno.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_free_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_insert_id.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_param_metadata.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_thread_id.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_warning_count.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:67] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:77] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:68] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:78] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_cancel.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_cmp_named.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_count.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_count.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_named.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_num.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field_direct.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_character_set_info.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_num_rows.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_options.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_row_seek.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_row_tell.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_select_db.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_set_server_option.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_bind_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_close.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_more_results.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_param_count.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_prepare.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_row_seek.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_row_tell.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:69] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:79] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:70] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_check.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_check.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_free.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_num.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_stmt_fetch_fields.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_data_seek.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_errno.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_error.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_seek.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_tell.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_hex_string.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_options4.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_query.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_server_end.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_bind_param.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_data_seek.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_error.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_execute.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_field_count.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_next_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:80] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:81] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:71] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:82] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:83] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_cmp_named.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_count.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_free.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_named.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_named.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_fetch.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_affected_rows.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_fields.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_lengths.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_row.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_client_version.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_next_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_num_rows.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_query.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_send_query.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_server_end.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_shutdown.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_affected_rows.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch_column.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_num_rows.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_result_metadata.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_send_long_data.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_send_long_data.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_store_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:72] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:84] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:73] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:85] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_named.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_num.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_num.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_named.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_num.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_fetch.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_stmt_execute_direct.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_autocommit.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_hex_string.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_row_seek.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_set_character_set.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_bind_result.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_init.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_init.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_param_metadata.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_prepare.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_row_seek.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:74] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:86] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:75] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:87] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_cancel.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_check.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_named.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_num.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_named.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_exists_num.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_reconnect.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_fetch.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_data_seek.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_lengths.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_count.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_seek.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_character_set_info.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_character_set_info.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_host_info.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_ssl_cipher.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_kill.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_select_db.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_set_server_option.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_bind_param.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_bind_param.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_data_seek.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_use_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:76] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:88] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_check.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_named.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_named.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_num.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_open.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_hex_string.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ping.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_escape_string.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_query.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch_column.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_prepare.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_send_long_data.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_store_result.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_warning_count.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:89] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:77] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_cmp_named.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_count.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_named.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_num.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_num.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_stmt_execute_direct.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_errno.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_error.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field_direct.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field_direct.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_lengths.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_row.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_seek.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_seek.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_query.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_send_query.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_server_end.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_server_init.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_set_character_set.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_shutdown.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_affected_rows.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_reset.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_warning_count.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:90] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:91] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:78] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_cmp_named.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_named.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_named.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_num.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_reconnect.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_close.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_affected_rows.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_change_user.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_errno.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_error.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_row.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_server_info.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_query.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_shutdown.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_errno.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch_column.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_init.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_warning_count.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:92] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_named.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_num.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_stmt_execute_direct.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_autocommit.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_select_db.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_send_query.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_affected_rows.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_errno.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_field_count.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_send_long_data.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_warning_count.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:93] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:94] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_column_count.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_named.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_num.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_row.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_field_count.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_kill.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_more_results.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_escape_string.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_server_init.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_set_character_set.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_error.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch_column.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:95] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_named.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_num.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_named.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_num.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_fields.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_server_init.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ssl_set.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_error.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:96] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_change_user.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_reset_connection.3.gz:2] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:97] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_cancel.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_named.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_named.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_num.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_num.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_named.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_num.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_error.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_affected_rows.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_send_long_data.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:98] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_affected_rows.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_change_user.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_field.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_row.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_ssl_cipher.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_kill.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ssl_set.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:99] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:100] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:101] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_named.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_num.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_list_num.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_ssl_cipher.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_escape_string.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_send_query.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_send_long_data.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:102] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:103] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:104] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:105] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:106] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_change_user.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_fetch_row.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_ssl_cipher.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_kill.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ssl_set.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:107] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:108] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_named.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_create_many_num.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_named.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_update_many_num.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:109] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_autocommit.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_escape_string.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_escape_string.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_select_db.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ssl_set.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_fetch.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_use_result.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_fetch.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:3] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_stmt_execute_direct.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_get_ssl_cipher.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ssl_set.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:4] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_send_long_data.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_dyncol_unpack.3.gz:13] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ssl_set.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:13] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:14] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:13] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:13] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:15] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_change_user.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:14] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:15] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_ssl_set.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:16] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:17] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:16] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_select_db.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:18] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_autocommit.3.gz:6] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:7] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:17] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_next.3.gz:14] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:18] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:19] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:13] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:20] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:8] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:19] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:14] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:15] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:21] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:20] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:21] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:22] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:23] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:22] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:24] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:25] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_info.3.gz:9] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:26] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:27] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:13] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:23] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:24] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:28] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:29] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:25] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:26] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:30] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:31] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:14] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:27] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:28] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:32] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:33] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_session_track_get_first.3.gz:16] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:13] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:29] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:34] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:35] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:30] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:36] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:37] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:10] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:31] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_get_optionsv.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:38] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:39] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:32] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:40] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:41] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:33] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_rpl_optionsv.3.gz:5] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:42] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:15] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:34] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:43] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:14] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:35] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:44] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:45] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:11] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:16] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:15] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_init.3.gz:1] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:36] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:37] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:46] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:17] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:12] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:18] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:38] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:39] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:47] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_get.3.gz:19] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:16] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:40] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:13] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_refresh.3.gz:14] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:17] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:41] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:49] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:42] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:14] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:18] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_optionsv.3.gz:50] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_stmt_attr_set.3.gz:19] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mariadb_get_infov.3.gz:44] +groff-message troff::*: cannot select font 'C' [usr/share/man/man3/mysql_real_connect.3.gz:15] diff --git a/debian/libmariadb3.lintian-overrides b/debian/libmariadb3.lintian-overrides new file mode 100644 index 00000000000..1835a046c08 --- /dev/null +++ b/debian/libmariadb3.lintian-overrides @@ -0,0 +1,2 @@ +# Needed conflict +conflicts-with-version libmariadbclient18 (<< 10.2.0) diff --git a/debian/libmariadbd-dev.install b/debian/libmariadbd-dev.install index 5a4344721be..3eebe631b9e 100644 --- a/debian/libmariadbd-dev.install +++ b/debian/libmariadbd-dev.install @@ -3,4 +3,3 @@ usr/lib/*/libmariadbd.a usr/lib/*/libmariadbd.so usr/lib/*/libmysqld.a usr/lib/*/libmysqld.so -usr/lib/*/pkgconfig/mariadb.pc diff --git a/debian/libmariadbd19.lintian-overrides b/debian/libmariadbd19.lintian-overrides new file mode 100644 index 00000000000..9c78935ec40 --- /dev/null +++ b/debian/libmariadbd19.lintian-overrides @@ -0,0 +1,5 @@ +# These are from stop word list +spelling-error-in-binary noone no one [usr/lib/x86_64-linux-gnu/libmariadbd.so.19] +spelling-error-in-binary thats that's [usr/lib/x86_64-linux-gnu/libmariadbd.so.19] +spelling-error-in-binary theres there's [usr/lib/x86_64-linux-gnu/libmariadbd.so.19] +spelling-error-in-binary yuR your [usr/lib/x86_64-linux-gnu/libmariadbd.so.19] diff --git a/debian/mariadb-backup.lintian-overrides b/debian/mariadb-backup.lintian-overrides new file mode 100644 index 00000000000..053f6162c2f --- /dev/null +++ b/debian/mariadb-backup.lintian-overrides @@ -0,0 +1,7 @@ +# These are from stop word list +spelling-error-in-binary depricated deprecated [usr/bin/mariadb-backup] +spelling-error-in-binary explicite explicit [usr/bin/mariadb-backup] +spelling-error-in-binary noone no one [usr/bin/mariadb-backup] +spelling-error-in-binary thats that's [usr/bin/mariadb-backup] +spelling-error-in-binary theres there's [usr/bin/mariadb-backup] +spelling-error-in-binary yuR your [usr/bin/mariadb-backup] diff --git a/debian/mariadb-client-core.lintian-overrides b/debian/mariadb-client-core.lintian-overrides new file mode 100644 index 00000000000..aa1e02a5575 --- /dev/null +++ b/debian/mariadb-client-core.lintian-overrides @@ -0,0 +1,2 @@ +# Needed conflict +conflicts-with-version mysql-client (<< 5.0.51) diff --git a/debian/mariadb-client.lintian-overrides b/debian/mariadb-client.lintian-overrides new file mode 100644 index 00000000000..36577b08ef6 --- /dev/null +++ b/debian/mariadb-client.lintian-overrides @@ -0,0 +1,8 @@ +# Mainly for BSD family to make sure that perl is found +incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/bin/mytop] + +# Used to determine which shell we have. False-positive situation +bash-term-in-posix-shell '`echo "testing\c"' [usr/bin/mariadb-secure-installation:191] + +# Needed outside conflict +conflicts-with-version mysql-client (<< 5.0.51) diff --git a/debian/mariadb-common.lintian-overrides b/debian/mariadb-common.lintian-overrides new file mode 100644 index 00000000000..03b98e43308 --- /dev/null +++ b/debian/mariadb-common.lintian-overrides @@ -0,0 +1,2 @@ +# This false-positive as is just seeks dot +synopsis-is-a-sentence "MariaDB database common files (e.g. /etc/mysql/mariadb.conf.d/)" diff --git a/debian/mariadb-plugin-mroonga.lintian-overrides b/debian/mariadb-plugin-mroonga.lintian-overrides new file mode 100644 index 00000000000..48404b2c946 --- /dev/null +++ b/debian/mariadb-plugin-mroonga.lintian-overrides @@ -0,0 +1,2 @@ +# This little bit diffrent than MariaDB so needed file +mariadb-plugin-mroonga: extra-license-file [usr/share/mysql/mroonga/COPYING] diff --git a/debian/mariadb-plugin-mroonga.postinst b/debian/mariadb-plugin-mroonga.postinst index 7c6da36391b..5c3b293d476 100644 --- a/debian/mariadb-plugin-mroonga.postinst +++ b/debian/mariadb-plugin-mroonga.postinst @@ -3,7 +3,7 @@ set -e # Install Mroonga -mysql --defaults-file=/etc/mysql/debian.cnf < /usr/share/mysql/mroonga/install.sql || true +mariadb --defaults-file=/etc/mysql/debian.cnf < /usr/share/mysql/mroonga/install.sql || true # Always exit with success instead of leaving dpkg in a broken state diff --git a/debian/mariadb-plugin-provider-bzip2.lintian-overrides b/debian/mariadb-plugin-provider-bzip2.lintian-overrides index 50e280b56da..47298832bcf 100644 --- a/debian/mariadb-plugin-provider-bzip2.lintian-overrides +++ b/debian/mariadb-plugin-provider-bzip2.lintian-overrides @@ -1,4 +1,3 @@ # It's intentional that bzip2 compression plugin doesn't have symbols from libc # More info https://jira.mariadb.org/browse/MDEV-28120 -library-not-linked-against-libc usr/lib/mysql/plugin/provider_bzip2.so library-not-linked-against-libc [usr/lib/mysql/plugin/provider_bzip2.so] diff --git a/debian/mariadb-plugin-provider-lz4.lintian-overrides b/debian/mariadb-plugin-provider-lz4.lintian-overrides index 4df09a0af4e..dbfde133135 100644 --- a/debian/mariadb-plugin-provider-lz4.lintian-overrides +++ b/debian/mariadb-plugin-provider-lz4.lintian-overrides @@ -1,4 +1,3 @@ # It's intentional that LZ4 compression plugin doesn't have symbols from libc # More info https://jira.mariadb.org/browse/MDEV-28120 -library-not-linked-against-libc usr/lib/mysql/plugin/provider_lz4.so library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lz4.so] diff --git a/debian/mariadb-plugin-provider-lzma.lintian-overrides b/debian/mariadb-plugin-provider-lzma.lintian-overrides index 2d9f4b8adc2..79f6cb793c2 100644 --- a/debian/mariadb-plugin-provider-lzma.lintian-overrides +++ b/debian/mariadb-plugin-provider-lzma.lintian-overrides @@ -1,4 +1,3 @@ # It's intentional that LZMA compression plugin doesn't have symbols from libc # More info https://jira.mariadb.org/browse/MDEV-28120 -library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzma.so library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lzma.so] diff --git a/debian/mariadb-plugin-provider-lzo.lintian-overrides b/debian/mariadb-plugin-provider-lzo.lintian-overrides index 13015fde854..ccca4e2d355 100644 --- a/debian/mariadb-plugin-provider-lzo.lintian-overrides +++ b/debian/mariadb-plugin-provider-lzo.lintian-overrides @@ -1,4 +1,3 @@ # It's intentional that LZO compression plugin doesn't have symbols from libc # More info https://jira.mariadb.org/browse/MDEV-28120 -library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzo.so library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lzo.so] diff --git a/debian/mariadb-plugin-provider-snappy.lintian-overrides b/debian/mariadb-plugin-provider-snappy.lintian-overrides index 2ddf25d0dd0..b62907c3469 100644 --- a/debian/mariadb-plugin-provider-snappy.lintian-overrides +++ b/debian/mariadb-plugin-provider-snappy.lintian-overrides @@ -1,4 +1,3 @@ # It's intentional that Snappy compression plugin doesn't have symbols from libc # More info https://jira.mariadb.org/browse/MDEV-28120 -library-not-linked-against-libc usr/lib/mysql/plugin/provider_snappy.so library-not-linked-against-libc [usr/lib/mysql/plugin/provider_snappy.so] diff --git a/debian/mariadb-plugin-rocksdb.lintian-overrides b/debian/mariadb-plugin-rocksdb.lintian-overrides new file mode 100644 index 00000000000..0cb5cb56909 --- /dev/null +++ b/debian/mariadb-plugin-rocksdb.lintian-overrides @@ -0,0 +1,6 @@ +spelling-error-in-binary COMMITED COMMITTED [usr/lib/mysql/plugin/ha_rocksdb.so] +spelling-error-in-binary dont don't [usr/bin/mariadb-ldb] +spelling-error-in-binary dont don't [usr/lib/mysql/plugin/ha_rocksdb.so] +spelling-error-in-binary nam name [usr/bin/mariadb-ldb] +spelling-error-in-binary nam name [usr/lib/mysql/plugin/ha_rocksdb.so] + diff --git a/debian/mariadb-server-core.install b/debian/mariadb-server-core.install index 34b583d5904..fe3576a9e47 100644 --- a/debian/mariadb-server-core.install +++ b/debian/mariadb-server-core.install @@ -18,8 +18,8 @@ usr/share/mariadb/english usr/share/mariadb/estonian usr/share/mariadb/fill_help_tables.sql usr/share/mariadb/french -usr/share/mariadb/german usr/share/mariadb/georgian +usr/share/mariadb/german usr/share/mariadb/greek usr/share/mariadb/hindi usr/share/mariadb/hungarian diff --git a/debian/mariadb-server-core.lintian-overrides b/debian/mariadb-server-core.lintian-overrides new file mode 100644 index 00000000000..c4ff1a23acc --- /dev/null +++ b/debian/mariadb-server-core.lintian-overrides @@ -0,0 +1,11 @@ +# Bash word source used in comment +bash-term-in-posix-shell 'source tree,' [usr/bin/mariadb-install-db:93] + +# These are from stop word list +spelling-error-in-binary noone no one [usr/sbin/mariadbd] +spelling-error-in-binary thats that's [usr/sbin/mariadbd] +spelling-error-in-binary theres there's [usr/sbin/mariadbd] +spelling-error-in-binary yuR your [usr/sbin/mariadbd] + +# README non common place but good to be there +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/README] diff --git a/debian/mariadb-server.config b/debian/mariadb-server.config index 7875b1843ac..9913c33f6fd 100644 --- a/debian/mariadb-server.config +++ b/debian/mariadb-server.config @@ -2,13 +2,19 @@ set -e +# shellcheck source=/dev/null . /usr/share/debconf/confmodule -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } +if [ -n "$DEBIAN_SCRIPT_DEBUG" ] +then + set -v -x; DEBIAN_SCRIPT_TRACE=1 +fi + +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2} # Beware that there are two ypwhich one of them needs the 2>/dev/null! -if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then +if test -n "$(command -v ypwhich 2>/dev/null)" && ypwhich > /dev/null 2>&1 +then db_input high mariadb-server/nis_warning || true db_go fi diff --git a/debian/mariadb-server.install b/debian/mariadb-server.install index e5f4e79f610..04d501ac0a0 100644 --- a/debian/mariadb-server.install +++ b/debian/mariadb-server.install @@ -73,7 +73,6 @@ usr/share/man/man1/myisam_ftdump.1 usr/share/man/man1/myisamchk.1 usr/share/man/man1/myisamlog.1 usr/share/man/man1/myisampack.1 -usr/share/man/man1/wsrep_sst_backup.1 usr/share/man/man1/wsrep_sst_common.1 usr/share/man/man1/wsrep_sst_mariabackup.1 usr/share/man/man1/wsrep_sst_mysqldump.1 diff --git a/debian/mariadb-server.lintian-overrides b/debian/mariadb-server.lintian-overrides new file mode 100644 index 00000000000..c790a6ed22f --- /dev/null +++ b/debian/mariadb-server.lintian-overrides @@ -0,0 +1,40 @@ +# Used to check if running in Bash +bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/wsrep_notify:86] +bash-term-in-posix-shell '[ "$url" ==' [usr/bin/mariadbd-safe:216] +# In comment so false-positive +bash-term-in-posix-shell 'let' [usr/bin/mariadbd-safe:41] +# Supported in Zsh and Bash (also Dash) +bash-term-in-posix-shell 'ulimit' [usr/bin/mariadbd-safe:712] +bash-term-in-posix-shell 'ulimit' [usr/bin/mariadbd-safe:832] + +# These are from stop word list +spelling-error-in-binary noone no one [usr/bin/aria_chk] +spelling-error-in-binary noone no one [usr/bin/aria_dump_log] +spelling-error-in-binary noone no one [usr/bin/aria_ftdump] +spelling-error-in-binary noone no one [usr/bin/aria_pack] +spelling-error-in-binary noone no one [usr/bin/aria_read_log] +spelling-error-in-binary noone no one [usr/bin/myisam_ftdump] +spelling-error-in-binary noone no one [usr/bin/myisamchk] +spelling-error-in-binary noone no one [usr/bin/myisamlog] +spelling-error-in-binary noone no one [usr/bin/myisampack] +spelling-error-in-binary thats that's [usr/bin/aria_chk] +spelling-error-in-binary thats that's [usr/bin/aria_dump_log] +spelling-error-in-binary thats that's [usr/bin/aria_ftdump] +spelling-error-in-binary thats that's [usr/bin/aria_pack] +spelling-error-in-binary thats that's [usr/bin/aria_read_log] +spelling-error-in-binary thats that's [usr/bin/myisam_ftdump] +spelling-error-in-binary thats that's [usr/bin/myisamchk] +spelling-error-in-binary thats that's [usr/bin/myisamlog] +spelling-error-in-binary thats that's [usr/bin/myisampack] +spelling-error-in-binary theres there's [usr/bin/aria_chk] +spelling-error-in-binary theres there's [usr/bin/aria_dump_log] +spelling-error-in-binary theres there's [usr/bin/aria_ftdump] +spelling-error-in-binary theres there's [usr/bin/aria_pack] +spelling-error-in-binary theres there's [usr/bin/aria_read_log] +spelling-error-in-binary theres there's [usr/bin/myisam_ftdump] +spelling-error-in-binary theres there's [usr/bin/myisamchk] +spelling-error-in-binary theres there's [usr/bin/myisamlog] +spelling-error-in-binary theres there's [usr/bin/myisampack] + +# This is not documentation +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/errmsg-utf8.txt] diff --git a/debian/mariadb-server.logcheck.ignore.server b/debian/mariadb-server.logcheck.ignore.server index a64fc54e15c..7db321a02d4 100644 --- a/debian/mariadb-server.logcheck.ignore.server +++ b/debian/mariadb-server.logcheck.ignore.server @@ -18,7 +18,7 @@ mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$ mysqld_safe\[[0-9]+\]: ended$ mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$ mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$ -mysqld_safe\[[0-9]+\]: Please report any problems at https://mariadb.org/jira$ +mysqld_safe\[[0-9]+\]: Please report any problems at https://jira.mariadb.org$ mysqld_safe\[[0-9]+\]: See the manual for more instructions.$ mysqld_safe\[[0-9]+\]: started$ mysqld_safe\[[0-9]+\]: The latest information about MariaDB is available at$ diff --git a/debian/mariadb-server.logcheck.ignore.workstation b/debian/mariadb-server.logcheck.ignore.workstation index a64fc54e15c..7db321a02d4 100644 --- a/debian/mariadb-server.logcheck.ignore.workstation +++ b/debian/mariadb-server.logcheck.ignore.workstation @@ -18,7 +18,7 @@ mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$ mysqld_safe\[[0-9]+\]: ended$ mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$ mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$ -mysqld_safe\[[0-9]+\]: Please report any problems at https://mariadb.org/jira$ +mysqld_safe\[[0-9]+\]: Please report any problems at https://jira.mariadb.org$ mysqld_safe\[[0-9]+\]: See the manual for more instructions.$ mysqld_safe\[[0-9]+\]: started$ mysqld_safe\[[0-9]+\]: The latest information about MariaDB is available at$ diff --git a/debian/mariadb-server.mariadb.init b/debian/mariadb-server.mariadb.init index 26439cf44e4..765640327d1 100644 --- a/debian/mariadb-server.mariadb.init +++ b/debian/mariadb-server.mariadb.init @@ -8,9 +8,9 @@ # Should-Stop: $network $named $time # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Start and stop the mysql database server daemon +# Short-Description: Start and stop the MariaDB database server daemon # Description: Controls the main MariaDB database server daemon "mariadbd" -# and its wrapper script "mysqld_safe". +# and its wrapper script "mariadbd-safe". ### END INIT INFO # set -e @@ -19,9 +19,10 @@ ${DEBIAN_SCRIPT_DEBUG:+ set -v -x} test -x /usr/sbin/mariadbd || exit 0 +# shellcheck source=/dev/null . /lib/lsb/init-functions -SELF=$(cd "$(dirname $0)"; pwd -P)/$(basename $0) +SELF="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")" if [ -f /usr/bin/mariadb-admin ] then @@ -31,26 +32,30 @@ then MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" else log_failure_msg "Command mariadb-admin/mysqladmin not found! This SysV init script depends on it." - exit -1 + exit 1 fi if [ ! -x /usr/bin/mariadbd-safe ] then log_failure_msg "/usr/bin/mariadbd-safe not found or executable! This SysV init script depends on it." - exit -1 + exit 1 fi # priority can be overridden and "-s" adds output to stderr ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mariadb -i" -if [ -f /etc/default/mysql ]; then +if [ -f /etc/default/mysql ] +then + # shellcheck source=/dev/null . /etc/default/mysql fi # Also source default/mariadb in case the installation was upgraded from # packages originally installed from MariaDB.org repositories, which have # had support for reading /etc/default/mariadb since March 2016. -if [ -f /etc/default/mariadb ]; then +if [ -f /etc/default/mariadb ] +then + # shellcheck source=/dev/null . /etc/default/mariadb fi @@ -77,35 +82,36 @@ mariadbd_get_param() { ## Do some sanity checks before even trying to start mariadbd. sanity_checks() { # check for config file - if [ ! -r /etc/mysql/my.cnf ]; then + if [ ! -r /etc/mysql/my.cnf ] + then log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" echo "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER fi # check for diskspace shortage - datadir=`mariadbd_get_param datadir` + datadir="$(mariadbd_get_param datadir)" - # If datadir location is not changed int configuration + # If datadir location is not customized in configuration # then it's not printed with /usr/sbin/mariadbd --print-defaults - # then we use 'sane' default. + # and this should fall back to a sane default value if [ -z "$datadir" ] then datadir="/var/lib/mysql" fi - # Check if there datadir location is available and - # fail if it's not - if [ ! -d "$datadir" ] + # Verify the datadir location exists + if [ ! -d "$datadir" ] && [ ! -L "$datadir" ] then - log_failure_msg "$0: ERROR: Can't locate MariaDB installation location $datadir" - echo "ERROR: Can't locate MariaDB installation location $datadir" | $ERR_LOGGER + log_failure_msg "$0: ERROR: Can't locate MariaDB data location at $datadir" + echo "ERROR: Can't locate MariaDB data location at $datadir" | $ERR_LOGGER exit 1 fi # As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024 # 4096 blocks is then lower than 4 MB df_available_blocks="$(LC_ALL=C BLOCKSIZE='' df --output=avail "$datadir" | tail -n 1)" - if [ "$df_available_blocks" -lt "4096" ]; then + if [ "$df_available_blocks" -lt "4096" ] + then log_failure_msg "$0: ERROR: The partition with $datadir is too full!" echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER exit 1 @@ -119,17 +125,30 @@ sanity_checks() { # # Usage: boolean mariadbd_status [check_alive|check_dead] [warn|nowarn] mariadbd_status () { - ping_output=`$MYADMIN ping 2>&1`; ping_alive=$(( ! $? )) + ping_output="$($MYADMIN ping 2>&1)" + # The whole mariadbd_status function should be rewritten in clean shell script, + # so ignore minor Shellcheck nag for now as fixing it would be half of the + # rewrite + # shellcheck disable=SC2181 + ping_alive="$(( ! $? ))" ps_alive=0 - pidfile=`mariadbd_get_param pid-file` - if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi + pidfile="$(mariadbd_get_param pid-file)" + if [ -f "$pidfile" ] && ps "$(cat "$pidfile")" >/dev/null 2>&1 + then + ps_alive=1 + fi + # Using '-a' is unstandard, but it works and might be needed for the grouping + # of the if-else, so keep it and just ignore in Shellcheck + # shellcheck disable=SC2166 if [ "$1" = "check_alive" -a $ping_alive = 1 ] || - [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then + [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ] + then return 0 # EXIT_SUCCESS else - if [ "$2" = "warn" ]; then + if [ "$2" = "warn" ] + then echo -e "$ps_alive processes alive and '$MYADMIN ping' resulted in\n$ping_output\n" | $ERR_LOGGER -p daemon.debug fi return 1 # EXIT_FAILURE @@ -146,7 +165,8 @@ case "${1:-''}" in sanity_checks; # Start daemon log_daemon_msg "Starting MariaDB database server" "mariadbd" - if mariadbd_status check_alive nowarn; then + if mariadbd_status check_alive nowarn + then log_progress_msg "already running" log_end_msg 0 else @@ -156,19 +176,51 @@ case "${1:-''}" in # Start MariaDB! /usr/bin/mariadbd-safe "${@:2}" 2>&1 >/dev/null | $ERR_LOGGER & - for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do + # Make sure that there is some default + # 30 seconds is fine default for starting + # maximum is one hour if there is gigantic + # database + MARIADB_STARTUP_TIMEOUT=${MYSQLD_STARTUP_TIMEOUT:-30} + + for i in {1..3600} + do + if [ "${i}" -gt "${MARIADB_STARTUP_TIMEOUT}" ] + then + break + fi sleep 1 - if mariadbd_status check_alive nowarn ; then break; fi + if mariadbd_status check_alive nowarn + then + break + fi log_progress_msg "." done - if mariadbd_status check_alive warn; then + if mariadbd_status check_alive warn + then log_end_msg 0 # Now start mysqlcheck or whatever the admin wants. output=$(/etc/mysql/debian-start) - if [ -n "$output" ]; then + if [ -n "$output" ] + then log_action_msg "$output" fi else + # Try one more time but save error log separately, then spit it out + # before logging ends and init script execution ends. + if pgrep -ax mariadbd > /dev/null + then + echo "ERROR: The mariadbd process is running but not responding:" + # shellcheck disable=SC2009 + # Show the mariadbd process and it's parent and next line (if there is a child process) + ps faxu | grep mariadbd -C 1 + else + ERROR_LOG_FILE="$(mktemp).err" + echo # ensure newline + timeout --kill-after=20 10 /usr/bin/mariadbd-safe "${@:2}" --log-error="$ERROR_LOG_FILE" + echo "Running '/etc/init.d/mariadb start' failed with error log:" + cat "$ERROR_LOG_FILE" + fi + log_end_msg 1 log_failure_msg "Please take a look at the syslog" fi @@ -181,28 +233,40 @@ case "${1:-''}" in # to specify it explicit as e.g. sudo environments points to the normal # users home and not /root) log_daemon_msg "Stopping MariaDB database server" "mariadbd" - if ! mariadbd_status check_dead nowarn; then + if ! mariadbd_status check_dead nowarn + then set +e - shutdown_out=`$MYADMIN shutdown 2>&1`; r=$? + shutdown_out="$($MYADMIN shutdown 2>&1)" + r=$? set -e - if [ "$r" -ne 0 ]; then + if [ "$r" -ne 0 ] + then log_end_msg 1 [ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out" log_daemon_msg "Killing MariaDB database server by signal" "mariadbd" killall -15 mariadbd server_down= - for i in `seq 1 600`; do + for _ in {1..600} + do sleep 1 - if mariadbd_status check_dead nowarn; then server_down=1; break; fi + if mariadbd_status check_dead nowarn + then + server_down=1 + break + fi done - if test -z "$server_down"; then killall -9 mariadbd; fi + if test -z "$server_down" + then + killall -9 mariadbd + fi fi fi - if ! mariadbd_status check_dead warn; then + if ! mariadbd_status check_dead warn + then log_end_msg 1 log_failure_msg "Please stop MariaDB manually and read /usr/share/doc/mariadb-server/README.Debian.gz!" - exit -1 + exit 1 else log_end_msg 0 fi @@ -221,7 +285,8 @@ case "${1:-''}" in ;; 'status') - if mariadbd_status check_alive nowarn; then + if mariadbd_status check_alive nowarn + then log_action_msg "$($MYADMIN version)" else log_action_msg "MariaDB is stopped." @@ -230,11 +295,11 @@ case "${1:-''}" in ;; 'bootstrap') - # Bootstrap the cluster, start the first node - # that initiates the cluster - log_daemon_msg "Bootstrapping the cluster" "mariadbd" - $SELF start "${@:2}" --wsrep-new-cluster - ;; + # Bootstrap the cluster, start the first node + # that initiates the cluster + log_daemon_msg "Bootstrapping the cluster" "mariadbd" + $SELF start "${@:2}" --wsrep-new-cluster + ;; *) echo "Usage: $SELF start|stop|restart|reload|force-reload|status" diff --git a/debian/mariadb-server.postinst b/debian/mariadb-server.postinst index 298f551fdcf..875d3342263 100644 --- a/debian/mariadb-server.postinst +++ b/debian/mariadb-server.postinst @@ -10,7 +10,7 @@ then DEBIAN_SCRIPT_TRACE=1 fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2} export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin @@ -112,7 +112,7 @@ EOF fi rmdir $mysql_upgradedir 2>/dev/null || true - done + done # end 'for dir' loop # Upgrading from mysql.com needs might have the root user as auth_socket. # auto.cnf is a sign of a mysql install, that doesn't exist in mariadb. @@ -123,12 +123,12 @@ EOF # perform mariadb-upgrade, (MDEV-22678). To keep the impact minimal, we # skip innodb and set key-buffer-size to 0 as it isn't reused. if [ -f "$mysql_datadir/auto.cnf" ] && - [ -f "$mysql_datadir/mysql/user.MYD" ] && - ! lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null && - [ ! -f "$mysql_datadir/undo_001" ] + [ -f "$mysql_datadir/mysql/user.MYD" ] && + ! lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null && + [ ! -f "$mysql_datadir/undo_001" ] then - echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" | - mariadbd --skip-innodb --key_buffer_size=0 --default-storage-engine=MyISAM --bootstrap 2> /dev/null + echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" | \ + mariadbd --skip-innodb --key_buffer_size=0 --default-storage-engine=MyISAM --bootstrap 2> /dev/null fi # Ensure the existence and right permissions for the database and @@ -150,9 +150,10 @@ EOF # The mysql_statedir must not be writable by the mysql user under any # circumstances as it contains scripts that are executed by root. set +e - chown -R 0:0 $mysql_statedir + find $mysql_statedir ! -uid 0 -print0 -or ! -gid 0 -print0 | xargs -0 -r sudo chown 0:0 find $mysql_datadir ! -uid "$(id -u mysql)" -print0 | xargs -0 -r chown mysql - chown -R mysql:adm $mysql_logdir + chown mysql:adm $mysql_logdir + find "$mysql_logdir" -print0 | xargs -0 -r chown mysql:adm chmod 2750 $mysql_logdir set -e @@ -183,6 +184,8 @@ EOF # Clean up old flags before setting new one rm -f $mysql_datadir/debian-*.flag # Flag data dir to avoid downgrades + # @TODO: Rewrite this to use the new upstream /var/lib/mysql_upgrade_info file + # instead of the legacy /var/lib/debian-XX.X.flag file touch "$mysql_datadir/debian-__MARIADB_MAJOR_VER__.flag" # initiate databases. Output is not allowed by debconf :-( @@ -191,9 +194,13 @@ EOF # handle things. # Debian: beware of the bashisms... # Debian: can safely run on upgrades with existing databases + # Workaround for Debian Bug #1022994: failure to create database when + # working with libpam-tmpdir (by setting TMPDIR to empty value). set +e - bash /usr/bin/mariadb-install-db --rpm --cross-bootstrap --user=mysql \ - --disable-log-bin --skip-test-db 2>&1 | \ + TMPDIR='' bash /usr/bin/mariadb-install-db \ + --rpm --cross-bootstrap \ + --user=mysql --disable-log-bin \ + --skip-test-db 2>&1 | \ $ERR_LOGGER set -e @@ -210,6 +217,7 @@ EOF then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir fi + if [ ! -e "$dc" ] then cat /dev/null > $dc @@ -241,13 +249,13 @@ EOF # on by default) to work both to disable a default profile, and to keep # any profile installed and maintained by users themselves. profile="/etc/apparmor.d/usr.sbin.mariadbd" - if [ -f "$profile" ] && aa-status --enabled 2>/dev/null + if [ -f "$profile" ] && aa-status --enabled 2> /dev/null then - if grep -q /usr/sbin/mariadbd "$profile" 2>/dev/null + if grep -q /usr/sbin/mariadbd "$profile" 2> /dev/null then apparmor_parser -r "$profile" || true else - echo "/usr/sbin/mariadbd { }" | apparmor_parser --remove 2>/dev/null || true + echo "/usr/sbin/mariadbd { }" | apparmor_parser --remove 2> /dev/null || true fi fi @@ -272,7 +280,8 @@ EOF if [ -d /run/systemd/system ] then systemctl --system daemon-reload - else + elif [ -x /etc/init.d/mariadb ] + then invoke-rc.d mariadb restart fi ;; diff --git a/debian/mariadb-server.preinst b/debian/mariadb-server.preinst index 418273bbb27..03165f745b0 100644 --- a/debian/mariadb-server.preinst +++ b/debian/mariadb-server.preinst @@ -29,6 +29,15 @@ export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin mysql_datadir=/var/lib/mysql mysql_upgradedir=/var/lib/mysql-upgrade +MARIADBD_USERS="root" + +# Check if user 'mysql' exists before referring to it in pgrep +# to avoid pgrep erroring on 'invalid user name' +if id mysql >/dev/null 2>&1 +then + MARIADBD_USERS="$MARIADBD_USERS,mysql" +fi + # Try to stop the server in a sane way. If it does not success let the admin # do it himself. No database directories should be removed while the server # is running! Another mariadbd in e.g. a different chroot is fine for us. @@ -36,7 +45,7 @@ stop_server() { # Return immediately if there are no mysqld processes running on a host # (leave containerized processes with the same name in other namespaces) # as there is no point in trying to shutdown in that case. - if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null + if ! pgrep -x -u "$MARIADBD_USERS" --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null then return fi @@ -79,6 +88,9 @@ do break fi + # The whole flag_version thing should be rewritten, so ignore minor Shellcheck + # nag for now + # shellcheck disable=SC2001 flag_version=$(echo "$flag" | sed 's/.*debian-\([0-9\.]\+\).flag/\1/') # Initialize value if empty @@ -166,14 +178,14 @@ stop_server # If we use NIS then errors should be tolerated. It's up to the # user to ensure that the mysql user is correctly setup. # Beware that there are two ypwhich one of them needs the 2>/dev/null! -if test -n "$(which ypwhich 2>/dev/null)" && ypwhich >/dev/null 2>&1 +if test -n "$(command -v ypwhich 2>/dev/null)" && ypwhich > /dev/null 2>&1 then set +e fi # # Now we have to ensure the following state: -# /etc/passwd: mysql:x:100:101:MySQL Server:/nonexistent:/bin/false +# /etc/passwd: mysql:x:100:101:MariaDB Server:/nonexistent:/bin/false # /etc/group: mysql:x:101: # # Sadly there could any state be present on the system so we have to @@ -198,9 +210,9 @@ then --ingroup mysql \ --no-create-home \ --home /nonexistent \ - --gecos "MySQL Server" \ + --gecos "MariaDB Server" \ --shell /bin/false \ - mysql >/dev/null + mysql >/dev/null 2>&1 fi # end of NIS tolerance zone @@ -211,7 +223,8 @@ set -e for dir in DATADIR LOGDIR do checkdir=$(eval echo "$"$dir) - if [ -L "$checkdir" ]; then + if [ -L "$checkdir" ] + then # Use mkdir option 'Z' to create with correct SELinux context. mkdir -pZ "$mysql_upgradedir" cp -dT "$checkdir" "$mysql_upgradedir/$dir.link" @@ -225,23 +238,14 @@ then mkdir -Z $mysql_datadir fi -# Check if MariaDB datadir is available if not fails. -# There should be symlink or directory available or something will fail. -if [ -d "$mysql_datadir" ] || [ -L "$mysql_datadir" ] +# As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024 +# 4096 blocks is then lower than 4 MB +df_available_blocks="$(LC_ALL=C BLOCKSIZE='' df --output=avail "$mysql_datadir" | tail -n 1)" +if [ "$df_available_blocks" -lt "4096" ] then - # As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024 - # 4096 blocks is then lower than 4 MB - df_available_blocks="$(LC_ALL=C BLOCKSIZE='' df --output=avail "$mysql_datadir" | tail -n 1)" - if [ "$df_available_blocks" -lt "4096" ] - then - echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2 - db_stop - exit 1 - fi -else - echo "ERROR: There's no directory or symlink available: $mysql_datadir/" 1>&2 - db_stop - exit 1 + echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2 + db_stop + exit 1 fi # Since the home directory was created before putting the user into diff --git a/debian/mariadb-test-data.lintian-overrides b/debian/mariadb-test-data.lintian-overrides index cb05b748061..1cce591412f 100644 --- a/debian/mariadb-test-data.lintian-overrides +++ b/debian/mariadb-test-data.lintian-overrides @@ -8,25 +8,457 @@ incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mar incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mariadb/mariadb-test/suite/funcs_1/lib/DataGen_modify.pl] incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mariadb/mariadb-test/suite/funcs_2/lib/gen_charset_utf8.pl] incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mariadb/mariadb-test/suite/rpl/extension/checksum.pl] -# Intentional for test files -national-encoding usr/share/mariadb/mariadb-test/* -# Extra test documentation files that really need to be kept in context in test directory -package-contains-documentation-outside-usr-share-doc usr/share/mariadb/mariadb-test/* -# Intentional directory structure -repeated-path-segment auth_gssapi usr/share/mariadb/mariadb-test/plugin/auth_gssapi/auth_gssapi/ -repeated-path-segment connect usr/share/mariadb/mariadb-test/plugin/connect/connect/ -repeated-path-segment disks usr/share/mariadb/mariadb-test/plugin/disks/disks/ -repeated-path-segment func_test usr/share/mariadb/mariadb-test/plugin/func_test/func_test/ -repeated-path-segment metadata_lock_info usr/share/mariadb/mariadb-test/plugin/metadata_lock_info/metadata_lock_info/ -repeated-path-segment mroonga usr/share/mariadb/mariadb-test/plugin/mroonga/mroonga/ -repeated-path-segment mroonga usr/share/mariadb/mariadb-test/plugin/mroonga/mroonga/include/mroonga/ -repeated-path-segment oqgraph usr/share/mariadb/mariadb-test/plugin/oqgraph/oqgraph/ -repeated-path-segment query_response_time usr/share/mariadb/mariadb-test/plugin/query_response_time/query_response_time/ -repeated-path-segment rocksdb usr/share/mariadb/mariadb-test/plugin/rocksdb/rocksdb/ -repeated-path-segment sequence usr/share/mariadb/mariadb-test/plugin/sequence/sequence/ -repeated-path-segment sphinx usr/share/mariadb/mariadb-test/plugin/sphinx/sphinx/ -repeated-path-segment spider usr/share/mariadb/mariadb-test/plugin/spider/spider/ -repeated-path-segment type_inet usr/share/mariadb/mariadb-test/plugin/type_inet/type_inet/ -repeated-path-segment type_test usr/share/mariadb/mariadb-test/plugin/type_test/type_test/ -repeated-path-segment user_variables usr/share/mariadb/mariadb-test/plugin/user_variables/user_variables/ -repeated-path-segment wsrep_info usr/share/mariadb/mariadb-test/plugin/wsrep_info/wsrep_info/ +# This is used to check if we are running under Bash +bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/mariadb-test/std_data/wsrep_notify.sh:87] +bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/mariadb-test/std_data/wsrep_notify_ssl.sh:87] +# These files are result files and they are supposed to be +# Natial encoded (ISO/IEC 8859-1) not UTF-8 +national-encoding [usr/share/mysql/mariadb-test/include/ctype_E05C.inc] +national-encoding [usr/share/mysql/mariadb-test/main/alter_table.result] +national-encoding [usr/share/mysql/mariadb-test/main/binary.result] +national-encoding [usr/share/mysql/mariadb-test/main/binary.test] +national-encoding [usr/share/mysql/mariadb-test/main/cast.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_big5.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_collate.result] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_collate.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_cp1250_ch.result] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_cp1250_ch.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_cp1251.result] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_cp1251.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_cp932_binlog_stm.result] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_filesystem-master.opt] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_gbk.result] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_latin1.result] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_latin1.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_latin1_de.result] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_latin1_de.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_many.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_ucs.test] +national-encoding [usr/share/mysql/mariadb-test/main/ctype_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/main/ddl_i18n_koi8r.test] +national-encoding [usr/share/mysql/mariadb-test/main/ddl_i18n_utf8.test] +national-encoding [usr/share/mysql/mariadb-test/main/default.result] +national-encoding [usr/share/mysql/mariadb-test/main/default.test] +national-encoding [usr/share/mysql/mariadb-test/main/errors.result] +national-encoding [usr/share/mysql/mariadb-test/main/errors.test] +national-encoding [usr/share/mysql/mariadb-test/main/events_1.result] +national-encoding [usr/share/mysql/mariadb-test/main/events_1.test] +national-encoding [usr/share/mysql/mariadb-test/main/events_bugs.result] +national-encoding [usr/share/mysql/mariadb-test/main/events_bugs.test] +national-encoding [usr/share/mysql/mariadb-test/main/explain.result] +national-encoding [usr/share/mysql/mariadb-test/main/explain.test] +national-encoding [usr/share/mysql/mariadb-test/main/fulltext.test] +national-encoding [usr/share/mysql/mariadb-test/main/fulltext_left_join.test] +national-encoding [usr/share/mysql/mariadb-test/main/func_gconcat.result] +national-encoding [usr/share/mysql/mariadb-test/main/func_gconcat.test] +national-encoding [usr/share/mysql/mariadb-test/main/func_in.result] +national-encoding [usr/share/mysql/mariadb-test/main/func_in.test] +national-encoding [usr/share/mysql/mariadb-test/main/func_like.test] +national-encoding [usr/share/mysql/mariadb-test/main/log_tables.test] +national-encoding [usr/share/mysql/mariadb-test/main/long_unique_bugs.result] +national-encoding [usr/share/mysql/mariadb-test/main/mysql_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/main/mysql_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/main/mysqlbinlog.test] +national-encoding [usr/share/mysql/mariadb-test/main/mysqldump.result] +national-encoding [usr/share/mysql/mariadb-test/main/mysqltest.result] +national-encoding [usr/share/mysql/mariadb-test/main/outfile_loaddata.result] +national-encoding [usr/share/mysql/mariadb-test/main/rowid_order_innodb.result] +national-encoding [usr/share/mysql/mariadb-test/main/show_check.test] +national-encoding [usr/share/mysql/mariadb-test/main/show_explain.result] +national-encoding [usr/share/mysql/mariadb-test/main/show_explain.test] +national-encoding [usr/share/mysql/mariadb-test/main/show_explain_json.result] +national-encoding [usr/share/mysql/mariadb-test/main/show_explain_json.test] +national-encoding [usr/share/mysql/mariadb-test/main/sp.result] +national-encoding [usr/share/mysql/mariadb-test/main/sp.test] +national-encoding [usr/share/mysql/mariadb-test/main/warnings.result] +national-encoding [usr/share/mysql/mariadb-test/main/warnings.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/r/bson.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/r/jdbc_postgresql.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/r/json.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/r/mysql.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/r/xml2_zip.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/r/xml_zip.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/cp1251.xml] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/latin1.xml] +national-encoding [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/nocs.xml] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/alter_table_add_column_multibyte_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/alter_table_disable_keys_fulltext_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/alter_table_enable_keys_fulltext_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/column_multibyte_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/fulltext_charset_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/fulltext_charset_eucjpms.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/function_snippet_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/function_snippet_eucjpms.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/r/optimization_order_limit_optimized_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/column_multibyte_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/fulltext_charset_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/fulltext_charset_eucjpms.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/function_snippet_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/function_snippet_eucjpms.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/storage/t/optimization_order_limit_optimized_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/wrapper/r/alter_table_add_column_multibyte_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/wrapper/r/column_multibyte_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/wrapper/r/fulltext_charset_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/wrapper/r/fulltext_charset_eucjpms.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/wrapper/t/column_multibyte_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/wrapper/t/fulltext_charset_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/wrapper/t/fulltext_charset_eucjpms.test] +national-encoding [usr/share/mysql/mariadb-test/plugin/spider/spider/bugfix/r/cp932_column.result] +national-encoding [usr/share/mysql/mariadb-test/plugin/spider/spider/bugfix/t/cp932_column.test] +national-encoding [usr/share/mysql/mariadb-test/std_data/loaddata/mdev-11079.txt] +national-encoding [usr/share/mysql/mariadb-test/std_data/loaddata/mdev9823.ujis.txt] +national-encoding [usr/share/mysql/mariadb-test/std_data/loaddata/mdev9823.utf8mb4.txt] +national-encoding [usr/share/mysql/mariadb-test/std_data/mariadb-conv/file02.latin1.txt] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/include/binlog_mysqlbinlog-cp932.inc] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/include/ctype_cp932.test] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/r/binlog_mysqlbinlog_row.result] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/r/binlog_row_ctype_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/r/binlog_stm_ctype_cp932.result] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/r/binlog_table_map_optional_metadata.result] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result] +national-encoding [usr/share/mysql/mariadb-test/suite/client/mariadb-conv-cp932.result] +national-encoding [usr/share/mysql/mariadb-test/suite/client/mariadb-conv-cp932.test] +national-encoding [usr/share/mysql/mariadb-test/suite/innodb_fts/r/fulltext.result] +national-encoding [usr/share/mysql/mariadb-test/suite/innodb_fts/t/fulltext.test] +national-encoding [usr/share/mysql/mariadb-test/suite/innodb_fts/t/fulltext_left_join.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/include/trim_sjis.inc] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_alter_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_alter_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_alter_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_charlength_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_charlength_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_charlength_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_charset_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_charset_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_charset_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_convert_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_convert_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_create_db_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_create_db_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_create_db_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_create_tbl_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_create_tbl_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_create_tbl_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_enum_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_enum_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_enum_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_insert_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_insert_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_insert_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_instr_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_instr_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_instr_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_join_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_join_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_join_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_left_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_left_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_left_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_length_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_length_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_length_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_like_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_like_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_like_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_locate_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_locate_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_locate_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_lpad_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_lpad_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_lpad_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_ltrim_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_ltrim_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_ltrim_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_ps_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_ps_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_replace_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_replace_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_replace_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_reverse_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_reverse_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_reverse_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_right_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_right_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_right_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_rpad_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_rpad_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_rpad_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_rtrim_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_rtrim_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_rtrim_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_select_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_select_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_subquery_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_subquery_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_subquery_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_substring_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_substring_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_substring_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_trim_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_trim_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_trim_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_union_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_update_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_update_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_update_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_where_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_where_ucs2.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/r/jp_where_ujis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0201_sjis.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0201_ucs2.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0201_ujis.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0208_sjis2.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0208_sjis3.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0208_ucs2.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0208_ujis.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0212_ucs2.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/std_data/jisx0212_ujis.dat] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_alter_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_alter_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_alter_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_charlength_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_charlength_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_charlength_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_charset_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_charset_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_charset_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_convert_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_convert_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_convert_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_create_db_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_create_db_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_create_db_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_create_tbl_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_create_tbl_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_create_tbl_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_enum_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_enum_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_enum_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_insert_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_insert_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_insert_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_instr_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_instr_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_instr_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_join_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_join_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_join_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_left_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_left_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_left_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_length_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_length_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_length_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_like_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_like_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_like_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_locate_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_locate_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_locate_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_lpad_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_lpad_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_lpad_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_ltrim_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_ltrim_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_ltrim_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_ps_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_ps_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_replace_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_replace_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_replace_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_reverse_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_reverse_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_reverse_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_right_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_right_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_right_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_rpad_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_rpad_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_rpad_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_rtrim_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_rtrim_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_rtrim_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_select_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_select_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_select_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_subquery_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_subquery_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_subquery_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_substring_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_substring_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_substring_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_trim_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_trim_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_union_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_update_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_update_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_update_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_where_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_where_ucs2.test] +national-encoding [usr/share/mysql/mariadb-test/suite/jp/t/jp_where_ujis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/json/r/json_no_table.result] +national-encoding [usr/share/mysql/mariadb-test/suite/perfschema/t/statement_digest_charset.test] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/include/rpl_charset.test] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/include/rpl_row_annotate.test] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/r/rpl_charset.result] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/r/rpl_charset_sjis.result] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/r/rpl_parallel_charset.result] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/r/rpl_row_annotate_do.result] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/r/rpl_row_annotate_dont.result] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/r/rpl_set_charset.result] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/t/rpl_charset_sjis.test] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/t/rpl_parallel_charset.test] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/t/rpl_row_mysqlbinlog.test] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/t/rpl_set_charset.test] +national-encoding [usr/share/mysql/mariadb-test/suite/rpl/t/rpl_temporary.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/character_set_client_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/character_set_connection_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/character_set_results_func.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/collation_connection_func.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/collation_database_func.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/collation_server_func.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/foreign_key_checks_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/innodb_table_locks_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/max_seeks_for_key_func.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/pseudo_slave_mode_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/query_cache_wlock_invalidate_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_big_selects_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_buffer_result_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_log_bin_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_log_off_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_low_priority_updates_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_notes_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_quote_show_create_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_safe_updates_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/r/sql_warnings_basic.result] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/character_set_connection_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/character_set_results_func.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/collation_connection_func.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/collation_database_func.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/collation_server_func.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/foreign_key_checks_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/innodb_table_locks_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/max_seeks_for_key_func.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/pseudo_slave_mode_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/query_cache_wlock_invalidate_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/sql_big_selects_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/sql_buffer_result_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/sql_log_bin_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/sql_log_off_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/sql_notes_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/sql_quote_show_create_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/sql_safe_updates_basic.test] +national-encoding [usr/share/mysql/mariadb-test/suite/sys_vars/t/sql_warnings_basic.test] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/collections/README] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/collections/skip_list_ubsan.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/boys.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/boyswin.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/coffee.htm] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/emp.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/expenses.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/funny.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/funny2.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/connect/connect/std_data/girls.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/example/README] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/heap/mtr2/README] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/plugin/myisam/mtr2/README] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bad2_master.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bad3_master.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bad4_master.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bad5_master.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bad6_master.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bad_master.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bug30435_10k_items.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bug30435_5k.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/bug887051.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/charset_utf8.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/innodb_tb1.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/innodb_tb2.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/innodb_tb3.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/innodb_tb4.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/load_file.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/memory_tb1.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/memory_tb2.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/memory_tb3.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/memory_tb4.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/myisam_tb1.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/myisam_tb2.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/myisam_tb3.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/myisam_tb4.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/t3.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/t4.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/t7.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/funcs_1/t9.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/keys.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/keys2.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/keys3.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev-11079.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev-11343.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev-11631.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev-15497.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev8711.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev9823.ujis.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev9823.utf8mb4.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev9824.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/mdev9842.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/loaddata/nl.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/logkey.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/mariadb-conv/file01.utf16.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/mariadb-conv/file01.utf8.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/mariadb-conv/file02.latin1.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/mysql5613mysql/README] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/new-format-relay-log-win.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/new-format-relay-log.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/numbers.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/old-format-relay-log-win.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/old-format-relay-log.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/unicode/allkeys1400.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/unicode/allkeys400.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/unicode/allkeys520.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/std_data/wl5766_data.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/atomic/README.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/compat/README.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/engines/README] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/engines/iuds/t/hindi.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/engines/iuds/t/sample.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/engines/rr_trx/init_innodb.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/engines/rr_trx/run.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/funcs_1/README.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/funcs_2/data/charset_utf8.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/funcs_2/readme.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/large_tests/README.TXT] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/optimizer_unfixed_bugs/README.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/perfschema_stress/README] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/perfschema_stress/stress_init.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/perfschema_stress/stress_tests.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/rpl/README] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/rpl/r/rpl_critical_errors.result.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/suite/wsrep/README] + +# These are here for testing purposes +repeated-path-segment auth_gssapi [usr/share/mysql/mariadb-test/plugin/auth_gssapi/auth_gssapi/] +repeated-path-segment connect [usr/share/mysql/mariadb-test/plugin/connect/connect/] +repeated-path-segment disks [usr/share/mysql/mariadb-test/plugin/disks/disks/] +repeated-path-segment func_test [usr/share/mysql/mariadb-test/plugin/func_test/func_test/] +repeated-path-segment metadata_lock_info [usr/share/mysql/mariadb-test/plugin/metadata_lock_info/metadata_lock_info/] +repeated-path-segment mroonga [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/] +repeated-path-segment mroonga [usr/share/mysql/mariadb-test/plugin/mroonga/mroonga/include/mroonga/] +repeated-path-segment oqgraph [usr/share/mysql/mariadb-test/plugin/oqgraph/oqgraph/] +repeated-path-segment query_response_time [usr/share/mysql/mariadb-test/plugin/query_response_time/query_response_time/] +repeated-path-segment rocksdb [usr/share/mysql/mariadb-test/plugin/rocksdb/rocksdb/] +repeated-path-segment sequence [usr/share/mysql/mariadb-test/plugin/sequence/sequence/] +repeated-path-segment sphinx [usr/share/mysql/mariadb-test/plugin/sphinx/sphinx/] +repeated-path-segment spider [usr/share/mysql/mariadb-test/plugin/spider/spider/] +repeated-path-segment type_inet [usr/share/mysql/mariadb-test/plugin/type_inet/type_inet/] +repeated-path-segment type_mysql_timestamp [usr/share/mysql/mariadb-test/plugin/type_mysql_timestamp/type_mysql_timestamp/] +repeated-path-segment type_test [usr/share/mysql/mariadb-test/plugin/type_test/type_test/] +repeated-path-segment type_uuid [usr/share/mysql/mariadb-test/plugin/type_uuid/type_uuid/] +repeated-path-segment user_variables [usr/share/mysql/mariadb-test/plugin/user_variables/user_variables/] +repeated-path-segment wsrep_info [usr/share/mysql/mariadb-test/plugin/wsrep_info/wsrep_info/] diff --git a/debian/mariadb-test.lintian-overrides b/debian/mariadb-test.lintian-overrides index 6e7bdf05e39..be8a316338f 100644 --- a/debian/mariadb-test.lintian-overrides +++ b/debian/mariadb-test.lintian-overrides @@ -2,7 +2,30 @@ arch-dependent-file-in-usr-share [usr/share/mariadb/mariadb-test/lib/My/SafeProcess/my_safe_process] arch-dependent-file-in-usr-share [usr/share/mariadb/mariadb-test/lib/My/SafeProcess/wsrep_check_version] # Mainly for support for *BSD family. Not right way to do but this is test package and not for production -incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mariadb/mariadb-test/lib/process-purecov-annotations.pl] -incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mariadb/mariadb-test/lib/v1/mysql-test-run.pl] -incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mariadb/mariadb-test/mariadb-stress-test.pl] -incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mariadb/mariadb-test/mariadb-test-run.pl] +incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mariadb-test/lib/process-purecov-annotations.pl] +incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mariadb-test/lib/v1/mysql-test-run.pl] +incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mariadb-test/mariadb-stress-test.pl] +incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mariadb-test/mariadb-test-run.pl] + +# These libraries are ok not have any other dependencies than itself and MariaDB server +shared-library-lacks-prerequisites [usr/lib/mysql/plugin/auth_0x0100.so] +shared-library-lacks-prerequisites [usr/lib/mysql/plugin/debug_key_management.so] +shared-library-lacks-prerequisites [usr/lib/mysql/plugin/test_sql_service.so] + +# These are from stop word list +spelling-error-in-binary noone no one [usr/bin/mariadb-client-test-embedded] +spelling-error-in-binary noone no one [usr/bin/mariadb-test-embedded] +spelling-error-in-binary thats that's [usr/bin/mariadb-client-test-embedded] +spelling-error-in-binary thats that's [usr/bin/mariadb-test-embedded] +spelling-error-in-binary theres there's [usr/bin/mariadb-client-test-embedded] +spelling-error-in-binary theres there's [usr/bin/mariadb-test-embedded] +spelling-error-in-binary userA users [usr/lib/mysql/plugin/qa_auth_interface.so] +spelling-error-in-binary yuR your [usr/bin/mariadb-client-test-embedded] +spelling-error-in-binary yuR your [usr/bin/mariadb-test-embedded] + +# Location for this is usr/share/mysql/mariadb-test/mysql-test-run +# so it's not missing it just in unusual location +spare-manual-page [usr/share/man/man1/mysql-test-run.pl.1.gz] + +# README non common place but good to be there +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mariadb-test/README] diff --git a/debian/mysql-common.lintian-overrides b/debian/mysql-common.lintian-overrides new file mode 100644 index 00000000000..429aaa9898c --- /dev/null +++ b/debian/mysql-common.lintian-overrides @@ -0,0 +1,2 @@ +# This false-positive as is just seeks dot +synopsis-is-a-sentence "MariaDB client common configuration files package (e.g. /etc/mysql/my.cnf)" diff --git a/debian/not-installed b/debian/not-installed index da34fd0d8c0..b5d7d194771 100644 --- a/debian/not-installed +++ b/debian/not-installed @@ -10,14 +10,15 @@ usr/bin/mariadb-embedded # Shipping the embedded server in distro packaging does usr/bin/mysql_config # Debian packaging has mysql_config as symlink to mariadb_config usr/bin/mysql_embedded # Symlink to mariadb-embedded which is intentionally not included usr/bin/sst_dump # Use the one from rocksdb-tools package -usr/lib/aarch64-linux-gnu/libdbbc.a # ColumnStore header file -usr/lib/aarch64-linux-gnu/libidbboot.a # ColumnStore header file -usr/lib/aarch64-linux-gnu/libprocessor.a # ColumnStore header file -usr/lib/aarch64-linux-gnu/libwe_xml.a # ColumnStore header file -usr/lib/x86_64-linux-gnu/libdbbc.a # ColumnStore header file -usr/lib/x86_64-linux-gnu/libidbboot.a # ColumnStore header file -usr/lib/x86_64-linux-gnu/libprocessor.a # ColumnStore header file -usr/lib/x86_64-linux-gnu/libwe_xml.a # ColumnStore header file +usr/lib/*/libdbbc.a # ColumnStore static library +usr/lib/*/libidbboot.a # ColumnStore static library +usr/lib/*/libprocessor.a # ColumnStore static library +usr/lib/*/libwe_xml.a # ColumnStore static library +usr/lib/*/libdbbc.a # ColumnStore static library +usr/lib/*/libidbboot.a # ColumnStore static library +usr/lib/*/libprocessor.a # ColumnStore static library +usr/lib/*/libwe_xml.a # ColumnStore static library +usr/lib/*/pkgconfig/mariadb.pc usr/bin/test-connect-t usr/bin/uca-dump usr/bin/wsrep_sst_backup @@ -67,3 +68,4 @@ usr/share/mariadb/systemd/mariadb@.socket # Installed by rules file usr/share/mariadb/systemd/mysql.service # Installed by rules file usr/share/mariadb/systemd/mysqld.service # Installed by rules file usr/share/mariadb/systemd/use_galera_new_cluster.conf +usr/share/man/man1/wsrep_sst_backup.1 diff --git a/debian/rules b/debian/rules old mode 100755 new mode 100644 index d010a880f13..64866631839 --- a/debian/rules +++ b/debian/rules @@ -19,8 +19,10 @@ CFLAGS+=$(CPPFLAGS) CXXFLAGS+=$(CPPFLAGS) # Only do a strict symbol checking on Linux +# https://manpages.debian.org/testing/dpkg-dev/dpkg-gensymbols.1.en.html +# Level 4: Fails if some libraries have been introduced. ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS))) - DPKG_GENSYMBOLS_CHECK_LEVEL := 4 + export DPKG_GENSYMBOLS_CHECK_LEVEL = 4 endif BUILDDIR := builddir @@ -28,7 +30,8 @@ DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e 's/.*[~-]\(.*\)/\1/ DEB_VERSION_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/^.*:\(.*\)\(-\|+\).*/\1/') DEB_VERSION_MAJOR := $(shell echo $(DEB_VERSION_VERSION) | sed -e 's/^\(.*\)\..*$$/\1/') RELEASE := $(shell lsb_release -r -s) # Use changelog based DEB_DISTRIBUTION instead? -TMP:=$(CURDIR)/debian/tmp +TMP := $(CURDIR)/debian/tmp +MTR_SKIP_TEST_LIST := $(shell mktemp) # According to Debian Policy version 4.2.0 builds should be as verbose as # possible unless 'terse' is specifically passed. @@ -66,14 +69,17 @@ override_dh_auto_configure: dh_testdir ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) - dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure --builddirectory=builddir-native + dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure --builddirectory=builddir-native --reload-all-buildenv-variables dh_auto_build --builddirectory=builddir-native -- import_executables endif echo "server:Version=$(DEB_VERSION)" >> debian/substvars - # As packages does not have major version any more on package name there is no way as it not set by dpkg - # to use this on postinst script. Use sed to determine major version + # As packages does not have major version any more in package name there is no + # way as it not set by dpkg to use this on postinst script. Use sed to + # determine major version instead. + # @TODO: Rewrite this to use the new upstream /var/lib/mysql_upgrade_info file + # instead of the legacy /var/lib/debian-XX.X.flag file sed -i 's/__MARIADB_MAJOR_VER__/$(DEB_VERSION_MAJOR)/g' debian/mariadb-server.post* debian/mariadb-server.preinst # Don't build ColumnStore as part of the native build as it does not meet the @@ -84,7 +90,6 @@ endif # Note: Don't use '-DWITH_URING=ON' as some Buildbot builders are missing it # and would fail permanently. PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \ - NO_UPDATE_BUILD_VERSION=1 \ dh_auto_configure --builddirectory=$(BUILDDIR) -- \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ $(CMAKEFLAGS) \ @@ -109,16 +114,23 @@ override_dh_auto_build: override_dh_auto_test: @echo "RULES.$@" dh_testdir - # Ensure at least an empty file exists - touch mysql-test/unstable-tests - # Skip unstable tests if such are defined for arch - [ ! -f debian/unstable-tests.$(DEB_HOST_ARCH) ] || cat debian/unstable-tests.$(DEB_HOST_ARCH) >> mysql-test/unstable-tests - # Run testsuite + # Skip running test suite after build if DEB_BUILD_OPTIONS contains 'nocheck' + @echo "DEB_BUILD_OPTIONS: $(DEB_BUILD_OPTIONS)" ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + # Skip unstable tests if such are defined for arch + [ ! -f debian/unstable-tests.$(DEB_HOST_ARCH) ] || cat debian/unstable-tests.$(DEB_HOST_ARCH) >> $(MTR_SKIP_TEST_LIST) + # Show contents of skip list on this architecture + @echo "On architecture $(DEB_HOST_ARCH) skip tests:" + cat $(MTR_SKIP_TEST_LIST) + # Run testsuite cd $(BUILDDIR)/mysql-test && \ - ./mtr --force --mem \ + export MTR_PRINT_CORE=detailed && \ + ./mtr --force --testcase-timeout=120 --suite-timeout=540 --retry=3 \ + --verbose-restart --max-save-core=1 --max-save-datadir=1 \ --parallel=$(NUMJOBS) --skip-rpl --suite=main \ - --skip-test-list=unstable-tests + --skip-test-list=$(MTR_SKIP_TEST_LIST) + # Don't use --mem here as official Debian builders and most Docker systems don't have a large mem device available and + # would fail with errors on lack of disk space. endif override_dh_auto_install: @@ -169,18 +181,12 @@ override_dh_auto_install: mv -v $(TMP)/usr/lib/mysql/plugin/qa_auth_client.so $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb3/plugin/ override_dh_installsystemd: - dh_systemd_enable --name=mariadb mariadb.service - dh_systemd_enable --no-enable --name=mariadb mariadb.socket - dh_systemd_enable --no-enable --name=mariadb-extra mariadb-extra.socket - dh_systemd_enable --no-enable --name=mariadb@ mariadb.socket - dh_systemd_enable --no-enable --name=mariadb-extra@ mariadb-extra.socket - dh_systemd_enable --no-enable --name=mariadb@ mariadb@.service + dh_installsystemd -pmariadb-server mariadb.service -# Start MariaDB at sequence number 19 before 20 where apache, proftpd etc gets +# Start mariadbd at sequence number 19 before 20 where apache, proftpd etc gets # started which might depend on a running database server. override_dh_installinit-arch: dh_installinit --name=mariadb -- defaults 19 21 - dh_systemd_start --restart-after-upgrade # Use custom server version string variable override_dh_gencontrol: @@ -191,6 +197,6 @@ override_dh_gencontrol: # white list file only starting from Debian Stretch and Ubuntu Xenial. # To find more, grep build logs for 'but is not installed to anywhere'. %: - dh $@ --parallel --with systemd --fail-missing + dh $@ --parallel --fail-missing # vim: ts=8 diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index f5ffab99026..ba0355f84e2 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -6,9 +6,24 @@ include: # Override Salsa-CI with MariaDB specific variations variables: + BUILT_PACKAGES: "libmariadb-dev libmariadb-dev-compat libmariadb3 + libmariadbd19t64 libmariadbd-dev mariadb-common mariadb-client-core + mariadb-client mariadb-server-core mariadb-server mariadb-backup + mariadb-plugin-connect mariadb-plugin-s3 mariadb-plugin-rocksdb + mariadb-plugin-oqgraph mariadb-plugin-mroonga mariadb-plugin-spider + mariadb-plugin-gssapi-server mariadb-plugin-gssapi-client + mariadb-plugin-cracklib-password-check mariadb-plugin-hashicorp-key-management + mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4 + mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo + mariadb-plugin-provider-snappy mariadb-test mariadb-test-data" DEB_BUILD_OPTIONS: "nocheck noautodbgsym" - RELEASE: bullseye + RELEASE: sid + # Reprotest works, but takes very long time and often fails due to timeouts. + # Thus is best kept disabled and only occasionally manually enabled to + # test that reproducibility works, along with atomic reprotest to directly + # pinpoint what aspect of the build is broken if not reproducible. SALSA_CI_DISABLE_REPROTEST: 1 + SALSA_CI_ENABLE_ATOMIC_REPROTEST: 0 SALSA_CI_DISABLE_MISSING_BREAKS: 0 SALSA_CI_DISABLE_RC_BUGS: 1 SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 1 @@ -25,14 +40,16 @@ stages: - provisioning - build - test - - upgrade in Bullseye - - upgrade from Buster - - upgrade extras + - upgrade MariaDB + - upgrade MariaDB and distro + - upgrade MariaDB variant - test extras - publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used -build: + +build autobake: extends: .build-package + stage: build script: &autobake-deb-steps # Run Salsa-CI .build-before-script equivalent - mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR} @@ -51,34 +68,9 @@ build: - ccache -s # Show ccache stats to validate it worked - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} -build i386: - extends: .build-package-i386 - script: - - *autobake-deb-steps - -build bullseye-backports: - extends: .build-package - variables: - RELEASE: bullseye-backports - # Buster only has libfmt 6.1 but 7.0 is required, so backport build for Buster # is not possible unless somebody packages libfmt7-dev for Buster. -build sid: - extends: .build-package - script: - - *autobake-deb-steps - variables: - RELEASE: sid - -# Build native deb without using autobake-deb.sh. This way we will detect -# if the debian/control file and other packaging is correct as-is for Debian Sid. -build native deb amd64: - extends: .build-package - -build native deb i386: - extends: .build-package-i386 - autopkgtest: extends: .test-autopkgtest artifacts: @@ -86,15 +78,10 @@ autopkgtest: junit: ${WORKING_DIR}/debci/artifacts/mysql-test-run-junit.xml piuparts: - extends: .test-piuparts stage: test extras blhc: - extends: .test-blhc stage: test extras - # Build log checker needs a .build file and thus only works on native build - needs: - - job: build native deb amd64 # In addition to Salsa-CI, also run these fully MariaDB specific build jobs @@ -108,88 +95,116 @@ blhc: echo -e '#!/bin/sh\necho "N 5"' > /sbin/runlevel; chmod +x /sbin/runlevel # Avoid the warnings of "debconf: unable to initialize frontend: Dialog" echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections + # Emit non-zero exit code also on warnings + echo 'APT::Update::Error-Mode "any";' > /etc/apt/apt.conf.d/non-zero-exit-on-warnings # Prime the apt cache so later apt commands can run apt-get update -qq +# Readline was removed from Debian Sid (and Bullseye) in Feb 2021. To be able to install older +# versions of MariaDB that depend on it, fetch and install it from Buster. +.test-install-readline-in-sid-for-backwards-compat: &test-install-readline-in-sid-for-backwards-compat | + curl -sS -O https://snapshot.debian.org/archive/debian/20190316T031117Z/pool/main/r/readline5/libreadline5_5.2%2Bdfsg-3%2Bb13_amd64.deb + apt-get -qq install --no-install-recommends --yes ./libreadline5_5.2%2Bdfsg-3%2Bb13_amd64.deb + +# OpenSSL 1.1 was Debian Sid in Dec 2022 (as Bookworm will ship with OpenSSL 3.0 +# only). To be able to install versions of MariaDB that depend on OpenSSL 1.1, +# fetch and install it manually. +.test-install-openssl1-in-sid-for-backwards-compat: &test-install-openssl1-in-sid-for-backwards-compat | + curl -sS -O https://snapshot.debian.org/archive/debian/20220507T034236Z/pool/main/o/openssl/libssl1.1_1.1.1o-1_amd64.deb + apt-get -qq install --no-install-recommends --yes ./libssl1.1_1.1.1o-1_amd64.deb + +# Package libaio1 was replaced by libaio1t64 in Debian Sid in April 2024. To +# continue installing old MariaDB versions that depend on libaio1, use libaio1 +# from snapshots. +.test-install-libaio-in-sid-for-backwards-compat: &test-install-libaio-in-sid-for-backwards-compat | + curl -sS -O https://snapshot.debian.org/archive/debian/20240331T210805Z/pool/main/liba/libaio/libaio1_0.3.113-5_amd64.deb + apt-get -qq install --no-install-recommends --yes ./libaio1_0.3.113-5_amd64.deb + .test-verify-initial: &test-verify-initial | dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - service mysql status || service mariadb status # Early MariaDB 10.5 only had 'mariadb' + # MariaDB until 10.5 only had 'mysql', and since only 'mariadb', so try both + service mysql status || service mariadb status mysql --skip-column-names -e "select @@version, @@version_comment" # Show version mysql --table -e "SHOW DATABASES;" # List databases before upgrade mysql --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql mysql --table -e "SELECT * FROM plugin;" mysql mysql --table -e "SHOW PLUGINS;" mysql -# Readline was removed from Debian Sid (and Bullseye) in Feb 2021. To be able to install older -# versions of MariaDB that depend on it, fetch and install it from Buster. -.test-install-readline-in-sid-for-backwards-compat: &test-install-readline-in-sid-for-backwards-compat | - curl -sS -O http://ftp.de.debian.org/debian/pool/main/r/readline5/libreadline5_5.2+dfsg-3+b13_amd64.deb - apt-get -qq install --no-install-recommends --yes ./libreadline5_5.2+dfsg-3+b13_amd64.deb - -.test-enable-bullseye-repos: &test-enable-bullseye-repos - # Replace any old repos with just Sid - - echo 'deb http://deb.debian.org/debian bullseye main' > /etc/apt/sources.list - # Upgrade minimal stack first - - apt-get update -qq - - apt-get install -y apt - -.test-enable-buster-backports-repos: &test-enable-buster-backports-repos | - # Enable buster-backports (assumes environment already Debian Buster) - echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/buster-backports.list - # Increase default backports priority policy from '100' to '500' so it can actually be used - cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies - Package: * - Pin: release n=buster-* - Pin-Priority: 500 - EOF - apt-get update -qq - -.test-enable-bullseye-backports-repos: &test-enable-bullseye-backports-repos | - # Enable bullseye-backports (assumes environment already Debian Bullseye) - echo 'deb http://deb.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/bullseye-backports.list - # Increase default backports priority policy from '100' to '500' so it can actually be used - cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies - Package: * - Pin: release n=bullseye-* - Pin-Priority: 500 - EOF - apt-get update -qq - .test-enable-sid-repos: &test-enable-sid-repos - # Apply usrmerge workaround for Stretch/Buster/Bullseye to Bookworm/Sid upgrades - - echo 'this system will not be supported in the future' > /etc/unsupported-skip-usrmerge-conversion # Replace any old repos with just Sid - echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list # Upgrade minimal stack first - apt-get update -qq - # Next step will fail on https://bugs.debian.org/993755 + # Complete upgrade of minimal stack + - apt-get install -qq --yes apt || export APT_STATUS="failed" + # Due to https://bugs.debian.org/993755 and #975077 upgrades from Buster or + # older to Bookworm or newer fails on: # /usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot # open shared object file: No such file or directory # dpkg: error processing package libc6:amd64 (--configure): - - apt-get install -y apt || true - # Apply workaround - - cd $(mktemp -d) # Use temp dir where apt can download and unpack files - - apt-get -y download libcrypt1 - - dpkg-deb -x libcrypt1_*.deb . - - cp -ra lib/* /lib/ - - cd - # Back to /builds/$USER/mariadb-server/debian/output - - find /lib/*/libcrypt.* -ls # Show that new libcrypt is there - - apt-get -y --fix-broken install - # Complete upgrade of minimal stack - - apt-get install -y apt + # Therefore, run this extra workaround if first run of apt-get install failed: + - | + if [ "$APT_STATUS" = "failed" ] + then + cd $(mktemp -d) # Use temp dir where apt can download and unpack files + apt-get -y download libcrypt1 + dpkg-deb -x libcrypt1_*.deb . + cp -ra usr/lib/* /lib/ || true # libcrypt 1:4.4.36-3+ + cd - # Back to /builds/$USER/mariadb-server/debian/output + find /lib/*/libcrypt.* -ls # Show that new libcrypt is there + apt-get -qq --yes --fix-broken install + apt-get install -qq --yes apt + fi -.test-install: &test-install - # Install MariaDB built in this commit - - apt-get install -y ./*.deb +.test-enable-artifacts-repo: &test-enable-artifacts-repo | + apt-get install -qq --yes apt-utils + apt-ftparchive packages . > Packages + echo "deb [trusted=yes] file:$(pwd) ./" > /etc/apt/sources.list.d/mariadb-local.list + apt-get update -qq + +.test-install-all: &test-install-all + - *test-enable-artifacts-repo + - apt-get install -qq --simulate ${BUILT_PACKAGES} + - apt-get install -qq --yes ${BUILT_PACKAGES} # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version + - mariadb --version + - dpkg -l | grep -iE 'maria|mysql|galera' + - find /etc -name '*mariadb*' -ls -or -name '*mysql*' -ls | sort -k 11 + # Purge old versions if they exist + - apt-get purge --yes mariadb*10.? + - find /etc -name '*mariadb*' -ls -or -name '*mysql*' -ls | sort -k 11 + +.test-full-upgrade: &test-full-upgrade + - *test-enable-artifacts-repo + - apt-get full-upgrade -qq --simulate + - apt-get full-upgrade -qq --yes + # Verify installation of MariaDB built in this commit + - mariadb --version + - dpkg -l | grep -iE 'maria|mysql|galera' + - find /etc -name '*mariadb*' -ls -or -name '*mysql*' -ls | sort -k 11 + # Purge old versions if they exist + - apt-get purge --yes mariadb*10.? + - find /etc -name '*mariadb*' -ls -or -name '*mysql*' -ls | sort -k 11 + # Purging the old server might stop the running server, so restart it just in case + - service mariadb restart + +.test-install-all-libs: &test-install-all-libs + - *test-enable-artifacts-repo + - apt-get install -yq --no-install-recommends libmariadb-dev-compat libmariadbd-dev + # Installs 31 packages, including: + # libmariadb3 libmariadb-dev libmariadb-dev-compat libmariadbd19t64 libmariadbd-dev + +.test-full-upgrade-libs: &test-full-upgrade-libs + - *test-enable-artifacts-repo + - apt-get full-upgrade -y + - dpkg -l | grep -iE 'maria|mysql|galera' + # library tests don't have the mariadb client nor server, so don't check them .test-verify-final: &test-verify-final | + dpkg -l | grep -e "mariadb-server.*10\.11" mkdir -p debug # Ensure dir exists before using it find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory" cp -ra /etc/mysql debug/etc-mysql - cp -ra /var/log/mysql debug/var-log-mysql mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version mariadb --table -e "SHOW DATABASES;" # List databases mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql @@ -205,7 +220,7 @@ blhc: - pkg-config --cflags --libs mysqlclient - pkg-config --cflags --libs libmariadb - pkg-config --cflags --libs mariadb - - apt-get install -y --no-install-recommends g++ + - apt-get install -qq --yes --no-install-recommends g++ - | # Build a test binary that depends on libmysqlclient cat > b933063.cpp < b1031863.cpp < + #include + #include + using namespace std; -.test-install-all-libs: &test-install-all-libs - - apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb + void test_if_starts_with(const string expected, const string tested, const string name) { + int r = strncmp(tested.c_str(), expected.c_str(), expected.size()); + if (r == 0) { + cout << name << ": " << tested << "\n"; + } else { + cout << "ERROR: " << name << " started with " << tested << " instead of the expected " << expected << "!\n"; + exit(1); + } + } + + int main() + { + MYSQL h; + // Constants refer to server version + test_if_starts_with("1011", to_string(MARIADB_VERSION_ID), "MARIADB_VERSION_ID"); + test_if_starts_with("1011", to_string(MYSQL_VERSION_ID), "MYSQL_VERSION_ID"); + // Client ABI returns connector version + test_if_starts_with("303", to_string(mysql_get_client_version()), "mysql_get_client_version()"); + test_if_starts_with("3.3", mysql_get_client_info(), "mysql_get_client_info()"); + return 0; + } + EOF + g++ b1031863.cpp -l mysqlclient && ./a.out + + +.salsa-ci-template-for-mariadb: + stage: test + needs: + - job: build + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - echo "This script section must be overridden in each test" && exit 1 + variables: + GIT_STRATEGY: none + except: + variables: + - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ + +.salsa-ci-template-for-mariadb-upgrade: + stage: test + needs: + - job: build + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + before_script: + - *test-prepare-container + - apt-get install -qq --yes --no-install-recommends ca-certificates curl + - | + [[ -d /etc/apt/keyrings ]] || mkdir /etc/apt/keyrings + curl -sS https://mariadb.org/mariadb_release_signing_key.pgp -o /etc/apt/keyrings/mariadb-keyring.pgp + cat >/etc/apt/sources.list.d/mariadb.sources < /etc/apt/sources.list.d/bookworm.list + rm /etc/apt/sources.list.d/debian.sources + apt-get update -qq + # In February 2023 Bookworm snapshot this will install MariaDB 10.6 + - apt-get install -qq --yes mariadb-server + # Verify installation of MariaDB from (February 2023) Bookworm + - dpkg -l | grep -e "mariadb-server.*10\.6" + - *test-verify-initial + - *test-enable-sid-repos + # Ensure mariadbd will not crash on next shutdown for any reason + - service mariadb restart + - *test-full-upgrade + - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ + - apt-get purge --yes mariadb*10.? + - *test-verify-final + +mariadb-10.6 and Jammy upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB and distro + image: ubuntu:jammy + script: + - *test-prepare-container + # Install everything MariaDB currently in Ubuntu Jammy + - apt-get install -qq --yes 'mariadb-*' 'libmariadb*' + # Verify installation of MariaDB from Jammy + - dpkg -l | grep -e "mariadb-server.*10\.6" + - *test-verify-initial + # Install Debian Sid signing keys as Ubuntu does not have them by default + - apt-get install -qq --yes --no-install-recommends curl + - curl -sSLO http://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb + - apt-get install -qq --yes ./debian-archive-keyring_* + - *test-enable-sid-repos + # Ensure mariadbd will not crash on next shutdown for any reason + - service mariadb restart + - *test-enable-artifacts-repo + - apt-get install -qq --simulate mariadb-server + - apt-get install -qq --yes mariadb-server + # Due to usrmerge, full-upgrade from Jammy to Trixie or newer cannot work + - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ + - apt-get purge --yes mariadb*10.? + - *test-verify-final + +mariadb-10.5 and Bullseye upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB and distro + image: debian:bullseye + script: + - *test-prepare-container + # Install everything MariaDB currently in Debian Bullseye + - apt-get install -qq --yes 'default-mysql*' 'mariadb-*' 'libmariadb*' + # Verify installation of MariaDB from Bullseye + - dpkg -l | grep -e "mariadb-server.*10\.5" + - *test-verify-initial + - *test-enable-sid-repos + # Ensure mariadbd will not crash on next shutdown for any reason + - service mariadb restart + - *test-enable-artifacts-repo + - apt-get install -qq --simulate mariadb-server + - apt-get install -qq --yes mariadb-server + # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work + - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ + - apt-get purge --yes mariadb*10.? + - *test-verify-final + +mariadb-10.3 and Buster upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB and distro image: debian:buster - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug script: - *test-prepare-container - # Install everything MariaDB 10.3 currently in Debian Buster - - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*' + # Install everything MariaDB currently in Debian Buster + - apt-get install -qq --yes 'default-mysql*' 'mariadb-*' 'libmariadb*' # Verify installation of MariaDB from Buster + - dpkg -l | grep -e "mariadb-server.*10\.3" - *test-verify-initial - - *test-enable-bullseye-repos - - *test-install - # mariadb-10.3 in Buster ships a /etc/init.d/mysql so it should continue to work + - *test-enable-sid-repos + # Ensure mariadbd will not crash on next shutdown for any reason + - service mysql restart # in 10.3 service name is still 'mysql' + - *test-enable-artifacts-repo + - apt-get install -qq --simulate mariadb-server + - apt-get install -qq --yes mariadb-server + # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work - service mysql status + # mariadb-10.3 in Buster ships a /etc/init.d/mysql and it continues to exist + # after upgrade, and is removed only on purge + - apt-get purge --yes mariadb*10.? - service mariadb status + # Give the mariadb-upgrade plenty of time to complete, otherwise next commands + # fail on non-existing mariadb.sys user + - sleep 15 + - *test-verify-final + +mariadb-10.3 and Focal upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB and distro + image: ubuntu:focal + script: + - *test-prepare-container + # Install everything MariaDB currently in Ubuntu Focal + - apt-get install -qq --yes 'mariadb-*' 'libmariadb*' + # Verify installation of MariaDB from Focal + - dpkg -l | grep -e "mariadb-server.*10\.3" + - *test-verify-initial + # Install Debian Sid signing keys as Ubuntu does not have them by default + - apt-get install -qq --yes --no-install-recommends curl + - curl -sSLO http://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb + - apt-get install -qq --yes ./debian-archive-keyring_* + - *test-enable-sid-repos + # Ensure mariadbd will not crash on next shutdown for any reason + - service mysql restart # in 10.3 service name is still 'mysql' + - *test-enable-artifacts-repo + - apt-get install -qq --simulate mariadb-server + - apt-get install -qq --yes mariadb-server + # Due to usrmerge, full-upgrade from Focal to Trixie or newer cannot work + - service mysql status + # mariadb-10.3 in Focal ships a /etc/init.d/mysql and it continues to exist + # after upgrade, and is removed only on purge + - apt-get purge --yes mariadb*10.? + # Give the mariadb-upgrade plenty of time to complete, otherwise next commands + # fail on non-existing mariadb.sys user + - sleep 15 + - *test-verify-final + +# Similar to the Cacti install test, check that MariaDB consumer Zoph upgrades +default-mysql-server and Bookworm upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB and distro + image: debian:bookworm + script: + - *test-prepare-container + # Install everything MariaDB currently in Debian Bookworm + - apt-get install -qq --yes default-mysql-server zoph + # Verify installation of MariaDB from Bookworm + - dpkg -l | grep -e "mariadb-server.*10\.11" + - *test-verify-initial + - *test-enable-sid-repos + - *test-enable-artifacts-repo + - apt-get install -qq --simulate default-mysql-server + - apt-get install -qq --yes default-mysql-server + - *test-full-upgrade + - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ + - *test-verify-final + +# Similar to the Cacti install test, check that MariaDB consumer Zoph upgrades +default-mysql-server and Bullseye upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB and distro + image: debian:bullseye + script: + - *test-prepare-container + # Install everything MariaDB currently in Debian Bullseye + - apt-get install -qq --yes default-mysql-server zoph + # Verify installation of MariaDB from Bullseye + - dpkg -l | grep -e "mariadb-server.*10\.5" + - *test-verify-initial + - *test-enable-sid-repos + - *test-enable-artifacts-repo + - apt-get install -qq --simulate default-mysql-server + - apt-get install -qq --yes default-mysql-server + # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work + - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ test basic features: - stage: test - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug + extends: .salsa-ci-template-for-mariadb script: - *test-prepare-container - - *test-install + - *test-install-all - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - | @@ -392,459 +613,371 @@ test basic features: grep --quiet TLSv1.3 result mariadb -Bse 'SHOW SESSION STATUS' | grep -i -e tls -e ssl | tee result grep --quiet TLSv1.3 result - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ + +# Install Cacti, which in uses dbconfig-common to configure the MariaDB user and +# connection automatically in order to validate that at least one downstream +# server consumer continues to work. +test consumer cacti: + extends: .salsa-ci-template-for-mariadb + script: + - *test-prepare-container + - *test-enable-artifacts-repo + - apt-get install -qq --yes cacti + - mariadb -E -e "SHOW CREATE TABLE version;" cacti # Build a piece of software that was designed for libmysqlclient-dev but using the # libmariadb-dev-compat layer. Should always end up using libmariadb.so.3 run-time. build mariadbclient consumer Python-MySQLdb: - stage: test - needs: - - job: build - image: debian:${RELEASE} + extends: .salsa-ci-template-for-mariadb script: - *test-prepare-container - # Run each step separately to avoid an 800+ line chunk that lacks the - # commands themselves printed and Gitlab-CI cutting off the output - - apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb - - pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with - - apt-get install -y python3-pip - - pip3 install mysqlclient # Compiles module against libmysqlclient - - apt-get purge -y libmariadb-dev # Not needed for run-time + - *test-install-all-libs + - apt-get install -qq --yes pkg-config python3-pip + # See what MySQLdb will build with + - pkg-config --cflags --libs mysqlclient + # MySQLdb is also available in Debian as package python3-mysqldb, but + # install it from pip to force that the client is compiled with + # libmariadb-dev-compat on-the-fly. + # Python 3.11 needs `--break-system-packages` to proceed with this. + - pip3 install --break-system-packages mysqlclient # Compiles module against libmysqlclient + - apt-get purge --yes libmariadb-dev # Not needed for run-time - python3 -c "import MySQLdb; print(MySQLdb.get_client_info())" - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -default-libmysqlclient-dev Bullseye upgrade: - stage: upgrade in Bullseye - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +libmysql* to libmariadb* upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB script: - *test-prepare-container - - apt-get install -y pkg-config default-libmysqlclient-dev default-libmysqld-dev + # Install all libmysql* available in Debian unstable + - apt-get install -qq --yes pkg-config libmysqlclient-dev - pkg-config --list-all - - *test-install-all-libs + - pkg-config --cflags mysqlclient # mysqlclient.pc from original package + - *test-enable-artifacts-repo + - apt-get install -qq --yes libmariadb3 + - pkg-config --list-all + - apt-get install -qq --yes libmariadb-dev + - pkg-config --list-all + - apt-get install -qq --yes libmariadb-dev-compat + - pkg-config --cflags mysqlclient # mysqlclient.pc from compat package + - pkg-config --list-all + - apt-get install -qq --yes libmariadbd19t64 + - pkg-config --list-all + - apt-get install -qq --yes libmariadbd-dev + - pkg-config --list-all + - apt-get install -qq --yes default-libmysqlclient-dev default-libmysqld-dev - *test-verify-libs - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -default-libmysqlclient-dev Buster upgrade: - stage: upgrade from Buster - needs: - - job: build - image: debian:buster - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +default-libmysqlclient-dev upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB script: - *test-prepare-container - - apt-get install -y pkg-config default-libmysqlclient-dev + - apt-get install -qq --yes pkg-config default-libmysqlclient-dev default-libmysqld-dev - pkg-config --list-all - - *test-enable-bullseye-repos + - *test-full-upgrade-libs + - *test-verify-libs + +default-libmysqlclient-dev and Bookworm upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB and distro + image: debian:bookworm + script: + - *test-prepare-container + - apt-get install -qq --yes pkg-config default-libmysqlclient-dev + - pkg-config --list-all + - *test-enable-sid-repos + - *test-full-upgrade-libs + - *test-verify-libs + +default-libmysqlclient-dev and Bullseye upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB and distro + image: debian:bullseye + script: + - *test-prepare-container + - apt-get install -qq --yes pkg-config default-libmysqlclient-dev + - pkg-config --list-all + - *test-enable-sid-repos + # Due to usrmerge, full-upgrade from Bullseye to Trixie or newer cannot work - *test-install-all-libs - *test-verify-libs - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ + +# No longer possible since as it pulls as dependencies packages that trigger +# usrmerge, which cannot run in a container +#default-libmysqlclient-dev and Buster upgrade: # Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump. # The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh. -# -# Testing on Focal binaries on Buster works. Using Jammy binaries on Bullseye -# does not work as libc in Jammy is too new. -mysql-8.0 from Ubuntu 22.04 upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +mysql-8.0 in Sid upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB variant + image: debian:sid script: - *test-prepare-container - # Add Ubuntu Focal archive keys and repository - - apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32 - - echo "deb http://archive.ubuntu.com/ubuntu/ focal main restricted" > /etc/apt/sources.list.d/ubuntu.list - - apt-get update -qq - # First install often fail due to bug in mysql-8.0 - - apt-get install -y mysql-server 'libmysqlc*' || true - - sleep 10 && apt-get install -f + # The postinst fails often if 'ps' is missing from system, so install procps + - apt-get install -qq --yes 'mysql*' libmysqlcppconn7t64 + # Ensure MySQL 8.0 package actually got installed + - dpkg -l | grep -e "mysql-server.*8\.0" - *test-verify-initial - - *test-install - - service mysql status + - *test-install-all + # Due to some (currently unknown) changes in MySQL 8.0 packaging or apt + # behaviour changes, a system with a previous installation of MySQL 8.0 will + # on upgrades to MariaDB first fully remove MySQL, including the + # /etc/init.d/mysql file, so previous techniques in + # mariadb-server-10.6.postinst to maintain backwards compatibility with + # 'service mysql status' after installing MariaDB on top MySQL no longer + # works. Thus the step to test it now intentionally has a fallback to use + # the service name 'mariadb' instead, and the fallback is always used. - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server + - service mysql status || service mariadb status - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ # Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump. # The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh. -mysql-community-cluster-8.0 from MySQL.com upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +mysql-8.0 in Ubuntu 23.10 upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB variant + image: ubuntu:mantic script: - *test-prepare-container - - apt-get install --no-install-recommends --yes ca-certificates curl systemctl - - curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x859be8d7c586f538430b19c2467b942d3a79bd29" -o /etc/apt/trusted.gpg.d/mysql.asc - - echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-cluster-8.0" > /etc/apt/sources.list.d/mysql.list - - apt-get update -qq - - apt-get install -y mysql-cluster-community-server + - apt-get install -qq --yes procps mysql-server 'libmysqlc*' + # Ensure MySQL 8.0 package actually got installed + - dpkg -l | grep mysql + - service mysql status + - *test-verify-initial + # Install Debian Sid signing keys as Ubuntu does not have them by default + - apt-get install -qq --yes --no-install-recommends curl + - curl -sSLO http://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb + - apt-get install -qq --yes ./debian-archive-keyring_* + - *test-enable-sid-repos + # Ensure mysqld will not crash on next shutdown for any reason + - service mysql restart + - *test-enable-artifacts-repo + - apt-get install -qq --simulate mariadb-server + - apt-get install -qq --yes mariadb-server + # Due to usrmerge, full-upgrade from Mantic to Trixie or newer may not work + - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ + # Remove everything MySQL except mysql-common which also MariaDB depends on + - apt-get purge --yes mysql-s* mysql-cl* libmysql* + - *test-verify-final + +# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump. +# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh. +mysql-community-cluster-8.0 from MySQL.com with Bookworm upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB variant + image: debian:bookworm + script: + - *test-prepare-container + - | + apt-get install -qq --yes --no-install-recommends ca-certificates curl systemctl + curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xbca43417c3b485dd128ec6d4b7b3b788a8d3785c" -o /etc/apt/trusted.gpg.d/mysql.asc + echo "deb https://repo.mysql.com/apt/debian/ bookworm mysql-cluster-8.0" > /etc/apt/sources.list.d/mysql.list + apt-get update -qq + - apt-get install -qq --yes mysql-cluster-community-server - sed 's/ExecStartPre=+/ExecStartPre=/' -i /lib/systemd/system/mysql.service # Hack to make file compatible with systemctl shim - systemctl start mysql - dpkg -l | grep -iE 'maria|mysql|galera' - systemctl status mysql; mysql -e 'SELECT VERSION()' - systemctl stop mysql # Stop manually as maintainer scripts don't handle this with systemctl shim - - *test-install + - *test-enable-sid-repos + - *test-enable-artifacts-repo + - apt-get install -qq --simulate mariadb-server + - apt-get install -qq --yes mariadb-server # Ignore systemctl shim result as MariaDB systemd file is incompatible with it and yields: # ERROR:systemctl:the ExecStartPre control process exited with error code - systemctl status mysql || true - mysql -e 'SELECT VERSION()' || true - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org 10.11 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +mariadb.org-10.11 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.11" script: - - *test-prepare-container - - apt install -y curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/10.11/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update - - apt-get install -y mariadb-server + - apt-get install -qq --yes mariadb-server - *test-verify-initial # Install MariaDB built in this commit - # Force downgrades so our version installs on top of upstream revision, e.g. 1:10.9.1-1 vs 1:10.9.1+mariadb~sid - - apt-get install -y --allow-downgrades ./*.deb + # Force downgrades so our version installs on top of upstream revision, e.g. 1:11.10.1-1 vs 1:11.10.1+mariadb~sid + - apt-get install -qq --yes --allow-downgrades ./*.deb # Verify installation of MariaDB built in this commit - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - mariadb --version # Client version - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org 10.10 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +mariadb.org-10.10 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.10" script: - - *test-prepare-container - - apt install -y curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/10.10/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update - - apt-get install -y mariadb-server + # this should not use Sid to begin with + - apt-get install -qq --yes mariadb-server=1:10.10.2+maria~debunstable mariadb-client=1:10.10.2+maria~debunstable - *test-verify-initial - # Install MariaDB built in this commit - # Force downgrades so our version installs on top of upstream revision, e.g. 1:10.9.1-1 vs 1:10.9.1+mariadb~sid - - apt-get install -y --allow-downgrades ./*.deb - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version + - *test-full-upgrade - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org 10.9 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +mariadb.org-10.9 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.9" script: - - *test-prepare-container - - apt install -y curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/10.9/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update - - apt-get install -y mariadb-server-10.9 mariadb-client-10.9 + # this should not use Sid to begin with + - apt-get install -qq --yes mariadb-server=1:10.9.4+maria~debunstable mariadb-client=1:10.9.4+maria~debunstable - *test-verify-initial - # Install MariaDB built in this commit - # Force downgrades so our version installs on top of upstream revision, e.g. 1:10.9.1-1 vs 1:10.9.1+mariadb~sid - - apt-get install -y --allow-downgrades ./*.deb - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version + - *test-full-upgrade - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org-10.8 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +mariadb.org-10.8 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.8" script: - - *test-prepare-container - - apt install -y curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/10.8/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update - - apt-get install -y mariadb-server-10.8 + - apt-get install -qq --yes mariadb-server-10.8 - *test-verify-initial - # Install MariaDB built in this commit - # Force downgrades so our version installs on top of upstream revision, e.g. 1:10.9.1-1 vs 1:10.9.1+mariadb~sid - - apt-get install -y --allow-downgrades ./*.deb - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version + - *test-install-all - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org-10.7 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +mariadb.org-10.7 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.7" script: - - *test-prepare-container - - apt install -y curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/10.7/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update - - apt-get install -y mariadb-server-10.7 + - apt-get install -qq --yes mariadb-server-10.7 - *test-verify-initial - # Install MariaDB built in this commit - # Force downgrades so our version installs on top of upstream revision, e.g. 1:10.9.1-1 vs 1:10.9.1+mariadb~sid - - apt-get install -y --allow-downgrades ./*.deb - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version + - *test-install-all - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org-10.6 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +mariadb.org-10.6 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.6" script: - - *test-prepare-container - - apt-get -qq install --no-install-recommends --yes ca-certificates curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://deb.mariadb.org/10.6/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update -qq - - apt-get install -y mariadb-server-10.6 + # Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Sid, so cannot use wildcard that would include it + # Enable this line when there is a way to install them only from the mariadb.org repo + # - apt-get install -qq --yes 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*' + - apt-get install -qq --yes mariadb-server-10.6 - *test-verify-initial - # Install MariaDB built in this commit - # Force downgrades so our version installs on top of upstream revision, e.g. 1:10.9.1-1 vs 1:10.9.1+mariadb~sid - - apt-get install -y --allow-downgrades ./*.deb - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version + - *test-install-all - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org-10.5 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +# archive.mariadb.org for Debian Sid latest is 10.5.13 +mariadb.org-10.5 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.5" script: - - *test-prepare-container - - apt-get -qq install --no-install-recommends --yes ca-certificates curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://archive.mariadb.org/mariadb-10.5/repo/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update -qq - - apt-get install -y mariadb-server-10.5 + - *test-install-openssl1-in-sid-for-backwards-compat + - apt-get install -qq --yes mariadb-server-10.5 - *test-verify-initial - - *test-install + - *test-install-all - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org-10.4 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +# archive.mariadb.org for Debian Sid latest is 10.4.17 +mariadb.org-10.4 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.4" script: - - *test-prepare-container - - apt-get -qq install --no-install-recommends --yes ca-certificates curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://archive.mariadb.org/mariadb-10.4/repo/debian buster main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update -qq - *test-install-readline-in-sid-for-backwards-compat - - apt-get install -y mariadb-server-10.4 + - *test-install-openssl1-in-sid-for-backwards-compat + - *test-install-libaio-in-sid-for-backwards-compat + - apt-get install -qq --yes mariadb-server-10.4 # MariaDB.org version of 10.4 and early 10.5 do not install an init file, so # it must be installed here manually - cp /usr/share/mysql/mysql.init /etc/init.d/mysql; chmod +x /etc/init.d/mysql; service mysql start; sleep 5 - *test-verify-initial - # Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4) - - *test-enable-buster-backports-repos - - *test-install + - *test-install-all - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - service mysql status - service mariadb status - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -mariadb.org-10.3 to mariadb upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +# archive.mariadb.org for Debian Sid latest is 10.3.27 +mariadb.org-10.3 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant + variables: + MARIADB_VERSION: "10.3" script: - - *test-prepare-container - - apt-get -qq install --no-install-recommends --yes ca-certificates curl - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://archive.mariadb.org/mariadb-10.3/repo/debian buster main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update -qq - *test-install-readline-in-sid-for-backwards-compat - - apt-get install -y mariadb-server-10.3 + - *test-install-openssl1-in-sid-for-backwards-compat + - *test-install-libaio-in-sid-for-backwards-compat + - apt-get install -qq --yes mariadb-server-10.3 - *test-verify-initial - # Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4) - - *test-enable-buster-backports-repos - - *test-install - - service mysql status + - *test-install-all + # mariadb-10.3 in Buster ships a /etc/init.d/mysql and it continues to exist + # after upgrade, and is removed only on purge + - service mysql status || service mariadb status # Give the mariadb-upgrade plenty of time to complete, otherwise next commands # fail on non-existing mariadb.sys user - sleep 15 - *test-verify-final + +# archive.mariadb.org for Debian Sid latest is 10.2.21 +mariadb.org-10.2 upgrade: + extends: .salsa-ci-template-for-mariadb-upgrade + stage: upgrade MariaDB variant variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ + MARIADB_VERSION: "10.2" + script: + - *test-install-readline-in-sid-for-backwards-compat + - *test-install-openssl1-in-sid-for-backwards-compat + - *test-install-libaio-in-sid-for-backwards-compat + - apt-get install -qq --yes mariadb-server-10.2 + # Verify initial state before upgrade + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3 + - | + mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" + mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SHOW DATABASES;" + mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost;" + mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS;" + - *test-install-all + # mariadb-10.2 in ships a /etc/init.d/mysql and it continues to exist + # after upgrade, and is removed only on purge + - service mysql status || service mariadb status + # Give the mariadb-upgrade plenty of time to complete, otherwise next commands + # fail on non-existing mariadb.sys user + - sleep 15 + - *test-verify-final -# archive.mariadb.org has for 10.2 only Stretch, so we can't test upgrades to -# 10.6 with only Buster and Bullseye builds - -mysql.com-5.7 upgrade: - stage: upgrade extras +# Buster is the last Debian release Oracle MySQL 5.7 offers binaries for +mysql.com-5.7 with Buster upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB variant needs: - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug + image: debian:buster script: - *test-prepare-container - | - apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 467B942D3A79BD29 - echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-5.7" > /etc/apt/sources.list.d/mysql.list + apt-get install -qq --yes --no-install-recommends gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work + apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 B7B3B788A8D3785C + echo "deb https://repo.mysql.com/apt/debian/ buster mysql-5.7" > /etc/apt/sources.list.d/mysql.list apt-get update -qq - apt-get install -y 'mysql*' 'libmysqlc*' + - apt-get install -qq --yes mysql-server 'libmysqlc*' + # Ensure MySQL 5.7 package actually got installed + - dpkg -l | grep -e "mysql-server.*5.7" - *test-verify-initial - - *test-install + - *test-enable-sid-repos + - *test-install-all # Due to some (currently unknown) changes in MySQL 5.7 packaging or apt # behaviour changes, a system with a previous installation of MySQL will # on upgrades to MariaDB first fully remove MySQL, including the @@ -854,41 +987,30 @@ mysql.com-5.7 upgrade: # works. Thus the step to test it now intentionally has a fallback to use # the service name 'mariadb' instead, and the fallback is always used. - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - - service mariadb status # There is no init.d/mysql in MariaDB 10.5+ + - service mysql status || service mariadb status - sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ -percona-xtradb-5.7 upgrade: - stage: upgrade extras - needs: - - job: build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug +# Note: pmm2-client does not exist in the Bookworm repository anymore +percona-xtradb-5.7 with Bookworm upgrade: + extends: .salsa-ci-template-for-mariadb + stage: upgrade MariaDB variant + image: debian:bookworm script: - *test-prepare-container - | - apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 9334A25F8507EFA5 - echo "deb https://repo.percona.com/apt/ ${RELEASE} main" > /etc/apt/sources.list.d/mysql.list + apt-get install -qq --yes --no-install-recommends ca-certificates curl systemctl + curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9334A25F8507EFA5" -o /etc/apt/trusted.gpg.d/percona.asc + echo "deb https://repo.percona.com/apt/ bookworm main" > /etc/apt/sources.list.d/percona.list apt-get update -qq - apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client + - apt-get install -qq --yes percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit + # Ensure Percona 5.7 package actually got installed + - dpkg -l | grep -e "percona.*5\.7" - service mysql status - *test-verify-initial - - *test-install - - service mysql status + - *test-enable-sid-repos + - *test-install-all + # Percona package owned /etc/init.d/mysql, so on removal and upgrade to MariaDB old service name can't be referenced anymore + - service mariadb status - sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides index 68f84851d6c..65a2893331f 100644 --- a/debian/source/lintian-overrides +++ b/debian/source/lintian-overrides @@ -1,99 +1,62 @@ -# MariaDB use high enough debhelper so this is should -# be considered as bug in lintia -missing-build-dependency-for-dh-addon systemd * +# This compat version is needed to use to support older version +mariadb source: package-uses-deprecated-debhelper-compat-version 9 # Necessary for drop-in-place-replacement upgrades on mysql-server/-client # since package breaks/replaces these but at the same time also provides them -version-substvar-for-external-package mariadb-client-core -> mysql-client-5.5 -version-substvar-for-external-package mariadb-server -> mysql-server -version-substvar-for-external-package libmariadb-dev -> libmysqlclient-dev -version-substvar-for-external-package libmariadb-dev -> libmysqld-dev -version-substvar-for-external-package Replaces ${source:Version} libmariadb-dev -> libmysqlclient-dev [debian/control:74] -version-substvar-for-external-package Replaces ${source:Version} libmariadb-dev -> libmysqld-dev [debian/control:74] -version-substvar-for-external-package libmariadbd-dev -> libmariadbclient-dev -# ColumnStore not used in Debian, safe to ignore. Reported upstream in https://jira.mariadb.org/browse/MDEV-24124 -source-is-missing storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2 -source-is-missing [storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2] -# Must be fixed upstream -source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-*.custom.js # New Lintian syntax (from version 2.115) source-is-missing [sql/share/charsets/languages.html] source-is-missing [storage/rocksdb/rocksdb/docs/_includes/footer.html] -# Intentional control relationships -version-substvar-for-external-package Replaces * libmariadbd-dev -> libmariadbclient-dev -version-substvar-for-external-package Replaces * libmariadb-dev -> libmysqlclient-dev -version-substvar-for-external-package Replaces * libmariadb-dev -> libmysqld-dev -# New Lintian syntax (from version 2.115) -version-substvar-for-external-package Replaces * libmariadb-dev -> libmysqlclient-dev [debian/control:*] -version-substvar-for-external-package Replaces * libmariadb-dev -> libmysqld-dev [debian/control:*] -version-substvar-for-external-package Replaces * libmariadbd-dev -> libmariadbclient-dev [debian/control:*] -# Data or test files where long lines are justified -very-long-line-length-in-source-file *.test * -very-long-line-length-in-source-file *.result * -very-long-line-length-in-source-file BUILD/compile-* -very-long-line-length-in-source-file *COPYING.rtf * -# These are mainly found under extra/wolfssl -very-long-line-length-in-source-file *.cproject * -very-long-line-length-in-source-file *.md * -very-long-line-length-in-source-file *.scfg * -very-long-line-length-in-source-file *.launch * -very-long-line-length-in-source-file extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/test/test_wolfssl.c * -very-long-line-length-in-source-file extra/wolfssl/wolfssl/configure.ac * -very-long-line-length-in-source-file extra/wolfssl/wolfssl/doc/formats/html/html_changes/tabs.css * -# Preprocessed C files which have long lines -very-long-line-length-in-source-file extra/wolfssl/wolfssl/wolfcrypt/src/*.i * -# These are all results for test cases and similar so they can be -# especially formatted to be too long -very-long-line-length-in-source-file mysql-test/*.dump * -very-long-line-length-in-source-file mysql-test/*.inc * -very-long-line-length-in-source-file mysql-test/*.rdiff * -very-long-line-length-in-source-file mysql-test/*.txt * -very-long-line-length-in-source-file mysql-test/*.weekly * -# Test file -very-long-line-length-in-source-file plugin/handler_socket/regtest/test_01_lib/test19.expected * -# SQL source file that has very long inserts/selects -very-long-line-length-in-source-file mysql-test/std_data/init_file_longline_3816.sql * -very-long-line-length-in-source-file scripts/fill_help_tables.sql * -very-long-line-length-in-source-file scripts/mariadb_system_tables.sql * -very-long-line-length-in-source-file scripts/mariadb_test_data_timezone.sql * -# Machine formatted HTML -very-long-line-length-in-source-file sql/share/charsets/languages.html * -very-long-line-length-in-source-file sql/share/errmsg-utf8.txt * -# Very long test string -very-long-line-length-in-source-file storage/archive/archive_test.c line 30 is 1051 characters long (>512) -# autogenerated thrift file -very-long-line-length-in-source-file storage/cassandra/gen-cpp/cassandra_types.h * -# ColumnStore ignores -# In Directory mysql-test are some long test includes -very-long-line-length-in-source-file storage/columnstore/columnstore/.drone.jsonnet * -very-long-line-length-in-source-file storage/columnstore/columnstore/CMakeLists.txt * -very-long-line-length-in-source-file storage/columnstore/columnstore/mysql-test/columnstore/csinternal/include/autopilot_create_datatypetestm_tables.inc * -very-long-line-length-in-source-file storage/columnstore/columnstore/mysql-test/columnstore/csinternal/include/autopilot_create_datatypeupdate_table.inc * -very-long-line-length-in-source-file storage/columnstore/columnstore/*.xmi * -very-long-line-length-in-source-file storage/columnstore/columnstore/dbcon/doc/q19_plan.txt * -very-long-line-length-in-source-file storage/columnstore/columnstore/utils/udfsdk/docs/source/reference/mcsv1Context.rst * -very-long-line-length-in-source-file storage/columnstore/columnstore/utils/winport/win_setup_mysql_part1.sql * -# Minified CSS files. These appear in several places -very-long-line-length-in-source-file *badge_only.css * -very-long-line-length-in-source-file *theme.css line * -# General storage ignores -very-long-line-length-in-source-file storage/mroonga/vendor/groonga/examples/dictionary/html/css/smoothness/jquery-ui-1.8.12.custom.css * -very-long-line-length-in-source-file storage/rocksdb/mysql-test/rocksdb/t/bypass_select_basic_bloom-master.opt * -very-long-line-length-in-source-file storage/rocksdb/mysql-test/rocksdb/t/type_enum.inc * -very-long-line-length-in-source-file storage/rocksdb/mysql-test/rocksdb/t/type_set.inc * -very-long-line-length-in-source-file storage/rocksdb/rocksdb/docs/_includes/footer.html * -very-long-line-length-in-source-file storage/rocksdb/rocksdb/docs/_posts/*.markdown line * -very-long-line-length-in-source-file storage/spider/mysql-test/spider/bugfix/include/sql_mode_init.inc * -very-long-line-length-in-source-file storage/tokudb/PerconaFT/cmake_modules/TokuBuildTagDatabases.cmake * -very-long-line-length-in-source-file storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/m4/po.m4 * -# These are generated files which should not make any harm -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/*.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/*.h -source-contains-autogenerated-visual-c++-file win/upgrade_wizard/resource.h -source-contains-autogenerated-visual-c++-file win/upgrade_wizard/upgrade.rc - -# New in 10.11 -version-substvar-for-external-package Conflicts ${source:Version} libmariadb-dev-compat -> libmariadbclient-dev [debian/control:95] -version-substvar-for-external-package Replaces ${source:Version} libmariadb-dev-compat -> libmariadbclient-dev [debian/control:109] missing-build-dependency-for-dh-addon systemd (does not satisfy debhelper:any (>= 9.20160709~) | debhelper-compat:any | dh-sequence-systemd:any | dh-systemd:any) [debian/rules] -source-is-missing [sql/share/charsets/languages.html] -source-is-missing [storage/rocksdb/rocksdb/docs/_includes/footer.html] +# Should in some point reviewd what should we done +dependency-is-not-multi-archified libmariadb-dev-compat depends on libmariadb-dev (multi-arch: no) +dependency-is-not-multi-archified mariadb-plugin-gssapi-client depends on mariadb-client (multi-arch: no) +# These are for purpose +version-substvar-for-external-package Replaces ${source:Version} libmariadb-dev -> libmysqlclient-dev [debian/control:*] +version-substvar-for-external-package Replaces ${source:Version} libmariadb-dev -> libmysqld-dev [debian/control:*] +version-substvar-for-external-package Replaces ${source:Version} libmariadbd-dev -> libmariadbclient-dev [debian/control:*] + +# These are there for purpose +source-contains-autogenerated-visual-c++-file [extra/wolfssl/wolfssl/IDE/WIN10/resource.h] +source-contains-autogenerated-visual-c++-file [extra/wolfssl/wolfssl/IDE/WIN10/wolfssl-fips.rc] +source-contains-autogenerated-visual-c++-file [extra/wolfssl/wolfssl/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/dbcon/ddlpackageproc/libddlpackageproc.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/dbcon/ddlpackageproc/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/dbcon/dmlpackageproc/libdmlpackageproc.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/dbcon/dmlpackageproc/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/dbcon/joblist/libjoblist.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/dbcon/joblist/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/ddlproc/DDLProc.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/ddlproc/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/dmlproc/DMLProc.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/dmlproc/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/exemgr/ExeMgr.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/exemgr/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/oam/oamcpp/liboamcpp.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/oam/oamcpp/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/primitives/primproc/PrimProc.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/primitives/primproc/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/tools/dbloadxml/colxml.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/tools/dbloadxml/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/utils/configcpp/libconfigcpp.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/utils/configcpp/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/utils/udfsdk/libudf_mysql.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/utils/udfsdk/libudfsdk.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/utils/udfsdk/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/utils/winport/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/utils/winport/winfinidb.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/versioning/BRM/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/writeengine/bulk/cpimport.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/writeengine/bulk/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/writeengine/libwriteengine.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/writeengine/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/writeengine/server/WriteEngineServer.rc] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/writeengine/server/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/writeengine/splitter/resource.h] +source-contains-autogenerated-visual-c++-file [storage/columnstore/columnstore/writeengine/splitter/splitter.rc] +source-contains-autogenerated-visual-c++-file [win/upgrade_wizard/resource.h] +source-contains-autogenerated-visual-c++-file [win/upgrade_wizard/upgrade.rc] + +# These are needed for testing +source-contains-prebuilt-java-object [storage/connect/mysql-test/connect/std_data/JavaWrappers.jar] +source-contains-prebuilt-java-object [storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar] +source-contains-prebuilt-java-object [storage/connect/mysql-test/connect/std_data/Mongo2.jar] +source-contains-prebuilt-java-object [storage/connect/mysql-test/connect/std_data/Mongo3.jar] diff --git a/debian/tests/control b/debian/tests/control index bc9c7d91874..3ea02093b86 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -12,5 +12,6 @@ Depends: mariadb-plugin-rocksdb | mariadb-server, Restrictions: allow-stderr needs-root isolation-container Tests: upstream -Depends: mariadb-test, eatmydata +Depends: eatmydata, + mariadb-test Restrictions: allow-stderr breaks-testbed diff --git a/debian/tests/smoke b/debian/tests/smoke index b3e09acc8ae..5c4facbb501 100644 --- a/debian/tests/smoke +++ b/debian/tests/smoke @@ -8,9 +8,9 @@ # # This test should be declared in debian/tests/control with the # following restrictions: -# -# needs-root (to be able to log into the database) -# allow-stderr +# - allow-stderr (set -x always outputs to stderr) +# - needs-root (to be able to log into the database) +# - isolation-container (to be able to start service) # # This test: # @@ -27,7 +27,7 @@ set -ex # Start the daemon if it was not running. For example in Docker testing # environments there might not be any systemd et al and the service needs to # be started manually. -if ! which systemctl +if ! command -v systemctl then if ! /etc/init.d/mariadb status then @@ -45,35 +45,39 @@ else systemctl restart mariadb fi -mariadb <&2 - exit 1 +result=$(echo 'SELECT bar+1 FROM foo;'|mysql --batch --skip-column-names --user=testuser --password=testpassword testdatabase) +if [ "$result" != "42" ] +then + echo "Unexpected result" >&2 + exit 1 fi -mariadb --user=testuser --password=testpassword testdatabase <> $SKIP_TEST_LST + cat "/usr/share/mariadb/mariadb-test/unstable-tests.$ARCH" >> "$SKIP_TEST_LST" fi # Skip tests that cannot run properly on ci.debian.net / autopkgtests.ubuntu.com -cat >> $SKIP_TEST_LST << EOF +cat >> "$MTR_SKIP_TEST_LIST" << EOF binlog.binlog_server_start_options : Requires writable /usr main.ctype_uca : Requires writable /usr rpl.rpl_gtid_mode : Requires starting server as root ref http://bugs.mysql.com/bug.php?id=70517 EOF # Skip tests that cannot run properly on Gitlab-CI -if [ ! -z "$GITLAB_CI" ] +if [ -n "$GITLAB_CI" ] then - cat >> $SKIP_TEST_LST << EOF + cat >> "$MTR_SKIP_TEST_LIST" << EOF main.mysqld--help : For unknown reason table-cache is 4000 instead of default 421 EOF fi if [ "$ARCH" = "s390x" ] then - echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $SKIP_TEST_LST + echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> "$MTR_SKIP_TEST_LIST" elif [ "$ARCH" = "armhf" ] || [ "$ARCH" = "i386" ] then - echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> $SKIP_TEST_LST + echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> "$MTR_SKIP_TEST_LIST" fi # Store skipped test list in artifacts so it can be viewed while debugging # failed autopkgtest runs -cp -v $SKIP_TEST_LST $AUTOPKGTEST_ARTIFACTS +cp -v "$MTR_SKIP_TEST_LIST" "$AUTOPKGTEST_ARTIFACTS" -cd /usr/share/mariadb/mariadb-test -echo "starting mariadb-test-run.pl..." -eatmydata perl -I. ./mariadb-test-run.pl --suite=main \ +cd /usr/share/mysql/mysql-test +echo "starting mariadb-test-tun.pl..." +export MTR_PRINT_CORE=detailed +# The $MTR_ARGUMENTS_APPEND is intentionally used to pass in extra arguments +# shellcheck disable=SC2086 +eatmydata perl -I. ./mariadb-test-run.pl \ + --force --testcase-timeout=120 --suite-timeout=540 --retry=3 \ + --verbose-restart --max-save-core=1 --max-save-datadir=1 \ + --parallel=auto --skip-rpl --suite=main \ + --skip-test-list="$MTR_SKIP_TEST_LIST" \ --vardir="$WORKDIR/var" --tmpdir="$WORKDIR/tmp" \ - --parallel=auto --skip-rpl \ - --force --skip-test-list=$SKIP_TEST_LST \ - --xml-report=$AUTOPKGTEST_ARTIFACTS/mysql-test-run-junit.xml $@ 2>&1 + --xml-report="$AUTOPKGTEST_ARTIFACTS/mariadb-test-run-junit.xml" \ + $MTR_ARGUMENTS_APPEND \ + "$@" 2>&1 echo "run: OK" diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc index aad6f5766b0..ddab761cdd4 100644 --- a/extra/mariabackup/backup_mysql.cc +++ b/extra/mariabackup/backup_mysql.cc @@ -1936,9 +1936,17 @@ char *make_argv(char *buf, size_t len, int argc, char **argv) while (argc > 0 && left > 0) { arg = *argv; - if (strncmp(*argv, "--password", strlen("--password")) == 0) { + if (strncmp(*argv, STRING_WITH_LEN("--password=")) == 0) { arg = "--password=..."; + } else + if (strcmp(*argv, "--password") == 0) { + arg = "--password ..."; + ++argv; --argc; + } else + if (strncmp(*argv, STRING_WITH_LEN("-p")) == 0) { + arg = "-p..."; } + uint l= snprintf(buf + len - left, left, "%s%c", arg, argc > 1 ? ' ' : 0); ++argv; --argc; diff --git a/extra/wolfssl/wolfssl b/extra/wolfssl/wolfssl index 8970ff4c340..00e42151ca0 160000 --- a/extra/wolfssl/wolfssl +++ b/extra/wolfssl/wolfssl @@ -1 +1 @@ -Subproject commit 8970ff4c34034dbb3594943d11f8c9d4c5512bd5 +Subproject commit 00e42151ca061463ba6a95adb2290f678cbca472 diff --git a/libmariadb b/libmariadb index 923a0092e35..486ce75d642 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit 923a0092e3508b9567b0d695e72eb4d58bf15c8f +Subproject commit 486ce75d6426c20c4e9f8e7fe4df8ddec193d7e2 diff --git a/man/mariadb-binlog.1 b/man/mariadb-binlog.1 index e5f4a98949a..7103fa22f2b 100644 --- a/man/mariadb-binlog.1 +++ b/man/mariadb-binlog.1 @@ -571,6 +571,22 @@ privilege\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqlbinlog: flashback option +.\" flashback option: mysqlbinlog +\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 +.\} .\" mysqlbinlog: force-if-open option .\" force-if-open option: mysqlbinlog \fB\-\-force\-if\-open\fR diff --git a/man/mariadb-dump.1 b/man/mariadb-dump.1 index d81ac2f7aed..112b50fe9bc 100644 --- a/man/mariadb-dump.1 +++ b/man/mariadb-dump.1 @@ -892,22 +892,6 @@ 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/mysql-test/include/analyze-format.inc b/mysql-test/include/analyze-format.inc index 907f4e71010..134905d4410 100644 --- a/mysql-test/include/analyze-format.inc +++ b/mysql-test/include/analyze-format.inc @@ -4,4 +4,4 @@ # - r_engine_stats depends on buffer pool state and whether old record versions # were purged. ---replace_regex /("(r_[a-z_]*_time(_in_progress)?_ms|r_buffer_size|cost)": )[^, \n]*/\1"REPLACED"/ /("r_engine_stats":) {[^}]*}/\1 REPLACED/ +--replace_regex /("(r_[a-z_]*_time(_in_progress)?_ms|r_buffer_size|cost|r_partial_match_buffer_size)": )[^, \n]*/\1"REPLACED"/ /("r_engine_stats":) {[^}]*}/\1 REPLACED/ diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index c693b86b896..6f79e7063a9 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -142,11 +142,13 @@ Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--disable_view_protocol explain extended SELECT g1.fid as first, g2.fid as second, Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--enable_view_protocol DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; diff --git a/mysql-test/include/not_valgrind_build.inc b/mysql-test/include/not_valgrind_build.inc deleted file mode 100644 index b62a1bc953b..00000000000 --- a/mysql-test/include/not_valgrind_build.inc +++ /dev/null @@ -1,4 +0,0 @@ -if (`select version() like '%valgrind%' || version() like '%asan%'`) -{ - skip Does not run with binaries built with valgrind or asan; -} diff --git a/mysql-test/main/analyze_format_json.result b/mysql-test/main/analyze_format_json.result index 00fdc10f84a..1c76fa4971c 100644 --- a/mysql-test/main/analyze_format_json.result +++ b/mysql-test/main/analyze_format_json.result @@ -876,29 +876,33 @@ ANALYZE ], "subqueries": [ { - "query_block": { - "select_id": 2, - "cost": "REPLACED", - "r_loops": 1, - "r_total_time_ms": "REPLACED", - "nested_loop": [ - { - "table": { - "table_name": "t1", - "access_type": "ALL", - "loops": 1, - "r_loops": 1, - "rows": 2, - "r_rows": 2, - "cost": "REPLACED", - "r_table_time_ms": "REPLACED", - "r_other_time_ms": "REPLACED", - "r_engine_stats": REPLACED, - "filtered": 100, - "r_filtered": 100 + "materialization": { + "r_strategy": "index_lookup", + "r_loops": 2, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } } - } - ] + ] + } } } ] diff --git a/mysql-test/main/column_compression.result b/mysql-test/main/column_compression.result index 7d846caedde..4ac35912072 100644 --- a/mysql-test/main/column_compression.result +++ b/mysql-test/main/column_compression.result @@ -8,7 +8,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -44,7 +44,7 @@ ALTER TABLE t1 MODIFY COLUMN a BLOB COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -61,7 +61,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -69,7 +69,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -105,7 +105,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -223,7 +223,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -259,7 +259,7 @@ ALTER TABLE t1 MODIFY COLUMN a TEXT COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -276,7 +276,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -284,7 +284,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -320,7 +320,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -438,7 +438,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -474,7 +474,7 @@ ALTER TABLE t1 MODIFY COLUMN a VARBINARY(10000) COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -491,7 +491,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -499,7 +499,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -535,7 +535,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -653,7 +653,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -689,7 +689,7 @@ ALTER TABLE t1 MODIFY COLUMN a VARCHAR(10000) COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -706,7 +706,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -714,7 +714,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -750,7 +750,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -868,7 +868,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -904,7 +904,7 @@ ALTER TABLE t1 MODIFY COLUMN a TEXT COMPRESSED CHARSET ucs2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -921,7 +921,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -929,7 +929,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -965,7 +965,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -1084,7 +1084,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -1120,7 +1120,7 @@ ALTER TABLE t1 MODIFY COLUMN a BLOB COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -1137,7 +1137,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -1145,7 +1145,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -1181,7 +1181,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -1323,7 +1323,7 @@ LENGTH(a) SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ NOT NULL DEFAULT '' + `a` blob /*M!100301 COMPRESSED*/ NOT NULL DEFAULT '' ) ENGINE=CSV DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" DROP TABLE t1; @@ -1373,7 +1373,7 @@ CREATE TABLE t1(a VARCHAR(255) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(255) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(255) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SET column_compression_threshold=300; INSERT INTO t1 VALUES(REPEAT('a', 255)); @@ -1483,12 +1483,12 @@ CREATE OR REPLACE TABLE t1 (a VARCHAR(1000) COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + `a` varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'; COLUMN_TYPE -varchar(1000) /*!100301 COMPRESSED*/ +varchar(1000) /*M!100301 COMPRESSED*/ DROP TABLE t1; # # MDEV-17363 - Compressed columns cannot be restored from dump @@ -1507,10 +1507,10 @@ d TINYTEXT COMPRESSED BINARY SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`a`)), - `b` varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - `c` varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, - `d` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`a`)), + `b` varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, + `c` varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, + `d` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1524,49 +1524,49 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1577,35 +1577,35 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) /*!100301 COMPRESSED*/ DEFAULT '' + `a` varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1617,7 +1617,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED); @@ -1626,7 +1626,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED); @@ -1635,7 +1635,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1675,49 +1675,49 @@ CREATE TABLE t1 (a TINYTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1728,35 +1728,35 @@ CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ DEFAULT '' + `a` tinytext /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1768,7 +1768,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED); @@ -1777,7 +1777,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED); @@ -1786,7 +1786,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1826,49 +1826,49 @@ CREATE TABLE t1 (a TEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1879,35 +1879,35 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT '' + `a` blob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT '' + `a` text /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1919,7 +1919,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT ASCII COMPRESSED); @@ -1928,7 +1928,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT BYTE COMPRESSED); @@ -1937,7 +1937,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1977,49 +1977,49 @@ CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2030,35 +2030,35 @@ CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ DEFAULT '' + `a` mediumtext /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2070,7 +2070,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED); @@ -2079,7 +2079,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED); @@ -2088,7 +2088,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2128,49 +2128,49 @@ CREATE TABLE t1 (a LONGTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2181,35 +2181,35 @@ CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ DEFAULT '' + `a` longtext /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2221,7 +2221,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED); @@ -2230,7 +2230,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED); @@ -2239,7 +2239,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2281,7 +2281,7 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2292,21 +2292,21 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` varchar(10) /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2318,7 +2318,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED); @@ -2327,7 +2327,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2356,7 +2356,7 @@ CREATE TABLE t1 (a TINYBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2367,21 +2367,21 @@ CREATE TABLE t1 (a TINYBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` tinyblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2393,7 +2393,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED); @@ -2402,7 +2402,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2431,7 +2431,7 @@ CREATE TABLE t1 (a BLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2442,21 +2442,21 @@ CREATE TABLE t1 (a BLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT '' + `a` blob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a BLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a BLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` blob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2468,7 +2468,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT '' + `a` blob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a BLOB NULL COMPRESSED); @@ -2477,7 +2477,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2506,7 +2506,7 @@ CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2517,21 +2517,21 @@ CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` mediumblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2543,7 +2543,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED); @@ -2552,7 +2552,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2581,7 +2581,7 @@ CREATE TABLE t1 (a LONGBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2592,21 +2592,21 @@ CREATE TABLE t1 (a LONGBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` longblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2618,7 +2618,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED); @@ -2627,7 +2627,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2656,7 +2656,7 @@ CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED); diff --git a/mysql-test/main/column_compression_parts.result b/mysql-test/main/column_compression_parts.result index 5f5539b723c..e960ff71927 100644 --- a/mysql-test/main/column_compression_parts.result +++ b/mysql-test/main/column_compression_parts.result @@ -64,7 +64,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, - `a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT 'AAA' + `a` varchar(1000) /*M!100301 COMPRESSED*/ DEFAULT 'AAA' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY RANGE COLUMNS(`a`) (PARTITION `p1` VALUES LESS THAN ('m') ENGINE = MyISAM, @@ -132,7 +132,7 @@ ALTER TABLE t1 MODIFY COLUMN a VARCHAR(1000) COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT NULL, + `a` varchar(1000) /*M!100301 COMPRESSED*/ DEFAULT NULL, `id` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY RANGE COLUMNS(`id`,`a`) @@ -165,7 +165,7 @@ ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 6; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT '10-12-2010' + `a` varchar(1000) /*M!100301 COMPRESSED*/ DEFAULT '10-12-2010' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY KEY (`a`) PARTITIONS 6 @@ -230,7 +230,7 @@ ALTER TABLE t2 REMOVE PARTITIONING; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(200) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(200) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY KEY (`a`) (PARTITION `p0` ENGINE = MyISAM, @@ -247,7 +247,7 @@ t1 CREATE TABLE `t1` ( SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(200) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(200) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ALTER TABLE t1 EXCHANGE PARTITION pm WITH TABLE t2; DROP TABLE t1,t2; @@ -265,7 +265,7 @@ ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition defin SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT 5, + `a` blob /*M!100301 COMPRESSED*/ DEFAULT 5, `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY HASH (`i`) @@ -282,7 +282,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p2 INTO (PARTITION p22 VALUES LESS THAN (MAX SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(500) /*!100301 COMPRESSED*/ DEFAULT '5', + `a` varchar(500) /*M!100301 COMPRESSED*/ DEFAULT '5', `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY RANGE COLUMNS(`i`) diff --git a/mysql-test/main/ddl_i18n_koi8r.result b/mysql-test/main/ddl_i18n_koi8r.result index bc4ef5ca644..06e35aeaf56 100644 --- a/mysql-test/main/ddl_i18n_koi8r.result +++ b/mysql-test/main/ddl_i18n_koi8r.result @@ -719,7 +719,7 @@ ca cb utf8mb3_general_ci utf8mb3_general_ci ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -796,7 +796,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.sp.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1725,7 +1725,7 @@ koi8r_general_ci utf8mb3_general_ci koi8r_general_ci koi8r_general_ci utf8mb3_ge DELETE FROM mysqltest2.log| ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1808,7 +1808,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.triggers.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2495,7 +2495,7 @@ COLLATION( ' END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8mb3_unicode_ci ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2563,7 +2563,7 @@ DELIMITER ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.events.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; diff --git a/mysql-test/main/ddl_i18n_utf8.result b/mysql-test/main/ddl_i18n_utf8.result index 9561c914302..d12d2f3e795 100644 --- a/mysql-test/main/ddl_i18n_utf8.result +++ b/mysql-test/main/ddl_i18n_utf8.result @@ -719,7 +719,7 @@ ca cb utf8mb3_general_ci utf8mb3_general_ci ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -796,7 +796,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_utf8sp.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1725,7 +1725,7 @@ utf8mb3_general_ci utf8mb3_general_ci koi8r_general_ci utf8mb3_general_ci utf8mb DELETE FROM mysqltest2.log| ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1808,7 +1808,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_utf8triggers.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2495,7 +2495,7 @@ COLLATION( 'текÑÑ‚') AS c4, END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8mb3 utf8mb3_general_ci utf8mb3_unicode_ci ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2563,7 +2563,7 @@ DELIMITER ; ---> Dumping mysqltest1 to ddl_i18n_utf8events.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; diff --git a/mysql-test/main/delete_single_to_multi.result b/mysql-test/main/delete_single_to_multi.result index 57cc224203a..afd94ce6494 100644 --- a/mysql-test/main/delete_single_to_multi.result +++ b/mysql-test/main/delete_single_to_multi.result @@ -42,7 +42,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.052271677, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -55,7 +55,7 @@ EXPLAIN "ref": ["const"], "loops": 1, "rows": 1, - "cost": 0.002024411, + "cost": "COST_REPLACED", "filtered": 100, "index_condition": "nation.n_name = 'PERU'" } @@ -71,7 +71,7 @@ EXPLAIN "ref": ["dbt3_s001.nation.n_nationkey"], "loops": 1, "rows": 6, - "cost": 0.008193756, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -94,7 +94,7 @@ EXPLAIN }, "loops": 6, "rows": 15, - "cost": 0.04205351, + "cost": "COST_REPLACED", "filtered": 7.199999809, "attached_condition": "orders.o_orderDATE between '1992-01-01' and '1992-06-30'" } @@ -138,7 +138,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.052271677, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -151,7 +151,7 @@ EXPLAIN "ref": ["const"], "loops": 1, "rows": 1, - "cost": 0.002024411, + "cost": "COST_REPLACED", "filtered": 100, "index_condition": "nation.n_name = 'PERU'" } @@ -167,7 +167,7 @@ EXPLAIN "ref": ["dbt3_s001.nation.n_nationkey"], "loops": 1, "rows": 6, - "cost": 0.008193756, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -190,7 +190,7 @@ EXPLAIN }, "loops": 6, "rows": 15, - "cost": 0.04205351, + "cost": "COST_REPLACED", "filtered": 7.199999809, "attached_condition": "orders.o_orderDATE between '1992-01-01' and '1992-06-30'" } @@ -509,7 +509,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.40015207, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -518,7 +518,7 @@ EXPLAIN "possible_keys": ["PRIMARY", "i_n_regionkey"], "loops": 1, "rows": 25, - "cost": 0.013945725, + "cost": "COST_REPLACED", "filtered": 40, "attached_condition": "nation.n_regionkey in (1,2)" } @@ -534,7 +534,7 @@ EXPLAIN "ref": ["dbt3_s001.nation.n_nationkey"], "loops": 10, "rows": 6, - "cost": 0.08009436, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -557,7 +557,7 @@ EXPLAIN }, "loops": 60, "rows": 15, - "cost": 0.306111985, + "cost": "COST_REPLACED", "filtered": 6.666666508, "attached_condition": "orders.o_orderDATE between '1992-10-09' and '1993-06-08'", "first_match": "customer" @@ -630,7 +630,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.40015207, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -639,7 +639,7 @@ EXPLAIN "possible_keys": ["PRIMARY", "i_n_regionkey"], "loops": 1, "rows": 25, - "cost": 0.013945725, + "cost": "COST_REPLACED", "filtered": 40, "attached_condition": "nation.n_regionkey in (1,2)" } @@ -655,7 +655,7 @@ EXPLAIN "ref": ["dbt3_s001.nation.n_nationkey"], "loops": 10, "rows": 6, - "cost": 0.08009436, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -678,7 +678,7 @@ EXPLAIN }, "loops": 60, "rows": 15, - "cost": 0.306111985, + "cost": "COST_REPLACED", "filtered": 6.666666508, "attached_condition": "orders.o_orderDATE between '1992-10-09' and '1993-06-08'", "first_match": "customer" @@ -906,7 +906,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.382051418, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -915,7 +915,7 @@ EXPLAIN "possible_keys": ["PRIMARY"], "loops": 1, "rows": 150, - "cost": 0.03493875, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -942,7 +942,7 @@ EXPLAIN "possible_keys": ["i_o_orderdate", "i_o_custkey"], "loops": 1, "rows": 1500, - "cost": 0.2532975, + "cost": "COST_REPLACED", "filtered": 16.13333321, "attached_condition": "orders.o_orderDATE between '1992-01-09' and '1993-03-08'" } @@ -1064,7 +1064,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.37364371, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -1073,7 +1073,7 @@ EXPLAIN "possible_keys": ["PRIMARY"], "loops": 1, "rows": 150, - "cost": 0.026531042, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -1100,7 +1100,7 @@ EXPLAIN "possible_keys": ["i_o_orderdate", "i_o_custkey"], "loops": 1, "rows": 1500, - "cost": 0.2532975, + "cost": "COST_REPLACED", "filtered": 16.13333321, "attached_condition": "orders.o_orderDATE between '1992-01-09' and '1993-03-08'" } @@ -1394,7 +1394,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.085533248, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -1403,32 +1403,34 @@ EXPLAIN "possible_keys": ["distinct_key"], "loops": 1, "rows": 28, - "cost": 0.03691572, + "cost": "COST_REPLACED", "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": 0.053826401, - "having_condition": "count(orders.o_custkey) > 1", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "orders", - "access_type": "range", - "possible_keys": ["i_o_orderdate"], - "key": "i_o_orderdate", - "key_length": "4", - "used_key_parts": ["o_orderDATE"], - "loops": 1, - "rows": 28, - "cost": 0.035889016, - "filtered": 100, - "index_condition": "orders.o_orderDATE between '1992-01-09' and '1992-03-08'" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "count(orders.o_custkey) > 1", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "orders", + "access_type": "range", + "possible_keys": ["i_o_orderdate"], + "key": "i_o_orderdate", + "key_length": "4", + "used_key_parts": ["o_orderDATE"], + "loops": 1, + "rows": 28, + "cost": "COST_REPLACED", + "filtered": 100, + "index_condition": "orders.o_orderDATE between '1992-01-09' and '1992-03-08'" + } } - } - ] + ] + } } } } @@ -1445,7 +1447,7 @@ EXPLAIN "ref": [".o_custkey"], "loops": 28, "rows": 1, - "cost": 0.048617528, + "cost": "COST_REPLACED", "filtered": 100 } } @@ -1481,7 +1483,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.054856476, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -1490,32 +1492,34 @@ EXPLAIN "possible_keys": ["distinct_key"], "loops": 1, "rows": 28, - "cost": 0.03691572, + "cost": "COST_REPLACED", "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": 0.053826401, - "having_condition": "count(orders.o_custkey) > 1", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "orders", - "access_type": "range", - "possible_keys": ["i_o_orderdate"], - "key": "i_o_orderdate", - "key_length": "4", - "used_key_parts": ["o_orderDATE"], - "loops": 1, - "rows": 28, - "cost": 0.035889016, - "filtered": 100, - "index_condition": "orders.o_orderDATE between '1992-01-09' and '1992-03-08'" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "count(orders.o_custkey) > 1", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "orders", + "access_type": "range", + "possible_keys": ["i_o_orderdate"], + "key": "i_o_orderdate", + "key_length": "4", + "used_key_parts": ["o_orderDATE"], + "loops": 1, + "rows": 28, + "cost": "COST_REPLACED", + "filtered": 100, + "index_condition": "orders.o_orderDATE between '1992-01-09' and '1992-03-08'" + } } - } - ] + ] + } } } } @@ -1532,7 +1536,7 @@ EXPLAIN "ref": [".o_custkey"], "loops": 28, "rows": 1, - "cost": 0.017940756, + "cost": "COST_REPLACED", "filtered": 100 } } @@ -3452,7 +3456,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.222764041, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -3469,7 +3473,7 @@ EXPLAIN "used_key_parts": ["ps_partkey", "ps_suppkey"], "loops": 1, "rows": 176, - "cost": 0.019403477, + "cost": "COST_REPLACED", "filtered": 23.86363602, "attached_condition": "partsupp_small.ps_suppkey in (1,2,3)", "using_index": true, @@ -3487,7 +3491,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 42, "rows": 30, - "cost": 0.203360564, + "cost": "COST_REPLACED", "filtered": 2.380952358, "using_index": true } @@ -3510,7 +3514,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.222764041, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -3527,7 +3531,7 @@ EXPLAIN "used_key_parts": ["ps_partkey", "ps_suppkey"], "loops": 1, "rows": 176, - "cost": 0.019403477, + "cost": "COST_REPLACED", "filtered": 23.86363602, "attached_condition": "partsupp_small.ps_suppkey in (1,2,3)", "using_index": true, @@ -3545,7 +3549,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 42, "rows": 30, - "cost": 0.203360564, + "cost": "COST_REPLACED", "filtered": 2.380952358, "using_index": true } @@ -3577,7 +3581,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.222764041, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -3594,7 +3598,7 @@ EXPLAIN "used_key_parts": ["ps_partkey", "ps_suppkey"], "loops": 1, "rows": 176, - "cost": 0.019403477, + "cost": "COST_REPLACED", "filtered": 23.86363602, "attached_condition": "partsupp_small.ps_suppkey in (1,2,3)", "using_index": true, @@ -3612,7 +3616,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 42, "rows": 30, - "cost": 0.203360564, + "cost": "COST_REPLACED", "filtered": 2.380952358 } } @@ -3762,7 +3766,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 4.129940741, + "cost": "COST_REPLACED", "nested_loop": [ { "duplicates_removal": [ @@ -3776,7 +3780,7 @@ EXPLAIN "used_key_parts": ["s_suppkey"], "loops": 1, "rows": 1, - "cost": 0.001478954, + "cost": "COST_REPLACED", "filtered": 100, "attached_condition": "supplier.s_suppkey < 2", "using_index": true @@ -3798,7 +3802,7 @@ EXPLAIN "ref": ["dbt3_s001.supplier.s_suppkey"], "loops": 1, "rows": 17, - "cost": 0.003160332, + "cost": "COST_REPLACED", "filtered": 79.54545593, "attached_condition": "partsupp_small.ps_partkey is not null", "using_index": true @@ -3815,7 +3819,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 14, "rows": 30, - "cost": 0.069152188, + "cost": "COST_REPLACED", "filtered": 100, "using_index": true } @@ -3831,7 +3835,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 420.35, "rows": 30, - "cost": 1.994712365, + "cost": "COST_REPLACED", "filtered": 0.237896994, "using_index": true } @@ -3866,7 +3870,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 4.129940741, + "cost": "COST_REPLACED", "nested_loop": [ { "duplicates_removal": [ @@ -3880,7 +3884,7 @@ EXPLAIN "used_key_parts": ["s_suppkey"], "loops": 1, "rows": 1, - "cost": 0.001478954, + "cost": "COST_REPLACED", "filtered": 100, "attached_condition": "supplier.s_suppkey < 2", "using_index": true @@ -3902,7 +3906,7 @@ EXPLAIN "ref": ["dbt3_s001.supplier.s_suppkey"], "loops": 1, "rows": 17, - "cost": 0.003160332, + "cost": "COST_REPLACED", "filtered": 79.54545593, "attached_condition": "partsupp_small.ps_partkey is not null", "using_index": true @@ -3919,7 +3923,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 14, "rows": 30, - "cost": 0.069152188, + "cost": "COST_REPLACED", "filtered": 100, "using_index": true } @@ -3935,7 +3939,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 420.35, "rows": 30, - "cost": 1.994712365, + "cost": "COST_REPLACED", "filtered": 0.237896994, "using_index": true } @@ -3987,7 +3991,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 4.129940741, + "cost": "COST_REPLACED", "nested_loop": [ { "duplicates_removal": [ @@ -4001,7 +4005,7 @@ EXPLAIN "used_key_parts": ["s_suppkey"], "loops": 1, "rows": 1, - "cost": 0.001478954, + "cost": "COST_REPLACED", "filtered": 100, "attached_condition": "supplier.s_suppkey < 2", "using_index": true @@ -4023,7 +4027,7 @@ EXPLAIN "ref": ["dbt3_s001.supplier.s_suppkey"], "loops": 1, "rows": 17, - "cost": 0.003160332, + "cost": "COST_REPLACED", "filtered": 79.54545593, "attached_condition": "partsupp_small.ps_partkey is not null", "using_index": true @@ -4040,7 +4044,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 14, "rows": 30, - "cost": 0.069152188, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -4055,7 +4059,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 420.35, "rows": 30, - "cost": 1.994712365, + "cost": "COST_REPLACED", "filtered": 0.237896994, "using_index": true } diff --git a/mysql-test/main/delete_single_to_multi.test b/mysql-test/main/delete_single_to_multi.test index 31f1d157096..ded33f8d24a 100644 --- a/mysql-test/main/delete_single_to_multi.test +++ b/mysql-test/main/delete_single_to_multi.test @@ -32,6 +32,7 @@ let $c1= eval explain select o_orderkey, o_totalprice from orders where $c1; +--source include/explain-no-costs.inc eval explain format=json select o_orderkey, o_totalprice from orders where $c1; @@ -45,6 +46,7 @@ select * from orders where $c1; eval explain delete from orders where $c1; +--source include/explain-no-costs.inc eval explain format=json delete from orders where $c1; @@ -180,6 +182,7 @@ let $c5= eval explain select c_name, c_acctbal from customer where $c5; +--source include/explain-no-costs.inc eval explain format=json select c_name, c_acctbal from customer where $c5; @@ -193,6 +196,7 @@ select * from customer where $c5; eval explain delete from customer where $c5; +--source include/explain-no-costs.inc eval explain format=json delete from customer where $c5; @@ -286,6 +290,7 @@ let $c8= eval explain select c_name, c_acctbal from customer where $c8; +--source include/explain-no-costs.inc eval explain format=json select c_name, c_acctbal from customer where $c8; @@ -299,6 +304,7 @@ select * from customer where $c8; eval explain delete from customer where $c8; +--source include/explain-no-costs.inc eval explain format=json delete from customer where $c8; @@ -354,6 +360,7 @@ let $c10= eval explain select c_name, c_acctbal from customer where $c10; +--source include/explain-no-costs.inc eval explain format=json select c_name, c_acctbal from customer where $c10; @@ -367,6 +374,7 @@ select * from customer where $c10; eval explain delete from customer where $c10; +--source include/explain-no-costs.inc eval explain format=json delete from customer where $c10; @@ -848,12 +856,14 @@ let $c12 = l_partkey in eval explain select count(*) from lineitem where $c12; +--source include/explain-no-costs.inc eval explain format=json select count(*) from lineitem where $c12; eval explain select l_partkey from lineitem where $c12; +--source include/explain-no-costs.inc eval explain format=json select l_partkey from lineitem where $c12; @@ -866,6 +876,7 @@ select * from lineitem where $c12; eval explain delete from lineitem where $c12; +--source include/explain-no-costs.inc eval explain format=json delete from lineitem where $c12; @@ -965,12 +976,14 @@ let $c13 = l_partkey in ( eval explain select count(*) from lineitem where $c13; +--source include/explain-no-costs.inc eval explain format=json select count(*) from lineitem where $c13; eval explain select l_partkey from lineitem where $c13; +--source include/explain-no-costs.inc eval explain format=json select l_partkey from lineitem where $c13; @@ -983,6 +996,7 @@ select * from lineitem where $c13; eval explain delete from lineitem where $c13; +--source include/explain-no-costs.inc eval explain format=json delete from lineitem where $c13; diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index d91b4510dee..54687caaa09 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -9691,10 +9691,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "message": "Select tables optimized away" + } } } } @@ -9767,10 +9769,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "message": "Select tables optimized away" + } } } } @@ -9878,10 +9882,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -9951,10 +9957,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -10019,10 +10027,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -10087,10 +10097,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -10157,10 +10169,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -10225,10 +10239,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -10293,10 +10309,12 @@ EXPLAIN "filtered": 0, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -10409,10 +10427,12 @@ EXPLAIN }, "subqueries": [ { - "query_block": { - "select_id": 2, - "table": { - "message": "Impossible WHERE" + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "message": "Impossible WHERE" + } } } } @@ -11737,47 +11757,49 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "", - "access_type": "ALL", - "loops": 1, - "rows": 5, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 5, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e > 1" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e > 1" + } } - } - ] + ] + } } } } } } - } - ] + ] + } } } } @@ -11864,47 +11886,49 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "", - "access_type": "ALL", - "loops": 1, - "rows": 5, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "d_tab.max_f > 20", - "materialized": { - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "max_f > 20", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 5, - "cost": "COST_REPLACED", - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "d_tab.max_f > 20", + "materialized": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "max_f > 20", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "COST_REPLACED", + "filtered": 100 + } } - } - ] + ] + } } } } } } - } - ] + ] + } } } } @@ -13651,24 +13675,26 @@ EXPLAIN "attached_condition": "t4.c = ``.`sum(b)`", "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`f1(a)` > 1 and `sum(b)` > 123", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t1", - "access_type": "ALL", - "loops": 1, - "rows": 3, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t1.a + 1 > 10" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`f1(a)` > 1 and `sum(b)` > 123", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 3, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t1.a + 1 > 10" + } } - } - ] + ] + } } } } @@ -22907,6 +22933,635 @@ valdouble valint1 5 3289988 DROP TABLE t1,t2; # End of 10.4 tests +# MDEV-34506 2nd execution name resolution problem with pushdown into +# unions +# +# Statements affected by this bug need all the following to be true +# 1) a derived table table or view whose specification contains a set +# operation at the top level. +# 2) a grouping operator (group by/having) operating on a column alias +# other than in the first select of the union/intersect +# 3) an outer condition that will be pushed into all selects in this +# union/intersect, either into the where or having clause +# +# When pushing a condition into all selects of a unit with more than one +# select, pushdown_cond_for_derived() renames items so we can re-use the +# condition being pushed. +# These names need to be saved and reset for correct name resolution on +# second execution of prepared statements. +create table t1 (c1 int, c2 int, c3 int); +insert into t1 values (1,2,3),(1,2,2),(4,5,6); +insert into t1 values (17,8,9),(11,11,12); +create table t2 (c4 int, c5 int, c6 int); +insert into t2 values (7,8,9),(10,11,12); +prepare stmt from 'select * from +( +select c1, sum(c3) as s from t1 group by c1 +union +select c4 as c, sum(c6) as u from t2 group by c +) dt +where c1 > 6'; +execute stmt; +c1 s +11 12 +17 9 +7 9 +10 12 +execute stmt; +c1 s +11 12 +17 9 +7 9 +10 12 +prepare stmt from 'explain format=json select * from +( +select c1, sum(c3) as s from t1 group by c1 +union +select c4 as c, sum(c6) as u from t2 group by c +) dt +where c1 > 6'; +execute stmt; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 7, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "dt.c1 > 6", + "materialized": { + "query_block": { + "union_result": { + "table_name": "", + "access_type": "ALL", + "query_specifications": [ + { + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "filesort": { + "sort_key": "t1.c1", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "t1.c1 > 6" + } + } + ] + } + } + } + }, + { + "query_block": { + "select_id": 3, + "operation": "UNION", + "cost": "REPLACED", + "filesort": { + "sort_key": "t2.c4", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "t2.c4 > 6" + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } +} +execute stmt; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 7, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "dt.c1 > 6", + "materialized": { + "query_block": { + "union_result": { + "table_name": "", + "access_type": "ALL", + "query_specifications": [ + { + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "filesort": { + "sort_key": "t1.c1", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "t1.c1 > 6" + } + } + ] + } + } + } + }, + { + "query_block": { + "select_id": 3, + "operation": "UNION", + "cost": "REPLACED", + "filesort": { + "sort_key": "t2.c4", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "t2.c4 > 6" + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } +} +prepare stmt from 'select * from +( +select c1, c2, sum(c3) as s from t1 group by c1, c2 having s > 2 +union +select c4, c5, sum(c6) as u from t2 group by c4, c5 having u > 3 +) dt +where c2 > 5'; +execute stmt; +c1 c2 s +11 11 12 +17 8 9 +7 8 9 +10 11 12 +execute stmt; +c1 c2 s +11 11 12 +17 8 9 +7 8 9 +10 11 12 +prepare stmt from 'explain format=json select * from +( +select c1, c2, sum(c3) as s from t1 group by c1, c2 having s > 2 +union +select c4, c5, sum(c6) as u from t2 group by c4, c5 having u > 3 +) dt +where c2 > 5'; +execute stmt; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 7, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "dt.c2 > 5", + "materialized": { + "query_block": { + "union_result": { + "table_name": "", + "access_type": "ALL", + "query_specifications": [ + { + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "having_condition": "s > 2", + "filesort": { + "sort_key": "t1.c1, t1.c2", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "t1.c2 > 5" + } + } + ] + } + } + } + }, + { + "query_block": { + "select_id": 3, + "operation": "UNION", + "cost": "REPLACED", + "having_condition": "s > 3", + "filesort": { + "sort_key": "t2.c4, t2.c5", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "t2.c5 > 5" + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } +} +execute stmt; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 7, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "dt.c2 > 5", + "materialized": { + "query_block": { + "union_result": { + "table_name": "", + "access_type": "ALL", + "query_specifications": [ + { + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "having_condition": "s > 2", + "filesort": { + "sort_key": "t1.c1, t1.c2", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "t1.c2 > 5" + } + } + ] + } + } + } + }, + { + "query_block": { + "select_id": 3, + "operation": "UNION", + "cost": "REPLACED", + "having_condition": "s > 3", + "filesort": { + "sort_key": "t2.c4, t2.c5", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "t2.c5 > 5" + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } +} +prepare stmt from 'select * +from +( +select c1, c2, max(c3) as max_c, avg(c3) as avg_c +from t1 +group by c1,c2 +having max_c < 7 +union +select c4, c5, max(c6) as u, avg(c6) as w +from t2 +group by c4, c5 +having u < 10 +) dt, +t2 +where dt.max_c > 6 and t2.c6 > dt.c1'; +execute stmt; +c1 c2 max_c avg_c c4 c5 c6 +7 8 9 9.0000 7 8 9 +7 8 9 9.0000 10 11 12 +execute stmt; +c1 c2 max_c avg_c c4 c5 c6 +7 8 9 9.0000 7 8 9 +7 8 9 9.0000 10 11 12 +prepare stmt from 'explain format=json select * +from +( +select c1, c2, max(c3) as max_c, avg(c3) as avg_c +from t1 +group by c1,c2 +having max_c < 7 +union +select c4, c5, max(c6) as u, avg(c6) as w +from t2 +group by c4, c5 +having u < 10 +) dt, +t2 +where dt.max_c > 6 and t2.c6 > dt.c1'; +execute stmt; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "REPLACED", + "filtered": 100 + } + }, + { + "block-nl-join": { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 2, + "rows": 7, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "dt.max_c > 6" + }, + "buffer_type": "flat", + "buffer_size": "173", + "join_type": "BNL", + "attached_condition": "t2.c6 > dt.c1", + "materialized": { + "query_block": { + "union_result": { + "table_name": "", + "access_type": "ALL", + "query_specifications": [ + { + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "having_condition": "max_c < 7 and max_c > 6", + "filesort": { + "sort_key": "t1.c1, t1.c2", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "REPLACED", + "filtered": 100 + } + } + ] + } + } + } + }, + { + "query_block": { + "select_id": 3, + "operation": "UNION", + "cost": "REPLACED", + "having_condition": "max_c < 10 and max_c > 6", + "filesort": { + "sort_key": "t2.c4, t2.c5", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "REPLACED", + "filtered": 100 + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } +} +execute stmt; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "REPLACED", + "filtered": 100 + } + }, + { + "block-nl-join": { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 2, + "rows": 7, + "cost": "REPLACED", + "filtered": 100, + "attached_condition": "dt.max_c > 6" + }, + "buffer_type": "flat", + "buffer_size": "173", + "join_type": "BNL", + "attached_condition": "t2.c6 > dt.c1", + "materialized": { + "query_block": { + "union_result": { + "table_name": "", + "access_type": "ALL", + "query_specifications": [ + { + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "having_condition": "max_c < 7 and max_c > 6", + "filesort": { + "sort_key": "t1.c1, t1.c2", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 5, + "cost": "REPLACED", + "filtered": 100 + } + } + ] + } + } + } + }, + { + "query_block": { + "select_id": 3, + "operation": "UNION", + "cost": "REPLACED", + "having_condition": "max_c < 10 and max_c > 6", + "filesort": { + "sort_key": "t2.c4, t2.c5", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "REPLACED", + "filtered": 100 + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } +} +drop table t1, t2; +# End of 10.5 tests # # MDEV-28958: condition pushable into view after simplification # contains constant TRUE/FALSE as subformula diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index 0dca9ce70a7..66cb7467081 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -4304,6 +4304,93 @@ DROP TABLE t1,t2; --echo # End of 10.4 tests +--echo # MDEV-34506 2nd execution name resolution problem with pushdown into +--echo # unions +--echo # +--echo # Statements affected by this bug need all the following to be true +--echo # 1) a derived table table or view whose specification contains a set +--echo # operation at the top level. +--echo # 2) a grouping operator (group by/having) operating on a column alias +--echo # other than in the first select of the union/intersect +--echo # 3) an outer condition that will be pushed into all selects in this +--echo # union/intersect, either into the where or having clause +--echo # +--echo # When pushing a condition into all selects of a unit with more than one +--echo # select, pushdown_cond_for_derived() renames items so we can re-use the +--echo # condition being pushed. +--echo # These names need to be saved and reset for correct name resolution on +--echo # second execution of prepared statements. + +create table t1 (c1 int, c2 int, c3 int); +insert into t1 values (1,2,3),(1,2,2),(4,5,6); +insert into t1 values (17,8,9),(11,11,12); +create table t2 (c4 int, c5 int, c6 int); +insert into t2 values (7,8,9),(10,11,12); +let $q=select * from + ( + select c1, sum(c3) as s from t1 group by c1 + union + select c4 as c, sum(c6) as u from t2 group by c + ) dt + where c1 > 6; +eval prepare stmt from '$q'; +execute stmt; +execute stmt; + +eval prepare stmt from 'explain format=json $q'; +--source include/analyze-format.inc +execute stmt; +--source include/analyze-format.inc +execute stmt; + +let $q=select * from + ( + select c1, c2, sum(c3) as s from t1 group by c1, c2 having s > 2 + union + select c4, c5, sum(c6) as u from t2 group by c4, c5 having u > 3 + ) dt + where c2 > 5; + +eval prepare stmt from '$q'; +execute stmt; +execute stmt; + +eval prepare stmt from 'explain format=json $q'; +--source include/analyze-format.inc +execute stmt; +--source include/analyze-format.inc +execute stmt; + +let $q=select * + from + ( + select c1, c2, max(c3) as max_c, avg(c3) as avg_c + from t1 + group by c1,c2 + having max_c < 7 + union + select c4, c5, max(c6) as u, avg(c6) as w + from t2 + group by c4, c5 + having u < 10 + ) dt, + t2 + where dt.max_c > 6 and t2.c6 > dt.c1; + +eval prepare stmt from '$q'; +execute stmt; +execute stmt; + +eval prepare stmt from 'explain format=json $q'; +--source include/analyze-format.inc +execute stmt; +--source include/analyze-format.inc +execute stmt; + +drop table t1, t2; + +--echo # End of 10.5 tests + --echo # --echo # MDEV-28958: condition pushable into view after simplification --echo # contains constant TRUE/FALSE as subformula diff --git a/mysql-test/main/derived_cond_pushdown_innodb.result b/mysql-test/main/derived_cond_pushdown_innodb.result new file mode 100644 index 00000000000..d01ce8cdd20 --- /dev/null +++ b/mysql-test/main/derived_cond_pushdown_innodb.result @@ -0,0 +1,39 @@ +# +# MDEV-33010: Crash when pushing condition with CHARSET()/COERCIBILITY() +# into derived table +# +CREATE TABLE t1 (c1 BIGINT, KEY (c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (c2 DOUBLE UNSIGNED); +INSERT INTO t2 VALUES (1); +SET optimizer_switch='derived_merge=off'; +EXPLAIN EXTENDED +SELECT dt1_c1 FROM +(SELECT c1 AS dt1_c1 FROM t1) AS dt1 +JOIN +(SELECT 1 AS dt2_c2 FROM t2) AS dt2 +ON CHARSET(dt2_c2) BETWEEN dt1_c1 AND dt1_c1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY system NULL NULL NULL NULL 1 100.00 +1 PRIMARY ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED t2 system NULL NULL NULL NULL 1 100.00 +2 DERIVED t1 ref c1 c1 9 const 1 100.00 Using where; Using index +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: 'binary' +Note 1003 /* select#1 */ select `dt1`.`dt1_c1` AS `dt1_c1` from (/* select#2 */ select `test`.`t1`.`c1` AS `dt1_c1` from `test`.`t1` where (charset(1)) between `test`.`t1`.`c1` and `test`.`t1`.`c1`) `dt1` where (charset(1)) between `dt1`.`dt1_c1` and `dt1`.`dt1_c1` +EXPLAIN EXTENDED +SELECT dt1_c1 FROM +(SELECT c1 AS dt1_c1 FROM t1) AS dt1 +JOIN +(SELECT 1 AS dt2_c2 FROM t2) AS dt2 +ON COERCIBILITY(dt2_c2) BETWEEN dt1_c1 AND dt1_c1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY system NULL NULL NULL NULL 1 100.00 +1 PRIMARY ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED t2 system NULL NULL NULL NULL 1 100.00 +2 DERIVED t1 ref c1 c1 9 const 1 100.00 Using where; Using index +Warnings: +Note 1003 /* select#1 */ select `dt1`.`dt1_c1` AS `dt1_c1` from (/* select#2 */ select `test`.`t1`.`c1` AS `dt1_c1` from `test`.`t1` where (coercibility(1)) between `test`.`t1`.`c1` and `test`.`t1`.`c1`) `dt1` where (coercibility(1)) between `dt1`.`dt1_c1` and `dt1`.`dt1_c1` +SET optimizer_switch=DEFAULT; +DROP TABLE t1, t2; +# End of 10.4 tests diff --git a/mysql-test/main/derived_cond_pushdown_innodb.test b/mysql-test/main/derived_cond_pushdown_innodb.test new file mode 100644 index 00000000000..2904e638db3 --- /dev/null +++ b/mysql-test/main/derived_cond_pushdown_innodb.test @@ -0,0 +1,31 @@ +--source include/have_innodb.inc + +--echo # +--echo # MDEV-33010: Crash when pushing condition with CHARSET()/COERCIBILITY() +--echo # into derived table +--echo # +CREATE TABLE t1 (c1 BIGINT, KEY (c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (c2 DOUBLE UNSIGNED); +INSERT INTO t2 VALUES (1); + +SET optimizer_switch='derived_merge=off'; + +EXPLAIN EXTENDED + SELECT dt1_c1 FROM + (SELECT c1 AS dt1_c1 FROM t1) AS dt1 + JOIN + (SELECT 1 AS dt2_c2 FROM t2) AS dt2 + ON CHARSET(dt2_c2) BETWEEN dt1_c1 AND dt1_c1; + +EXPLAIN EXTENDED + SELECT dt1_c1 FROM + (SELECT c1 AS dt1_c1 FROM t1) AS dt1 + JOIN + (SELECT 1 AS dt2_c2 FROM t2) AS dt2 + ON COERCIBILITY(dt2_c2) BETWEEN dt1_c1 AND dt1_c1; + +SET optimizer_switch=DEFAULT; +DROP TABLE t1, t2; + +--echo # End of 10.4 tests diff --git a/mysql-test/main/explain_json.result b/mysql-test/main/explain_json.result index cd55f7ddf65..195528577a3 100644 --- a/mysql-test/main/explain_json.result +++ b/mysql-test/main/explain_json.result @@ -765,22 +765,24 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t1", - "access_type": "ALL", - "loops": 1, - "rows": 10, - "cost": "COST_REPLACED", - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 10, + "cost": "COST_REPLACED", + "filtered": 100 + } } - } - ] + ] + } } } } diff --git a/mysql-test/main/fulltext_order_by.result b/mysql-test/main/fulltext_order_by.result index a350a55c75d..35ae8789c7d 100644 --- a/mysql-test/main/fulltext_order_by.result +++ b/mysql-test/main/fulltext_order_by.result @@ -126,7 +126,7 @@ group by a.text, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -142,7 +142,7 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join diff --git a/mysql-test/main/func_analyse.result b/mysql-test/main/func_analyse.result index 1cb9e3c9ad8..1dfdc828793 100644 --- a/mysql-test/main/func_analyse.result +++ b/mysql-test/main/func_analyse.result @@ -222,3 +222,28 @@ DROP TABLE t1; # # End of 10.4 tests # +# +# Start of 10.5 tests +# +# +# MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number +# +SET sql_mode=''; +CREATE TABLE t1 (c CHAR(10) KEY); +INSERT INTO t1 VALUES (1.755555555); +Warnings: +Warning 1265 Data truncated for column 'c' at row 1 +SELECT * FROM t1 PROCEDURE ANALYSE(); +Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype +test.t1.c 1.75555555 1.75555555 10 10 0 0 10.0000 NULL ENUM('1.75555555') NOT NULL +DROP TABLE t1; +SET sql_mode=DEFAULT; +CREATE TABLE t1 (c BLOB) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1.3),(1.1); +SELECT * FROM t1 PROCEDURE ANALYSE(); +Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype +test.t1.c 1.1 1.3 3 3 0 0 3.0000 NULL ENUM('1.1','1.3') NOT NULL +DROP TABLE t1; +# +# End of 10.5 tests +# diff --git a/mysql-test/main/func_analyse.test b/mysql-test/main/func_analyse.test index 3c8be90d6e2..17b6b49decc 100644 --- a/mysql-test/main/func_analyse.test +++ b/mysql-test/main/func_analyse.test @@ -230,3 +230,28 @@ DROP TABLE t1; --echo # --echo # End of 10.4 tests --echo # + + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number +--echo # + +SET sql_mode=''; +CREATE TABLE t1 (c CHAR(10) KEY); +INSERT INTO t1 VALUES (1.755555555); +SELECT * FROM t1 PROCEDURE ANALYSE(); +DROP TABLE t1; +SET sql_mode=DEFAULT; + +CREATE TABLE t1 (c BLOB) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1.3),(1.1); +SELECT * FROM t1 PROCEDURE ANALYSE(); +DROP TABLE t1; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/mysql-test/main/having_cond_pushdown.result b/mysql-test/main/having_cond_pushdown.result index 0123b900a7a..ba11be710f1 100644 --- a/mysql-test/main/having_cond_pushdown.result +++ b/mysql-test/main/having_cond_pushdown.result @@ -1397,23 +1397,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 4, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.x < 5 and t2.x > 1" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 4, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.x < 5 and t2.x > 1" + } } - } - ] + ] + } } } } @@ -1464,23 +1466,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 4, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.x < 5 and t2.x > 1" + "materialization": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 4, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.x < 5 and t2.x > 1" + } } - } - ] + ] + } } } } @@ -1556,24 +1560,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.y)` < 14", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 4, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.x < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.y)` < 14", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 4, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.x < 5" + } } - } - ] + ] + } } } } @@ -1624,24 +1630,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.y)` < 14", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 4, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.x < 5" + "materialization": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.y)` < 14", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 4, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.x < 5" + } } - } - ] + ] + } } } } @@ -6043,7 +6051,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.011611947, + "cost": "COST_REPLACED", "filesort": { "sort_key": "t1.b, t1.c", "temporary_table": { @@ -6054,7 +6062,7 @@ EXPLAIN "access_type": "ALL", "loops": 1, "rows": 2, - "cost": 0.01034841, + "cost": "COST_REPLACED", "filtered": 100, "attached_condition": "t1.a = (subquery#2) and (t1.b = (subquery#2) or t1.c = (subquery#2))" } @@ -6064,7 +6072,7 @@ EXPLAIN { "query_block": { "select_id": 2, - "cost": 0.01034841, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -6072,7 +6080,7 @@ EXPLAIN "access_type": "ALL", "loops": 1, "rows": 2, - "cost": 0.01034841, + "cost": "COST_REPLACED", "filtered": 100 } } @@ -6094,7 +6102,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.011611947, + "cost": "COST_REPLACED", "filesort": { "sort_key": "t1.b", "temporary_table": { @@ -6105,7 +6113,7 @@ EXPLAIN "access_type": "ALL", "loops": 1, "rows": 2, - "cost": 0.01034841, + "cost": "COST_REPLACED", "filtered": 100, "attached_condition": "t1.a = (subquery#2) and (1 or (subquery#2) > t1.b)" } @@ -6115,7 +6123,7 @@ EXPLAIN { "query_block": { "select_id": 2, - "cost": 0.01034841, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -6123,7 +6131,7 @@ EXPLAIN "access_type": "ALL", "loops": 1, "rows": 2, - "cost": 0.01034841, + "cost": "COST_REPLACED", "filtered": 100 } } @@ -6170,4 +6178,119 @@ SELECT * FROM v1 GROUP BY a HAVING a = (a IS NULL OR a IS NULL); a DROP VIEW v1; +# +# MDEV-32608: Expression with constant subquery causes a crash +# in pushdown from HAVING +# +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (2, 1), (3, 2); +EXPLAIN FORMAT=JSON SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a + b = 3; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "COST_REPLACED", + "having_condition": "t1.a = (subquery#2)", + "filesort": { + "sort_key": "t1.b", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "(subquery#2) + t1.b = 3" + } + } + ], + "subqueries": [ + { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "COST_REPLACED", + "filtered": 100 + } + } + ] + } + } + ] + } + } + } +} +SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a + b = 3; +a b +2 1 +EXPLAIN FORMAT=JSON SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a > b; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "COST_REPLACED", + "having_condition": "t1.a = (subquery#2)", + "filesort": { + "sort_key": "t1.b", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "(subquery#2) > t1.b" + } + } + ], + "subqueries": [ + { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "COST_REPLACED", + "filtered": 100 + } + } + ] + } + } + ] + } + } + } +} +SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a > b; +a b +2 1 +DROP TABLE t1; End of 10.5 tests diff --git a/mysql-test/main/having_cond_pushdown.test b/mysql-test/main/having_cond_pushdown.test index 3171e640a6e..78371a32e70 100644 --- a/mysql-test/main/having_cond_pushdown.test +++ b/mysql-test/main/having_cond_pushdown.test @@ -1660,6 +1660,7 @@ let $q= SELECT a,b,c FROM t1 GROUP BY a,b,c HAVING a = (SELECT MIN(b) AS min_b FROM t1) and (a = b or a = c); +--source include/explain-no-costs.inc eval EXPLAIN FORMAT=JSON $q; eval $q; @@ -1667,6 +1668,7 @@ let $q= SELECT a FROM t1 GROUP BY a,b HAVING a = (SELECT MIN(a) AS min_a FROM t1) AND (a = 3 or a > b); +--source include/explain-no-costs.inc eval EXPLAIN FORMAT=JSON $q; eval $q; @@ -1708,4 +1710,32 @@ SELECT * FROM v1 DROP VIEW v1; +--echo # +--echo # MDEV-32608: Expression with constant subquery causes a crash +--echo # in pushdown from HAVING +--echo # + +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (2, 1), (3, 2); + +let $q= +SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a + b = 3; + +--source include/explain-no-costs.inc +eval EXPLAIN FORMAT=JSON $q; +eval $q; + +let $q= +SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a > b; + +--source include/explain-no-costs.inc +eval EXPLAIN FORMAT=JSON $q; +eval $q; + +DROP TABLE t1; + --echo End of 10.5 tests diff --git a/mysql-test/main/in_subq_cond_pushdown.result b/mysql-test/main/in_subq_cond_pushdown.result index d0431852614..7a4b85503d9 100644 --- a/mysql-test/main/in_subq_cond_pushdown.result +++ b/mysql-test/main/in_subq_cond_pushdown.result @@ -79,24 +79,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.g)` < 25", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.g)` < 25", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -186,24 +188,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.g)` > 55 and t2.f < 4", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.g)` > 55 and t2.f < 4", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -295,24 +299,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -402,24 +408,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "(`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25) and t2.f > 2", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "(`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25) and t2.f > 2", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -511,24 +519,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "t2.f > 1", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "t2.f > 1", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -618,24 +628,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(v1_y)` > 20", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t3", - "access_type": "ALL", - "loops": 1, - "rows": 8, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t3.x > 1 and t3.x <= 3" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(v1_y)` > 20", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t3", + "access_type": "ALL", + "loops": 1, + "rows": 8, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t3.x > 1 and t3.x <= 3" + } } - } - ] + ] + } } } } @@ -742,24 +754,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.g)` > 20", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.g)` > 20", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -851,23 +865,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e < 2" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e < 2" + } } - } - ] + ] + } } } } @@ -959,23 +975,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e > 2 and t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e > 2 and t2.e < 5" + } } - } - ] + ] + } } } } @@ -1069,23 +1087,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e >= 4)" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e >= 4)" + } } - } - ] + ] + } } } } @@ -1175,23 +1195,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3" + } } - } - ] + ] + } } } } @@ -1281,23 +1303,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3" + } } - } - ] + ] + } } } } @@ -1387,23 +1411,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e < 2" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e < 2" + } } - } - ] + ] + } } } } @@ -1493,22 +1519,24 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e = 1" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e = 1" + } } - } - ] + ] + } } } } @@ -1597,23 +1625,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e > 1" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e > 1" + } } - } - ] + ] + } } } } @@ -1701,23 +1731,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t3", - "access_type": "ALL", - "loops": 1, - "rows": 8, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t3.x > 1 and t3.x <= 3 and t3.x < 3" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t3", + "access_type": "ALL", + "loops": 1, + "rows": 8, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t3.x > 1 and t3.x <= 3 and t3.x < 3" + } } - } - ] + ] + } } } } @@ -1826,23 +1858,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e <= 3" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e <= 3" + } } - } - ] + ] + } } } } @@ -1933,24 +1967,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "t2.f < 3 or t2.f = 4", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e < 3" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "t2.f < 3 or t2.f = 4", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e < 3" + } } - } - ] + ] + } } } } @@ -2040,24 +2076,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "t2.e + `MAX(t2.g)` > 41", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "t2.e + `MAX(t2.g)` > 41", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -2149,24 +2187,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.g)` - t2.e < 35", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.g)` - t2.e < 35", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -2256,24 +2296,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.g)` * t2.e > 100", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.g)` * t2.e > 100", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -2367,24 +2409,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.g)` / t2.e > 30", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.g)` / t2.e > 30", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -2474,24 +2518,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "`MAX(t2.g)` between 50 and 100", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "`MAX(t2.g)` between 50 and 100", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } @@ -2581,23 +2627,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e + t2.f > 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e + t2.f > 5" + } } - } - ] + ] + } } } } @@ -2687,23 +2735,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e - t2.f > 0" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e - t2.f > 0" + } } - } - ] + ] + } } } } @@ -2793,23 +2843,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e * t2.f > 6" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e * t2.f > 6" + } } - } - ] + ] + } } } } @@ -2901,23 +2953,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.f / t2.e > 2" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.f / t2.e > 2" + } } - } - ] + ] + } } } } @@ -3013,23 +3067,25 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e between 1 and 3" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e between 1 and 3" + } } - } - ] + ] + } } } } @@ -3123,49 +3179,51 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "v2.max_g > 3", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "v2.e < 5", - "materialized": { - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "max_g > 25", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "v2.max_g > 3", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "v2.e < 5", + "materialized": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "max_g > 25", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5" + } } - } - ] + ] + } } } } } } - } - ] + ] + } } } } @@ -3258,48 +3316,50 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "v2.e < 5 and v2.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "max_g > 25", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e > 1" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "v2.e < 5 and v2.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "max_g > 25", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e > 1" + } } - } - ] + ] + } } } } } } - } - ] + ] + } } } } @@ -3393,49 +3453,51 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "having_condition": "v2.max_g < 100", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "v2.e < 5 and v2.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "max_g > 25", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e > 1" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "v2.max_g < 100", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "v2.e < 5 and v2.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "max_g > 25", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e > 1" + } } - } - ] + ] + } } } } } } - } - ] + ] + } } } } @@ -3552,47 +3614,49 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "d_tab.e < 5 and d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", - "filesort": { - "sort_key": "t2.f", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "d_tab.e < 5 and d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", + "filesort": { + "sort_key": "t2.f", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100 + } } - } - ] + ] + } } } } } } - } - ] + ] + } } } } @@ -3728,47 +3792,49 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "d_tab.e < 5 and d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", - "filesort": { - "sort_key": "t2.f", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "d_tab.e < 5 and d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", + "filesort": { + "sort_key": "t2.f", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100 + } } - } - ] + ] + } } } } } } - } - ] + ] + } } } } @@ -3905,47 +3971,49 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "d_tab.e < 5 and d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", - "filesort": { - "sort_key": "t2.f", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "d_tab.e < 5 and d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", + "filesort": { + "sort_key": "t2.f", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100 + } } - } - ] + ] + } } } } } } - } - ] + ] + } } } } @@ -4098,24 +4166,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "t2.f < 5", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e > 1 and t2.e < 5" + "materialization": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "t2.f < 5", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e > 1 and t2.e < 5" + } } - } - ] + ] + } } } } @@ -4296,24 +4366,26 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "cost": "COST_REPLACED", - "having_condition": "t2.f < 5", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e > 1 and t2.e < 5" + "materialization": { + "query_block": { + "select_id": 3, + "cost": "COST_REPLACED", + "having_condition": "t2.f < 5", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e > 1 and t2.e < 5" + } } - } - ] + ] + } } } } @@ -4413,31 +4485,33 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "window_functions_computation": { - "sorts": [ - { - "filesort": { - "sort_key": "t2.f" - } - } - ], - "temporary_table": { - "nested_loop": [ + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "window_functions_computation": { + "sorts": [ { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.f > 1" + "filesort": { + "sort_key": "t2.f" } } - ] + ], + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.f > 1" + } + } + ] + } } } } @@ -4529,31 +4603,33 @@ EXPLAIN "attached_condition": "t1.c = ``.`CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)`", "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": "COST_REPLACED", - "window_functions_computation": { - "sorts": [ - { - "filesort": { - "sort_key": "t2.f" - } - } - ], - "temporary_table": { - "nested_loop": [ + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "window_functions_computation": { + "sorts": [ { - "table": { - "table_name": "t2", - "access_type": "ALL", - "loops": 1, - "rows": 12, - "cost": "COST_REPLACED", - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.f > 1" + "filesort": { + "sort_key": "t2.f" } } - ] + ], + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 12, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.f > 1" + } + } + ] + } } } } diff --git a/mysql-test/main/item_types.result b/mysql-test/main/item_types.result new file mode 100644 index 00000000000..865b4f612ae --- /dev/null +++ b/mysql-test/main/item_types.result @@ -0,0 +1,16 @@ +# +# MDEV-34634 Types mismatch when cloning items causes debug assertion +# +CREATE TABLE t1 (a DATETIME); +SET optimizer_switch='derived_merge=off'; +SELECT * FROM (SELECT * FROM t1) AS t1 WHERE a=''; +a +Warnings: +Warning 1292 Truncated incorrect datetime value: '' +DROP TABLE t1; +CREATE TABLE t1 (c YEAR); +CREATE TABLE t2 (c INT); +SELECT * FROM t1 JOIN t2 ON t1.c=t2.c WHERE t1.c<=>5; +c c +DROP TABLE t1, t2; +SET optimizer_switch=default; diff --git a/mysql-test/main/item_types.test b/mysql-test/main/item_types.test new file mode 100644 index 00000000000..f43bfe1a8ac --- /dev/null +++ b/mysql-test/main/item_types.test @@ -0,0 +1,15 @@ +--echo # +--echo # MDEV-34634 Types mismatch when cloning items causes debug assertion +--echo # + +CREATE TABLE t1 (a DATETIME); +SET optimizer_switch='derived_merge=off'; +SELECT * FROM (SELECT * FROM t1) AS t1 WHERE a=''; +DROP TABLE t1; + +CREATE TABLE t1 (c YEAR); +CREATE TABLE t2 (c INT); +SELECT * FROM t1 JOIN t2 ON t1.c=t2.c WHERE t1.c<=>5; +DROP TABLE t1, t2; + +SET optimizer_switch=default; diff --git a/mysql-test/main/join_cache.result b/mysql-test/main/join_cache.result index 3761da5d731..b96b387b9cf 100644 --- a/mysql-test/main/join_cache.result +++ b/mysql-test/main/join_cache.result @@ -6488,3 +6488,23 @@ DROP TABLE t1,t2,t3; # # End of 10.4 tests # +# +# MDEV-34580: Assertion `(key_part->key_part_flag & 4) == 0' failed key_hashnr +# +SET join_cache_level=3; +CREATE TABLE t1 ( a TIMESTAMP , b varchar(100), c varchar(10) ) ; +INSERT INTO t1 (b,c) VALUES ('GHOBS','EMLCG'),('t','p'); +CREATE TABLE t2 (a varchar(100), b varchar(100), c varchar(10) , KEY b (b(66))) ; +insert into t2 select seq, seq, seq from seq_1_to_20; +explain +SELECT t1.a FROM t1 JOIN t2 ON t1.b = t2.b ; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t2 hash_ALL b #hash#b 69 test.t1.b 20 Using where; Using join buffer (flat, BNLH join) +SELECT t1.a FROM t1 JOIN t2 ON t1.b = t2.b ; +a +set join_cache_level=default; +DROP TABLE t1, t2; +# +# End of 10.5 tests +# diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test index dc6f3dd89a3..401d0736aaf 100644 --- a/mysql-test/main/join_cache.test +++ b/mysql-test/main/join_cache.test @@ -4358,3 +4358,25 @@ DROP TABLE t1,t2,t3; --echo # --echo # End of 10.4 tests --echo # + +--echo # +--echo # MDEV-34580: Assertion `(key_part->key_part_flag & 4) == 0' failed key_hashnr +--echo # +--source include/have_sequence.inc +SET join_cache_level=3; + +CREATE TABLE t1 ( a TIMESTAMP , b varchar(100), c varchar(10) ) ; +INSERT INTO t1 (b,c) VALUES ('GHOBS','EMLCG'),('t','p'); + +CREATE TABLE t2 (a varchar(100), b varchar(100), c varchar(10) , KEY b (b(66))) ; +insert into t2 select seq, seq, seq from seq_1_to_20; + +explain +SELECT t1.a FROM t1 JOIN t2 ON t1.b = t2.b ; +SELECT t1.a FROM t1 JOIN t2 ON t1.b = t2.b ; + +set join_cache_level=default; +DROP TABLE t1, t2; +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/mysql-test/main/json_debug_nonembedded.result b/mysql-test/main/json_debug_nonembedded_noasan.result similarity index 100% rename from mysql-test/main/json_debug_nonembedded.result rename to mysql-test/main/json_debug_nonembedded_noasan.result diff --git a/mysql-test/main/json_debug_nonembedded.test b/mysql-test/main/json_debug_nonembedded_noasan.test similarity index 97% rename from mysql-test/main/json_debug_nonembedded.test rename to mysql-test/main/json_debug_nonembedded_noasan.test index fb4fe67b5d3..68fb37bf006 100644 --- a/mysql-test/main/json_debug_nonembedded.test +++ b/mysql-test/main/json_debug_nonembedded_noasan.test @@ -1,5 +1,6 @@ -- source include/not_embedded.inc --source include/have_debug.inc +--source include/not_asan.inc --echo # --echo # MDEV-28762: recursive call of some json functions without stack control diff --git a/mysql-test/main/lock_view.result b/mysql-test/main/lock_view.result index e4c666bff52..07548b1d725 100644 --- a/mysql-test/main/lock_view.result +++ b/mysql-test/main/lock_view.result @@ -16,7 +16,7 @@ create definer=definer@localhost view mysqltest3.v3is as select schema_name from create definer=definer@localhost view mysqltest3.v3ps as select user from performance_schema.users where current_connections>0 order by user; create definer=definer@localhost view mysqltest3.v3nt as select 1; create definer=definer@localhost sql security invoker view mysqltest3.v3i as select * from mysqltest1.t1; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */; @@ -235,7 +235,7 @@ create view v1 as select * from (select * from t1) dt; lock table v1 read; disconnect con1; connection default; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE VIEW `v1` AS SELECT diff --git a/mysql-test/main/log_slow.result b/mysql-test/main/log_slow.result index b236288b0bf..2ec8c91e863 100644 --- a/mysql-test/main/log_slow.result +++ b/mysql-test/main/log_slow.result @@ -186,6 +186,30 @@ SET @@global.slow_query_log= @old_slow_query_log; SET SESSION slow_query_log=default; drop table tab_MDEV_30820, tab2; drop function get_zero; -# # End of 10.4 tests # +# MDEV-34539 Invalid "use" and "Schema" in slow query log file with multi-line schema +# +set global log_output='file'; +set @@log_slow_filter= 'not_using_index'; +set slow_query_log=1; +set timestamp=1234567890; +create database `a +b`; +use `a +b`; +select count(*) from mysql.global_priv where length(priv)>2; +count(*) +5 +drop database `a +b`; +use test; +set global log_output= @old_log_output; +set slow_query_log=default; +set log_slow_filter=default; +set timestamp=default; +use `a +b`; +SET timestamp=1234567890; +select count(*) from mysql.global_priv where length(priv)>2 +# End of 10.5 tests diff --git a/mysql-test/main/log_slow.test b/mysql-test/main/log_slow.test index 39467e7e800..085f15f752a 100644 --- a/mysql-test/main/log_slow.test +++ b/mysql-test/main/log_slow.test @@ -187,6 +187,35 @@ drop function get_zero; --enable_ps2_protocol --enable_view_protocol ---echo # --echo # End of 10.4 tests + --echo # +--echo # MDEV-34539 Invalid "use" and "Schema" in slow query log file with multi-line schema +--echo # +set global log_output='file'; +set @@log_slow_filter= 'not_using_index'; +set slow_query_log=1; +set timestamp=1234567890; +create database `a +b`; +use `a +b`; +--disable_ps_protocol +--disable_view_protocol +select count(*) from mysql.global_priv where length(priv)>2; +--enable_view_protocol +--enable_ps_protocol +drop database `a +b`; +use test; +set global log_output= @old_log_output; +set slow_query_log=default; +set log_slow_filter=default; +set timestamp=default; + +let SEARCH_FILE=`select @@slow_query_log_file`; +let SEARCH_PATTERN=use.*2; +let SEARCH_OUTPUT=matches; +source include/search_pattern_in_file.inc; + +--echo # End of 10.5 tests diff --git a/mysql-test/main/mysql.result b/mysql-test/main/mysql.result index 5f25b3bb527..83b8c78699d 100644 --- a/mysql-test/main/mysql.result +++ b/mysql-test/main/mysql.result @@ -560,7 +560,7 @@ Table Create Table a1\`b1 CREATE TABLE `a1\``b1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `a1\``b1` ( @@ -592,7 +592,7 @@ Table Create Table a1\"b1 CREATE TABLE "a1\""b1" ( "a" int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "a1\""b1" ( diff --git a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result index 86ff8179b44..3777d86697e 100644 --- a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result +++ b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result @@ -8,7 +8,7 @@ CREATE TABLE time_zone_leap_second LIKE mysql.time_zone_leap_second; # # Verbose run set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); @@ -60,7 +60,7 @@ SET session alter_algorithm=@old_alter_alg; # # Run on zoneinfo directory set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); @@ -123,7 +123,7 @@ COUNT(*) # Run on zoneinfo directory --skip-write-binlog # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -198,7 +198,7 @@ TRUNCATE TABLE time_zone_leap_second; # Testing with explicit timezonefile # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); @@ -262,7 +262,7 @@ TRUNCATE TABLE time_zone_leap_second; # Testing with explicit timezonefile --skip-write-binlog # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -320,7 +320,7 @@ TRUNCATE TABLE time_zone_leap_second; # Testing --leap # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); @@ -383,7 +383,7 @@ TRUNCATE TABLE time_zone_leap_second; # Testing --skip-write-binlog --leap # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -435,7 +435,7 @@ COM_TRUNCATE 1 # Testing --skip-write-binlog # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -457,7 +457,7 @@ COMMIT; SET SESSION SQL_LOG_BIN=@save_sql_log_bin; execute immediate if(@wsrep_is_on, 'SET SESSION WSREP_ON=@save_wsrep_on', 'do 0'); set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -504,7 +504,7 @@ set sql_mode=default; # MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); diff --git a/mysql-test/main/mysqlbinlog_row_compressed.result b/mysql-test/main/mysqlbinlog_row_compressed.result index 410af54441c..2dcb91e8050 100644 --- a/mysql-test/main/mysqlbinlog_row_compressed.result +++ b/mysql-test/main/mysqlbinlog_row_compressed.result @@ -26,10 +26,10 @@ ROLLBACK/*!*/; # server id 1 end_log_pos CRC32 XXX Binlog checkpoint master-bin.000001 # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # server id 1 end_log_pos CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid= use `test`/*!*/; @@ -46,7 +46,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # server id 1 end_log_pos CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid= SET TIMESTAMP=X/*!*/; @@ -54,7 +54,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at @@ -83,7 +83,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at @@ -112,7 +112,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at @@ -141,7 +141,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at @@ -170,7 +170,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at @@ -232,7 +232,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at @@ -313,7 +313,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at @@ -375,7 +375,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at diff --git a/mysql-test/main/mysqlbinlog_row_minimal.result b/mysql-test/main/mysqlbinlog_row_minimal.result index f87954335a4..eda2f8143d8 100644 --- a/mysql-test/main/mysqlbinlog_row_minimal.result +++ b/mysql-test/main/mysqlbinlog_row_minimal.result @@ -22,10 +22,10 @@ ROLLBACK/*!*/; # server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001 # at 329 # server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at 371 # server id 1 end_log_pos 564 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid= use `test`/*!*/; @@ -42,7 +42,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f /*!*/; # at 564 # server id 1 end_log_pos 606 CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at 606 # server id 1 end_log_pos 792 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid= SET TIMESTAMP=X/*!*/; @@ -50,7 +50,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN /*!*/; # at 792 # server id 1 end_log_pos 834 CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at 834 @@ -79,7 +79,7 @@ COMMIT /*!*/; # at 1106 # server id 1 end_log_pos 1148 CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at 1148 @@ -108,7 +108,7 @@ COMMIT /*!*/; # at 1421 # server id 1 end_log_pos 1463 CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at 1463 @@ -137,7 +137,7 @@ COMMIT /*!*/; # at 1737 # server id 1 end_log_pos 1779 CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at 1779 @@ -166,7 +166,7 @@ COMMIT /*!*/; # at 2053 # server id 1 end_log_pos 2095 CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at 2095 @@ -228,7 +228,7 @@ COMMIT /*!*/; # at 2445 # server id 1 end_log_pos 2487 CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at 2487 @@ -261,7 +261,7 @@ COMMIT /*!*/; # at 2748 # server id 1 end_log_pos 2790 CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at 2790 @@ -291,7 +291,7 @@ COMMIT /*!*/; # at 3010 # server id 1 end_log_pos 3052 CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at 3052 @@ -371,10 +371,10 @@ FLUSH BINARY LOGS; DELIMITER /*!*/; # at POS # server id 1 end_log_pos END_LOG_POS CRC32 XXX GTID D-S-N -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=21*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=21*//*!*/; START TRANSACTION /*!*/; # at POS diff --git a/mysql-test/main/mysqlbinlog_stmt_compressed.result b/mysql-test/main/mysqlbinlog_stmt_compressed.result index 471cb4b72c6..38885c8b656 100644 --- a/mysql-test/main/mysqlbinlog_stmt_compressed.result +++ b/mysql-test/main/mysqlbinlog_stmt_compressed.result @@ -24,10 +24,10 @@ ROLLBACK/*!*/; # server id 1 end_log_pos CRC32 XXX Binlog checkpoint master-bin.000001 # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # server id 1 end_log_pos CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid= use `test`/*!*/; @@ -44,7 +44,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # server id 1 end_log_pos CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid= SET TIMESTAMP=X/*!*/; @@ -52,7 +52,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at @@ -67,7 +67,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at @@ -82,7 +82,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at @@ -97,7 +97,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at @@ -112,7 +112,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at @@ -127,7 +127,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at @@ -142,7 +142,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at @@ -157,7 +157,7 @@ COMMIT /*!*/; # at # server id 1 end_log_pos CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at diff --git a/mysql-test/main/mysqldump-compat-102.result b/mysql-test/main/mysqldump-compat-102.result index d5ed54570e2..d3cc35d3c19 100644 --- a/mysql-test/main/mysqldump-compat-102.result +++ b/mysql-test/main/mysqldump-compat-102.result @@ -58,7 +58,7 @@ BEGIN log(0, 'Session ' || connection_id() || ' ' || current_user || ' started'); END; $$ -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- MariaDB dump DUMPVERSION Distrib DISTVERSION, for OS -- -- Host: localhost Database: db1_mdev17429 diff --git a/mysql-test/main/mysqldump-max.result b/mysql-test/main/mysqldump-max.result index e76193ac5bb..256d6299a9f 100644 --- a/mysql-test/main/mysqldump-max.result +++ b/mysql-test/main/mysqldump-max.result @@ -77,7 +77,7 @@ id name 3 first value 4 first value 5 first value -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -205,7 +205,7 @@ INSERT IGNORE INTO `t6` VALUES /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-nl.result b/mysql-test/main/mysqldump-nl.result index 1e9928308fc..56e9c56bae2 100644 --- a/mysql-test/main/mysqldump-nl.result +++ b/mysql-test/main/mysqldump-nl.result @@ -12,7 +12,7 @@ create procedure sp() select * from `v1 1v`; flush tables; use test; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- -- Current Database: `mysqltest1 @@ -135,7 +135,7 @@ test\` \! ls # test` -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- -- Current Database: `test``` diff --git a/mysql-test/main/mysqldump-no-binlog.result b/mysql-test/main/mysqldump-no-binlog.result index 669675ff21b..995f576e0db 100644 --- a/mysql-test/main/mysqldump-no-binlog.result +++ b/mysql-test/main/mysqldump-no-binlog.result @@ -1,2 +1,2 @@ mariadb-dump: Error: Binlogging on server not active -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ diff --git a/mysql-test/main/mysqldump-order-by-size.result b/mysql-test/main/mysqldump-order-by-size.result index 3bd953b828d..8585fcecda1 100644 --- a/mysql-test/main/mysqldump-order-by-size.result +++ b/mysql-test/main/mysqldump-order-by-size.result @@ -21,7 +21,7 @@ test.t3 analyze status OK test.t4 analyze status Engine-independent statistics collected test.t4 analyze Warning Engine-independent statistics are not collected for column 'a' test.t4 analyze status OK -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t4` ( diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result index 240a8499af1..d8a1283391a 100644 --- a/mysql-test/main/mysqldump-system.result +++ b/mysql-test/main/mysqldump-system.result @@ -41,7 +41,7 @@ CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB"; # # mysqldump of system tables with --system=all # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -633,7 +633,7 @@ UNLOCK TABLES; # # mysqldump of system tables with --system=all --replace # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1248,7 +1248,7 @@ UNLOCK TABLES; # # mysqldump of system tables with --system=all --insert-ignore # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-timing.result b/mysql-test/main/mysqldump-timing.result index 5e2851b8f1c..390cd1a53f6 100644 --- a/mysql-test/main/mysqldump-timing.result +++ b/mysql-test/main/mysqldump-timing.result @@ -7,7 +7,7 @@ CREATE TABLE t1 (i INT); INSERT INTO t1 VALUES (0); LOCK TABLE t1 WRITE; timeout without t1 contents expected -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -31,7 +31,7 @@ SET @save_max_statement_time=@@max_statement_time; SET GLOBAL max_statement_time=0.1; UNLOCK TABLES;; This would be a race condition otherwise, but default max_statement_time=0 makes it succeed -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-utf8mb4.result b/mysql-test/main/mysqldump-utf8mb4.result index 7c5aea5fed8..6b48137854f 100644 --- a/mysql-test/main/mysqldump-utf8mb4.result +++ b/mysql-test/main/mysqldump-utf8mb4.result @@ -32,7 +32,7 @@ Testing XML format output ---- Testing text format output ---- -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index acf03e85227..0d5c6d20a71 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -31,7 +31,7 @@ DROP TABLE t1; CREATE TABLE t1 (a decimal(64, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), ("0987654321098765432109876543210987654321"); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -49,7 +49,7 @@ CREATE TABLE t1 (a double); INSERT IGNORE INTO t1 VALUES ('-9e999999'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -72,7 +72,7 @@ INSERT INTO t1 VALUES ('1.2345', 2.3456); INSERT INTO t1 VALUES ("1.2345", 2.3456); ERROR 42S22: Unknown column '1.2345' in 'field list' SET SQL_MODE=@OLD_SQL_MODE; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -86,7 +86,7 @@ INSERT INTO `t1` VALUES (1.23450,2.3456), (1.23450,2.3456), (1.23450,2.3456); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -100,7 +100,7 @@ INSERT INTO `t1` VALUES (1.23450,2.3456), (1.23450,2.3456), (1.23450,2.3456); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -141,7 +141,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -223,7 +223,7 @@ DROP TABLE t1; # CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r; INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -265,7 +265,7 @@ DROP TABLE t1; # CREATE TABLE t1 (a int) ENGINE=MYISAM; INSERT INTO t1 VALUES (1), (2); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -291,7 +291,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -322,7 +322,7 @@ DROP TABLE t1; # Bug#2592 mysqldump doesn't quote "tricky" names correctly # create table ```a` (i int); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE ```a` ( @@ -334,7 +334,7 @@ drop table ```a`; # Bug#2591 mysqldump quotes names inconsistently # create table t1(a int); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -368,7 +368,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -395,7 +395,7 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; set global sql_mode='ANSI_QUOTES'; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -429,7 +429,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -462,7 +462,7 @@ drop table t1; # create table t1(a int); insert into t1 values (1),(2),(3); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -495,7 +495,7 @@ drop table t1; # # Bug#6101 create database problem # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -522,7 +522,7 @@ USE `test`; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; create database mysqldump_test_db character set latin2 collate latin2_bin; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -557,7 +557,7 @@ drop database mysqldump_test_db; # if it is explicitly set. CREATE TABLE t1 (a CHAR(10)); INSERT INTO t1 VALUES (_latin1 'ÄÖÜß'); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -600,7 +600,7 @@ UNLOCK TABLES; # If the future we can move this command into a separate test with # checking that "mysqldump" is compiled with "latin1" # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -625,7 +625,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -650,7 +650,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -683,7 +683,7 @@ CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t2 VALUES (4),(5),(6); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -728,7 +728,7 @@ DROP TABLE t2; # CREATE TABLE t1 (`b` blob); INSERT INTO `t1` VALUES (0x602010000280100005E71A); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -770,7 +770,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (4),(5),(6); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -811,7 +811,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1187,7 +1187,7 @@ F_cd00692c3bfe59267d5ecfac5310286c int, F_6faa8040da20ef399b63a72d0e4ab575 int, F_fe73f687e5bc5280214e0486b273a5f9 int); insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1557,7 +1557,7 @@ drop table t1; # CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (1),(2),(3); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1611,7 +1611,7 @@ CREATE TABLE t1 ( a INT ); CREATE TABLE t2 ( a INT ); INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (1), (2); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1647,7 +1647,7 @@ CREATE TABLE `t2` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1720,35 +1720,35 @@ create table t3(a varchar(30) primary key, b int not null); test_sequence ------ Testing with illegal table names ------ mariadb-dump: Couldn't find table: "\d-2-1.sql" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\t1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\t1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\\t1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t\1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t\1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t/1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T%1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T'1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ test_sequence ------ Testing with illegal database names ------ mariadb-dump: Got error: 1049: "Unknown database 'mysqldump_test_d'" when selecting the database -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Got error: 1049: "Unknown database 'mysqld\ump_test_db'" when selecting the database -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ drop table t1, t2, t3; drop database mysqldump_test_db; use test; @@ -1810,7 +1810,7 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1849,7 +1849,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1975,7 +1975,7 @@ create table t1(a int); create table t2(a int); create table t3(a int); mariadb-dump: Couldn't find table: "non_existing" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2025,7 +2025,7 @@ drop table t1, t2, t3; create table t1 (a int); mariadb-dump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ `a` FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064) mariadb-dump: Got error: 1064: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1" when retrieving data from server -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2067,7 +2067,7 @@ CREATE TABLE `t1` ( PRIMARY KEY (`a b`, `c"d`, `e``f`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; insert into t1 values (0815, 4711, 2006); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2098,7 +2098,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2154,7 +2154,7 @@ INSERT INTO t2 VALUES ('bingo'); INSERT INTO t2 VALUES ('waffle'); INSERT INTO t2 VALUES ('lemon'); create view v2 as select * from t2 where a like 'a%' with check option; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2254,7 +2254,7 @@ drop database db1; use test; create table t1(a int); create view v1 as select * from t1; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2325,7 +2325,7 @@ INSERT INTO t2 VALUES ('bingo'); INSERT INTO t2 VALUES ('waffle'); INSERT INTO t2 VALUES ('lemon'); create view v2 as select * from t2 where a like 'a%' with check option; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2396,7 +2396,7 @@ use test; # CREATE TABLE t1 (a char(10)); INSERT INTO t1 VALUES ('\''); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2444,7 +2444,7 @@ create view v1 as select * from v3 where b in (1, 2, 3, 4, 5, 6, 7); create view v2 as select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2597,7 +2597,7 @@ end if; end AFTER 0000-00-00 00:00:00 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci INSERT INTO t1 (a) VALUES (1),(2),(3),(22); update t1 set a = 4 where a=3; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2731,7 +2731,7 @@ DELIMITER ; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2881,7 +2881,7 @@ END // set sql_mode='ansi'; create procedure `a'b` () select 1; set sql_mode=''; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3038,7 +3038,7 @@ d 2003-10-26 02:00:00 2003-10-26 02:00:00 set global time_zone='Europe/Moscow'; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3080,7 +3080,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3143,7 +3143,7 @@ a2 1 2 3 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -3224,7 +3224,7 @@ a b c 1 first value xxxx 2 second value tttt 3 third value vvv vvv -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3353,7 +3353,7 @@ BEGIN SET new.a = 0; END| SET SQL_MODE = @old_sql_mode; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3417,7 +3417,7 @@ DROP TABLE t1; # create table t1 (a binary(1), b blob); insert into t1 values ('',''); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3453,7 +3453,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3554,7 +3554,7 @@ insert into t values(5, 51); create view v1 as select qty, price, qty*price as value from t; create view v2 as select qty from v1; mysqldump { -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!50001 DROP VIEW IF EXISTS `v1`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; @@ -3570,7 +3570,7 @@ mysqldump { /*!50001 SET collation_connection = @saved_col_connection */; } mysqldump { -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!50001 DROP VIEW IF EXISTS `v2`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; @@ -3616,7 +3616,7 @@ drop table t1; mysqldump { mariadb-dump: Got error: 1356: "View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES mariadb-dump: Couldn't execute 'SHOW FIELDS FROM `v1`': View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356) -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- failed on view `v1`: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`id` AS `id` from `t1` @@ -3633,7 +3633,7 @@ insert into t1 values (1232131); insert into t1 values (4711); insert into t1 values (3231); insert into t1 values (0815); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3712,7 +3712,7 @@ create table basetable ( id serial, tag varchar(64) ); create database mysqldump_views; use mysqldump_views; create view nasishnasifu as select mysqldump_tables.basetable.id from mysqldump_tables.basetable; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_tables` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */; @@ -3798,14 +3798,14 @@ grant all on test.* to mysqltest_1@localhost; create table t1(a int, b varchar(34)); reset master; mariadb-dump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227) -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227) -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ grant RELOAD on *.* to mysqltest_1@localhost; mariadb-dump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the BINLOG MONITOR privilege(s) for this operation (1227) -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the BINLOG MONITOR privilege(s) for this operation (1227) -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; drop table t1; drop user mysqltest_1@localhost; @@ -3864,7 +3864,7 @@ use test; # # Bug #33762: mysqldump can not dump INFORMATION_SCHEMA # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ DROP TABLE IF EXISTS `TABLES`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -3929,7 +3929,7 @@ DROP TABLE t1; CREATE TABLE t2 (a INT) ENGINE=MyISAM; CREATE TABLE t3 (a INT) ENGINE=MyISAM; CREATE TABLE t1 (a INT) ENGINE=merge UNION=(t2, t3); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -4020,12 +4020,12 @@ connect user27293,localhost,user1,,mysqldump_test_db,$MASTER_MYPORT,$MASTER_MYS connection user27293; create procedure mysqldump_test_db.sp1() select 'hello'; mariadb-dump: user2 has insufficient privileges to SHOW CREATE PROCEDURE `sp1`! -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- insufficient privileges to SHOW CREATE PROCEDURE `sp1` -- does user2 have permissions on mysql.proc? -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ; @@ -4053,7 +4053,7 @@ drop database mysqldump_test_db; # CREATE TABLE t1 (c1 INT, c2 LONGBLOB); INSERT INTO t1 SET c1=11, c2=REPEAT('q',509); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -4101,18 +4101,21 @@ DROP TABLE t1,t2; # "Dump completed on" # # --skip-dump-date: +/*M!999999\- enable the sandbox mode */ -- -- Dump completed # --dump-date: +/*M!999999\- enable the sandbox mode */ -- -- Dump completed on DATE # --dump-date (default): +/*M!999999\- enable the sandbox mode */ -- @@ -4127,7 +4130,7 @@ use db42635; create table t1 (id int); create view db42635.v1 (c) as select * from db42635.t1; create view db42635.v2 (c) as select * from db42635.t1; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -4188,7 +4191,7 @@ drop database db42635; # SET NAMES utf8; CREATE TABLE `straße` ( f1 INT ); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -4211,7 +4214,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -4236,7 +4239,7 @@ UNLOCK TABLES; DROP TABLE `straße`; CREATE TABLE `כדשגכחךלדגכחשךדגחכךלדגכ` ( f1 INT ); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -4260,7 +4263,7 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; mariadb-dump: Got error: 1146: "Table 'test.???????????????????????' doesn't exist" when using LOCK TABLES -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -4277,7 +4280,7 @@ CREATE TABLE t1(a int, b int); INSERT INTO t1 VALUES (1,1); INSERT INTO t1 VALUES (2,3); INSERT INTO t1 VALUES (3,4), (4,5); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -4552,7 +4555,7 @@ insert into t1 values (1232131); insert into t1 values (4711); insert into t1 values (3231); insert into t1 values (0815); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -4685,7 +4688,7 @@ CREATE DATABASE test; create database `test-database`; use `test-database`; create table test (a int); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ DROP TABLE IF EXISTS `test`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -4908,7 +4911,7 @@ CREATE TRIGGER `trig` BEFORE INSERT ON `test` FOR EACH ROW BEGIN END | ALTER DATABASE `test-database` CHARACTER SET latin1 COLLATE latin1_swedish_ci; ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `test` ( @@ -5392,7 +5395,7 @@ USE test; # Also verify that a prefix of the mode's name is enough. # CREATE TABLE t1 (a INT); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -5629,7 +5632,7 @@ CREATE DATABASE `a\"'``b`; USE `a\"'``b`; CREATE PROCEDURE p1() BEGIN END; ALTER DATABASE `a\"'``b` COLLATE utf8_general_ci; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = '' */ ; ALTER DATABASE `a\"'``b` CHARACTER SET latin1 COLLATE latin1_swedish_ci ; @@ -5678,7 +5681,7 @@ CREATE VIEW nonunique_table_view_name AS SELECT 1; ################################################## # --compact --databases db1 db2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db1` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci */; @@ -5747,7 +5750,7 @@ USE `db2`; ################################################## # --compact db2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `nonunique_table_name` ( @@ -5770,7 +5773,7 @@ INSERT INTO `nonunique_table_view_name` VALUES ################################################## # --compact --delayed-insert --no-data-med=0 --databases db2 db1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db2` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci */; @@ -5905,7 +5908,7 @@ CREATE TABLE t1 (a int, b int); CREATE TRIGGER tt1_t1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.b=NEW.a + 10; INSERT INTO t1 (a) VALUES (1),(2),(3); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -5954,7 +5957,7 @@ DROP TABLE t1; # # Without --replace and --insert-ignore # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -6050,7 +6053,7 @@ CREATE TABLE IF NOT EXISTS `transaction_registry` ( # # With --replace # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -6156,7 +6159,7 @@ CREATE TABLE IF NOT EXISTS `transaction_registry` ( # # With --insert-ignore # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -6281,7 +6284,7 @@ insert into t3 values(2); insert into t3(`invisible`, `a b c & $!@#$%^&*( )`, `ds=~!@ \# $% ^ & * ( ) _ - = +` ) values(1,2,3); CREATE TABLE t4(ËÃÃŒÃÎËÃ1 INT); insert into t4 values(1); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -6322,7 +6325,7 @@ CREATE TABLE `t4` ( INSERT INTO `t4` VALUES (1); #Check side effect on --complete insert -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -6683,7 +6686,7 @@ Warnings: Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. update mysql.event set body ='select not_a_value' where db='test' and name='e1'; create table t1 (i int); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -6736,7 +6739,7 @@ drop table t1; # MDEV-33727 mariadb-dump trusts the server and does not validate the data # create table t1 (a int); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ DROP TABLE IF EXISTS `t1`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; diff --git a/mysql-test/main/name_const_replacement.result b/mysql-test/main/name_const_replacement.result new file mode 100644 index 00000000000..e48b6d293bc --- /dev/null +++ b/mysql-test/main/name_const_replacement.result @@ -0,0 +1,105 @@ +create table t1 (a int, b int); +insert into t1 values (1,1),(2,2); +explain format=json +select * from t1 where a=name_const('varname',1); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "COST_REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "t1.a = 1" + } + } + ] + } +} +explain format=json +select * from t1 left join t1 as t2 on t1.a=name_const('varname',1) and t1.b=t2.b; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "COST_REPLACED", + "const_condition": "1", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "COST_REPLACED", + "filtered": 100 + } + }, + { + "block-nl-join": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 2, + "rows": 2, + "cost": "COST_REPLACED", + "filtered": 100 + }, + "buffer_type": "flat", + "buffer_size": "141", + "join_type": "BNL", + "attached_condition": "trigcond(t2.b = t1.b and trigcond(t1.a = 1))" + } + } + ] + } +} +create table t2 ( +a varchar(100) collate utf8_unicode_ci, +b int +); +insert into t2 values ('foo', 1),('bar', 1); +create procedure p1(var1 varchar(10)) +update t2 set b=b+1 where a=var1; +call p1('foo'); +call p1('foo'); +call p1('foo'); +select * from t2; +a b +foo 4 +bar 1 +create table t3 ( +a varchar(100) collate utf8_unicode_ci, +b int +); +insert into t3 values ('foo', 1),('bar', 1); +select * from t3; +a b +foo 1 +bar 1 +explain format=json +update t3 set b=b+1 where a= NAME_CONST('var1',_latin1'foo' COLLATE 'latin1_swedish_ci'); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "update": 1, + "table_name": "t3", + "access_type": "ALL", + "rows": 2, + "attached_condition": "t3.a = convert(_latin1'foo' collate latin1_swedish_ci using utf8mb3)" + } + } +} +select * from t3 where a= NAME_CONST('var1',_latin1'foo' COLLATE 'latin1_swedish_ci'); +a b +foo 1 +drop procedure p1; +drop table t1, t2, t3; diff --git a/mysql-test/main/name_const_replacement.test b/mysql-test/main/name_const_replacement.test new file mode 100644 index 00000000000..b8fa568be97 --- /dev/null +++ b/mysql-test/main/name_const_replacement.test @@ -0,0 +1,46 @@ +# +# MDEV-33971 Using NAME_CONST() changes the plan +# + +create table t1 (a int, b int); +insert into t1 values (1,1),(2,2); + +--source include/explain-no-costs.inc +explain format=json +select * from t1 where a=name_const('varname',1); +--source include/explain-no-costs.inc +explain format=json +select * from t1 left join t1 as t2 on t1.a=name_const('varname',1) and t1.b=t2.b; + + +create table t2 ( + a varchar(100) collate utf8_unicode_ci, + b int +); +insert into t2 values ('foo', 1),('bar', 1); +create procedure p1(var1 varchar(10)) + update t2 set b=b+1 where a=var1; +call p1('foo'); +call p1('foo'); +call p1('foo'); +select * from t2; + + +create table t3 ( + a varchar(100) collate utf8_unicode_ci, + b int +); +insert into t3 values ('foo', 1),('bar', 1); +select * from t3; +--source include/explain-no-costs.inc +explain format=json +update t3 set b=b+1 where a= NAME_CONST('var1',_latin1'foo' COLLATE 'latin1_swedish_ci'); +# +# enable after fixing MDEV-27904 +# +--disable_view_protocol +select * from t3 where a= NAME_CONST('var1',_latin1'foo' COLLATE 'latin1_swedish_ci'); +--enable_view_protocol + +drop procedure p1; +drop table t1, t2, t3; diff --git a/mysql-test/main/olap.result b/mysql-test/main/olap.result index b837aeaf1db..22186ee085c 100644 --- a/mysql-test/main/olap.result +++ b/mysql-test/main/olap.result @@ -787,18 +787,12 @@ DROP TABLE t1; # # MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP # -# Note, different MariaDB versions can return different results -# in the two rows (such as "latin1" vs "binary"). This is wrong. -# Both lines should return equal values. -# The point in this test is to make sure it does not crash. -# As this is a minor issue, bad result will be fixed -# in a later version, presumably in 10.4. CREATE TABLE t (d DATE) ENGINE=MyISAM; INSERT INTO t VALUES ('2018-12-12'); SELECT CHARSET(d) AS f FROM t GROUP BY d WITH ROLLUP; f binary -latin1 +binary DROP TABLE t; # # MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP diff --git a/mysql-test/main/olap.test b/mysql-test/main/olap.test index 9e4f15d50da..3b4852ebbdc 100644 --- a/mysql-test/main/olap.test +++ b/mysql-test/main/olap.test @@ -436,13 +436,6 @@ DROP TABLE t1; --echo # MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP --echo # ---echo # Note, different MariaDB versions can return different results ---echo # in the two rows (such as "latin1" vs "binary"). This is wrong. ---echo # Both lines should return equal values. ---echo # The point in this test is to make sure it does not crash. ---echo # As this is a minor issue, bad result will be fixed ---echo # in a later version, presumably in 10.4. - CREATE TABLE t (d DATE) ENGINE=MyISAM; INSERT INTO t VALUES ('2018-12-12'); SELECT CHARSET(d) AS f FROM t GROUP BY d WITH ROLLUP; diff --git a/mysql-test/main/openssl_1.result b/mysql-test/main/openssl_1.result index b022ce232ba..17d6fe5202b 100644 --- a/mysql-test/main/openssl_1.result +++ b/mysql-test/main/openssl_1.result @@ -77,7 +77,7 @@ DROP TABLE thread_status; SET GLOBAL event_scheduler=0; CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -114,7 +114,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -151,7 +151,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/partition_key_cache.result b/mysql-test/main/partition_key_cache.result index fae7639d9bb..94fa099447b 100644 --- a/mysql-test/main/partition_key_cache.result +++ b/mysql-test/main/partition_key_cache.result @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1, t2, v, x; # Actual test of key caches # Verifing that reads/writes use the key cache correctly SET @org_key_cache_buffer_size= @@global.default.key_buffer_size; diff --git a/mysql-test/main/partition_key_cache.test b/mysql-test/main/partition_key_cache.test index 365a571ae92..a4178d62d65 100644 --- a/mysql-test/main/partition_key_cache.test +++ b/mysql-test/main/partition_key_cache.test @@ -1,10 +1,6 @@ # Test of key cache with partitions --source include/have_partition.inc ---disable_warnings -DROP TABLE IF EXISTS t1, t2, v, x; ---enable_warnings - --echo # Actual test of key caches --echo # Verifing that reads/writes use the key cache correctly SET @org_key_cache_buffer_size= @@global.default.key_buffer_size; diff --git a/mysql-test/main/partition_mgm_err.result b/mysql-test/main/partition_mgm_err.result index 864b1cbd37f..980cd6523a4 100644 --- a/mysql-test/main/partition_mgm_err.result +++ b/mysql-test/main/partition_mgm_err.result @@ -1,4 +1,3 @@ -drop table if exists t1; CREATE TABLE t1 (a int, b int) PARTITION BY RANGE (a) (PARTITION x0 VALUES LESS THAN (2), @@ -158,3 +157,15 @@ PARTITION p1 VALUES IN (0) (SUBPARTITION p1b), PARTITION p2 VALUES IN (2) (SUBPARTITION p1b) ); ERROR HY000: Duplicate partition name p1b +# End of 5.5 tests +# +# MDEV-32155 MariaDB Server crashes with ill-formed partitions +# +create table t1 (c1 set ( 'abc' ) binary unicode) partition by linear hash (c1 mod c1) partitions 10; +alter table t1 check partition all for upgrade; +Table Op Msg_type Msg_text +test.t1 check status OK +alter table t1 order by nonexistent; +ERROR 42S22: Unknown column 'nonexistent' in 'order clause' +drop table t1; +# End of 10.5 tests diff --git a/mysql-test/main/partition_mgm_err.test b/mysql-test/main/partition_mgm_err.test index 82b9db7bbe1..0e4d0a5f63c 100644 --- a/mysql-test/main/partition_mgm_err.test +++ b/mysql-test/main/partition_mgm_err.test @@ -4,10 +4,6 @@ # -- source include/have_partition.inc ---disable_warnings -drop table if exists t1; ---enable_warnings - # # Try faulty DROP PARTITION and COALESCE PARTITION # @@ -223,3 +219,16 @@ SUBPARTITION BY KEY (s2) ( PARTITION p1 VALUES IN (0) (SUBPARTITION p1b), PARTITION p2 VALUES IN (2) (SUBPARTITION p1b) ); + +--echo # End of 5.5 tests + +--echo # +--echo # MDEV-32155 MariaDB Server crashes with ill-formed partitions +--echo # +create table t1 (c1 set ( 'abc' ) binary unicode) partition by linear hash (c1 mod c1) partitions 10; +alter table t1 check partition all for upgrade; +--error ER_BAD_FIELD_ERROR +alter table t1 order by nonexistent; +drop table t1; + +--echo # End of 10.5 tests diff --git a/mysql-test/main/plugin_auth.result b/mysql-test/main/plugin_auth.result index 9a13b9bad21..9d296f48c28 100644 --- a/mysql-test/main/plugin_auth.result +++ b/mysql-test/main/plugin_auth.result @@ -338,7 +338,7 @@ FLUSH PRIVILEGES; # Executing 'mysqladmin' mysqld is alive # Executing 'mysqldump' -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ # Executing 'mysql_upgrade' # # Bug #59657: Move the client authentication_pam plugin into the diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result index 468fb3800ab..9fdd6b246a2 100644 --- a/mysql-test/main/rowid_filter_innodb.result +++ b/mysql-test/main/rowid_filter_innodb.result @@ -2052,7 +2052,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": { - "pages_accessed": 3 + "pages_accessed": 2 }, "filtered": "REPLACED", "r_filtered": 66.66666667, @@ -2216,7 +2216,7 @@ ANALYZE "r_table_time_ms": "REPLACED", "r_other_time_ms": "REPLACED", "r_engine_stats": { - "pages_accessed": 3 + "pages_accessed": 2 }, "filtered": "REPLACED", "r_filtered": 66.66666667, diff --git a/mysql-test/main/rpl_mysqldump_slave.result b/mysql-test/main/rpl_mysqldump_slave.result index 8d6f099427e..7bd4649817e 100644 --- a/mysql-test/main/rpl_mysqldump_slave.result +++ b/mysql-test/main/rpl_mysqldump_slave.result @@ -7,27 +7,26 @@ connection slave; connection master; use test; connection slave; -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos=''; +/*M!999999\- enable the sandbox mode */ CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; -/*!999999\- enable the sandbox mode */ +-- SET GLOBAL gtid_slave_pos=''; +/*M!999999\- enable the sandbox mode */ STOP ALL SLAVES; --- SET GLOBAL gtid_slave_pos=''; CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos=''; START ALL SLAVES; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ STOP ALL SLAVES; --- SET GLOBAL gtid_slave_pos=''; CHANGE MASTER '' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos=''; START ALL SLAVES; start slave; Warnings: Note 1254 Slave is already running -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos=''; +/*M!999999\- enable the sandbox mode */ CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; start slave; @@ -45,77 +44,77 @@ DROP TABLE t2; 1. --dump-slave=1 --gtid -/*!999999\- enable the sandbox mode */ -SET GLOBAL gtid_slave_pos='0-1-1001'; +/*M!999999\- enable the sandbox mode */ CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos; -- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +SET GLOBAL gtid_slave_pos='0-1-1001'; 1a. --dump-slave=1 -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos='0-1-1001'; +/*M!999999\- enable the sandbox mode */ CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos='0-1-1001'; 2. --dump-slave=2 --gtid -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos='0-1-1001'; +/*M!999999\- enable the sandbox mode */ -- CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos; -- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos='0-1-1001'; 2. --dump-slave=2 -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos='0-1-1001'; +/*M!999999\- enable the sandbox mode */ -- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos='0-1-1001'; *** Test mysqldump --master-data GTID/non-gtid functionality. 1. --master-data=1 --gtid -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CHANGE MASTER TO MASTER_USE_GTID=slave_pos; -SET GLOBAL gtid_slave_pos='0-2-1003'; -- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +SET GLOBAL gtid_slave_pos='0-2-1003'; 1a. --master-data=1 -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos='0-2-1003'; +/*M!999999\- enable the sandbox mode */ CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos='0-2-1003'; 2. --master-data=2 --gtid -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- CHANGE MASTER TO MASTER_USE_GTID=slave_pos; --- SET GLOBAL gtid_slave_pos='0-2-1003'; -- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos='0-2-1003'; 2a. --master-data=2 -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos='0-2-1003'; +/*M!999999\- enable the sandbox mode */ -- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos='0-2-1003'; 3. --master-data --single-transaction --gtid -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CHANGE MASTER TO MASTER_USE_GTID=slave_pos; -SET GLOBAL gtid_slave_pos='0-2-1003'; -- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +SET GLOBAL gtid_slave_pos='0-2-1003'; 3a. --master-data --single-transaction -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos='0-2-1003'; +/*M!999999\- enable the sandbox mode */ CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos='0-2-1003'; 4. --master-data=2 --dump-slave=2 --single-transaction --gtid (MDEV-4827) -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- MariaDB dump-- -- Host: localhost Database: test -- ------------------------------------------------------ @@ -130,11 +129,9 @@ CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- Preferably use GTID to start replication from GTID position: - -- CHANGE MASTER TO MASTER_USE_GTID=slave_pos; --- SET GLOBAL gtid_slave_pos='0-2-1003'; + +-- A corresponding to the above master-data CHANGE-MASTER settings to the slave gtid state is printed later in the file. -- -- Alternately, following is the position of the binary logging from SHOW MASTER STATUS at point of backup. @@ -149,14 +146,24 @@ CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START -- Use this position when creating a clone of, or replacement server, from where the backup was taken. -- This new server will connects to the same primary server(s). -- --- GTID position to start replication: --- SET GLOBAL gtid_slave_pos='0-1-1001'; + +-- A corresponding to the below dump-slave CHANGE-MASTER settings to the slave gtid state is printed later in the file. -- Use only the MASTER_USE_GTID=slave_pos or MASTER_LOG_FILE/MASTER_LOG_POS in the statements below. -- CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos; -- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; + +-- The deferred gtid setting for slave corresponding to the master-data CHANGE-MASTER follows + +-- Preferably use GTID to start replication from GTID position: + +-- SET GLOBAL gtid_slave_pos='0-2-1003'; + +-- The deferred gtid setting for slave corresponding to the dump-slave CHANGE-MASTER follows +-- GTID position to start replication: +-- SET GLOBAL gtid_slave_pos='0-1-1001'; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -171,7 +178,7 @@ CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START 4a. --master-data=2 --dump-slave=2 --single-transaction (MDEV-4827) -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- MariaDB dump-- -- Host: localhost Database: test -- ------------------------------------------------------ @@ -187,10 +194,6 @@ CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; --- Preferably use GTID to start replication from GTID position: - --- SET GLOBAL gtid_slave_pos='0-2-1003'; - -- -- Alternately, following is the position of the binary logging from SHOW MASTER STATUS at point of backup. -- Use this when creating a replica of the primary server where the backup was made. @@ -199,15 +202,27 @@ CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START -- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START; +-- A corresponding to the above master-data CHANGE-MASTER settings to the slave gtid state is printed as comments later in the file. + -- -- The following is the SQL position of the replication taken from SHOW SLAVE STATUS at the time of backup. -- Use this position when creating a clone of, or replacement server, from where the backup was taken. -- This new server will connects to the same primary server(s). -- --- GTID position to start replication: --- SET GLOBAL gtid_slave_pos='0-1-1001'; + +-- A corresponding to the below dump-slave CHANGE-MASTER settings to the slave gtid state is printed later in the file. -- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START; + +-- The deferred gtid setting for slave corresponding to the master-data CHANGE-MASTER follows + +-- Preferably use GTID to start replication from GTID position: + +-- SET GLOBAL gtid_slave_pos='0-2-1003'; + +-- The deferred gtid setting for slave corresponding to the dump-slave CHANGE-MASTER follows +-- GTID position to start replication: +-- SET GLOBAL gtid_slave_pos='0-1-1001'; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -231,9 +246,9 @@ include/stop_slave.inc change master to master_use_gtid=slave_pos; connection master; # Ensuring the binlog dump thread is killed on primary... -/*!999999\- enable the sandbox mode */ --- SET GLOBAL gtid_slave_pos='0-1-1005'; +/*M!999999\- enable the sandbox mode */ -- CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000002', MASTER_LOG_POS=BINLOG_START; +-- SET GLOBAL gtid_slave_pos='0-1-1005'; connection slave; include/start_slave.inc connection master; diff --git a/mysql-test/main/secondary_key_costs.result b/mysql-test/main/secondary_key_costs.result index 3c56b50d44a..7d88e6503b7 100644 --- a/mysql-test/main/secondary_key_costs.result +++ b/mysql-test/main/secondary_key_costs.result @@ -158,3 +158,84 @@ json_detailed(json_extract(@trace, '$**.considered_access_paths')) ] ] drop table t1, name, flag2; +select @@optimizer_adjust_secondary_key_costs; +@@optimizer_adjust_secondary_key_costs +0 +set @@optimizer_adjust_secondary_key_costs=7; +Warnings: +Warning 1287 '@@optimizer_adjust_secondary_key_costs' is deprecated and will be removed in a future release +Warning 1292 Truncated incorrect optimizer_adjust_secondary_ke... value: '7' +select @@optimizer_adjust_secondary_key_costs; +@@optimizer_adjust_secondary_key_costs +2 +set @@optimizer_adjust_secondary_key_costs=default; +Warnings: +Warning 1287 '@@optimizer_adjust_secondary_key_costs' is deprecated and will be removed in a future release +# +# MDEV-34664: fix_innodb_cardinality +# +set @save_userstat=@@global.userstat; +set @save_ispsp=@@global.innodb_stats_persistent_sample_pages; +set @@global.innodb_stats_persistent_sample_pages=20; +set @@global.userstat=on; +set use_stat_tables=PREFERABLY_FOR_QUERIES; +create or replace table t1 (a int primary key, b int, c int, d int, key(b,c,d)) engine=innodb; +insert into t1 select seq,seq/100,seq/60,seq/10 from seq_1_to_1000; +create or replace table t2 (a int); +insert into t2 values (1),(2),(3); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +select count(distinct b),count(distinct b,c), count(distinct b,c,d) from t1; +count(distinct b) count(distinct b,c) count(distinct b,c,d) +11 25 125 +show index from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored +t1 0 PRIMARY 1 a A 1000 NULL NULL BTREE NO +t1 1 b 1 b A 11 NULL NULL YES BTREE NO +t1 1 b 2 c A 25 NULL NULL YES BTREE NO +t1 1 b 3 d A 125 NULL NULL YES BTREE NO +explain select * from t1,t2 where t1.b=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ref b b 5 test.t2.a 90 Using index +set @@optimizer_adjust_secondary_key_costs=8; +Warnings: +Warning 1287 '@@optimizer_adjust_secondary_key_costs' is deprecated and will be removed in a future release +Warning 1292 Truncated incorrect optimizer_adjust_secondary_ke... value: '8' +explain select * from t1,t2 where t1.b=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ref b b 5 test.t2.a 90 Using index +show index from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored +t1 0 PRIMARY 1 a A 1000 NULL NULL BTREE NO +t1 1 b 1 b A 11 NULL NULL YES BTREE NO +t1 1 b 2 c A 25 NULL NULL YES BTREE NO +t1 1 b 3 d A 125 NULL NULL YES BTREE NO +flush tables; +explain select * from t1,t2 where t1.b=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ref b b 5 test.t2.a 90 Using index +show index from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored +t1 0 PRIMARY 1 a A 1000 NULL NULL BTREE NO +t1 1 b 1 b A 11 NULL NULL YES BTREE NO +t1 1 b 2 c A 25 NULL NULL YES BTREE NO +t1 1 b 3 d A 125 NULL NULL YES BTREE NO +connect user2, localhost, root,,; +show index from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored +t1 0 PRIMARY 1 a A 1000 NULL NULL BTREE NO +t1 1 b 1 b A 11 NULL NULL YES BTREE NO +t1 1 b 2 c A 25 NULL NULL YES BTREE NO +t1 1 b 3 d A 125 NULL NULL YES BTREE NO +connection default; +disconnect user2; +drop table t1,t2; +set global userstat=@save_userstat; +set global innodb_stats_persistent_sample_pages=@save_ispsp; +set @@optimizer_adjust_secondary_key_costs=default; +Warnings: +Warning 1287 '@@optimizer_adjust_secondary_key_costs' is deprecated and will be removed in a future release diff --git a/mysql-test/main/secondary_key_costs.test b/mysql-test/main/secondary_key_costs.test index d3db137653b..0061d71b81e 100644 --- a/mysql-test/main/secondary_key_costs.test +++ b/mysql-test/main/secondary_key_costs.test @@ -1,5 +1,6 @@ --source include/have_sequence.inc --source include/not_embedded.inc +--source include/have_innodb.inc # # Show the costs for rowid filter @@ -51,3 +52,43 @@ select json_detailed(json_extract(@trace, '$**.considered_access_paths')); --enable_ps_protocol drop table t1, name, flag2; +select @@optimizer_adjust_secondary_key_costs; +set @@optimizer_adjust_secondary_key_costs=7; +select @@optimizer_adjust_secondary_key_costs; +set @@optimizer_adjust_secondary_key_costs=default; + +--echo # +--echo # MDEV-34664: fix_innodb_cardinality +--echo # + +set @save_userstat=@@global.userstat; +set @save_ispsp=@@global.innodb_stats_persistent_sample_pages; +set @@global.innodb_stats_persistent_sample_pages=20; +set @@global.userstat=on; +set use_stat_tables=PREFERABLY_FOR_QUERIES; + +create or replace table t1 (a int primary key, b int, c int, d int, key(b,c,d)) engine=innodb; +insert into t1 select seq,seq/100,seq/60,seq/10 from seq_1_to_1000; +create or replace table t2 (a int); +insert into t2 values (1),(2),(3); +analyze table t1; +select count(distinct b),count(distinct b,c), count(distinct b,c,d) from t1; +show index from t1; +explain select * from t1,t2 where t1.b=t2.a; +set @@optimizer_adjust_secondary_key_costs=8; +explain select * from t1,t2 where t1.b=t2.a; +show index from t1; +# Flush tables or show index is needed to refresh the data in table share +flush tables; +explain select * from t1,t2 where t1.b=t2.a; +show index from t1; +# Check that the option does not affect other usage +connect (user2, localhost, root,,); +show index from t1; +connection default; +disconnect user2; +drop table t1,t2; +set global userstat=@save_userstat; +set global innodb_stats_persistent_sample_pages=@save_ispsp; + +set @@optimizer_adjust_secondary_key_costs=default; diff --git a/mysql-test/main/sp-no-valgrind.test b/mysql-test/main/sp-no-valgrind.test index 6bacc7b150c..1b4a0f84f1e 100644 --- a/mysql-test/main/sp-no-valgrind.test +++ b/mysql-test/main/sp-no-valgrind.test @@ -1,5 +1,5 @@ --source include/not_msan.inc ---source include/not_valgrind_build.inc +--source include/not_valgrind.inc --echo # MDEV-20699 do not cache SP in SHOW CREATE --echo # Warmup round, this might allocate some memory for session variable diff --git a/mysql-test/main/subselect_mat_analyze_json.result b/mysql-test/main/subselect_mat_analyze_json.result new file mode 100644 index 00000000000..7530c680ce0 --- /dev/null +++ b/mysql-test/main/subselect_mat_analyze_json.result @@ -0,0 +1,1283 @@ +set @save_optimizer_switch=@@optimizer_switch; +create table t1 (a int); +create table t2 (b int); +insert into t1 values (null), (1), (2), (3); +insert into t2 values (3), (4); +set @@optimizer_switch = "materialization=on,in_to_exists=off,semijoin=off"; +explain format=json select * from t1 where a in (select b from t2); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "cost": "COST_REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "rows": 4, + "cost": "COST_REPLACED", + "filtered": 100, + "attached_condition": "(t1.a,t1.a in (subquery#2))" + } + } + ], + "subqueries": [ + { + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 2, + "cost": "COST_REPLACED", + "filtered": 100 + } + } + ] + } + } + } + ] + } +} +# "Complete match" execution strategy +analyze format=json select * from t1 where a in (select b from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 25, + "attached_condition": "(t1.a,t1.a in (subquery#2))" + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup", + "r_loops": 3, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +# "Partial match" is used due to NOT IN +# Force rowid-merge partial partial matching +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +analyze format=json select * from t1 where a not in (select b from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 50, + "attached_condition": "!(t1.a,t1.a in (subquery#2))" + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["2"], + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +# Force table scan partial matching +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on"; +analyze format=json select * from t1 where a not in (select b from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 50, + "attached_condition": "!(t1.a,t1.a in (subquery#2))" + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +# Subselect in GROUP BY +analyze format=json select a from t1 group by a in (select b from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "filesort": { + "sort_key": "(t1.a,t1.a in (subquery#2))", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "r_used_priority_queue": false, + "r_output_rows": 3, + "r_buffer_size": "REPLACED", + "r_sort_mode": "sort_key,rowid", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } + } + } +} +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +analyze format=json select a from t1 group by a not in (select b from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "filesort": { + "sort_key": "!(t1.a,t1.a in (subquery#2))", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "r_used_priority_queue": false, + "r_output_rows": 3, + "r_buffer_size": "REPLACED", + "r_sort_mode": "sort_key,rowid", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["2"], + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } + } + } +} +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=on"; +# Subselect in ORDER BY +analyze format=json select a from t1 order by a in (select b from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "read_sorted_file": { + "r_rows": 4, + "filesort": { + "sort_key": "(t1.a,t1.a in (subquery#2))", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "r_used_priority_queue": false, + "r_output_rows": 4, + "r_buffer_size": "REPLACED", + "r_sort_mode": "sort_key,addon_fields", + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +# Subselect in HAVING +analyze format=json select a from t1 having a not in (select b from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "having_condition": "!(t1.a,t1.a in (subquery#2))", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +# Nested IN +analyze format=json select a from t1 where a in (select a from t1 where a in (select b from t2)); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 25, + "attached_condition": "(t1.a,t1.a in (subquery#2))" + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup", + "r_loops": 3, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 25, + "attached_condition": "(t1.a,t1.a in (subquery#3))" + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup", + "r_loops": 3, + "query_block": { + "select_id": 3, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } + } + } + ] + } +} +create table t3 (c int); +insert into t3 (c) values (3), (null), (4); +# Subquery in ON-clause of outer join +analyze format=json select a from t1 left join t2 on a not in (select c from t3); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "const_condition": "1", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + }, + { + "block-nl-join": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 4, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + }, + "buffer_type": "flat", + "buffer_size": "87", + "join_type": "BNL", + "attached_condition": "trigcond(trigcond(!(t1.a,t1.a in (subquery#2))))", + "r_loops": 4, + "r_filtered": 50, + "r_unpack_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_effective_rows": 2 + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t3", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 3, + "r_rows": 3, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +analyze format=json +select (b, b + 1, b + 2) not in +(select count(distinct a), a + 1, a + 2 from t1 group by a + 1, a + 2) +from t2; +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 2, + "r_index_lookups": 2, + "r_partial_matches": 2, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "read_sorted_file": { + "r_rows": 4, + "filesort": { + "sort_key": "t1.a + 1, t1.a + 2", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "r_used_priority_queue": false, + "r_output_rows": 4, + "r_buffer_size": "REPLACED", + "r_sort_mode": "sort_key,addon_fields", + "table": { + "table_name": "t1", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } + } + } + ] + } +} +drop table t1, t2, t3; +# +# Tables with more than one column +# +create table t1 (a1 char(1), a2 char(1)); +insert into t1 values (null, 'b'); +create table t2 (b1 char(1), b2 char(2)); +insert into t2 values ('a','b'), ('c', 'd'), (null, 'e'), ('f', 'g'); +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +explain format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "const_condition": "!((NULL,'b'),(NULL,'b') in (subquery#2))", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "system", + "rows": 1, + "filtered": 100 + } + } + ], + "subqueries": [ + { + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 4, + "cost": "COST_REPLACED", + "filtered": 100 + } + } + ] + } + } + } + ] + } +} +analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "const_condition": "!((NULL,'b'),(NULL,'b') in (subquery#2))", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": null + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["4", "3"], + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on"; +analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "const_condition": "!((NULL,'b'),(NULL,'b') in (subquery#2))", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": null + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +# Subquery in SELECT list +explain format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "system", + "rows": 1, + "filtered": 100 + } + } + ], + "subqueries": [ + { + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "rows": 4, + "cost": "COST_REPLACED", + "filtered": 100 + } + } + ] + } + } + } + ] + } +} +analyze format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": null + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +analyze format=json select t1.*, (a1, a2) not in (select * from t2) as in_res from t1; +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": null + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +analyze format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": null + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["4", "3"], + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +analyze format=json select t1.*, (a1, a2) not in (select * from t2) as in_res from t1; +ANALYZE +{ + "query_optimization": { + "r_total_time_ms": "REPLACED" + }, + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": null + } + } + ], + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["4", "3"], + "query_block": { + "select_id": 2, + "cost": "REPLACED", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "nested_loop": [ + { + "table": { + "table_name": "t2", + "access_type": "ALL", + "loops": 1, + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "cost": "REPLACED", + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "r_engine_stats": REPLACED, + "filtered": 100, + "r_filtered": 100 + } + } + ] + } + } + } + ] + } +} +drop table t1,t2; +set @@optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/subselect_mat_analyze_json.test b/mysql-test/main/subselect_mat_analyze_json.test new file mode 100644 index 00000000000..c727cc91a33 --- /dev/null +++ b/mysql-test/main/subselect_mat_analyze_json.test @@ -0,0 +1,102 @@ +set @save_optimizer_switch=@@optimizer_switch; + +create table t1 (a int); +create table t2 (b int); +insert into t1 values (null), (1), (2), (3); +insert into t2 values (3), (4); + +set @@optimizer_switch = "materialization=on,in_to_exists=off,semijoin=off"; + +--source include/explain-no-costs.inc +explain format=json select * from t1 where a in (select b from t2); +--echo # "Complete match" execution strategy +--source include/analyze-format.inc +analyze format=json select * from t1 where a in (select b from t2); + +--echo # "Partial match" is used due to NOT IN +--echo # Force rowid-merge partial partial matching +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +--source include/analyze-format.inc +analyze format=json select * from t1 where a not in (select b from t2); + +--echo # Force table scan partial matching +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on"; +--source include/analyze-format.inc +analyze format=json select * from t1 where a not in (select b from t2); + +--echo # Subselect in GROUP BY +--source include/analyze-format.inc +analyze format=json select a from t1 group by a in (select b from t2); + +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +--source include/analyze-format.inc +analyze format=json select a from t1 group by a not in (select b from t2); + +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=on"; +--echo # Subselect in ORDER BY +--source include/analyze-format.inc +analyze format=json select a from t1 order by a in (select b from t2); + +--echo # Subselect in HAVING +--source include/analyze-format.inc +analyze format=json select a from t1 having a not in (select b from t2); + +--echo # Nested IN +--source include/analyze-format.inc +analyze format=json select a from t1 where a in (select a from t1 where a in (select b from t2)); + +create table t3 (c int); +insert into t3 (c) values (3), (null), (4); + +--echo # Subquery in ON-clause of outer join +--source include/analyze-format.inc +analyze format=json select a from t1 left join t2 on a not in (select c from t3); + +--source include/analyze-format.inc +analyze format=json +select (b, b + 1, b + 2) not in + (select count(distinct a), a + 1, a + 2 from t1 group by a + 1, a + 2) +from t2; + +drop table t1, t2, t3; + + +--echo # +--echo # Tables with more than one column +--echo # +create table t1 (a1 char(1), a2 char(1)); +insert into t1 values (null, 'b'); +create table t2 (b1 char(1), b2 char(2)); +insert into t2 values ('a','b'), ('c', 'd'), (null, 'e'), ('f', 'g'); + +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +--source include/explain-no-costs.inc +explain format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); +--source include/analyze-format.inc +analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); + +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on"; +--source include/analyze-format.inc +analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); + +--echo # Subquery in SELECT list +--source include/explain-no-costs.inc +explain format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; + +--source include/analyze-format.inc +analyze format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; + +--source include/analyze-format.inc +analyze format=json select t1.*, (a1, a2) not in (select * from t2) as in_res from t1; + +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +--source include/analyze-format.inc +analyze format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; + +--source include/analyze-format.inc +analyze format=json select t1.*, (a1, a2) not in (select * from t2) as in_res from t1; + +drop table t1,t2; + + +set @@optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/trigger_wl3253.result b/mysql-test/main/trigger_wl3253.result index e501b2640b0..8d4de24d4e0 100644 --- a/mysql-test/main/trigger_wl3253.result +++ b/mysql-test/main/trigger_wl3253.result @@ -310,7 +310,7 @@ CREATE TABLE t1 (a INT); CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; CREATE TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2; CREATE TRIGGER tr1_bu BEFORE UPDATE ON t1 FOR EACH ROW SET @a:=3; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -373,7 +373,7 @@ CREATE TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2; CREATE TRIGGER tr0_bi BEFORE INSERT ON t1 FOR EACH ROW PRECEDES tr1_bi SET @a:=0; CREATE TRIGGER tr1_1_bi BEFORE INSERT ON t1 FOR EACH ROW FOLLOWS tr1_bi SET @a:=0; # Expected order of triggers in the dump is: tr0_bi, tr1_bi, tr1_1_bi, tr2_i. -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( diff --git a/mysql-test/main/type_num_innodb.result b/mysql-test/main/type_num_innodb.result index 92dc705de90..76ab147ea7e 100644 --- a/mysql-test/main/type_num_innodb.result +++ b/mysql-test/main/type_num_innodb.result @@ -88,3 +88,51 @@ DROP TABLE t1,t2; # # End of 10.2 tests # +# +# Start of 10.5 tests +# +# +# MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number +# +CREATE TABLE t1 (c BLOB) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('0.0e'),('0.0e+0'); +SELECT * FROM t1 WHERE COALESCE(c)=0.0; +c +0.0e +0.0e+0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '0.0e' +SELECT * FROM t1 WHERE COALESCE(c)=0.0e0; +c +0.0e +0.0e+0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '0.0e' +DROP TABLE t1; +CREATE TABLE t1 (c BLOB) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('0.0e'),('0.0e+0'); +SELECT * FROM t1 WHERE c=0.0; +c +0.0e +0.0e+0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '0.0e' +SELECT * FROM t1 WHERE c=0.0e0; +c +0.0e +0.0e+0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '0.0e' +DROP TABLE t1; +CREATE TABLE t1 (c1 MEDIUMBLOB NOT NULL); +INSERT INTO t1 VALUES ('1e+'); +SELECT AVG(c1) AS VALUE FROM t1 WHERE c1 <> 0; +VALUE +1 +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: '1e+' +Warning 1292 Truncated incorrect DOUBLE value: '1e+' +DROP TABLE t1; +# +# End of 10.5 tests +# diff --git a/mysql-test/main/type_num_innodb.test b/mysql-test/main/type_num_innodb.test index 04bdd4c63b0..b1f2d5e018d 100644 --- a/mysql-test/main/type_num_innodb.test +++ b/mysql-test/main/type_num_innodb.test @@ -39,3 +39,33 @@ DROP TABLE t1,t2; --echo # --echo # End of 10.2 tests --echo # + + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number +--echo # + +CREATE TABLE t1 (c BLOB) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('0.0e'),('0.0e+0'); +SELECT * FROM t1 WHERE COALESCE(c)=0.0; +SELECT * FROM t1 WHERE COALESCE(c)=0.0e0; +DROP TABLE t1; + +CREATE TABLE t1 (c BLOB) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('0.0e'),('0.0e+0'); +SELECT * FROM t1 WHERE c=0.0; +SELECT * FROM t1 WHERE c=0.0e0; +DROP TABLE t1; + +CREATE TABLE t1 (c1 MEDIUMBLOB NOT NULL); +INSERT INTO t1 VALUES ('1e+'); +SELECT AVG(c1) AS VALUE FROM t1 WHERE c1 <> 0; +DROP TABLE t1; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result index 797abaf9de5..f67376b40c3 100644 --- a/mysql-test/main/union.result +++ b/mysql-test/main/union.result @@ -80,7 +80,7 @@ a b 2 b 1 a (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b; -ERROR 42000: Table 't1' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 't1' from one of the SELECTs cannot be used in order clause explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00 @@ -493,7 +493,7 @@ drop temporary table t1; create table t1 select a from t1 union select a from t2; ERROR 42S01: Table 't1' already exists select a from t1 union select a from t2 order by t2.a; -ERROR 42000: Table 't2' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 't2' from one of the SELECTs cannot be used in order clause drop table t1,t2; select length(version()) > 1 as `*` UNION select 2; * diff --git a/mysql-test/main/update_single_to_multi.result b/mysql-test/main/update_single_to_multi.result index 679237837cc..0adf72ac5c3 100644 --- a/mysql-test/main/update_single_to_multi.result +++ b/mysql-test/main/update_single_to_multi.result @@ -133,7 +133,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.052271677, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -146,7 +146,7 @@ EXPLAIN "ref": ["const"], "loops": 1, "rows": 1, - "cost": 0.002024411, + "cost": "COST_REPLACED", "filtered": 100, "index_condition": "nation.n_name = 'PERU'" } @@ -162,7 +162,7 @@ EXPLAIN "ref": ["dbt3_s001.nation.n_nationkey"], "loops": 1, "rows": 6, - "cost": 0.008193756, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -185,7 +185,7 @@ EXPLAIN }, "loops": 6, "rows": 15, - "cost": 0.04205351, + "cost": "COST_REPLACED", "filtered": 7.199999809, "attached_condition": "orders.o_orderDATE between '1992-01-01' and '1992-06-30'" } @@ -523,7 +523,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.40015207, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -532,7 +532,7 @@ EXPLAIN "possible_keys": ["PRIMARY", "i_n_regionkey"], "loops": 1, "rows": 25, - "cost": 0.013945725, + "cost": "COST_REPLACED", "filtered": 40, "attached_condition": "nation.n_regionkey in (1,2)" } @@ -548,7 +548,7 @@ EXPLAIN "ref": ["dbt3_s001.nation.n_nationkey"], "loops": 10, "rows": 6, - "cost": 0.08009436, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -571,7 +571,7 @@ EXPLAIN }, "loops": 60, "rows": 15, - "cost": 0.306111985, + "cost": "COST_REPLACED", "filtered": 6.666666508, "attached_condition": "orders.o_orderDATE between '1992-10-09' and '1993-06-08'", "first_match": "customer" @@ -638,7 +638,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.40015207, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -647,7 +647,7 @@ EXPLAIN "possible_keys": ["PRIMARY", "i_n_regionkey"], "loops": 1, "rows": 25, - "cost": 0.013945725, + "cost": "COST_REPLACED", "filtered": 40, "attached_condition": "nation.n_regionkey in (1,2)" } @@ -663,7 +663,7 @@ EXPLAIN "ref": ["dbt3_s001.nation.n_nationkey"], "loops": 10, "rows": 6, - "cost": 0.08009436, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -686,7 +686,7 @@ EXPLAIN }, "loops": 60, "rows": 15, - "cost": 0.306111985, + "cost": "COST_REPLACED", "filtered": 6.666666508, "attached_condition": "orders.o_orderDATE between '1992-10-09' and '1993-06-08'", "first_match": "customer" @@ -1124,7 +1124,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.382051418, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -1133,7 +1133,7 @@ EXPLAIN "possible_keys": ["PRIMARY"], "loops": 1, "rows": 150, - "cost": 0.03493875, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -1160,7 +1160,7 @@ EXPLAIN "possible_keys": ["i_o_orderdate", "i_o_custkey"], "loops": 1, "rows": 1500, - "cost": 0.2532975, + "cost": "COST_REPLACED", "filtered": 16.13333321, "attached_condition": "orders.o_orderDATE between '1992-01-09' and '1993-03-08'" } @@ -1607,7 +1607,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.085533248, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -1616,32 +1616,34 @@ EXPLAIN "possible_keys": ["distinct_key"], "loops": 1, "rows": 28, - "cost": 0.03691572, + "cost": "COST_REPLACED", "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": 0.053826401, - "having_condition": "count(orders.o_custkey) > 1", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "orders", - "access_type": "range", - "possible_keys": ["i_o_orderdate"], - "key": "i_o_orderdate", - "key_length": "4", - "used_key_parts": ["o_orderDATE"], - "loops": 1, - "rows": 28, - "cost": 0.035889016, - "filtered": 100, - "index_condition": "orders.o_orderDATE between '1992-01-09' and '1992-03-08'" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "count(orders.o_custkey) > 1", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "orders", + "access_type": "range", + "possible_keys": ["i_o_orderdate"], + "key": "i_o_orderdate", + "key_length": "4", + "used_key_parts": ["o_orderDATE"], + "loops": 1, + "rows": 28, + "cost": "COST_REPLACED", + "filtered": 100, + "index_condition": "orders.o_orderDATE between '1992-01-09' and '1992-03-08'" + } } - } - ] + ] + } } } } @@ -1658,7 +1660,7 @@ EXPLAIN "ref": [".o_custkey"], "loops": 28, "rows": 1, - "cost": 0.048617528, + "cost": "COST_REPLACED", "filtered": 100 } } @@ -1690,7 +1692,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.085533248, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -1699,32 +1701,34 @@ EXPLAIN "possible_keys": ["distinct_key"], "loops": 1, "rows": 28, - "cost": 0.03691572, + "cost": "COST_REPLACED", "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "cost": 0.053826401, - "having_condition": "count(orders.o_custkey) > 1", - "temporary_table": { - "nested_loop": [ - { - "table": { - "table_name": "orders", - "access_type": "range", - "possible_keys": ["i_o_orderdate"], - "key": "i_o_orderdate", - "key_length": "4", - "used_key_parts": ["o_orderDATE"], - "loops": 1, - "rows": 28, - "cost": 0.035889016, - "filtered": 100, - "index_condition": "orders.o_orderDATE between '1992-01-09' and '1992-03-08'" + "materialization": { + "query_block": { + "select_id": 2, + "cost": "COST_REPLACED", + "having_condition": "count(orders.o_custkey) > 1", + "temporary_table": { + "nested_loop": [ + { + "table": { + "table_name": "orders", + "access_type": "range", + "possible_keys": ["i_o_orderdate"], + "key": "i_o_orderdate", + "key_length": "4", + "used_key_parts": ["o_orderDATE"], + "loops": 1, + "rows": 28, + "cost": "COST_REPLACED", + "filtered": 100, + "index_condition": "orders.o_orderDATE between '1992-01-09' and '1992-03-08'" + } } - } - ] + ] + } } } } @@ -1741,7 +1745,7 @@ EXPLAIN "ref": [".o_custkey"], "loops": 28, "rows": 1, - "cost": 0.048617528, + "cost": "COST_REPLACED", "filtered": 100 } } @@ -3275,7 +3279,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 0.776623555, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -3292,7 +3296,7 @@ EXPLAIN "used_key_parts": ["ps_suppkey", "ps_partkey"], "loops": 1, "rows": 176, - "cost": 0.019403477, + "cost": "COST_REPLACED", "filtered": 5.113636494, "attached_condition": "partsupp_small.ps_partkey in (1,2,3)", "using_index": true, @@ -3310,7 +3314,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_suppkey"], "loops": 9, "rows": 600, - "cost": 0.757220078, + "cost": "COST_REPLACED", "filtered": 11.11111069, "using_index": true } @@ -3342,7 +3346,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 2.191459679, + "cost": "COST_REPLACED", "nested_loop": [ { "table": { @@ -3351,7 +3355,7 @@ EXPLAIN "possible_keys": ["i_l_suppkey"], "loops": 1, "rows": 6005, - "cost": 0.988432825, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -3386,7 +3390,7 @@ EXPLAIN "used_key_parts": ["ps_partkey"], "loops": 1, "rows": 9, - "cost": 0.003756598, + "cost": "COST_REPLACED", "filtered": 100, "attached_condition": "partsupp_small.ps_partkey in (1,2,3)", "using_index": true @@ -3525,7 +3529,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 4.129940741, + "cost": "COST_REPLACED", "nested_loop": [ { "duplicates_removal": [ @@ -3539,7 +3543,7 @@ EXPLAIN "used_key_parts": ["s_suppkey"], "loops": 1, "rows": 1, - "cost": 0.001478954, + "cost": "COST_REPLACED", "filtered": 100, "attached_condition": "supplier.s_suppkey < 2", "using_index": true @@ -3561,7 +3565,7 @@ EXPLAIN "ref": ["dbt3_s001.supplier.s_suppkey"], "loops": 1, "rows": 17, - "cost": 0.003160332, + "cost": "COST_REPLACED", "filtered": 79.54545593, "attached_condition": "partsupp_small.ps_partkey is not null", "using_index": true @@ -3578,7 +3582,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 14, "rows": 30, - "cost": 0.069152188, + "cost": "COST_REPLACED", "filtered": 100, "using_index": true } @@ -3594,7 +3598,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 420.35, "rows": 30, - "cost": 1.994712365, + "cost": "COST_REPLACED", "filtered": 0.237896994, "using_index": true } @@ -3641,7 +3645,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "cost": 4.590092321, + "cost": "COST_REPLACED", "nested_loop": [ { "duplicates_removal": [ @@ -3655,7 +3659,7 @@ EXPLAIN "used_key_parts": ["s_suppkey"], "loops": 1, "rows": 1, - "cost": 0.001478954, + "cost": "COST_REPLACED", "filtered": 100, "attached_condition": "supplier.s_suppkey < 2", "using_index": true @@ -3677,7 +3681,7 @@ EXPLAIN "ref": ["dbt3_s001.supplier.s_suppkey"], "loops": 1, "rows": 17, - "cost": 0.003160332, + "cost": "COST_REPLACED", "filtered": 79.54545593, "attached_condition": "partsupp_small.ps_partkey is not null", "using_index": true @@ -3694,7 +3698,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 14, "rows": 30, - "cost": 0.529303768, + "cost": "COST_REPLACED", "filtered": 100 } }, @@ -3709,7 +3713,7 @@ EXPLAIN "ref": ["dbt3_s001.partsupp_small.ps_partkey"], "loops": 420.35, "rows": 30, - "cost": 1.994712365, + "cost": "COST_REPLACED", "filtered": 0.237896994, "using_index": true } diff --git a/mysql-test/main/update_single_to_multi.test b/mysql-test/main/update_single_to_multi.test index 7364806e65d..38c6aca8fda 100644 --- a/mysql-test/main/update_single_to_multi.test +++ b/mysql-test/main/update_single_to_multi.test @@ -40,6 +40,7 @@ select o_orderkey, o_totalprice from orders where $c1; eval explain update orders set o_totalprice = o_totalprice-50 where $c1; +--source include/explain-no-costs.inc eval explain format=json update orders set o_totalprice = o_totalprice-50 where $c1; @@ -158,6 +159,7 @@ let $c5= eval explain select c_name, c_acctbal from customer where $c5; +--source include/explain-no-costs.inc eval explain format=json select c_name, c_acctbal from customer where $c5; @@ -167,6 +169,7 @@ select c_name, c_acctbal from customer where $c5; eval explain update customer set c_acctbal = c_acctbal+10 where $c5; +--source include/explain-no-costs.inc eval explain format=json update customer set c_acctbal = c_acctbal+10 where $c5; @@ -256,6 +259,7 @@ select c_name, c_acctbal from customer where $c8; eval explain update customer set c_acctbal = c_acctbal+5 where $c8; +--source include/explain-no-costs.inc eval explain format=json update customer set c_acctbal = c_acctbal+5 where $c8; @@ -306,6 +310,7 @@ let $c10= eval explain select c_name, c_acctbal from customer where $c10; +--source include/explain-no-costs.inc eval explain format=json select c_name, c_acctbal from customer where $c10; @@ -315,6 +320,7 @@ select c_name, c_acctbal from customer where $c10; eval explain update customer set c_acctbal = c_acctbal-5 where $c10; +--source include/explain-no-costs.inc eval explain format=json update customer set c_acctbal = c_acctbal-5 where $c10; @@ -612,6 +618,7 @@ let $c12 = l_suppkey in eval explain select count(*) from lineitem where $c12; +--source include/explain-no-costs.inc eval explain format=json select count(*) from lineitem where $c12; @@ -628,6 +635,7 @@ eval select $l_count as count, $l_old_sum as old_sum; eval explain update lineitem set l_extendedprice=l_extendedprice+10 where $c12; +--source include/explain-no-costs.inc eval explain format=json update lineitem set l_extendedprice=l_extendedprice+10 where $c12; @@ -728,6 +736,7 @@ let $c13 = l_partkey in ( eval explain select count(*) from lineitem where $c13; +--source include/explain-no-costs.inc eval explain format=json select count(*) from lineitem where $c13; @@ -743,6 +752,7 @@ eval select $l_count as count, $l_old_sum as old_sum; eval explain update lineitem set l_extendedprice=l_extendedprice+10 where $c13; +--source include/explain-no-costs.inc eval explain format=json update lineitem set l_extendedprice=l_extendedprice+10 where $c13; diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result index 03ed47f63fe..7d351d2a878 100644 --- a/mysql-test/main/win.result +++ b/mysql-test/main/win.result @@ -1247,15 +1247,10 @@ insert into t1 values (1,1,'foo'); insert into t1 values (2,2,'bar'); select count(*) over (order by a,b -range between unbounded preceding and current row) as count +range between 1 preceding and current row) as count from t1; ERROR HY000: RANGE-type frame requires ORDER BY clause with single sort key select -count(*) over (order by c -range between unbounded preceding and current row) as count -from t1; -ERROR HY000: Numeric datatype is required for RANGE-type frame -select count(*) over (order by a range between 'abcd' preceding and current row) as count from t1; @@ -1277,6 +1272,56 @@ rows between current row and 3.14 following) as count from t1; ERROR HY000: Integer is required for ROWS-type frame # +# MDEV-19052 Range-type window frame supports only numeric datatype +# +select +count(*) over (order by c +range between unbounded preceding and current row) as r +from t1; +r +1 +2 +select +count(*) over (order by c +range between current row and unbounded following) as r +from t1; +r +2 +1 +select +count(*) over (order by c +range between unbounded preceding and unbounded following) as r +from t1; +r +2 +2 +create table t2 (a int, b varchar(5)); +insert into t2 values (1,'a'), (2, 'b'), (3, 'c'); +select sum(a) over (order by b range between unbounded preceding and current row) as r from t2; +r +1 +3 +6 +insert into t1 values (3,3,'goo'); +insert into t1 values (3,1,'har'); +insert into t1 values (1,4,'har'); +select a, b, sum(b) over (order by a, b desc range between unbounded preceding and current row) as r from t1; +a b r +1 4 4 +1 1 5 +2 2 7 +3 3 10 +3 1 11 +select a, b, sum(b) over (order by a desc, b range between unbounded preceding and current row) as r from t1; +a b r +3 1 1 +3 3 4 +2 2 6 +1 1 7 +1 4 11 +drop table t2; +delete from t1 where a >= 3 or b = 4; +# # EXCLUDE clause is parsed but not supported # select diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test index 6168b5736f1..5ed62d7b635 100644 --- a/mysql-test/main/win.test +++ b/mysql-test/main/win.test @@ -784,13 +784,7 @@ insert into t1 values (2,2,'bar'); --error ER_RANGE_FRAME_NEEDS_SIMPLE_ORDERBY select count(*) over (order by a,b - range between unbounded preceding and current row) as count -from t1; - ---error ER_WRONG_TYPE_FOR_RANGE_FRAME -select - count(*) over (order by c - range between unbounded preceding and current row) as count + range between 1 preceding and current row) as count from t1; --error ER_WRONG_TYPE_FOR_RANGE_FRAME @@ -818,6 +812,41 @@ select rows between current row and 3.14 following) as count from t1; +--echo # +--echo # MDEV-19052 Range-type window frame supports only numeric datatype +--echo # + +select + count(*) over (order by c + range between unbounded preceding and current row) as r +from t1; + +select + count(*) over (order by c + range between current row and unbounded following) as r +from t1; + +select + count(*) over (order by c + range between unbounded preceding and unbounded following) as r +from t1; + +create table t2 (a int, b varchar(5)); +insert into t2 values (1,'a'), (2, 'b'), (3, 'c'); + +select sum(a) over (order by b range between unbounded preceding and current row) as r from t2; + +insert into t1 values (3,3,'goo'); +insert into t1 values (3,1,'har'); +insert into t1 values (1,4,'har'); + +select a, b, sum(b) over (order by a, b desc range between unbounded preceding and current row) as r from t1; + +select a, b, sum(b) over (order by a desc, b range between unbounded preceding and current row) as r from t1; + +drop table t2; +delete from t1 where a >= 3 or b = 4; + --echo # --echo # EXCLUDE clause is parsed but not supported --echo # @@ -843,6 +872,9 @@ select exclude group) as count from t1; + + + # EXCLUDE NO OTHERS means 'don't exclude anything' select count(*) over (order by a diff --git a/mysql-test/suite/archive/archive_bitfield.result b/mysql-test/suite/archive/archive_bitfield.result index 8cb4190e842..7bd5851abee 100644 --- a/mysql-test/suite/archive/archive_bitfield.result +++ b/mysql-test/suite/archive/archive_bitfield.result @@ -180,7 +180,7 @@ INSERT INTO `t1` VALUES (NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), (NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), (NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ INSERT INTO `t1` VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x01,0x3F,0x3E,4,5,5,5,5,5,5,5,5,5,3,2,1); INSERT INTO `t1` VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x02,0x00,0x3D,4,5,5,5,5,5,5,5,5,5,3,2,1); INSERT INTO `t1` VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x04,0x0F,0x3B,4,5,5,5,5,5,5,5,5,5,3,2,1); diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result index 4ae2a7d4bc3..31e3653b87c 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result @@ -367,10 +367,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -387,7 +387,7 @@ CREATE TABLE t1 (c01 BIT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -408,7 +408,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -429,7 +429,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 ddl -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -437,7 +437,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 ddl -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -445,7 +445,7 @@ CREATE TABLE t1 (c01 BIT(7)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -466,7 +466,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -487,7 +487,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -508,7 +508,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -529,7 +529,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -550,7 +550,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 -/*!100001 SET @@session.gtid_seq_no=11*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; START TRANSACTION /*!*/; # at # @@ -571,7 +571,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 -/*!100001 SET @@session.gtid_seq_no=12*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; START TRANSACTION /*!*/; # at # @@ -592,7 +592,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-13 -/*!100001 SET @@session.gtid_seq_no=13*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=13*//*!*/; START TRANSACTION /*!*/; # at # @@ -613,7 +613,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-14 -/*!100001 SET @@session.gtid_seq_no=14*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=14*//*!*/; START TRANSACTION /*!*/; # at # @@ -634,7 +634,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-15 -/*!100001 SET @@session.gtid_seq_no=15*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=15*//*!*/; START TRANSACTION /*!*/; # at # @@ -657,7 +657,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-16 ddl -/*!100001 SET @@session.gtid_seq_no=16*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=16*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -665,7 +665,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-17 ddl -/*!100001 SET @@session.gtid_seq_no=17*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=17*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -673,7 +673,7 @@ CREATE TABLE t1 (a BIT(20), b CHAR(2)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-18 -/*!100001 SET @@session.gtid_seq_no=18*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=18*//*!*/; START TRANSACTION /*!*/; # at # @@ -695,7 +695,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-19 ddl -/*!100001 SET @@session.gtid_seq_no=19*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=19*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -703,7 +703,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-20 ddl -/*!100001 SET @@session.gtid_seq_no=20*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=20*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -711,7 +711,7 @@ CREATE TABLE t1 (c02 BIT(64)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-21 -/*!100001 SET @@session.gtid_seq_no=21*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=21*//*!*/; START TRANSACTION /*!*/; # at # @@ -732,7 +732,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-22 -/*!100001 SET @@session.gtid_seq_no=22*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=22*//*!*/; START TRANSACTION /*!*/; # at # @@ -753,7 +753,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-23 -/*!100001 SET @@session.gtid_seq_no=23*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=23*//*!*/; START TRANSACTION /*!*/; # at # @@ -774,7 +774,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-24 -/*!100001 SET @@session.gtid_seq_no=24*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=24*//*!*/; START TRANSACTION /*!*/; # at # @@ -795,7 +795,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-25 ddl -/*!100001 SET @@session.gtid_seq_no=25*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=25*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -803,7 +803,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-26 ddl -/*!100001 SET @@session.gtid_seq_no=26*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=26*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -811,7 +811,7 @@ CREATE TABLE t1 (c03 TINYINT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-27 -/*!100001 SET @@session.gtid_seq_no=27*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=27*//*!*/; START TRANSACTION /*!*/; # at # @@ -838,7 +838,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-28 -/*!100001 SET @@session.gtid_seq_no=28*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=28*//*!*/; START TRANSACTION /*!*/; # at # @@ -859,7 +859,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-29 -/*!100001 SET @@session.gtid_seq_no=29*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=29*//*!*/; START TRANSACTION /*!*/; # at # @@ -882,7 +882,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-30 -/*!100001 SET @@session.gtid_seq_no=30*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=30*//*!*/; START TRANSACTION /*!*/; # at # @@ -903,7 +903,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-31 ddl -/*!100001 SET @@session.gtid_seq_no=31*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=31*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -911,7 +911,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-32 ddl -/*!100001 SET @@session.gtid_seq_no=32*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=32*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -919,7 +919,7 @@ CREATE TABLE t1 (c04 TINYINT UNSIGNED) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-33 -/*!100001 SET @@session.gtid_seq_no=33*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=33*//*!*/; START TRANSACTION /*!*/; # at # @@ -943,7 +943,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-34 -/*!100001 SET @@session.gtid_seq_no=34*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=34*//*!*/; START TRANSACTION /*!*/; # at # @@ -964,7 +964,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-35 ddl -/*!100001 SET @@session.gtid_seq_no=35*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=35*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -972,7 +972,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-36 ddl -/*!100001 SET @@session.gtid_seq_no=36*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=36*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -980,7 +980,7 @@ CREATE TABLE t1 (c06 BOOL) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-37 -/*!100001 SET @@session.gtid_seq_no=37*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=37*//*!*/; START TRANSACTION /*!*/; # at # @@ -1001,7 +1001,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-38 -/*!100001 SET @@session.gtid_seq_no=38*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=38*//*!*/; START TRANSACTION /*!*/; # at # @@ -1022,7 +1022,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-39 ddl -/*!100001 SET @@session.gtid_seq_no=39*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=39*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1030,7 +1030,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-40 ddl -/*!100001 SET @@session.gtid_seq_no=40*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=40*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1038,7 +1038,7 @@ CREATE TABLE t1 (c07 SMALLINT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-41 -/*!100001 SET @@session.gtid_seq_no=41*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=41*//*!*/; START TRANSACTION /*!*/; # at # @@ -1059,7 +1059,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-42 -/*!100001 SET @@session.gtid_seq_no=42*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=42*//*!*/; START TRANSACTION /*!*/; # at # @@ -1080,7 +1080,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-43 ddl -/*!100001 SET @@session.gtid_seq_no=43*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=43*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1088,7 +1088,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-44 ddl -/*!100001 SET @@session.gtid_seq_no=44*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=44*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1096,7 +1096,7 @@ CREATE TABLE t1 (c08 SMALLINT UNSIGNED) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-45 -/*!100001 SET @@session.gtid_seq_no=45*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=45*//*!*/; START TRANSACTION /*!*/; # at # @@ -1120,7 +1120,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-46 -/*!100001 SET @@session.gtid_seq_no=46*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=46*//*!*/; START TRANSACTION /*!*/; # at # @@ -1143,7 +1143,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-47 -/*!100001 SET @@session.gtid_seq_no=47*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=47*//*!*/; START TRANSACTION /*!*/; # at # @@ -1164,7 +1164,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-48 ddl -/*!100001 SET @@session.gtid_seq_no=48*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=48*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1172,7 +1172,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-49 ddl -/*!100001 SET @@session.gtid_seq_no=49*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=49*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1180,7 +1180,7 @@ CREATE TABLE t1 (c10 MEDIUMINT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-50 -/*!100001 SET @@session.gtid_seq_no=50*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=50*//*!*/; START TRANSACTION /*!*/; # at # @@ -1201,7 +1201,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-51 -/*!100001 SET @@session.gtid_seq_no=51*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=51*//*!*/; START TRANSACTION /*!*/; # at # @@ -1222,7 +1222,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-52 ddl -/*!100001 SET @@session.gtid_seq_no=52*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=52*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1230,7 +1230,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-53 ddl -/*!100001 SET @@session.gtid_seq_no=53*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=53*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1238,7 +1238,7 @@ CREATE TABLE t1 (c11 MEDIUMINT UNSIGNED) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-54 -/*!100001 SET @@session.gtid_seq_no=54*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=54*//*!*/; START TRANSACTION /*!*/; # at # @@ -1262,7 +1262,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-55 -/*!100001 SET @@session.gtid_seq_no=55*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=55*//*!*/; START TRANSACTION /*!*/; # at # @@ -1285,7 +1285,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-56 -/*!100001 SET @@session.gtid_seq_no=56*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=56*//*!*/; START TRANSACTION /*!*/; # at # @@ -1306,7 +1306,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-57 ddl -/*!100001 SET @@session.gtid_seq_no=57*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=57*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1314,7 +1314,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-58 ddl -/*!100001 SET @@session.gtid_seq_no=58*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=58*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1322,7 +1322,7 @@ CREATE TABLE t1 (c13 INT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-59 -/*!100001 SET @@session.gtid_seq_no=59*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=59*//*!*/; START TRANSACTION /*!*/; # at # @@ -1343,7 +1343,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-60 -/*!100001 SET @@session.gtid_seq_no=60*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=60*//*!*/; START TRANSACTION /*!*/; # at # @@ -1364,7 +1364,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-61 ddl -/*!100001 SET @@session.gtid_seq_no=61*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=61*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1372,7 +1372,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-62 ddl -/*!100001 SET @@session.gtid_seq_no=62*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=62*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1380,7 +1380,7 @@ CREATE TABLE t1 (c14 INT UNSIGNED) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-63 -/*!100001 SET @@session.gtid_seq_no=63*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=63*//*!*/; START TRANSACTION /*!*/; # at # @@ -1404,7 +1404,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-64 -/*!100001 SET @@session.gtid_seq_no=64*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=64*//*!*/; START TRANSACTION /*!*/; # at # @@ -1427,7 +1427,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-65 -/*!100001 SET @@session.gtid_seq_no=65*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=65*//*!*/; START TRANSACTION /*!*/; # at # @@ -1448,7 +1448,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-66 ddl -/*!100001 SET @@session.gtid_seq_no=66*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=66*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1456,7 +1456,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-67 ddl -/*!100001 SET @@session.gtid_seq_no=67*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=67*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1464,7 +1464,7 @@ CREATE TABLE t1 (c16 BIGINT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-68 -/*!100001 SET @@session.gtid_seq_no=68*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=68*//*!*/; START TRANSACTION /*!*/; # at # @@ -1485,7 +1485,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-69 -/*!100001 SET @@session.gtid_seq_no=69*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=69*//*!*/; START TRANSACTION /*!*/; # at # @@ -1506,7 +1506,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-70 ddl -/*!100001 SET @@session.gtid_seq_no=70*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=70*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1514,7 +1514,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-71 ddl -/*!100001 SET @@session.gtid_seq_no=71*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=71*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1522,7 +1522,7 @@ CREATE TABLE t1 (c17 BIGINT UNSIGNED) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-72 -/*!100001 SET @@session.gtid_seq_no=72*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=72*//*!*/; START TRANSACTION /*!*/; # at # @@ -1546,7 +1546,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-73 -/*!100001 SET @@session.gtid_seq_no=73*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=73*//*!*/; START TRANSACTION /*!*/; # at # @@ -1569,7 +1569,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-74 -/*!100001 SET @@session.gtid_seq_no=74*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=74*//*!*/; START TRANSACTION /*!*/; # at # @@ -1590,7 +1590,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-75 ddl -/*!100001 SET @@session.gtid_seq_no=75*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=75*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1598,7 +1598,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-76 ddl -/*!100001 SET @@session.gtid_seq_no=76*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=76*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1606,7 +1606,7 @@ CREATE TABLE t1 (c19 FLOAT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-77 -/*!100001 SET @@session.gtid_seq_no=77*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=77*//*!*/; START TRANSACTION /*!*/; # at # @@ -1627,7 +1627,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-78 -/*!100001 SET @@session.gtid_seq_no=78*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=78*//*!*/; START TRANSACTION /*!*/; # at # @@ -1648,7 +1648,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-79 ddl -/*!100001 SET @@session.gtid_seq_no=79*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=79*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1656,7 +1656,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-80 ddl -/*!100001 SET @@session.gtid_seq_no=80*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=80*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1664,7 +1664,7 @@ CREATE TABLE t1 (c22 DOUBLE) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-81 -/*!100001 SET @@session.gtid_seq_no=81*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=81*//*!*/; START TRANSACTION /*!*/; # at # @@ -1685,7 +1685,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-82 -/*!100001 SET @@session.gtid_seq_no=82*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=82*//*!*/; START TRANSACTION /*!*/; # at # @@ -1706,7 +1706,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-83 ddl -/*!100001 SET @@session.gtid_seq_no=83*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=83*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1714,7 +1714,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-84 ddl -/*!100001 SET @@session.gtid_seq_no=84*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=84*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1722,7 +1722,7 @@ CREATE TABLE t1 (c25 DECIMAL(10,5)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-85 -/*!100001 SET @@session.gtid_seq_no=85*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=85*//*!*/; START TRANSACTION /*!*/; # at # @@ -1743,7 +1743,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-86 -/*!100001 SET @@session.gtid_seq_no=86*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=86*//*!*/; START TRANSACTION /*!*/; # at # @@ -1764,7 +1764,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-87 -/*!100001 SET @@session.gtid_seq_no=87*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=87*//*!*/; START TRANSACTION /*!*/; # at # @@ -1785,7 +1785,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-88 ddl -/*!100001 SET @@session.gtid_seq_no=88*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=88*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1793,7 +1793,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-89 ddl -/*!100001 SET @@session.gtid_seq_no=89*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=89*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1801,7 +1801,7 @@ CREATE TABLE t1 (c28 DATE) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-90 -/*!100001 SET @@session.gtid_seq_no=90*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=90*//*!*/; START TRANSACTION /*!*/; # at # @@ -1822,7 +1822,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-91 -/*!100001 SET @@session.gtid_seq_no=91*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=91*//*!*/; START TRANSACTION /*!*/; # at # @@ -1843,7 +1843,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-92 ddl -/*!100001 SET @@session.gtid_seq_no=92*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=92*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1851,7 +1851,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-93 ddl -/*!100001 SET @@session.gtid_seq_no=93*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=93*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1859,7 +1859,7 @@ CREATE TABLE t1 (c29 DATETIME) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-94 -/*!100001 SET @@session.gtid_seq_no=94*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=94*//*!*/; START TRANSACTION /*!*/; # at # @@ -1880,7 +1880,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-95 -/*!100001 SET @@session.gtid_seq_no=95*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=95*//*!*/; START TRANSACTION /*!*/; # at # @@ -1901,7 +1901,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-96 ddl -/*!100001 SET @@session.gtid_seq_no=96*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=96*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1909,7 +1909,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-97 ddl -/*!100001 SET @@session.gtid_seq_no=97*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=97*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1917,7 +1917,7 @@ CREATE TABLE t1 (c30 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURR /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-98 -/*!100001 SET @@session.gtid_seq_no=98*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=98*//*!*/; START TRANSACTION /*!*/; # at # @@ -1938,7 +1938,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-99 -/*!100001 SET @@session.gtid_seq_no=99*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=99*//*!*/; START TRANSACTION /*!*/; # at # @@ -1959,7 +1959,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-100 ddl -/*!100001 SET @@session.gtid_seq_no=100*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=100*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1967,7 +1967,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-101 ddl -/*!100001 SET @@session.gtid_seq_no=101*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=101*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1975,7 +1975,7 @@ CREATE TABLE t1 (c31 TIME) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-102 -/*!100001 SET @@session.gtid_seq_no=102*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=102*//*!*/; START TRANSACTION /*!*/; # at # @@ -1996,7 +1996,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-103 -/*!100001 SET @@session.gtid_seq_no=103*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=103*//*!*/; START TRANSACTION /*!*/; # at # @@ -2017,7 +2017,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-104 ddl -/*!100001 SET @@session.gtid_seq_no=104*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=104*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2025,7 +2025,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-105 ddl -/*!100001 SET @@session.gtid_seq_no=105*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=105*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2033,7 +2033,7 @@ CREATE TABLE t1 (c32 YEAR) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-106 -/*!100001 SET @@session.gtid_seq_no=106*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=106*//*!*/; START TRANSACTION /*!*/; # at # @@ -2054,7 +2054,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-107 -/*!100001 SET @@session.gtid_seq_no=107*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=107*//*!*/; START TRANSACTION /*!*/; # at # @@ -2075,7 +2075,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-108 ddl -/*!100001 SET @@session.gtid_seq_no=108*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=108*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2083,7 +2083,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-109 ddl -/*!100001 SET @@session.gtid_seq_no=109*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=109*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2091,7 +2091,7 @@ CREATE TABLE t1 (c33 CHAR) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-110 -/*!100001 SET @@session.gtid_seq_no=110*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=110*//*!*/; START TRANSACTION /*!*/; # at # @@ -2112,7 +2112,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-111 -/*!100001 SET @@session.gtid_seq_no=111*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=111*//*!*/; START TRANSACTION /*!*/; # at # @@ -2133,7 +2133,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-112 ddl -/*!100001 SET @@session.gtid_seq_no=112*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=112*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2141,7 +2141,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-113 ddl -/*!100001 SET @@session.gtid_seq_no=113*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=113*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2149,7 +2149,7 @@ CREATE TABLE t1 (c34 CHAR(0)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-114 -/*!100001 SET @@session.gtid_seq_no=114*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=114*//*!*/; START TRANSACTION /*!*/; # at # @@ -2170,7 +2170,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-115 -/*!100001 SET @@session.gtid_seq_no=115*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=115*//*!*/; START TRANSACTION /*!*/; # at # @@ -2191,7 +2191,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-116 ddl -/*!100001 SET @@session.gtid_seq_no=116*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=116*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2199,7 +2199,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-117 ddl -/*!100001 SET @@session.gtid_seq_no=117*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=117*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2207,7 +2207,7 @@ CREATE TABLE t1 (c35 CHAR(1)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-118 -/*!100001 SET @@session.gtid_seq_no=118*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=118*//*!*/; START TRANSACTION /*!*/; # at # @@ -2228,7 +2228,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-119 -/*!100001 SET @@session.gtid_seq_no=119*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=119*//*!*/; START TRANSACTION /*!*/; # at # @@ -2249,7 +2249,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-120 ddl -/*!100001 SET @@session.gtid_seq_no=120*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=120*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2257,7 +2257,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-121 ddl -/*!100001 SET @@session.gtid_seq_no=121*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=121*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2265,7 +2265,7 @@ CREATE TABLE t1 (c36 CHAR(255)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-122 -/*!100001 SET @@session.gtid_seq_no=122*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=122*//*!*/; START TRANSACTION /*!*/; # at # @@ -2286,7 +2286,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-123 -/*!100001 SET @@session.gtid_seq_no=123*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=123*//*!*/; START TRANSACTION /*!*/; # at # @@ -2307,7 +2307,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-124 ddl -/*!100001 SET @@session.gtid_seq_no=124*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=124*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2315,7 +2315,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-125 ddl -/*!100001 SET @@session.gtid_seq_no=125*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=125*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2324,7 +2324,7 @@ CREATE TABLE t1 (c37 NATIONAL CHAR) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-126 -/*!100001 SET @@session.gtid_seq_no=126*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=126*//*!*/; START TRANSACTION /*!*/; # at # @@ -2345,7 +2345,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-127 -/*!100001 SET @@session.gtid_seq_no=127*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=127*//*!*/; START TRANSACTION /*!*/; # at # @@ -2366,7 +2366,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-128 ddl -/*!100001 SET @@session.gtid_seq_no=128*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=128*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2374,7 +2374,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-129 ddl -/*!100001 SET @@session.gtid_seq_no=129*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=129*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2383,7 +2383,7 @@ CREATE TABLE t1 (c38 NATIONAL CHAR(0)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-130 -/*!100001 SET @@session.gtid_seq_no=130*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=130*//*!*/; START TRANSACTION /*!*/; # at # @@ -2404,7 +2404,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-131 -/*!100001 SET @@session.gtid_seq_no=131*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=131*//*!*/; START TRANSACTION /*!*/; # at # @@ -2425,7 +2425,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-132 ddl -/*!100001 SET @@session.gtid_seq_no=132*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=132*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2433,7 +2433,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-133 ddl -/*!100001 SET @@session.gtid_seq_no=133*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=133*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2442,7 +2442,7 @@ CREATE TABLE t1 (c39 NATIONAL CHAR(1)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-134 -/*!100001 SET @@session.gtid_seq_no=134*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=134*//*!*/; START TRANSACTION /*!*/; # at # @@ -2463,7 +2463,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-135 -/*!100001 SET @@session.gtid_seq_no=135*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=135*//*!*/; START TRANSACTION /*!*/; # at # @@ -2484,7 +2484,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-136 ddl -/*!100001 SET @@session.gtid_seq_no=136*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=136*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2492,7 +2492,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-137 ddl -/*!100001 SET @@session.gtid_seq_no=137*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=137*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2501,7 +2501,7 @@ CREATE TABLE t1 (c40 NATIONAL CHAR(255)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-138 -/*!100001 SET @@session.gtid_seq_no=138*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=138*//*!*/; START TRANSACTION /*!*/; # at # @@ -2522,7 +2522,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-139 -/*!100001 SET @@session.gtid_seq_no=139*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=139*//*!*/; START TRANSACTION /*!*/; # at # @@ -2543,7 +2543,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-140 -/*!100001 SET @@session.gtid_seq_no=140*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=140*//*!*/; START TRANSACTION /*!*/; # at # @@ -2567,7 +2567,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-141 ddl -/*!100001 SET @@session.gtid_seq_no=141*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=141*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2575,7 +2575,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-142 ddl -/*!100001 SET @@session.gtid_seq_no=142*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=142*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2584,7 +2584,7 @@ CREATE TABLE t1 (c41 CHAR CHARACTER SET UCS2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-143 -/*!100001 SET @@session.gtid_seq_no=143*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=143*//*!*/; START TRANSACTION /*!*/; # at # @@ -2605,7 +2605,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-144 -/*!100001 SET @@session.gtid_seq_no=144*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=144*//*!*/; START TRANSACTION /*!*/; # at # @@ -2626,7 +2626,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-145 ddl -/*!100001 SET @@session.gtid_seq_no=145*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=145*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2634,7 +2634,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-146 ddl -/*!100001 SET @@session.gtid_seq_no=146*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=146*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2643,7 +2643,7 @@ CREATE TABLE t1 (c42 CHAR(0) CHARACTER SET UCS2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-147 -/*!100001 SET @@session.gtid_seq_no=147*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=147*//*!*/; START TRANSACTION /*!*/; # at # @@ -2664,7 +2664,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-148 -/*!100001 SET @@session.gtid_seq_no=148*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=148*//*!*/; START TRANSACTION /*!*/; # at # @@ -2685,7 +2685,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-149 ddl -/*!100001 SET @@session.gtid_seq_no=149*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=149*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2693,7 +2693,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-150 ddl -/*!100001 SET @@session.gtid_seq_no=150*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=150*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2702,7 +2702,7 @@ CREATE TABLE t1 (c43 CHAR(1) CHARACTER SET UCS2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-151 -/*!100001 SET @@session.gtid_seq_no=151*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=151*//*!*/; START TRANSACTION /*!*/; # at # @@ -2723,7 +2723,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-152 -/*!100001 SET @@session.gtid_seq_no=152*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=152*//*!*/; START TRANSACTION /*!*/; # at # @@ -2744,7 +2744,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-153 ddl -/*!100001 SET @@session.gtid_seq_no=153*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=153*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2752,7 +2752,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-154 ddl -/*!100001 SET @@session.gtid_seq_no=154*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=154*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2761,7 +2761,7 @@ CREATE TABLE t1 (c44 CHAR(255) CHARACTER SET UCS2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-155 -/*!100001 SET @@session.gtid_seq_no=155*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=155*//*!*/; START TRANSACTION /*!*/; # at # @@ -2782,7 +2782,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-156 -/*!100001 SET @@session.gtid_seq_no=156*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=156*//*!*/; START TRANSACTION /*!*/; # at # @@ -2803,7 +2803,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-157 -/*!100001 SET @@session.gtid_seq_no=157*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=157*//*!*/; START TRANSACTION /*!*/; # at # @@ -2827,7 +2827,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-158 ddl -/*!100001 SET @@session.gtid_seq_no=158*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=158*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2835,7 +2835,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-159 ddl -/*!100001 SET @@session.gtid_seq_no=159*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=159*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2843,7 +2843,7 @@ CREATE TABLE t1 (c45 VARCHAR(0)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-160 -/*!100001 SET @@session.gtid_seq_no=160*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=160*//*!*/; START TRANSACTION /*!*/; # at # @@ -2864,7 +2864,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-161 -/*!100001 SET @@session.gtid_seq_no=161*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=161*//*!*/; START TRANSACTION /*!*/; # at # @@ -2885,7 +2885,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-162 ddl -/*!100001 SET @@session.gtid_seq_no=162*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=162*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2893,7 +2893,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-163 ddl -/*!100001 SET @@session.gtid_seq_no=163*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=163*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2901,7 +2901,7 @@ CREATE TABLE t1 (c46 VARCHAR(1)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-164 -/*!100001 SET @@session.gtid_seq_no=164*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=164*//*!*/; START TRANSACTION /*!*/; # at # @@ -2922,7 +2922,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-165 -/*!100001 SET @@session.gtid_seq_no=165*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=165*//*!*/; START TRANSACTION /*!*/; # at # @@ -2943,7 +2943,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-166 ddl -/*!100001 SET @@session.gtid_seq_no=166*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=166*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2951,7 +2951,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-167 ddl -/*!100001 SET @@session.gtid_seq_no=167*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=167*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -2959,7 +2959,7 @@ CREATE TABLE t1 (c47 VARCHAR(255)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-168 -/*!100001 SET @@session.gtid_seq_no=168*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=168*//*!*/; START TRANSACTION /*!*/; # at # @@ -2980,7 +2980,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-169 -/*!100001 SET @@session.gtid_seq_no=169*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=169*//*!*/; START TRANSACTION /*!*/; # at # @@ -3001,7 +3001,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-170 ddl -/*!100001 SET @@session.gtid_seq_no=170*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=170*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3009,7 +3009,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-171 ddl -/*!100001 SET @@session.gtid_seq_no=171*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=171*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3017,7 +3017,7 @@ CREATE TABLE t1 (c48 VARCHAR(261)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-172 -/*!100001 SET @@session.gtid_seq_no=172*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=172*//*!*/; START TRANSACTION /*!*/; # at # @@ -3038,7 +3038,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-173 -/*!100001 SET @@session.gtid_seq_no=173*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=173*//*!*/; START TRANSACTION /*!*/; # at # @@ -3059,7 +3059,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-174 ddl -/*!100001 SET @@session.gtid_seq_no=174*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=174*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3067,7 +3067,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-175 ddl -/*!100001 SET @@session.gtid_seq_no=175*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=175*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3076,7 +3076,7 @@ CREATE TABLE t1 (c49 NATIONAL VARCHAR(0)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-176 -/*!100001 SET @@session.gtid_seq_no=176*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=176*//*!*/; START TRANSACTION /*!*/; # at # @@ -3097,7 +3097,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-177 -/*!100001 SET @@session.gtid_seq_no=177*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=177*//*!*/; START TRANSACTION /*!*/; # at # @@ -3118,7 +3118,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-178 ddl -/*!100001 SET @@session.gtid_seq_no=178*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=178*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3126,7 +3126,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-179 ddl -/*!100001 SET @@session.gtid_seq_no=179*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=179*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3135,7 +3135,7 @@ CREATE TABLE t1 (c50 NATIONAL VARCHAR(1)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-180 -/*!100001 SET @@session.gtid_seq_no=180*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=180*//*!*/; START TRANSACTION /*!*/; # at # @@ -3156,7 +3156,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-181 -/*!100001 SET @@session.gtid_seq_no=181*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=181*//*!*/; START TRANSACTION /*!*/; # at # @@ -3177,7 +3177,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-182 ddl -/*!100001 SET @@session.gtid_seq_no=182*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=182*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3185,7 +3185,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-183 ddl -/*!100001 SET @@session.gtid_seq_no=183*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=183*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3194,7 +3194,7 @@ CREATE TABLE t1 (c51 NATIONAL VARCHAR(255)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-184 -/*!100001 SET @@session.gtid_seq_no=184*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=184*//*!*/; START TRANSACTION /*!*/; # at # @@ -3215,7 +3215,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-185 -/*!100001 SET @@session.gtid_seq_no=185*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=185*//*!*/; START TRANSACTION /*!*/; # at # @@ -3236,7 +3236,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-186 -/*!100001 SET @@session.gtid_seq_no=186*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=186*//*!*/; START TRANSACTION /*!*/; # at # @@ -3260,7 +3260,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-187 ddl -/*!100001 SET @@session.gtid_seq_no=187*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=187*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3268,7 +3268,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-188 ddl -/*!100001 SET @@session.gtid_seq_no=188*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=188*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3277,7 +3277,7 @@ CREATE TABLE t1 (c52 NATIONAL VARCHAR(261)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-189 -/*!100001 SET @@session.gtid_seq_no=189*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=189*//*!*/; START TRANSACTION /*!*/; # at # @@ -3298,7 +3298,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-190 -/*!100001 SET @@session.gtid_seq_no=190*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=190*//*!*/; START TRANSACTION /*!*/; # at # @@ -3319,7 +3319,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-191 -/*!100001 SET @@session.gtid_seq_no=191*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=191*//*!*/; START TRANSACTION /*!*/; # at # @@ -3343,7 +3343,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-192 ddl -/*!100001 SET @@session.gtid_seq_no=192*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=192*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3351,7 +3351,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-193 ddl -/*!100001 SET @@session.gtid_seq_no=193*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=193*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3360,7 +3360,7 @@ CREATE TABLE t1 (c53 VARCHAR(0) CHARACTER SET ucs2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-194 -/*!100001 SET @@session.gtid_seq_no=194*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=194*//*!*/; START TRANSACTION /*!*/; # at # @@ -3381,7 +3381,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-195 -/*!100001 SET @@session.gtid_seq_no=195*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=195*//*!*/; START TRANSACTION /*!*/; # at # @@ -3402,7 +3402,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-196 ddl -/*!100001 SET @@session.gtid_seq_no=196*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=196*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3410,7 +3410,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-197 ddl -/*!100001 SET @@session.gtid_seq_no=197*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=197*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3419,7 +3419,7 @@ CREATE TABLE t1 (c54 VARCHAR(1) CHARACTER SET ucs2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-198 -/*!100001 SET @@session.gtid_seq_no=198*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=198*//*!*/; START TRANSACTION /*!*/; # at # @@ -3440,7 +3440,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-199 -/*!100001 SET @@session.gtid_seq_no=199*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=199*//*!*/; START TRANSACTION /*!*/; # at # @@ -3461,7 +3461,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-200 ddl -/*!100001 SET @@session.gtid_seq_no=200*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=200*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3469,7 +3469,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-201 ddl -/*!100001 SET @@session.gtid_seq_no=201*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=201*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3478,7 +3478,7 @@ CREATE TABLE t1 (c55 VARCHAR(255) CHARACTER SET ucs2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-202 -/*!100001 SET @@session.gtid_seq_no=202*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=202*//*!*/; START TRANSACTION /*!*/; # at # @@ -3499,7 +3499,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-203 -/*!100001 SET @@session.gtid_seq_no=203*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=203*//*!*/; START TRANSACTION /*!*/; # at # @@ -3520,7 +3520,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-204 ddl -/*!100001 SET @@session.gtid_seq_no=204*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=204*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3528,7 +3528,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-205 ddl -/*!100001 SET @@session.gtid_seq_no=205*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=205*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3537,7 +3537,7 @@ CREATE TABLE t1 (c56 VARCHAR(261) CHARACTER SET ucs2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-206 -/*!100001 SET @@session.gtid_seq_no=206*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=206*//*!*/; START TRANSACTION /*!*/; # at # @@ -3558,7 +3558,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-207 -/*!100001 SET @@session.gtid_seq_no=207*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=207*//*!*/; START TRANSACTION /*!*/; # at # @@ -3579,7 +3579,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-208 ddl -/*!100001 SET @@session.gtid_seq_no=208*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=208*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3587,7 +3587,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-209 ddl -/*!100001 SET @@session.gtid_seq_no=209*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=209*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3595,7 +3595,7 @@ CREATE TABLE t1 (c57 BINARY) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-210 -/*!100001 SET @@session.gtid_seq_no=210*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=210*//*!*/; START TRANSACTION /*!*/; # at # @@ -3616,7 +3616,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-211 -/*!100001 SET @@session.gtid_seq_no=211*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=211*//*!*/; START TRANSACTION /*!*/; # at # @@ -3637,7 +3637,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-212 -/*!100001 SET @@session.gtid_seq_no=212*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=212*//*!*/; START TRANSACTION /*!*/; # at # @@ -3658,7 +3658,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-213 -/*!100001 SET @@session.gtid_seq_no=213*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=213*//*!*/; START TRANSACTION /*!*/; # at # @@ -3679,7 +3679,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-214 ddl -/*!100001 SET @@session.gtid_seq_no=214*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=214*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3687,7 +3687,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-215 ddl -/*!100001 SET @@session.gtid_seq_no=215*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=215*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3695,7 +3695,7 @@ CREATE TABLE t1 (c58 BINARY(0)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-216 -/*!100001 SET @@session.gtid_seq_no=216*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=216*//*!*/; START TRANSACTION /*!*/; # at # @@ -3716,7 +3716,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-217 -/*!100001 SET @@session.gtid_seq_no=217*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=217*//*!*/; START TRANSACTION /*!*/; # at # @@ -3737,7 +3737,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-218 ddl -/*!100001 SET @@session.gtid_seq_no=218*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=218*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3745,7 +3745,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-219 ddl -/*!100001 SET @@session.gtid_seq_no=219*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=219*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3753,7 +3753,7 @@ CREATE TABLE t1 (c59 BINARY(1)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-220 -/*!100001 SET @@session.gtid_seq_no=220*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=220*//*!*/; START TRANSACTION /*!*/; # at # @@ -3774,7 +3774,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-221 -/*!100001 SET @@session.gtid_seq_no=221*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=221*//*!*/; START TRANSACTION /*!*/; # at # @@ -3795,7 +3795,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-222 -/*!100001 SET @@session.gtid_seq_no=222*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=222*//*!*/; START TRANSACTION /*!*/; # at # @@ -3816,7 +3816,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-223 -/*!100001 SET @@session.gtid_seq_no=223*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=223*//*!*/; START TRANSACTION /*!*/; # at # @@ -3837,7 +3837,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-224 ddl -/*!100001 SET @@session.gtid_seq_no=224*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=224*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3845,7 +3845,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-225 ddl -/*!100001 SET @@session.gtid_seq_no=225*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=225*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3853,7 +3853,7 @@ CREATE TABLE t1 (c60 BINARY(255)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-226 -/*!100001 SET @@session.gtid_seq_no=226*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=226*//*!*/; START TRANSACTION /*!*/; # at # @@ -3874,7 +3874,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-227 -/*!100001 SET @@session.gtid_seq_no=227*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=227*//*!*/; START TRANSACTION /*!*/; # at # @@ -3895,7 +3895,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-228 -/*!100001 SET @@session.gtid_seq_no=228*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=228*//*!*/; START TRANSACTION /*!*/; # at # @@ -3916,7 +3916,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-229 -/*!100001 SET @@session.gtid_seq_no=229*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=229*//*!*/; START TRANSACTION /*!*/; # at # @@ -3937,7 +3937,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-230 ddl -/*!100001 SET @@session.gtid_seq_no=230*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=230*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3945,7 +3945,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-231 ddl -/*!100001 SET @@session.gtid_seq_no=231*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=231*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -3953,7 +3953,7 @@ CREATE TABLE t1 (c61 VARBINARY(0)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-232 -/*!100001 SET @@session.gtid_seq_no=232*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=232*//*!*/; START TRANSACTION /*!*/; # at # @@ -3974,7 +3974,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-233 -/*!100001 SET @@session.gtid_seq_no=233*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=233*//*!*/; START TRANSACTION /*!*/; # at # @@ -3995,7 +3995,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-234 ddl -/*!100001 SET @@session.gtid_seq_no=234*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=234*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4003,7 +4003,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-235 ddl -/*!100001 SET @@session.gtid_seq_no=235*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=235*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4011,7 +4011,7 @@ CREATE TABLE t1 (c62 VARBINARY(1)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-236 -/*!100001 SET @@session.gtid_seq_no=236*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=236*//*!*/; START TRANSACTION /*!*/; # at # @@ -4032,7 +4032,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-237 -/*!100001 SET @@session.gtid_seq_no=237*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=237*//*!*/; START TRANSACTION /*!*/; # at # @@ -4053,7 +4053,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-238 -/*!100001 SET @@session.gtid_seq_no=238*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=238*//*!*/; START TRANSACTION /*!*/; # at # @@ -4074,7 +4074,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-239 -/*!100001 SET @@session.gtid_seq_no=239*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=239*//*!*/; START TRANSACTION /*!*/; # at # @@ -4095,7 +4095,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-240 ddl -/*!100001 SET @@session.gtid_seq_no=240*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=240*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4103,7 +4103,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-241 ddl -/*!100001 SET @@session.gtid_seq_no=241*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=241*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4111,7 +4111,7 @@ CREATE TABLE t1 (c63 VARBINARY(255)) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-242 -/*!100001 SET @@session.gtid_seq_no=242*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=242*//*!*/; START TRANSACTION /*!*/; # at # @@ -4132,7 +4132,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-243 -/*!100001 SET @@session.gtid_seq_no=243*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=243*//*!*/; START TRANSACTION /*!*/; # at # @@ -4153,7 +4153,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-244 -/*!100001 SET @@session.gtid_seq_no=244*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=244*//*!*/; START TRANSACTION /*!*/; # at # @@ -4174,7 +4174,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-245 -/*!100001 SET @@session.gtid_seq_no=245*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=245*//*!*/; START TRANSACTION /*!*/; # at # @@ -4195,7 +4195,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-246 ddl -/*!100001 SET @@session.gtid_seq_no=246*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=246*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4203,7 +4203,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-247 ddl -/*!100001 SET @@session.gtid_seq_no=247*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=247*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4211,7 +4211,7 @@ CREATE TABLE t1 (c65 TINYBLOB) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-248 -/*!100001 SET @@session.gtid_seq_no=248*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=248*//*!*/; START TRANSACTION /*!*/; # at # @@ -4232,7 +4232,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-249 -/*!100001 SET @@session.gtid_seq_no=249*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=249*//*!*/; START TRANSACTION /*!*/; # at # @@ -4253,7 +4253,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-250 ddl -/*!100001 SET @@session.gtid_seq_no=250*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=250*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4261,7 +4261,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-251 ddl -/*!100001 SET @@session.gtid_seq_no=251*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=251*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4269,7 +4269,7 @@ CREATE TABLE t1 (c68 BLOB) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-252 -/*!100001 SET @@session.gtid_seq_no=252*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=252*//*!*/; START TRANSACTION /*!*/; # at # @@ -4290,7 +4290,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-253 -/*!100001 SET @@session.gtid_seq_no=253*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=253*//*!*/; START TRANSACTION /*!*/; # at # @@ -4311,7 +4311,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-254 ddl -/*!100001 SET @@session.gtid_seq_no=254*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=254*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4319,7 +4319,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-255 ddl -/*!100001 SET @@session.gtid_seq_no=255*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=255*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4327,7 +4327,7 @@ CREATE TABLE t1 (c71 MEDIUMBLOB) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-256 -/*!100001 SET @@session.gtid_seq_no=256*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=256*//*!*/; START TRANSACTION /*!*/; # at # @@ -4348,7 +4348,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-257 -/*!100001 SET @@session.gtid_seq_no=257*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=257*//*!*/; START TRANSACTION /*!*/; # at # @@ -4369,7 +4369,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-258 ddl -/*!100001 SET @@session.gtid_seq_no=258*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=258*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4377,7 +4377,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-259 ddl -/*!100001 SET @@session.gtid_seq_no=259*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=259*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4385,7 +4385,7 @@ CREATE TABLE t1 (c74 LONGBLOB) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-260 -/*!100001 SET @@session.gtid_seq_no=260*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=260*//*!*/; START TRANSACTION /*!*/; # at # @@ -4406,7 +4406,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-261 -/*!100001 SET @@session.gtid_seq_no=261*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=261*//*!*/; START TRANSACTION /*!*/; # at # @@ -4427,7 +4427,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-262 ddl -/*!100001 SET @@session.gtid_seq_no=262*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=262*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4435,7 +4435,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-263 ddl -/*!100001 SET @@session.gtid_seq_no=263*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=263*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4443,7 +4443,7 @@ CREATE TABLE t1 (c66 TINYTEXT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-264 -/*!100001 SET @@session.gtid_seq_no=264*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=264*//*!*/; START TRANSACTION /*!*/; # at # @@ -4464,7 +4464,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-265 -/*!100001 SET @@session.gtid_seq_no=265*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=265*//*!*/; START TRANSACTION /*!*/; # at # @@ -4485,7 +4485,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-266 ddl -/*!100001 SET @@session.gtid_seq_no=266*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=266*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4493,7 +4493,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-267 ddl -/*!100001 SET @@session.gtid_seq_no=267*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=267*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4501,7 +4501,7 @@ CREATE TABLE t1 (c69 TEXT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-268 -/*!100001 SET @@session.gtid_seq_no=268*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=268*//*!*/; START TRANSACTION /*!*/; # at # @@ -4522,7 +4522,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-269 -/*!100001 SET @@session.gtid_seq_no=269*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=269*//*!*/; START TRANSACTION /*!*/; # at # @@ -4543,7 +4543,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-270 ddl -/*!100001 SET @@session.gtid_seq_no=270*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=270*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4551,7 +4551,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-271 ddl -/*!100001 SET @@session.gtid_seq_no=271*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=271*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4559,7 +4559,7 @@ CREATE TABLE t1 (c72 MEDIUMTEXT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-272 -/*!100001 SET @@session.gtid_seq_no=272*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=272*//*!*/; START TRANSACTION /*!*/; # at # @@ -4580,7 +4580,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-273 -/*!100001 SET @@session.gtid_seq_no=273*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=273*//*!*/; START TRANSACTION /*!*/; # at # @@ -4601,7 +4601,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-274 ddl -/*!100001 SET @@session.gtid_seq_no=274*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=274*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4609,7 +4609,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-275 ddl -/*!100001 SET @@session.gtid_seq_no=275*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=275*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4617,7 +4617,7 @@ CREATE TABLE t1 (c75 LONGTEXT) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-276 -/*!100001 SET @@session.gtid_seq_no=276*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=276*//*!*/; START TRANSACTION /*!*/; # at # @@ -4638,7 +4638,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-277 -/*!100001 SET @@session.gtid_seq_no=277*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=277*//*!*/; START TRANSACTION /*!*/; # at # @@ -4659,7 +4659,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-278 ddl -/*!100001 SET @@session.gtid_seq_no=278*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=278*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4667,7 +4667,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-279 ddl -/*!100001 SET @@session.gtid_seq_no=279*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=279*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4676,7 +4676,7 @@ CREATE TABLE t1 (c67 TINYTEXT CHARACTER SET UCS2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-280 -/*!100001 SET @@session.gtid_seq_no=280*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=280*//*!*/; START TRANSACTION /*!*/; # at # @@ -4697,7 +4697,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-281 -/*!100001 SET @@session.gtid_seq_no=281*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=281*//*!*/; START TRANSACTION /*!*/; # at # @@ -4718,7 +4718,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-282 ddl -/*!100001 SET @@session.gtid_seq_no=282*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=282*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4726,7 +4726,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-283 ddl -/*!100001 SET @@session.gtid_seq_no=283*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=283*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4735,7 +4735,7 @@ CREATE TABLE t1 (c70 TEXT CHARACTER SET UCS2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-284 -/*!100001 SET @@session.gtid_seq_no=284*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=284*//*!*/; START TRANSACTION /*!*/; # at # @@ -4756,7 +4756,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-285 -/*!100001 SET @@session.gtid_seq_no=285*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=285*//*!*/; START TRANSACTION /*!*/; # at # @@ -4777,7 +4777,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-286 ddl -/*!100001 SET @@session.gtid_seq_no=286*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=286*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4785,7 +4785,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-287 ddl -/*!100001 SET @@session.gtid_seq_no=287*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=287*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4794,7 +4794,7 @@ CREATE TABLE t1 (c73 MEDIUMTEXT CHARACTER SET UCS2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-288 -/*!100001 SET @@session.gtid_seq_no=288*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=288*//*!*/; START TRANSACTION /*!*/; # at # @@ -4815,7 +4815,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-289 -/*!100001 SET @@session.gtid_seq_no=289*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=289*//*!*/; START TRANSACTION /*!*/; # at # @@ -4836,7 +4836,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-290 ddl -/*!100001 SET @@session.gtid_seq_no=290*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=290*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4844,7 +4844,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-291 ddl -/*!100001 SET @@session.gtid_seq_no=291*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=291*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4853,7 +4853,7 @@ CREATE TABLE t1 (c76 LONGTEXT CHARACTER SET UCS2) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-292 -/*!100001 SET @@session.gtid_seq_no=292*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=292*//*!*/; START TRANSACTION /*!*/; # at # @@ -4874,7 +4874,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-293 -/*!100001 SET @@session.gtid_seq_no=293*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=293*//*!*/; START TRANSACTION /*!*/; # at # @@ -4895,7 +4895,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-294 ddl -/*!100001 SET @@session.gtid_seq_no=294*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=294*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4903,7 +4903,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-295 ddl -/*!100001 SET @@session.gtid_seq_no=295*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=295*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4911,7 +4911,7 @@ CREATE TABLE t1 (c77 ENUM('a','b','c')) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-296 -/*!100001 SET @@session.gtid_seq_no=296*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=296*//*!*/; START TRANSACTION /*!*/; # at # @@ -4932,7 +4932,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-297 -/*!100001 SET @@session.gtid_seq_no=297*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=297*//*!*/; START TRANSACTION /*!*/; # at # @@ -4953,7 +4953,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-298 ddl -/*!100001 SET @@session.gtid_seq_no=298*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=298*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4961,7 +4961,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-299 ddl -/*!100001 SET @@session.gtid_seq_no=299*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=299*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -4969,7 +4969,7 @@ CREATE TABLE t1 (c78 SET('a','b','c','d','e','f')) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-300 -/*!100001 SET @@session.gtid_seq_no=300*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=300*//*!*/; START TRANSACTION /*!*/; # at # @@ -4990,7 +4990,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-301 -/*!100001 SET @@session.gtid_seq_no=301*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=301*//*!*/; START TRANSACTION /*!*/; # at # @@ -5011,7 +5011,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-302 -/*!100001 SET @@session.gtid_seq_no=302*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=302*//*!*/; START TRANSACTION /*!*/; # at # @@ -5032,7 +5032,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-303 -/*!100001 SET @@session.gtid_seq_no=303*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=303*//*!*/; START TRANSACTION /*!*/; # at # @@ -5053,7 +5053,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-304 -/*!100001 SET @@session.gtid_seq_no=304*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=304*//*!*/; START TRANSACTION /*!*/; # at # @@ -5074,7 +5074,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-305 -/*!100001 SET @@session.gtid_seq_no=305*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=305*//*!*/; START TRANSACTION /*!*/; # at # @@ -5095,7 +5095,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-306 -/*!100001 SET @@session.gtid_seq_no=306*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=306*//*!*/; START TRANSACTION /*!*/; # at # @@ -5116,7 +5116,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-307 -/*!100001 SET @@session.gtid_seq_no=307*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=307*//*!*/; START TRANSACTION /*!*/; # at # @@ -5137,7 +5137,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-308 ddl -/*!100001 SET @@session.gtid_seq_no=308*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=308*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5145,7 +5145,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-309 ddl -/*!100001 SET @@session.gtid_seq_no=309*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=309*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5153,7 +5153,7 @@ CREATE TABLE t1 (a int NOT NULL DEFAULT 0, b int NOT NULL DEFAULT 0) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-310 ddl -/*!100001 SET @@session.gtid_seq_no=310*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=310*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5161,7 +5161,7 @@ CREATE TABLE t2 (a int NOT NULL DEFAULT 0, b int NOT NULL DEFAULT 0) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-311 -/*!100001 SET @@session.gtid_seq_no=311*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=311*//*!*/; START TRANSACTION /*!*/; # at # @@ -5183,7 +5183,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-312 -/*!100001 SET @@session.gtid_seq_no=312*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=312*//*!*/; START TRANSACTION /*!*/; # at # @@ -5205,7 +5205,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-313 -/*!100001 SET @@session.gtid_seq_no=313*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=313*//*!*/; START TRANSACTION /*!*/; # at # @@ -5227,7 +5227,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-314 -/*!100001 SET @@session.gtid_seq_no=314*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=314*//*!*/; START TRANSACTION /*!*/; # at # @@ -5249,7 +5249,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-315 -/*!100001 SET @@session.gtid_seq_no=315*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=315*//*!*/; START TRANSACTION /*!*/; # at # @@ -5299,7 +5299,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-316 ddl -/*!100001 SET @@session.gtid_seq_no=316*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=316*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5307,7 +5307,7 @@ DROP TABLE `t1`,`t2` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-317 ddl -/*!100001 SET @@session.gtid_seq_no=317*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=317*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5317,7 +5317,7 @@ c_text_utf8 blob ) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-318 -/*!100001 SET @@session.gtid_seq_no=318*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=318*//*!*/; START TRANSACTION /*!*/; # at # @@ -5340,7 +5340,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-319 ddl -/*!100001 SET @@session.gtid_seq_no=319*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=319*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5367,10 +5367,10 @@ DELIMITER /*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-320 -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=320*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=320*//*!*/; START TRANSACTION /*!*/; # at # @@ -5396,10 +5396,10 @@ DELIMITER /*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-324 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=324*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=324*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -5416,7 +5416,7 @@ CREATE TABLE t1 (a GEOMETRY DEFAULT NULL) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-325 -/*!100001 SET @@session.gtid_seq_no=325*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=325*//*!*/; START TRANSACTION /*!*/; # at # @@ -5437,7 +5437,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-326 -/*!100001 SET @@session.gtid_seq_no=326*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=326*//*!*/; START TRANSACTION /*!*/; # at # @@ -5458,7 +5458,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-327 ddl -/*!100001 SET @@session.gtid_seq_no=327*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=327*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result index c0c6b7dbc7f..d83c1fec521 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result @@ -2261,10 +2261,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -2370,7 +2370,7 @@ crn INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -2555,7 +2555,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -2740,7 +2740,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -3094,7 +3094,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -3448,7 +3448,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -3803,7 +3803,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 trans -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -4157,7 +4157,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 trans -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -4512,7 +4512,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 trans -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -4698,7 +4698,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 trans -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -4883,7 +4883,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 trans -/*!100001 SET @@session.gtid_seq_no=11*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; START TRANSACTION /*!*/; # at # @@ -5069,7 +5069,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 trans -/*!100001 SET @@session.gtid_seq_no=12*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; START TRANSACTION /*!*/; # at # @@ -5354,10 +5354,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -5379,7 +5379,7 @@ crn INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -5449,7 +5449,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -5528,7 +5528,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -5755,10 +5755,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -5780,7 +5780,7 @@ c_1_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5793,7 +5793,7 @@ c_2_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5806,7 +5806,7 @@ c_3_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -5876,7 +5876,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -5946,7 +5946,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -6016,7 +6016,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 trans -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -6206,7 +6206,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 trans -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -6396,10 +6396,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -6421,7 +6421,7 @@ c3 VARCHAR(60) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result index 9186d065ac7..ae5fcc1b7f8 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result @@ -2259,10 +2259,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -2368,7 +2368,7 @@ crn INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -2555,7 +2555,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -2742,7 +2742,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -3098,7 +3098,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -3454,7 +3454,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -3811,7 +3811,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -4167,7 +4167,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -4524,7 +4524,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -4712,7 +4712,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -4899,7 +4899,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 -/*!100001 SET @@session.gtid_seq_no=11*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; START TRANSACTION /*!*/; # at # @@ -5087,7 +5087,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 -/*!100001 SET @@session.gtid_seq_no=12*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; START TRANSACTION /*!*/; # at # @@ -5374,10 +5374,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -5399,7 +5399,7 @@ crn INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -5471,7 +5471,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -5552,7 +5552,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -5781,10 +5781,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -5806,7 +5806,7 @@ c_1_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5819,7 +5819,7 @@ c_2_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -5832,7 +5832,7 @@ c_3_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -5904,7 +5904,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -5976,7 +5976,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -6048,7 +6048,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -6240,7 +6240,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -6432,10 +6432,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -6457,7 +6457,7 @@ c3 VARCHAR(60) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result index 1a49ad29ed3..1a51483e55b 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result @@ -137,10 +137,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -161,7 +161,7 @@ c2 VARCHAR(20) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -173,7 +173,7 @@ c2 VARCHAR(20) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -242,7 +242,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 ddl -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -250,7 +250,7 @@ TRUNCATE TABLE t1 /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 ddl -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -258,7 +258,7 @@ TRUNCATE TABLE t1 /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -288,7 +288,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -327,7 +327,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -349,7 +349,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 trans -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -418,7 +418,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 ddl -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -426,7 +426,7 @@ TRUNCATE TABLE t1 /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 ddl -/*!100001 SET @@session.gtid_seq_no=11*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -434,7 +434,7 @@ TRUNCATE TABLE t2 /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 -/*!100001 SET @@session.gtid_seq_no=12*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; START TRANSACTION /*!*/; # at # @@ -464,7 +464,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-13 -/*!100001 SET @@session.gtid_seq_no=13*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=13*//*!*/; START TRANSACTION /*!*/; # at # @@ -503,7 +503,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-14 -/*!100001 SET @@session.gtid_seq_no=14*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=14*//*!*/; START TRANSACTION /*!*/; # at # @@ -525,7 +525,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-15 ddl -/*!100001 SET @@session.gtid_seq_no=15*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=15*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -533,7 +533,7 @@ TRUNCATE TABLE t1 /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-16 ddl -/*!100001 SET @@session.gtid_seq_no=16*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=16*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result index edf8f4e7f71..74e1191983c 100644 --- a/mysql-test/suite/binlog/r/binlog_row_annotate.result +++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result @@ -108,10 +108,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -127,7 +127,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -135,7 +135,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -143,7 +143,7 @@ CREATE DATABASE test3 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -170,7 +170,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -197,7 +197,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -224,7 +224,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -266,7 +266,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -293,7 +293,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -346,10 +346,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -365,15 +365,15 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -400,7 +400,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -413,7 +413,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -426,7 +426,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -456,7 +456,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -469,7 +469,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -505,10 +505,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -524,7 +524,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -532,7 +532,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -540,7 +540,7 @@ CREATE DATABASE test3 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -565,7 +565,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -590,7 +590,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -615,7 +615,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -653,7 +653,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -678,7 +678,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -731,10 +731,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -750,7 +750,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -758,7 +758,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -766,7 +766,7 @@ CREATE DATABASE test3 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -793,7 +793,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -820,7 +820,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -847,7 +847,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -889,7 +889,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -916,7 +916,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -969,10 +969,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -988,15 +988,15 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -1023,7 +1023,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -1036,7 +1036,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -1049,7 +1049,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -1079,7 +1079,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -1092,7 +1092,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -1128,10 +1128,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1147,7 +1147,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1155,7 +1155,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -1163,7 +1163,7 @@ CREATE DATABASE test3 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -1187,7 +1187,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -1211,7 +1211,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -1235,7 +1235,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -1272,7 +1272,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -1296,7 +1296,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result index de8a9e89992..9cc0e60a904 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -83,10 +83,10 @@ DELIMITER /*!*/; #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=#*//*!*/; -/*!100001 SET @@session.server_id=#*//*!*/; -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=#*//*!*/; +/*M!100001 SET @@session.server_id=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -104,7 +104,7 @@ CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8) /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -125,7 +125,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -146,7 +146,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -167,7 +167,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -188,7 +188,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -209,7 +209,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -230,7 +230,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=XXX/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result index 07e469333da..7beef1149be 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result @@ -41,10 +41,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # use `new_test1`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= @@ -61,7 +61,7 @@ CREATE TABLE t1 (a INT, b INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2 -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -87,7 +87,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test2`/*!*/; @@ -96,7 +96,7 @@ CREATE TABLE t2 (a INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -120,7 +120,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -142,7 +142,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 ddl -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; # at # use `new_test3`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= @@ -151,7 +151,7 @@ CREATE TABLE t3 (a INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -175,7 +175,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -197,7 +197,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -236,7 +236,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -282,10 +282,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # use `new_test1`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= @@ -302,7 +302,7 @@ CREATE TABLE t1 (a INT, b INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2 -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -328,7 +328,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test2`/*!*/; @@ -337,7 +337,7 @@ CREATE TABLE t2 (a INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -361,7 +361,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -383,7 +383,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 ddl -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; # at # use `new_test3`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= @@ -392,7 +392,7 @@ CREATE TABLE t3 (a INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -416,7 +416,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -438,7 +438,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -477,7 +477,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result index 380e6f86fdf..a9dd79e77ed 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -85,10 +85,10 @@ DELIMITER /*!*/; #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=#*//*!*/; -/*!100001 SET @@session.server_id=#*//*!*/; -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=#*//*!*/; +/*M!100001 SET @@session.server_id=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -106,7 +106,7 @@ CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8) /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -121,7 +121,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -137,7 +137,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -152,7 +152,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -167,7 +167,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -183,7 +183,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -198,7 +198,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=XXX/*!*/; diff --git a/mysql-test/suite/binlog/r/flashback.result b/mysql-test/suite/binlog/r/flashback.result index ec767f62152..da6dc7e07ff 100644 --- a/mysql-test/suite/binlog/r/flashback.result +++ b/mysql-test/suite/binlog/r/flashback.result @@ -51,10 +51,10 @@ ROLLBACK/*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -80,7 +80,7 @@ c08 TEXT /*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -106,7 +106,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -132,7 +132,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -158,7 +158,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -212,7 +212,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result index 2a20f9391b2..0b35e99f807 100644 --- a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result +++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result @@ -112,10 +112,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -131,7 +131,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -139,7 +139,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -147,7 +147,7 @@ CREATE DATABASE test3 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -174,7 +174,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -201,7 +201,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -228,7 +228,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -270,7 +270,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -297,7 +297,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -353,10 +353,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -372,15 +372,15 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -407,7 +407,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -420,7 +420,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -433,7 +433,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -463,7 +463,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -476,7 +476,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -515,10 +515,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -534,7 +534,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -542,7 +542,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -550,7 +550,7 @@ CREATE DATABASE test3 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -574,7 +574,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -598,7 +598,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -622,7 +622,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -659,7 +659,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -683,7 +683,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # diff --git a/mysql-test/suite/compat/oracle/r/column_compression.result b/mysql-test/suite/compat/oracle/r/column_compression.result index 2709fe048d9..ab11e364588 100644 --- a/mysql-test/suite/compat/oracle/r/column_compression.result +++ b/mysql-test/suite/compat/oracle/r/column_compression.result @@ -24,10 +24,10 @@ d TINYTEXT COMPRESSED BINARY SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid("a")), - "b" varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - "c" varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, - "d" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid("a")), + "b" varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, + "c" varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, + "d" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; # @@ -41,49 +41,49 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -94,35 +94,35 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -134,7 +134,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED); @@ -143,7 +143,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED); @@ -152,7 +152,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -192,49 +192,49 @@ CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -245,35 +245,35 @@ CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -285,7 +285,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) ASCII COMPRESSED); @@ -294,7 +294,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) BYTE COMPRESSED); @@ -303,7 +303,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -343,49 +343,49 @@ CREATE TABLE t1 (a TINYTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -396,35 +396,35 @@ CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ DEFAULT '' + "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -436,7 +436,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED); @@ -445,7 +445,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED); @@ -454,7 +454,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -494,49 +494,49 @@ CREATE TABLE t1 (a TEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" blob(65535) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -547,35 +547,35 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT '' + "a" blob(65535) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ DEFAULT '' + "a" text /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -587,7 +587,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT ASCII COMPRESSED); @@ -596,7 +596,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT BYTE COMPRESSED); @@ -605,7 +605,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" blob(65535) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -645,49 +645,49 @@ CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -698,35 +698,35 @@ CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ DEFAULT '' + "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -738,7 +738,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED); @@ -747,7 +747,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED); @@ -756,7 +756,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -796,49 +796,49 @@ CREATE TABLE t1 (a LONGTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -849,35 +849,35 @@ CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ DEFAULT '' + "a" longtext /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -889,7 +889,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED); @@ -898,7 +898,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED); @@ -907,7 +907,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -949,7 +949,7 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -960,21 +960,21 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" varchar(10) /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -986,7 +986,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED); @@ -995,7 +995,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1024,7 +1024,7 @@ CREATE TABLE t1 (a TINYBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1035,21 +1035,21 @@ CREATE TABLE t1 (a TINYBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" tinyblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -1061,7 +1061,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED); @@ -1070,7 +1070,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1099,7 +1099,7 @@ CREATE TABLE t1 (a BLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1110,21 +1110,21 @@ CREATE TABLE t1 (a BLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a BLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a BLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" longblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -1136,7 +1136,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a BLOB NULL COMPRESSED); @@ -1145,7 +1145,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1174,7 +1174,7 @@ CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1185,21 +1185,21 @@ CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" mediumblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -1211,7 +1211,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED); @@ -1220,7 +1220,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1249,7 +1249,7 @@ CREATE TABLE t1 (a LONGBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1260,21 +1260,21 @@ CREATE TABLE t1 (a LONGBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" longblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -1286,7 +1286,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED); @@ -1295,7 +1295,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1324,7 +1324,7 @@ CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED); diff --git a/mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result b/mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result index c01524b3cfa..26468bd2415 100644 --- a/mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result +++ b/mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result @@ -24,7 +24,7 @@ b1 VARCHAR(64) AS (LPAD(b0,10)) PERSISTENT CREATE VIEW v2 AS SELECT LTRIM(now()) AS a0, LPAD(now(),10) AS b0; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( diff --git a/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result b/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result index 508aea0e74f..a0e9bb463f6 100644 --- a/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result +++ b/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result @@ -34,7 +34,7 @@ PROCEDURE p1; FUNCTION f1 RETURN INT; END; $$ -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result index 18082027660..95797da2e15 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result +++ b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result @@ -1,3 +1,5 @@ +SET @start_encr_threads = @@global.innodb_encryption_threads; +SET @start_encrypt_tables = @@global.innodb_encrypt_tables; CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes; CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB; CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes; @@ -116,3 +118,42 @@ NOT FOUND /temp/ in t2.ibd # t3 ... on expecting NOT FOUND UNLOCK TABLES; DROP TABLE t1, t2, t3; +# +# MDEV-34670 IMPORT TABLESPACE unnecessary traverses +# tablespace list +# +SET GLOBAL innodb_encrypt_tables= OFF; +SET GLOBAL innodb_encryption_threads= 0; +CREATE TABLE t1(f1 int,f2 text)ENGINE=InnoDB; +INSERT INTO t1 VALUES(1, "InnoDB"); +CREATE TABLE t2 LIKE t1; +ALTER TABLE t2 DISCARD TABLESPACE; +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +ALTER TABLE t2 IMPORT TABLESPACE; +SET GLOBAL innodb_encryption_threads=2; +SET GLOBAL innodb_encrypt_tables = ON; +# Wait max 10 min for key encryption threads to encrypt all spaces +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 +AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry'; +NAME +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 +AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry'; +NAME +innodb_system +test/t1 +test/t2 +SET GLOBAL innodb_encrypt_tables = OFF; +# Wait max 10 min for key encryption threads to decrypt all spaces +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 +AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry'; +NAME +innodb_system +test/t1 +test/t2 +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 +AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry'; +NAME +DROP TABLE t1, t2; +SET GLOBAL innodb_encryption_threads=@start_encr_threads; +SET GLOBAL innodb_encrypt_tables=@start_encrypt_tables; diff --git a/mysql-test/suite/encryption/r/tempfiles_encrypted.result b/mysql-test/suite/encryption/r/tempfiles_encrypted.result index 1abe180548b..2718f4b3ab0 100644 --- a/mysql-test/suite/encryption/r/tempfiles_encrypted.result +++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result @@ -1253,15 +1253,10 @@ insert into t1 values (1,1,'foo'); insert into t1 values (2,2,'bar'); select count(*) over (order by a,b -range between unbounded preceding and current row) as count +range between 1 preceding and current row) as count from t1; ERROR HY000: RANGE-type frame requires ORDER BY clause with single sort key select -count(*) over (order by c -range between unbounded preceding and current row) as count -from t1; -ERROR HY000: Numeric datatype is required for RANGE-type frame -select count(*) over (order by a range between 'abcd' preceding and current row) as count from t1; @@ -1283,6 +1278,56 @@ rows between current row and 3.14 following) as count from t1; ERROR HY000: Integer is required for ROWS-type frame # +# MDEV-19052 Range-type window frame supports only numeric datatype +# +select +count(*) over (order by c +range between unbounded preceding and current row) as r +from t1; +r +1 +2 +select +count(*) over (order by c +range between current row and unbounded following) as r +from t1; +r +2 +1 +select +count(*) over (order by c +range between unbounded preceding and unbounded following) as r +from t1; +r +2 +2 +create table t2 (a int, b varchar(5)); +insert into t2 values (1,'a'), (2, 'b'), (3, 'c'); +select sum(a) over (order by b range between unbounded preceding and current row) as r from t2; +r +1 +3 +6 +insert into t1 values (3,3,'goo'); +insert into t1 values (3,1,'har'); +insert into t1 values (1,4,'har'); +select a, b, sum(b) over (order by a, b desc range between unbounded preceding and current row) as r from t1; +a b r +1 4 4 +1 1 5 +2 2 7 +3 3 10 +3 1 11 +select a, b, sum(b) over (order by a desc, b range between unbounded preceding and current row) as r from t1; +a b r +3 1 1 +3 3 4 +2 2 6 +1 1 7 +1 4 11 +drop table t2; +delete from t1 where a >= 3 or b = 4; +# # EXCLUDE clause is parsed but not supported # select diff --git a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test index 5f02d966e7e..e33aaec3e21 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test +++ b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test @@ -2,7 +2,8 @@ -- source include/have_example_key_management_plugin.inc -- source include/not_valgrind.inc -- source include/not_embedded.inc - +SET @start_encr_threads = @@global.innodb_encryption_threads; +SET @start_encrypt_tables = @@global.innodb_encrypt_tables; let MYSQLD_DATADIR = `SELECT @@datadir`; --let SEARCH_RANGE = 10000000 @@ -124,3 +125,56 @@ FLUSH TABLES t1, t2, t3 FOR EXPORT; UNLOCK TABLES; DROP TABLE t1, t2, t3; + +--echo # +--echo # MDEV-34670 IMPORT TABLESPACE unnecessary traverses +--echo # tablespace list +--echo # +SET GLOBAL innodb_encrypt_tables= OFF; +SET GLOBAL innodb_encryption_threads= 0; + +CREATE TABLE t1(f1 int,f2 text)ENGINE=InnoDB; +INSERT INTO t1 VALUES(1, "InnoDB"); +CREATE TABLE t2 LIKE t1; +ALTER TABLE t2 DISCARD TABLESPACE; +FLUSH TABLES t1 FOR EXPORT; +--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg +--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd +UNLOCK TABLES; +ALTER TABLE t2 IMPORT TABLESPACE; + +SET GLOBAL innodb_encryption_threads=2; +SET GLOBAL innodb_encrypt_tables = ON; + +--let $tables_count= `select count(*) + @@global.innodb_undo_tablespaces + 1 from information_schema.tables where engine = 'InnoDB'` + +--echo # Wait max 10 min for key encryption threads to encrypt all spaces +--let $wait_timeout= 600 +--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0; +--source include/wait_condition.inc + +--sorted_result +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 +AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry'; +--sorted_result +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 +AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry'; + +SET GLOBAL innodb_encrypt_tables = OFF; + +--echo # Wait max 10 min for key encryption threads to decrypt all spaces +--let $wait_timeout= 600 +--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0; +--source include/wait_condition.inc + +--sorted_result +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 +AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry'; + +--sorted_result +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 +AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry'; + +DROP TABLE t1, t2; +SET GLOBAL innodb_encryption_threads=@start_encr_threads; +SET GLOBAL innodb_encrypt_tables=@start_encrypt_tables; diff --git a/mysql-test/suite/federated/federatedx.result b/mysql-test/suite/federated/federatedx.result index e75fb25304c..f00c3f78d2a 100644 --- a/mysql-test/suite/federated/federatedx.result +++ b/mysql-test/suite/federated/federatedx.result @@ -2243,7 +2243,7 @@ connection master; CREATE TABLE t1(id VARCHAR(20) NOT NULL, PRIMARY KEY(id)) ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1'; # Dump table t1 using mysqldump tool -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( diff --git a/mysql-test/suite/federated/federatedx_create_handlers.result b/mysql-test/suite/federated/federatedx_create_handlers.result index 698dfab9449..a1f8bebf404 100644 --- a/mysql-test/suite/federated/federatedx_create_handlers.result +++ b/mysql-test/suite/federated/federatedx_create_handlers.result @@ -1178,7 +1178,7 @@ ERROR 42S22: Unknown column '2' in 'order clause' SELECT a FROM federated.t1 UNION ALL SELECT a FROM federated.t2 ORDER BY 2,1,3; ERROR 42S22: Unknown column '2' in 'order clause' SELECT a FROM federated.t1 UNION ALL SELECT a FROM federated.t2 ORDER BY t1.a; -ERROR 42000: Table 't1' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 't1' from one of the SELECTs cannot be used in order clause SELECT * from federated.t1 INTERSECT SELECT * from federated.t2 UNION ALL SELECT * from federated.t2 EXCEPT diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 412834c5cf2..7c62f6394d1 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -22,4 +22,3 @@ galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsr galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback() galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test failed galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes -galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch diff --git a/mysql-test/suite/galera/include/galera_sst_restore.inc b/mysql-test/suite/galera/include/galera_sst_restore.inc index 3248c06c509..1fb7f0b4794 100644 --- a/mysql-test/suite/galera/include/galera_sst_restore.inc +++ b/mysql-test/suite/galera/include/galera_sst_restore.inc @@ -20,7 +20,7 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); --disable_query_log --eval SET GLOBAL wsrep_sst_method = '$wsrep_sst_method_orig'; --eval SET GLOBAL wsrep_sst_receive_address = '$wsrep_sst_receive_address_orig'; diff --git a/mysql-test/suite/galera/include/galera_sst_set_mysqldump.inc b/mysql-test/suite/galera/include/galera_sst_set_mysqldump.inc index 16af5742b9b..70f086934df 100644 --- a/mysql-test/suite/galera/include/galera_sst_set_mysqldump.inc +++ b/mysql-test/suite/galera/include/galera_sst_set_mysqldump.inc @@ -4,8 +4,8 @@ --echo Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); --connection node_1 # We need a user with a password to perform SST, otherwise we hit LP #1378253 diff --git a/mysql-test/suite/galera/r/GAL-401.result b/mysql-test/suite/galera/r/GAL-401.result index 859a4415f8d..9522dc80bad 100644 --- a/mysql-test/suite/galera/r/GAL-401.result +++ b/mysql-test/suite/galera/r/GAL-401.result @@ -24,6 +24,6 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\."); connection node_1; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false'; diff --git a/mysql-test/suite/galera/r/GAL-419.result b/mysql-test/suite/galera/r/GAL-419.result index c70c9ee3263..e6bde169c23 100644 --- a/mysql-test/suite/galera/r/GAL-419.result +++ b/mysql-test/suite/galera/r/GAL-419.result @@ -1,10 +1,11 @@ connection node_2; connection node_1; -call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*"); +call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node"); call mtr.add_suppression("Aborting"); -call mtr.add_suppression("Plugin \'wsrep\' init function returned error."); -call mtr.add_suppression("Plugin \'wsrep\' registration as a STORAGE ENGINE failed."); -call mtr.add_suppression("Failed to initialize plugins."); +call mtr.add_suppression("Plugin 'wsrep' init function returned error"); +call mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed"); +call mtr.add_suppression("Plugin 'wsrep' registration as a FUNCTION failed"); +call mtr.add_suppression("Failed to initialize plugins"); connection node_2; SET SESSION wsrep_sync_wait = 0; Killing server ... diff --git a/mysql-test/suite/galera/r/GCF-939.result b/mysql-test/suite/galera/r/GCF-939.result index 24d4eab67e5..f9b65bced42 100644 --- a/mysql-test/suite/galera/r/GCF-939.result +++ b/mysql-test/suite/galera/r/GCF-939.result @@ -8,6 +8,6 @@ INSERT INTO t1 VALUES (1); GRA_.log GRA_.log DROP TABLE t1; -CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query"); +CALL mtr.add_suppression("Ignoring error 'Unknown table 'test\\.t1'' on query"); connection node_2; -CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query"); +CALL mtr.add_suppression("Error 'Unknown table 'test\\.t1'' on query"); diff --git a/mysql-test/suite/galera/r/MDEV-21479.result b/mysql-test/suite/galera/r/MDEV-21479.result index 7d1220a038b..de00413bdcc 100644 --- a/mysql-test/suite/galera/r/MDEV-21479.result +++ b/mysql-test/suite/galera/r/MDEV-21479.result @@ -66,7 +66,7 @@ SHOW STATUS LIKE 'wsrep_desync_count'; Variable_name Value wsrep_desync_count 0 SET @@global.wsrep_desync = 0; -CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\."); connection node_1; # Wait until both nodes are back to cluster SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false'; diff --git a/mysql-test/suite/galera/r/MDEV-26575.result b/mysql-test/suite/galera/r/MDEV-26575.result index 5b447e1ae20..0856c836f7e 100644 --- a/mysql-test/suite/galera/r/MDEV-26575.result +++ b/mysql-test/suite/galera/r/MDEV-26575.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connection node_2; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); connection node_1; connection node_1; connection node_2; diff --git a/mysql-test/suite/galera/r/MDEV-29142.result b/mysql-test/suite/galera/r/MDEV-29142.result index 2e567666c47..090960a3761 100644 --- a/mysql-test/suite/galera/r/MDEV-29142.result +++ b/mysql-test/suite/galera/r/MDEV-29142.result @@ -3,14 +3,14 @@ connection node_1; connection node_1; connection node_2; connection node_1; -call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*"); -call mtr.add_suppression("WSREP: Failed to apply write set:.*"); -call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*"); +call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed: "); +call mtr.add_suppression("WSREP: Failed to apply write set: "); +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); connection node_2; -call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing"); +call mtr.add_suppression("WSREP: Failed to open table mysql\\.wsrep_streaming_log for writing"); call mtr.add_suppression("WSREP: Failed to open SR table for write"); call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0"); -call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*"); +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); SET @@global.transaction_read_only = ON; SET default_storage_engine = SEQUENCE; create table t1 (c1 int); @@ -39,7 +39,7 @@ connection node_1; SET SESSION wsrep_sync_wait = 0; Killing server ... connection node_2; -call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing"); +call mtr.add_suppression("WSREP: Failed to open table mysql\\.wsrep_streaming_log for writing"); call mtr.add_suppression("WSREP: Failed to open SR table for write"); call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0"); DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result index 6ca1f16db6b..ba8b67e9c31 100644 --- a/mysql-test/suite/galera/r/MW-284.result +++ b/mysql-test/suite/galera/r/MW-284.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; -call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*"); +call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use "); call mtr.add_suppression("WSREP has not yet prepared node for application use"); connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result index 54d55eea7ca..16afcc15996 100644 --- a/mysql-test/suite/galera/r/MW-329.result +++ b/mysql-test/suite/galera/r/MW-329.result @@ -1,6 +1,5 @@ connection node_2; connection node_1; -CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*"); CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; INSERT INTO t1 (f1) VALUES (1),(65535); CREATE PROCEDURE proc_insert () @@ -19,5 +18,5 @@ connection node_1b; connection node_1; DROP PROCEDURE proc_insert; DROP TABLE t1; -CALL mtr.add_suppression("conflict state 3 after post commit"); +CALL mtr.add_suppression("WSREP: .* conflict state after post commit "); set global innodb_status_output=Default; diff --git a/mysql-test/suite/galera/r/galera#500.result b/mysql-test/suite/galera/r/galera#500.result index a5ab0b19718..a142e966e94 100644 --- a/mysql-test/suite/galera/r/galera#500.result +++ b/mysql-test/suite/galera/r/galera#500.result @@ -15,4 +15,4 @@ SET GLOBAL wsrep_provider_options="pc.bootstrap=1"; connection node_2; SET SESSION wsrep_on=0; connection node_2; -CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2."); +CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast\\.isolate=2\\."); diff --git a/mysql-test/suite/galera/r/galera-features#117.result b/mysql-test/suite/galera/r/galera-features#117.result index 21d810ca165..900e4fe2aac 100644 --- a/mysql-test/suite/galera/r/galera-features#117.result +++ b/mysql-test/suite/galera/r/galera-features#117.result @@ -34,7 +34,7 @@ SHOW TABLES IN test; Tables_in_test t1 Killing server ... -CALL mtr.add_suppression("Inconsistent by consensus."); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("WSREP: Failed to execute TOI action"); CALL mtr.add_suppression("WSREP: TO isolation end failed"); connection node_1; diff --git a/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result index 5233ea6c63c..1015e7b652d 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result @@ -5,7 +5,7 @@ connection node_2; connection node_1; CREATE TABLE t1 (f1 INT PRIMARY KEY); connection node_2; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue'; INSERT INTO t1 VALUES (1); connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; diff --git a/mysql-test/suite/galera/r/galera_desync_overlapped.result b/mysql-test/suite/galera/r/galera_desync_overlapped.result index e3f40d444ee..69ae5e2766d 100644 --- a/mysql-test/suite/galera/r/galera_desync_overlapped.result +++ b/mysql-test/suite/galera/r/galera_desync_overlapped.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connection node_1; -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; CREATE TABLE t2 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; @@ -12,6 +12,7 @@ wsrep_desync_count 1 SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter1 WAIT_FOR alter2'; INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3; connection node_1a; +FLUSH STATUS; SET GLOBAL wsrep_desync = 1; Warnings: Warning 1231 'wsrep_desync' is already ON. @@ -35,6 +36,7 @@ Warning 1231 'wsrep_desync' is already OFF. show status like 'wsrep_desync_count'; Variable_name Value wsrep_desync_count 0 +call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized\\."); show status like 'wsrep_desync_count'; Variable_name Value wsrep_desync_count 0 diff --git a/mysql-test/suite/galera/r/galera_drop_database.result b/mysql-test/suite/galera/r/galera_drop_database.result index 03b55136c6f..ed94678c08e 100644 --- a/mysql-test/suite/galera/r/galera_drop_database.result +++ b/mysql-test/suite/galera/r/galera_drop_database.result @@ -48,6 +48,6 @@ SHOW TABLES; Tables_in_fts DROP DATABASE fts; connection node_2; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); Warnings: Note 1049 Unknown database 'fts' diff --git a/mysql-test/suite/galera/r/galera_drop_multi.result b/mysql-test/suite/galera/r/galera_drop_multi.result index 1ff8afe3219..7934d6e0f15 100644 --- a/mysql-test/suite/galera/r/galera_drop_multi.result +++ b/mysql-test/suite/galera/r/galera_drop_multi.result @@ -19,6 +19,6 @@ SHOW CREATE TABLE t3; ERROR 42S02: Table 'test.t3' doesn't exist SHOW CREATE TABLE t4; ERROR 42S02: Table 'test.t4' doesn't exist -CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t2,test.t4'' on query\. Default database: 'test'\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t2,test\\.t4'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); connection node_1; DROP TABLE t5; diff --git a/mysql-test/suite/galera/r/galera_events2.result b/mysql-test/suite/galera/r/galera_events2.result index 26d3a74a7f3..5cbee44f186 100644 --- a/mysql-test/suite/galera/r/galera_events2.result +++ b/mysql-test/suite/galera/r/galera_events2.result @@ -111,7 +111,7 @@ f1 f2 SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT def test one_event root@localhost SQL SELECT 123 RECURRING NULL 10 SECOND SLAVESIDE_DISABLED NOT PRESERVE -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); connection node_1; SELECT * FROM t1; f1 f2 diff --git a/mysql-test/suite/galera/r/galera_forced_binlog_format_ctas.result b/mysql-test/suite/galera/r/galera_forced_binlog_format_ctas.result index cae5f723c51..a8a51b278bd 100644 --- a/mysql-test/suite/galera/r/galera_forced_binlog_format_ctas.result +++ b/mysql-test/suite/galera/r/galera_forced_binlog_format_ctas.result @@ -1,6 +1,6 @@ connection node_2; connection node_1; -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since.*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since "); SET GLOBAL wsrep_forced_binlog_format=ROW; connection node_1; CREATE TABLE t1(a int not null primary key auto_increment, b int) ENGINE=InnoDB; diff --git a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result index de89168683a..5338c096be8 100644 --- a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result +++ b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result @@ -94,7 +94,6 @@ CALL insert_1m ();; connection node_1_insert_10m; CALL insert_10m ();; connection node_2; -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); SET SESSION wsrep_sync_wait = 0; Killing server ... connection node_1; @@ -131,9 +130,9 @@ DROP PROCEDURE update_simple; DROP PROCEDURE insert_1k; DROP PROCEDURE insert_1m; connection node_1; -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); +call mtr.add_suppression("Error in Log_event::read_log_event\\(\\)"); CALL mtr.add_suppression("conflict state 7 after post commit"); CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); connection node_2; -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); +call mtr.add_suppression("Error in Log_event::read_log_event\\(\\)"); CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); diff --git a/mysql-test/suite/galera/r/galera_gra_log.result b/mysql-test/suite/galera/r/galera_gra_log.result index 6060e8d1b72..8f3da6fa106 100644 --- a/mysql-test/suite/galera/r/galera_gra_log.result +++ b/mysql-test/suite/galera/r/galera_gra_log.result @@ -35,4 +35,4 @@ ROLLBACK /* added by mysqlbinlog */; Killing server ... SET GLOBAL wsrep_ignore_apply_errors = 7; DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); diff --git a/mysql-test/suite/galera/r/galera_gtid_server_id.result b/mysql-test/suite/galera/r/galera_gtid_server_id.result index 8765fcc1636..5acf4519d0c 100644 --- a/mysql-test/suite/galera/r/galera_gtid_server_id.result +++ b/mysql-test/suite/galera/r/galera_gtid_server_id.result @@ -5,7 +5,7 @@ select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; @@gtid_domain_id @@server_id @@wsrep_gtid_domain_id @@wsrep_gtid_mode 0 11 1 1 connection node_2; -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; @@gtid_domain_id @@server_id @@wsrep_gtid_domain_id @@wsrep_gtid_mode 0 12 1 1 diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump.result b/mysql-test/suite/galera/r/galera_ist_mysqldump.result index 6c57a571b85..8737819e552 100644 --- a/mysql-test/suite/galera/r/galera_ist_mysqldump.result +++ b/mysql-test/suite/galera/r/galera_ist_mysqldump.result @@ -1,15 +1,15 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; SET GLOBAL wsrep_sst_auth = 'sst:'; connection node_2; SET GLOBAL wsrep_sst_method = 'mysqldump'; -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to "); connection node_1; connection node_2; Performing State Transfer on a server that has been shut down cleanly and restarted @@ -364,4 +364,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result index 33a1b19095f..34d2cc0be76 100644 --- a/mysql-test/suite/galera/r/galera_kill_ddl.result +++ b/mysql-test/suite/galera/r/galera_kill_ddl.result @@ -3,7 +3,7 @@ connection node_1; connection node_1; connection node_2; connection node_1; -call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member "); SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; connection node_2; diff --git a/mysql-test/suite/galera/r/galera_partition.result b/mysql-test/suite/galera/r/galera_partition.result index 7b4d6e41054..ca335984ab4 100644 --- a/mysql-test/suite/galera/r/galera_partition.result +++ b/mysql-test/suite/galera/r/galera_partition.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connection node_1; -call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); +call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER"); call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); connection node_1; CREATE TABLE t1( diff --git a/mysql-test/suite/galera/r/galera_query_cache_invalidate.result b/mysql-test/suite/galera/r/galera_query_cache_invalidate.result index fc23c0f1caf..c136cf1f03a 100644 --- a/mysql-test/suite/galera/r/galera_query_cache_invalidate.result +++ b/mysql-test/suite/galera/r/galera_query_cache_invalidate.result @@ -3,9 +3,9 @@ connection node_1; connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; connection node_2; -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); connection node_4; -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); connection node_3; CHANGE MASTER TO master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_1, master_use_gtid=current_pos;; START SLAVE; diff --git a/mysql-test/suite/galera/r/galera_replica_no_gtid.result b/mysql-test/suite/galera/r/galera_replica_no_gtid.result index 80d713c2348..f4b1a344400 100644 --- a/mysql-test/suite/galera/r/galera_replica_no_gtid.result +++ b/mysql-test/suite/galera/r/galera_replica_no_gtid.result @@ -37,7 +37,7 @@ connection node_2; # Start node_2 again ¤ Wait until node_2 is back on cluster connection node_2; -call mtr.add_suppression("Slave: Operation CREATE USER failed for .*"); +call mtr.add_suppression("Slave: Operation CREATE USER failed for "); SELECT COUNT(*) AS EXPECT_0 FROM mysql.gtid_slave_pos; EXPECT_0 0 diff --git a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result index b1ee6f5955f..221ccc76afd 100644 --- a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result +++ b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result @@ -41,7 +41,7 @@ f1 f2 connection node_2; Starting server ... Starting server ... -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); SELECT * FROM t1; f1 f2 1 a diff --git a/mysql-test/suite/galera/r/galera_ssl_compression.result b/mysql-test/suite/galera/r/galera_ssl_compression.result index 0acc4b97eea..545f4babfe1 100644 --- a/mysql-test/suite/galera/r/galera_ssl_compression.result +++ b/mysql-test/suite/galera/r/galera_ssl_compression.result @@ -24,5 +24,5 @@ COUNT(*) = 1 1 connection node_1; DROP TABLE t1; -CALL mtr.add_suppression("Unknown parameter 'socket\.ssl_compression'"); +CALL mtr.add_suppression("Unknown parameter 'socket\\.ssl_compression'"); CALL mtr.add_suppression("Set options returned 7"); diff --git a/mysql-test/suite/galera/r/galera_ssl_upgrade.result b/mysql-test/suite/galera/r/galera_ssl_upgrade.result index 9993b86e0e9..9030850b67e 100644 --- a/mysql-test/suite/galera/r/galera_ssl_upgrade.result +++ b/mysql-test/suite/galera/r/galera_ssl_upgrade.result @@ -1,10 +1,6 @@ connection node_2; connection node_1; connection node_1; -call mtr.add_suppression("WSREP: write_handler().*"); -connection node_2; -call mtr.add_suppression("WSREP: write_handler():.*"); -connection node_1; connection node_2; connection node_1; connection node_2; @@ -28,6 +24,6 @@ VARIABLE_VALUE = 2 1 connection node_2; connection node_1; -call mtr.add_suppression("WSREP: write_handler().*"); +call mtr.add_suppression("WSREP: write_handler\\(\\)"); connection node_2; -call mtr.add_suppression("WSREP: write_handler():.*"); +call mtr.add_suppression("WSREP: write_handler\\(\\)"); diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump.result b/mysql-test/suite/galera/r/galera_sst_mysqldump.result index e63b6f6f98d..e76d72383c1 100644 --- a/mysql-test/suite/galera/r/galera_sst_mysqldump.result +++ b/mysql-test/suite/galera/r/galera_sst_mysqldump.result @@ -1,8 +1,8 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -708,4 +708,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result index fcb250f02ce..fe574abf93f 100644 --- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result @@ -1,8 +1,8 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -368,5 +368,5 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); DROP USER sslsst; diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_error.result b/mysql-test/suite/galera/r/galera_toi_ddl_error.result index 9aec137d010..d9e66dc537b 100644 --- a/mysql-test/suite/galera/r/galera_toi_ddl_error.result +++ b/mysql-test/suite/galera/r/galera_toi_ddl_error.result @@ -21,6 +21,6 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; DROP TABLE ten; -CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); +CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\."); connection node_2; -CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); +CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\."); diff --git a/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result b/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result index 082d2e8eb1d..0b32f43704f 100644 --- a/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result +++ b/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result @@ -178,9 +178,9 @@ connection node_2; SET GLOBAL wsrep_ignore_apply_errors = 7; CALL mtr.add_suppression("Can't find record in 't.*'"); CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event"); -CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE t1', Error_code: 1051"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query. Default database: 'test'. Query: 'DROP SCHEMA s1', Error_code: 1008"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query."); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t1'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1', Error_code: 1051"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query\\. Default database: 'test'\\. Query: 'DROP SCHEMA s1', Error_code: 1008"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\."); diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result index 36dc79bdf82..936f58b89a0 100644 --- a/mysql-test/suite/galera/r/galera_var_slave_threads.result +++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result @@ -6,7 +6,7 @@ connection node_1; CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB; connection node_2; -CALL mtr.add_suppression("WSREP: Refusing exit for the last slave thread."); +CALL mtr.add_suppression("WSREP: Refusing exit for the last slave thread\\."); SET GLOBAL wsrep_slave_threads = 0; Warnings: Warning 1292 Truncated incorrect wsrep_slave_threads value: '0' diff --git a/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result b/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result index 3d409f90eac..fe0bdaa404f 100644 --- a/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result +++ b/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result @@ -3,7 +3,7 @@ connection node_1; # # wsrep_start_position # -CALL mtr.add_suppression("WSREP: SST failed for position .*"); +CALL mtr.add_suppression("WSREP: SST failed for position "); SET @wsrep_start_position_global_saved = @@global.wsrep_start_position; # default SELECT @@global.wsrep_start_position; diff --git a/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result b/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result index ff0063fbf7b..fa0d7d83c80 100644 --- a/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result +++ b/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result @@ -53,7 +53,7 @@ expect_0 SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'; expect_1 1 -CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group\\. Leaving cluster\\."); connection node_4; SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; expect_0 @@ -61,7 +61,7 @@ expect_0 SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'; expect_1 1 -CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group\\. Leaving cluster\\."); DROP TABLE t2; disconnect node_3; disconnect node_4; diff --git a/mysql-test/suite/galera/r/galera_wan.result b/mysql-test/suite/galera/r/galera_wan.result index bc4113ffb1c..0021b509bf2 100644 --- a/mysql-test/suite/galera/r/galera_wan.result +++ b/mysql-test/suite/galera/r/galera_wan.result @@ -1,9 +1,9 @@ connection node_2; connection node_1; -CALL mtr.add_suppression("WSREP: Stray state UUID msg:.*"); -CALL mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +CALL mtr.add_suppression("WSREP: Stray state UUID msg:"); +CALL mtr.add_suppression("Sending JOIN failed: "); +CALL mtr.add_suppression("WSREP: .* sending install message failed: Socket is not connected"); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 4 1 diff --git a/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result b/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result index 0f7cd134156..5b35bdcef10 100644 --- a/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result +++ b/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result @@ -1,6 +1,6 @@ connection node_2; connection node_1; -call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'"); +call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\\.segment'"); call mtr.add_suppression("WSREP\: Set options returned 7"); SET GLOBAL wsrep_provider_options="gmcasts.segment=1"; ERROR HY000: Incorrect arguments to SET diff --git a/mysql-test/suite/galera/r/mdev-28433.result b/mysql-test/suite/galera/r/mdev-28433.result index c2dde6481f4..dc5fdd5be49 100644 --- a/mysql-test/suite/galera/r/mdev-28433.result +++ b/mysql-test/suite/galera/r/mdev-28433.result @@ -19,7 +19,7 @@ wsrep_ready OFF SHOW STATUS LIKE 'wsrep_cluster_status'; Variable_name Value wsrep_cluster_status Disconnected -call mtr.add_suppression("WSREP: .*Invalid backend URI.*"); +call mtr.add_suppression("WSREP: .*Invalid backend URI"); call mtr.add_suppression("WSREP: gcs connect failed: Invalid argument"); disconnect node_2; disconnect node_1; diff --git a/mysql-test/suite/galera/r/mdev-31651.result b/mysql-test/suite/galera/r/mdev-31651.result index f715aa895f8..15c56a71344 100644 --- a/mysql-test/suite/galera/r/mdev-31651.result +++ b/mysql-test/suite/galera/r/mdev-31651.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; -call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field.*"); -call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table.*"); +call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field"); +call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table"); CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT, KEY(b)) engine=innodb; BINLOG 'AMqaOw8BAAAAdAAAAHgAAAAAAAQANS42LjM0LTc5LjEtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAYVx w2w='; BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#33.result b/mysql-test/suite/galera/r/mysql-wsrep#33.result index 2c116347fca..ef4240869a8 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#33.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#33.result @@ -3,8 +3,8 @@ connection node_1; connection node_1; connection node_2; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -709,6 +709,6 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); SET GLOBAL general_log = ON; SET GLOBAL slow_query_log = ON; diff --git a/mysql-test/suite/galera/r/versioning_trx_id.result b/mysql-test/suite/galera/r/versioning_trx_id.result index c28662dcfe6..099be737e65 100644 --- a/mysql-test/suite/galera/r/versioning_trx_id.result +++ b/mysql-test/suite/galera/r/versioning_trx_id.result @@ -1,6 +1,6 @@ connection node_2; connection node_1; -call mtr.add_suppression("Sending JOIN failed:.*"); +call mtr.add_suppression("Sending JOIN failed: "); connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; connection node_1; create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) engine=InnoDB with system versioning; diff --git a/mysql-test/suite/galera/t/GAL-401.test b/mysql-test/suite/galera/t/GAL-401.test index 06ce37dc81f..243fde23642 100644 --- a/mysql-test/suite/galera/t/GAL-401.test +++ b/mysql-test/suite/galera/t/GAL-401.test @@ -48,7 +48,7 @@ SET @@global.wsrep_desync = 0; SET SESSION wsrep_sync_wait=15; SHOW CREATE TABLE t1; DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\."); --connection node_1 --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; diff --git a/mysql-test/suite/galera/t/GAL-419.test b/mysql-test/suite/galera/t/GAL-419.test index 60c34f209eb..699a8e54361 100644 --- a/mysql-test/suite/galera/t/GAL-419.test +++ b/mysql-test/suite/galera/t/GAL-419.test @@ -5,11 +5,12 @@ --source include/galera_cluster.inc --source include/big_test.inc -call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*"); +call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node"); call mtr.add_suppression("Aborting"); -call mtr.add_suppression("Plugin \'wsrep\' init function returned error."); -call mtr.add_suppression("Plugin \'wsrep\' registration as a STORAGE ENGINE failed."); -call mtr.add_suppression("Failed to initialize plugins."); +call mtr.add_suppression("Plugin 'wsrep' init function returned error"); +call mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed"); +call mtr.add_suppression("Plugin 'wsrep' registration as a FUNCTION failed"); +call mtr.add_suppression("Failed to initialize plugins"); --connection node_2 SET SESSION wsrep_sync_wait = 0; diff --git a/mysql-test/suite/galera/t/GCF-939.test b/mysql-test/suite/galera/t/GCF-939.test index 637d656996e..62bcdb818c7 100644 --- a/mysql-test/suite/galera/t/GCF-939.test +++ b/mysql-test/suite/galera/t/GCF-939.test @@ -25,7 +25,6 @@ INSERT INTO t1 VALUES (1); --list_files $MYSQLTEST_VARDIR/mysqld.2/data GRA_*.log DROP TABLE t1; -CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query"); +CALL mtr.add_suppression("Ignoring error 'Unknown table 'test\\.t1'' on query"); --connection node_2 -CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query"); - +CALL mtr.add_suppression("Error 'Unknown table 'test\\.t1'' on query"); diff --git a/mysql-test/suite/galera/t/MDEV-21479.test b/mysql-test/suite/galera/t/MDEV-21479.test index 86de97ea77c..17451b3bb77 100644 --- a/mysql-test/suite/galera/t/MDEV-21479.test +++ b/mysql-test/suite/galera/t/MDEV-21479.test @@ -77,7 +77,7 @@ SET @@global.wsrep_desync = 0; --let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; --source include/wait_condition.inc -CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\."); --connection node_1 --echo # Wait until both nodes are back to cluster diff --git a/mysql-test/suite/galera/t/MDEV-26575.test b/mysql-test/suite/galera/t/MDEV-26575.test index 4554f632c6f..acb5ee2494f 100644 --- a/mysql-test/suite/galera/t/MDEV-26575.test +++ b/mysql-test/suite/galera/t/MDEV-26575.test @@ -6,7 +6,7 @@ --source include/galera_cluster.inc --connection node_2 -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); --connection node_1 # Save original auto_increment_offset values. diff --git a/mysql-test/suite/galera/t/MDEV-29142.test b/mysql-test/suite/galera/t/MDEV-29142.test index c41302f9e27..efcfbf81b87 100644 --- a/mysql-test/suite/galera/t/MDEV-29142.test +++ b/mysql-test/suite/galera/t/MDEV-29142.test @@ -8,15 +8,15 @@ --source include/auto_increment_offset_save.inc --connection node_1 -call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*"); -call mtr.add_suppression("WSREP: Failed to apply write set:.*"); -call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*"); +call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed: "); +call mtr.add_suppression("WSREP: Failed to apply write set: "); +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); --connection node_2 -call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing"); +call mtr.add_suppression("WSREP: Failed to open table mysql\\.wsrep_streaming_log for writing"); call mtr.add_suppression("WSREP: Failed to open SR table for write"); call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0"); -call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*"); +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); SET @@global.transaction_read_only = ON; --error 0,1286 @@ -59,7 +59,7 @@ SET SESSION wsrep_sync_wait = 0; --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --source include/start_mysqld.inc -call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing"); +call mtr.add_suppression("WSREP: Failed to open table mysql\\.wsrep_streaming_log for writing"); call mtr.add_suppression("WSREP: Failed to open SR table for write"); call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0"); diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test index d7da1dcd214..bc630912d57 100644 --- a/mysql-test/suite/galera/t/MW-284.test +++ b/mysql-test/suite/galera/t/MW-284.test @@ -6,7 +6,7 @@ --source include/galera_cluster.inc --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 -call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*"); +call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use "); call mtr.add_suppression("WSREP has not yet prepared node for application use"); --disable_query_log diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test index 16a65d9b7ae..14e28a42df4 100644 --- a/mysql-test/suite/galera/t/MW-329.test +++ b/mysql-test/suite/galera/t/MW-329.test @@ -5,7 +5,6 @@ --source include/galera_cluster.inc --source include/have_innodb.inc -CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*"); CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; # We start with a populated table @@ -78,7 +77,6 @@ while ($count) --eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old > 0 AS wsrep_local_replays; --enable_query_log - # # Terminate the stored procedure # @@ -99,6 +97,6 @@ DROP PROCEDURE proc_insert; DROP TABLE t1; # Due to MW-330, Multiple "conflict state 3 after post commit" warnings if table is dropped while SP is running -CALL mtr.add_suppression("conflict state 3 after post commit"); +CALL mtr.add_suppression("WSREP: .* conflict state after post commit "); -set global innodb_status_output=Default; \ No newline at end of file +set global innodb_status_output=Default; diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test index 0efac20dbe0..157993a3eb4 100644 --- a/mysql-test/suite/galera/t/MW-369.test +++ b/mysql-test/suite/galera/t/MW-369.test @@ -340,4 +340,3 @@ SELECT * FROM cg; DROP TABLE cg; DROP TABLE pg; - diff --git a/mysql-test/suite/galera/t/enforce_storage_engine2.cnf b/mysql-test/suite/galera/t/enforce_storage_engine2.cnf index b14fce85b36..590c4afd4d9 100644 --- a/mysql-test/suite/galera/t/enforce_storage_engine2.cnf +++ b/mysql-test/suite/galera/t/enforce_storage_engine2.cnf @@ -7,7 +7,3 @@ sql_mode='' [mysqld.2] enforce_storage_engine=innodb sql_mode='' - - - - diff --git a/mysql-test/suite/galera/t/galera#414.cnf b/mysql-test/suite/galera/t/galera#414.cnf index fbd1c58754f..03e7214b76f 100644 --- a/mysql-test/suite/galera/t/galera#414.cnf +++ b/mysql-test/suite/galera/t/galera#414.cnf @@ -5,4 +5,3 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcs.max_packet_size=2' [mysqld.2] wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcs.max_packet_size=2' - diff --git a/mysql-test/suite/galera/t/galera#500.test b/mysql-test/suite/galera/t/galera#500.test index 471620b32c1..c393b7fd056 100644 --- a/mysql-test/suite/galera/t/galera#500.test +++ b/mysql-test/suite/galera/t/galera#500.test @@ -40,6 +40,6 @@ SET SESSION wsrep_on=0; --source include/restart_mysqld.inc --connection node_2 -CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2."); +CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast\\.isolate=2\\."); --source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera-features#117.test b/mysql-test/suite/galera/t/galera-features#117.test index 30301996d1c..9a3eaf8686e 100644 --- a/mysql-test/suite/galera/t/galera-features#117.test +++ b/mysql-test/suite/galera/t/galera-features#117.test @@ -38,7 +38,7 @@ SHOW TABLES IN test; --source include/wait_until_disconnected.inc --source include/start_mysqld.inc -CALL mtr.add_suppression("Inconsistent by consensus."); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("WSREP: Failed to execute TOI action"); CALL mtr.add_suppression("WSREP: TO isolation end failed"); diff --git a/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test b/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test index 6eb1cd9f4b2..a9109ac42d8 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test @@ -18,7 +18,7 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY); --connection node_2 -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue'; --send INSERT INTO t1 VALUES (1) diff --git a/mysql-test/suite/galera/t/galera_desync_overlapped.test b/mysql-test/suite/galera/t/galera_desync_overlapped.test index 8b78e8cdeb7..2d94011690b 100644 --- a/mysql-test/suite/galera/t/galera_desync_overlapped.test +++ b/mysql-test/suite/galera/t/galera_desync_overlapped.test @@ -11,7 +11,7 @@ --connection node_1 -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; @@ -24,6 +24,7 @@ send INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM --connection node_1a +FLUSH STATUS; SET GLOBAL wsrep_desync = 1; show status like 'wsrep_desync_count'; SET DEBUG_SYNC='now WAIT_FOR alter1'; @@ -45,9 +46,7 @@ show status like 'wsrep_desync_count'; SET GLOBAL wsrep_desync = 0; show status like 'wsrep_desync_count'; ---disable_query_log -call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized."); ---enable_query_log +call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized\\."); show status like 'wsrep_desync_count'; SET GLOBAL wsrep_desync = 0; diff --git a/mysql-test/suite/galera/t/galera_drop_database.test b/mysql-test/suite/galera/t/galera_drop_database.test index c1a66e1f66c..7bffe94287d 100644 --- a/mysql-test/suite/galera/t/galera_drop_database.test +++ b/mysql-test/suite/galera/t/galera_drop_database.test @@ -56,7 +56,7 @@ SHOW TABLES; DROP DATABASE fts; --connection node_2 -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'fts_t1'; --source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'fts_t2'; diff --git a/mysql-test/suite/galera/t/galera_drop_multi.test b/mysql-test/suite/galera/t/galera_drop_multi.test index 44b1b619b2b..920c089185e 100644 --- a/mysql-test/suite/galera/t/galera_drop_multi.test +++ b/mysql-test/suite/galera/t/galera_drop_multi.test @@ -35,7 +35,7 @@ SHOW CREATE TABLE t3; --error ER_NO_SUCH_TABLE SHOW CREATE TABLE t4; -CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t2,test.t4'' on query\. Default database: 'test'\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t2,test\\.t4'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); --connection node_1 DROP TABLE t5; diff --git a/mysql-test/suite/galera/t/galera_events2.test b/mysql-test/suite/galera/t/galera_events2.test index b29ad3ba2f2..6f200257e16 100644 --- a/mysql-test/suite/galera/t/galera_events2.test +++ b/mysql-test/suite/galera/t/galera_events2.test @@ -137,7 +137,7 @@ SELECT * FROM t1; --echo # node_2 Event should be SERVERSIDE_DISABLED SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); --connection node_1 SELECT * FROM t1; diff --git a/mysql-test/suite/galera/t/galera_fk_truncate.test b/mysql-test/suite/galera/t/galera_fk_truncate.test index 9d54a720432..61b0f562065 100644 --- a/mysql-test/suite/galera/t/galera_fk_truncate.test +++ b/mysql-test/suite/galera/t/galera_fk_truncate.test @@ -1,4 +1,5 @@ --source include/galera_cluster.inc +--source include/have_innodb.inc CREATE TABLE author ( id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, diff --git a/mysql-test/suite/galera/t/galera_forced_binlog_format_ctas.test b/mysql-test/suite/galera/t/galera_forced_binlog_format_ctas.test index bb9cb6a9403..6260acaba2f 100644 --- a/mysql-test/suite/galera/t/galera_forced_binlog_format_ctas.test +++ b/mysql-test/suite/galera/t/galera_forced_binlog_format_ctas.test @@ -1,6 +1,6 @@ --source include/galera_cluster.inc -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since.*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since "); SET GLOBAL wsrep_forced_binlog_format=ROW; diff --git a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test index b2c38b635f1..3834607ce86 100644 --- a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test +++ b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test @@ -126,7 +126,6 @@ DELIMITER ;| --send CALL insert_10m (); --connection node_2 -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); SET SESSION wsrep_sync_wait = 0; # Make sure that node_2 is not killed while TOIs are applied. @@ -200,12 +199,12 @@ DROP PROCEDURE insert_1k; DROP PROCEDURE insert_1m; --connection node_1 -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); +call mtr.add_suppression("Error in Log_event::read_log_event\\(\\)"); CALL mtr.add_suppression("conflict state 7 after post commit"); # Warning happens when the cluster is started for the first time CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); --connection node_2 -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); +call mtr.add_suppression("Error in Log_event::read_log_event\\(\\)"); CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); diff --git a/mysql-test/suite/galera/t/galera_gra_log.test b/mysql-test/suite/galera/t/galera_gra_log.test index 23561d9a2b1..ad19bb44118 100644 --- a/mysql-test/suite/galera/t/galera_gra_log.test +++ b/mysql-test/suite/galera/t/galera_gra_log.test @@ -43,7 +43,7 @@ CREATE TABLE t1 (f1 INTEGER); --eval SET GLOBAL wsrep_ignore_apply_errors = $restore_wsrep_ignore_apply_errors DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); # Restore original auto_increment_offset values. --source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_gtid_server_id.test b/mysql-test/suite/galera/t/galera_gtid_server_id.test index 9bb07371f92..f61bef4909b 100644 --- a/mysql-test/suite/galera/t/galera_gtid_server_id.test +++ b/mysql-test/suite/galera/t/galera_gtid_server_id.test @@ -3,7 +3,7 @@ --connection node_1 select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; --connection node_2 -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_ist_mysqldump.test b/mysql-test/suite/galera/t/galera_ist_mysqldump.test index 7bfca0334fa..73b406d016b 100644 --- a/mysql-test/suite/galera/t/galera_ist_mysqldump.test +++ b/mysql-test/suite/galera/t/galera_ist_mysqldump.test @@ -4,7 +4,7 @@ --source suite/galera/include/galera_sst_set_mysqldump.inc -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to "); --let $node_1=node_1 --let $node_2=node_2 diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test index 940b511f752..0c31cf4ab58 100644 --- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test +++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test @@ -96,4 +96,3 @@ DROP TABLE t1; --source include/auto_increment_offset_restore.inc --source include/galera_end.inc - diff --git a/mysql-test/suite/galera/t/galera_kill_ddl.test b/mysql-test/suite/galera/t/galera_kill_ddl.test index 1034b81eddf..2b59bcbad95 100644 --- a/mysql-test/suite/galera/t/galera_kill_ddl.test +++ b/mysql-test/suite/galera/t/galera_kill_ddl.test @@ -11,7 +11,7 @@ --source include/auto_increment_offset_save.inc --connection node_1 -call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member "); # Enable the master to continue running during the split-brain situation that # occurs when the slave is killed diff --git a/mysql-test/suite/galera/t/galera_partition.test b/mysql-test/suite/galera/t/galera_partition.test index d69f87b6472..d85ec5f5994 100644 --- a/mysql-test/suite/galera/t/galera_partition.test +++ b/mysql-test/suite/galera/t/galera_partition.test @@ -6,7 +6,7 @@ --connection node_1 -call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); +call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER"); call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); --connection node_1 @@ -438,6 +438,3 @@ reap; --connection node_1 DROP TABLE t1; DROP PROCEDURE p1; - - - diff --git a/mysql-test/suite/galera/t/galera_query_cache_invalidate.test b/mysql-test/suite/galera/t/galera_query_cache_invalidate.test index d72d8a9ba40..fde02d6b9a8 100644 --- a/mysql-test/suite/galera/t/galera_query_cache_invalidate.test +++ b/mysql-test/suite/galera/t/galera_query_cache_invalidate.test @@ -22,9 +22,9 @@ --connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4 --connection node_2 -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); --connection node_4 -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); --connection node_3 diff --git a/mysql-test/suite/galera/t/galera_replica_no_gtid.test b/mysql-test/suite/galera/t/galera_replica_no_gtid.test index 8cc88ef211a..12e9038dc1c 100644 --- a/mysql-test/suite/galera/t/galera_replica_no_gtid.test +++ b/mysql-test/suite/galera/t/galera_replica_no_gtid.test @@ -87,7 +87,7 @@ SELECT COUNT(*) AS EXPECT_10000 FROM t1; --source include/wait_condition.inc --connection node_2 -call mtr.add_suppression("Slave: Operation CREATE USER failed for .*"); +call mtr.add_suppression("Slave: Operation CREATE USER failed for "); SELECT COUNT(*) AS EXPECT_0 FROM mysql.gtid_slave_pos; SELECT COUNT(*) AS EXPECT_10000 FROM t1; diff --git a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test index e3a8b749cb4..9a11a174dfe 100644 --- a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test +++ b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test @@ -125,7 +125,7 @@ SELECT * FROM t1; # Sanity check (node 2 is running now and can perform SQL operators): -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); SELECT * FROM t1; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_ssl_compression.test b/mysql-test/suite/galera/t/galera_ssl_compression.test index 75f92c5b2f4..1df4aa26ebb 100644 --- a/mysql-test/suite/galera/t/galera_ssl_compression.test +++ b/mysql-test/suite/galera/t/galera_ssl_compression.test @@ -31,5 +31,5 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = REPEAT('a', 333) AND f2 = REPEAT('b', 655 --connection node_1 DROP TABLE t1; -CALL mtr.add_suppression("Unknown parameter 'socket\.ssl_compression'"); +CALL mtr.add_suppression("Unknown parameter 'socket\\.ssl_compression'"); CALL mtr.add_suppression("Set options returned 7"); diff --git a/mysql-test/suite/galera/t/galera_ssl_upgrade.test b/mysql-test/suite/galera/t/galera_ssl_upgrade.test index 2c55238809f..c09615527fd 100644 --- a/mysql-test/suite/galera/t/galera_ssl_upgrade.test +++ b/mysql-test/suite/galera/t/galera_ssl_upgrade.test @@ -8,11 +8,6 @@ --source include/have_innodb.inc --source include/have_ssl_communication.inc ---connection node_1 -call mtr.add_suppression("WSREP: write_handler().*"); ---connection node_2 -call mtr.add_suppression("WSREP: write_handler():.*"); - # Save original auto_increment_offset values. --let $node_1=node_1 --let $node_2=node_2 @@ -77,7 +72,6 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --source include/auto_increment_offset_restore.inc --connection node_1 -call mtr.add_suppression("WSREP: write_handler().*"); +call mtr.add_suppression("WSREP: write_handler\\(\\)"); --connection node_2 -call mtr.add_suppression("WSREP: write_handler():.*"); - +call mtr.add_suppression("WSREP: write_handler\\(\\)"); diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_error.test b/mysql-test/suite/galera/t/galera_toi_ddl_error.test index 6ee2a6e9b16..474828311b9 100644 --- a/mysql-test/suite/galera/t/galera_toi_ddl_error.test +++ b/mysql-test/suite/galera/t/galera_toi_ddl_error.test @@ -28,7 +28,7 @@ SHOW CREATE TABLE t1; DROP TABLE t1; DROP TABLE ten; -CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); +CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\."); --connection node_2 -CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); \ No newline at end of file +CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\."); diff --git a/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test index 5a00048a90e..e5bff5d8dc4 100644 --- a/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test +++ b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test @@ -277,15 +277,14 @@ SET GLOBAL wsrep_on = ON; CREATE TABLE t1 (f1 INTEGER, f2 INTEGER); DROP TABLE t1; - --connection node_2 SET GLOBAL wsrep_ignore_apply_errors = 7; CALL mtr.add_suppression("Can't find record in 't.*'"); CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event"); -CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE t1', Error_code: 1051"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query. Default database: 'test'. Query: 'DROP SCHEMA s1', Error_code: 1008"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query."); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t1'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1', Error_code: 1051"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query\\. Default database: 'test'\\. Query: 'DROP SCHEMA s1', Error_code: 1008"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\."); diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test index 4a2dd07098c..66909baff07 100644 --- a/mysql-test/suite/galera/t/galera_var_slave_threads.test +++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test @@ -19,7 +19,7 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB; --connection node_2 -CALL mtr.add_suppression("WSREP: Refusing exit for the last slave thread."); +CALL mtr.add_suppression("WSREP: Refusing exit for the last slave thread\\."); # Setting wsrep_slave_threads to zero triggers a warning SET GLOBAL wsrep_slave_threads = 0; SHOW WARNINGS; diff --git a/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test b/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test index 43fd09b902c..24e2e033676 100644 --- a/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test +++ b/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test @@ -4,7 +4,7 @@ --echo # wsrep_start_position --echo # -CALL mtr.add_suppression("WSREP: SST failed for position .*"); +CALL mtr.add_suppression("WSREP: SST failed for position "); SET @wsrep_start_position_global_saved = @@global.wsrep_start_position; --echo # default diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test index e21c271cba0..58371061a5f 100644 --- a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test +++ b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test @@ -82,12 +82,12 @@ CALL mtr.add_suppression("Slave SQL: Error 'Unknown table"); --connection node_3 SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'; -CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group\\. Leaving cluster\\."); --connection node_4 SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'; -CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group\\. Leaving cluster\\."); DROP TABLE t2; diff --git a/mysql-test/suite/galera/t/galera_wan.test b/mysql-test/suite/galera/t/galera_wan.test index ca86a3000a6..b3dc190dc06 100644 --- a/mysql-test/suite/galera/t/galera_wan.test +++ b/mysql-test/suite/galera/t/galera_wan.test @@ -9,11 +9,10 @@ --source include/galera_cluster.inc --source include/have_innodb.inc -CALL mtr.add_suppression("WSREP: Stray state UUID msg:.*"); -CALL mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +CALL mtr.add_suppression("WSREP: Stray state UUID msg:"); +CALL mtr.add_suppression("Sending JOIN failed: "); +CALL mtr.add_suppression("WSREP: .* sending install message failed: Socket is not connected"); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); - SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; @@ -37,4 +36,3 @@ SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL SELECT COUNT(*) = 1 FROM t1; DROP TABLE t1; - diff --git a/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test b/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test index fe1abcf6c35..04d78a306a8 100644 --- a/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test +++ b/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test @@ -5,7 +5,7 @@ --source include/have_innodb.inc --let LOGF=$MYSQLTEST_VARDIR/log/mysqld.1.err --disable_info -call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'"); +call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\\.segment'"); call mtr.add_suppression("WSREP\: Set options returned 7"); --error ER_WRONG_ARGUMENTS SET GLOBAL wsrep_provider_options="gmcasts.segment=1"; diff --git a/mysql-test/suite/galera/t/mdev-28433.test b/mysql-test/suite/galera/t/mdev-28433.test index ddee3618fee..c501519561c 100644 --- a/mysql-test/suite/galera/t/mdev-28433.test +++ b/mysql-test/suite/galera/t/mdev-28433.test @@ -26,7 +26,7 @@ SHOW STATUS LIKE 'wsrep_cluster_status'; --enable_query_log --source include/wait_until_connected_again.inc --source include/galera_wait_ready.inc -call mtr.add_suppression("WSREP: .*Invalid backend URI.*"); +call mtr.add_suppression("WSREP: .*Invalid backend URI"); call mtr.add_suppression("WSREP: gcs connect failed: Invalid argument"); # Restore original auto_increment_offset values. diff --git a/mysql-test/suite/galera/t/mdev-31651.test b/mysql-test/suite/galera/t/mdev-31651.test index 3598057a53f..ebd6ff6ac44 100644 --- a/mysql-test/suite/galera/t/mdev-31651.test +++ b/mysql-test/suite/galera/t/mdev-31651.test @@ -1,8 +1,7 @@ --source include/galera_cluster.inc - -call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field.*"); -call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table.*"); +call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field"); +call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table"); CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT, KEY(b)) engine=innodb; BINLOG 'AMqaOw8BAAAAdAAAAHgAAAAAAAQANS42LjM0LTc5LjEtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAYVx w2w='; --error ER_GET_ERRNO diff --git a/mysql-test/suite/galera/t/versioning_trx_id.test b/mysql-test/suite/galera/t/versioning_trx_id.test index fc9ea18eeb4..22111d6b889 100644 --- a/mysql-test/suite/galera/t/versioning_trx_id.test +++ b/mysql-test/suite/galera/t/versioning_trx_id.test @@ -1,6 +1,6 @@ --source include/galera_cluster.inc -call mtr.add_suppression("Sending JOIN failed:.*"); +call mtr.add_suppression("Sending JOIN failed: "); --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def index f71f726c4f9..3a6c38d81bb 100644 --- a/mysql-test/suite/galera_3nodes/disabled.def +++ b/mysql-test/suite/galera_3nodes/disabled.def @@ -13,7 +13,6 @@ galera_2_cluster : MDEV-32631 galera_2_cluster: before_rollback(): Assertion `0' failed galera_gtid_2_cluster : MDEV-32633 galera_gtid_2_cluster: Assertion `thd->wsrep_next_trx_id() != (0x7fffffffffffffffLL * 2ULL + 1)' galera_ssl_reload : MDEV-32778 galera_ssl_reload failed with warning message -galera_ipv6_mariabackup : temporarily disabled at the request of Codership galera_pc_bootstrap : temporarily disabled at the request of Codership galera_ipv6_mariabackup_section : temporarily disabled at the request of Codership # Opensuse/suse/rocky9/rocky84/rhel9/rhel8-ppc64le .. - all same IPv6 isn't configured right or skipping or galera diff --git a/mysql-test/suite/galera_3nodes/include/galera_resume.inc b/mysql-test/suite/galera_3nodes/include/galera_resume.inc index af8f2b956fd..3b913cd665a 100644 --- a/mysql-test/suite/galera_3nodes/include/galera_resume.inc +++ b/mysql-test/suite/galera_3nodes/include/galera_resume.inc @@ -6,4 +6,3 @@ system("kill -SIGCONT $mysqld_pid"); exit(0); EOF - diff --git a/mysql-test/suite/galera_3nodes/r/GCF-354.result b/mysql-test/suite/galera_3nodes/r/GCF-354.result index 2b1399e6265..3fdd44fe9d3 100644 --- a/mysql-test/suite/galera_3nodes/r/GCF-354.result +++ b/mysql-test/suite/galera_3nodes/r/GCF-354.result @@ -43,13 +43,13 @@ Nodes 2 and 3 started connection node_2; USE test; Node 2 synced -CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1049"); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query\\. Default database: 'test'\\. Query: 'CREATE TABLE test\\.t1 \\(f1 INTEGER\\)', Error_code: 1049"); CALL mtr.add_suppression("Query apply failed"); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); connection node_3; Node 3 synced -CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1050"); +CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\. Default database: 'test'\\. Query: 'CREATE TABLE test\\.t1 \\(f1 INTEGER\\)', Error_code: 1050"); CALL mtr.add_suppression("Query apply failed"); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); diff --git a/mysql-test/suite/galera_3nodes/r/GCF-363.result b/mysql-test/suite/galera_3nodes/r/GCF-363.result index a7b811f794a..0dadff2673f 100644 --- a/mysql-test/suite/galera_3nodes/r/GCF-363.result +++ b/mysql-test/suite/galera_3nodes/r/GCF-363.result @@ -37,13 +37,13 @@ f1 f2 1 a DROP TABLE t1; connection node_1; -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); connection node_2; -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); connection node_3; -CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); connection node_1; diff --git a/mysql-test/suite/galera_3nodes/r/GCF-376.result b/mysql-test/suite/galera_3nodes/r/GCF-376.result index 7b535a01ed4..bf996963a3d 100644 --- a/mysql-test/suite/galera_3nodes/r/GCF-376.result +++ b/mysql-test/suite/galera_3nodes/r/GCF-376.result @@ -86,6 +86,6 @@ DROP TABLE t1; connection node_2; CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos (.*), Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event (.*) Write_rows_v1 apply failed: 121, seqno "); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on (.*)"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); CALL mtr.add_suppression("WSREP: Failed to apply write set: "); diff --git a/mysql-test/suite/galera_3nodes/r/MDEV-29171.result b/mysql-test/suite/galera_3nodes/r/MDEV-29171.result index 55513ff53af..3a91bfea211 100644 --- a/mysql-test/suite/galera_3nodes/r/MDEV-29171.result +++ b/mysql-test/suite/galera_3nodes/r/MDEV-29171.result @@ -56,7 +56,7 @@ connection node_1; set global wsrep_gtid_domain_id=100; connection node_2; set global wsrep_gtid_domain_id=100; -CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); connection node_3; set global wsrep_gtid_domain_id=100; -CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); diff --git a/mysql-test/suite/galera_3nodes/r/galera-features#119.result b/mysql-test/suite/galera_3nodes/r/galera-features#119.result index aa49e4e5284..704e25c95b4 100644 --- a/mysql-test/suite/galera_3nodes/r/galera-features#119.result +++ b/mysql-test/suite/galera_3nodes/r/galera-features#119.result @@ -25,8 +25,8 @@ connection node_2; Killing server ... # restart connection node_2; -CALL mtr.add_suppression("Inconsistent by consensus."); -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno"); -CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster..."); +CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster\\.\\.\\."); CALL mtr.add_suppression("WSREP: Failed to apply write set: "); diff --git a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result index 1910106c646..b280a803b37 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result +++ b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result @@ -29,7 +29,7 @@ COUNT(*) connection node_3; Resuming node ... CALL mtr.add_suppression("WSREP: gcs_caused"); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg"); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg"); SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) FROM t1; COUNT(*) diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd.result b/mysql-test/suite/galera_3nodes/r/galera_garbd.result index ebc5fdf33f4..676ba7e8a0e 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_garbd.result +++ b/mysql-test/suite/galera_3nodes/r/galera_garbd.result @@ -26,8 +26,8 @@ DROP TABLE t1; Restarting node #3 to satisfy MTR's end-of-test checks connection node_3; connection node_1; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); connection node_2; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); connection node_3; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result b/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result index 4a5e9a4530c..fdf3f5abde0 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result +++ b/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result @@ -34,8 +34,8 @@ Restarting node #3 to satisfy MTR's end-of-test checks connection node_3; connection node_1; connection node_1; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); connection node_2; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); connection node_3; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result b/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result index a35f31da422..ffc5ec0627a 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result +++ b/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result @@ -197,16 +197,17 @@ COUNT(*) 2750 connection node_2; call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); -call mtr.add_suppression("Sending JOIN failed:.*"); -call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*"); +call mtr.add_suppression("Sending JOIN failed: "); +call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST"); +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); connection node_3; call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); -call mtr.add_suppression("Sending JOIN failed:.*"); -call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*"); +call mtr.add_suppression("Sending JOIN failed: "); +call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST"); +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); # cleanup connection node_1; +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); DROP PROCEDURE insert_row; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result index 1fb0ea30f4f..6af8691b33d 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; connection node_2; connection node_3; @@ -35,6 +35,6 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); connection node_2; -CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort"); +CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled\\. Expect abort"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result index 1813607517a..fdea4154626 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result +++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result @@ -77,8 +77,8 @@ SET GLOBAL wsrep_provider_options = 'signal=process_primary_configuration'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; DROP TABLE t1; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_2; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_3; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result index a88909f4bfb..7811059db42 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result +++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result @@ -87,11 +87,11 @@ SET GLOBAL wsrep_provider_options = 'signal=process_primary_configuration'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; DROP TABLE t1; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_2; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_3; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); disconnect node_1a; disconnect node_3; disconnect node_2; diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result index d85f121b0f7..ea185bf676a 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result +++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result @@ -94,9 +94,9 @@ SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'signal=after_shift_to_joining'; connection node_1; DROP TABLE t1; -call mtr.add_suppression("WSREP: Send action {\(.*\), STATE_REQUEST} returned -107 \\(Transport endpoint is not connected\\)"); -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Send action {(.*), STATE_REQUEST} returned -107 \\(Transport endpoint is not connected\\)"); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_2; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_3; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result index 8cdd62db959..cb12e9d865e 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result +++ b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result @@ -1,6 +1,6 @@ connection node_2; connection node_1; -call mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\).*"); +call mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg\\(\\)"); connection node_1; connection node_2; connection node_3; diff --git a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result index 5d4b1d43fd6..2aefefaad00 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result +++ b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result @@ -43,10 +43,10 @@ CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); CALL mtr.add_suppression("Aborting"); -CALL mtr.add_suppression("Plugin 'wsrep' init function returned error."); -CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed."); -CALL mtr.add_suppression("Failed to initialize plugins."); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()"); +CALL mtr.add_suppression("Plugin 'wsrep' init function returned error\\."); +CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed\\."); +CALL mtr.add_suppression("Failed to initialize plugins\\."); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\)"); connection node_3; CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible"); CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node"); @@ -56,10 +56,10 @@ CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); CALL mtr.add_suppression("Aborting"); -CALL mtr.add_suppression("Plugin 'wsrep' init function returned error."); -CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed."); -CALL mtr.add_suppression("Failed to initialize plugins."); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()"); +CALL mtr.add_suppression("Plugin 'wsrep' init function returned error\\."); +CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed\\."); +CALL mtr.add_suppression("Failed to initialize plugins\\."); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\)"); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result b/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result index 13caead79d3..d8d3abe40e9 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result +++ b/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result @@ -19,4 +19,4 @@ disconnect node_3; connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; Killing server ... # restart -CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); diff --git a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result index 6faafacd61b..f8fb9da6931 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result +++ b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result @@ -1,8 +1,8 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -77,7 +77,7 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); connection node_2; # restart connection node_1; diff --git a/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result b/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result index 83c5b015a50..cd4087e01ca 100644 --- a/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result +++ b/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result @@ -135,8 +135,8 @@ SET SESSION wsrep_sync_wait = 15; SET GLOBAL wsrep_on=OFF; # restart DROP TABLE t1; -CALL mtr.add_suppression('Can\'t find record in \'t1\''); -CALL mtr.add_suppression('Update_rows_v1 apply failed'); -CALL mtr.add_suppression('Inconsistency detected: Inconsistent by consensus on'); -CALL mtr.add_suppression('last left .* greater than drain seqno'); -CALL mtr.add_suppression('WSREP: Failed to apply write set:'); +CALL mtr.add_suppression("Can't find record in 't1'"); +CALL mtr.add_suppression("Update_rows_v1 apply failed"); +CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus on"); +CALL mtr.add_suppression("last left .* greater than drain seqno"); +CALL mtr.add_suppression("WSREP: Failed to apply write set: "); diff --git a/mysql-test/suite/galera_3nodes/t/GCF-354.test b/mysql-test/suite/galera_3nodes/t/GCF-354.test index e1459734cf3..44dfa3deeb7 100644 --- a/mysql-test/suite/galera_3nodes/t/GCF-354.test +++ b/mysql-test/suite/galera_3nodes/t/GCF-354.test @@ -88,18 +88,18 @@ USE test; --let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' --source include/wait_condition.inc --echo Node 2 synced -CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1049"); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query\\. Default database: 'test'\\. Query: 'CREATE TABLE test\\.t1 \\(f1 INTEGER\\)', Error_code: 1049"); CALL mtr.add_suppression("Query apply failed"); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); --connection node_3 --let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' --source include/wait_condition.inc --echo Node 3 synced -CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1050"); +CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\. Default database: 'test'\\. Query: 'CREATE TABLE test\\.t1 \\(f1 INTEGER\\)', Error_code: 1050"); CALL mtr.add_suppression("Query apply failed"); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/GCF-363.test b/mysql-test/suite/galera_3nodes/t/GCF-363.test index 00af02126af..1e245597f08 100644 --- a/mysql-test/suite/galera_3nodes/t/GCF-363.test +++ b/mysql-test/suite/galera_3nodes/t/GCF-363.test @@ -60,15 +60,15 @@ SELECT * FROM t1; DROP TABLE t1; --connection node_1 -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); --connection node_2 -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); --connection node_3 -CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); diff --git a/mysql-test/suite/galera_3nodes/t/GCF-376.test b/mysql-test/suite/galera_3nodes/t/GCF-376.test index 20b9703f835..930d89e7f4f 100644 --- a/mysql-test/suite/galera_3nodes/t/GCF-376.test +++ b/mysql-test/suite/galera_3nodes/t/GCF-376.test @@ -113,6 +113,6 @@ DROP TABLE t1; --connection node_2 CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos (.*), Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event (.*) Write_rows_v1 apply failed: 121, seqno "); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on (.*)"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); CALL mtr.add_suppression("WSREP: Failed to apply write set: "); diff --git a/mysql-test/suite/galera_3nodes/t/MDEV-29171.test b/mysql-test/suite/galera_3nodes/t/MDEV-29171.test index 9e35cd0e0d9..df1282609f0 100644 --- a/mysql-test/suite/galera_3nodes/t/MDEV-29171.test +++ b/mysql-test/suite/galera_3nodes/t/MDEV-29171.test @@ -119,8 +119,8 @@ set global wsrep_gtid_domain_id=100; --connection node_2 set global wsrep_gtid_domain_id=100; -CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); --connection node_3 set global wsrep_gtid_domain_id=100; -CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); diff --git a/mysql-test/suite/galera_3nodes/t/galera-features#119.test b/mysql-test/suite/galera_3nodes/t/galera-features#119.test index d1dd435c5e4..0effe780a22 100644 --- a/mysql-test/suite/galera_3nodes/t/galera-features#119.test +++ b/mysql-test/suite/galera_3nodes/t/galera-features#119.test @@ -60,13 +60,12 @@ DROP TABLE test.t1; --source include/start_mysqld.inc --connection node_2 -CALL mtr.add_suppression("Inconsistent by consensus."); -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno"); -CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster..."); +CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster\\.\\.\\."); CALL mtr.add_suppression("WSREP: Failed to apply write set: "); # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc - diff --git a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test index 8848e698c25..c0b23e4cc8e 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test +++ b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test @@ -72,7 +72,7 @@ SELECT COUNT(*) FROM t1; --source include/galera_wait_ready.inc CALL mtr.add_suppression("WSREP: gcs_caused"); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg"); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg"); SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) FROM t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd.test b/mysql-test/suite/galera_3nodes/t/galera_garbd.test index 05b1b25930f..da1956d8c85 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_garbd.test +++ b/mysql-test/suite/galera_3nodes/t/galera_garbd.test @@ -81,10 +81,10 @@ let $restart_noprint=2; # Workaround for galera#101 --connection node_1 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); --connection node_2 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); --connection node_3 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test b/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test index f5eaf6fc59a..d1d8e643d8e 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test @@ -127,10 +127,10 @@ let $restart_noprint=2; --source ../galera/include/auto_increment_offset_restore.inc --connection node_1 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); --connection node_2 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); --connection node_3 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); diff --git a/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test index f41230bc8e6..f00972b0461 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test +++ b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test @@ -316,17 +316,18 @@ SELECT COUNT(*) FROM t1; # --connection node_2 call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); -call mtr.add_suppression("Sending JOIN failed:.*"); -call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*"); +call mtr.add_suppression("Sending JOIN failed: "); +call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST"); +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); --connection node_3 call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); -call mtr.add_suppression("Sending JOIN failed:.*"); -call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*"); +call mtr.add_suppression("Sending JOIN failed: "); +call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST"); +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); --echo # cleanup --connection node_1 +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); DROP PROCEDURE insert_row; DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test index 27e71da29fa..0e0112f86c7 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test @@ -3,8 +3,8 @@ --source include/check_ipv6.inc --source include/force_restart.inc -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); --let $galera_connection_name = node_3 --let $galera_server_number = 3 @@ -86,8 +86,9 @@ SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE --source ../galera/include/auto_increment_offset_restore.inc --source suite/galera/include/galera_sst_restore.inc + --connection node_2 -CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort"); +CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled\\. Expect abort"); # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test index db8bf90cb5c..bb25b1dd9d1 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test +++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test @@ -259,12 +259,12 @@ INSERT INTO t1 VALUES (9, 2); DROP TABLE t1; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_2 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_3 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test index d06cdcc8ae4..b5983c384ed 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test +++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test @@ -270,13 +270,13 @@ SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debu DROP TABLE t1; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_2 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_3 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --disconnect node_1a diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test index d1111e9fd4a..d914482a100 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test +++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test @@ -295,13 +295,13 @@ INSERT INTO t1 VALUES (9, 2); DROP TABLE t1; -call mtr.add_suppression("WSREP: Send action {\(.*\), STATE_REQUEST} returned -107 \\(Transport endpoint is not connected\\)"); -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Send action {(.*), STATE_REQUEST} returned -107 \\(Transport endpoint is not connected\\)"); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_2 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_3 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test index 58a67c7b32b..7020400e5ea 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test @@ -5,7 +5,7 @@ --source include/galera_cluster.inc --source include/have_innodb.inc -call mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\).*"); +call mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg\\(\\)"); # # Create connection node_3 and save auto increment variables. diff --git a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test index 65b4000cd1f..80482151518 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test +++ b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test @@ -191,10 +191,10 @@ CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); CALL mtr.add_suppression("Aborting"); -CALL mtr.add_suppression("Plugin 'wsrep' init function returned error."); -CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed."); -CALL mtr.add_suppression("Failed to initialize plugins."); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()"); +CALL mtr.add_suppression("Plugin 'wsrep' init function returned error\\."); +CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed\\."); +CALL mtr.add_suppression("Failed to initialize plugins\\."); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\)"); --connection node_3 CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible"); @@ -205,10 +205,10 @@ CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); CALL mtr.add_suppression("Aborting"); -CALL mtr.add_suppression("Plugin 'wsrep' init function returned error."); -CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed."); -CALL mtr.add_suppression("Failed to initialize plugins."); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()"); +CALL mtr.add_suppression("Plugin 'wsrep' init function returned error\\."); +CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed\\."); +CALL mtr.add_suppression("Failed to initialize plugins\\."); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\)"); SHOW CREATE TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test b/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test index 7b5682ed030..6bc87cf8874 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test +++ b/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test @@ -61,7 +61,7 @@ SET SESSION wsrep_sync_wait=0; --let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' --source include/wait_condition.inc -CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf b/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf index aa0c47f1e0f..60dd48dba52 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf +++ b/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf @@ -5,4 +5,3 @@ wsrep_node_address=127.0.0.1 [mysqld.3] wsrep_node_address=localhost - diff --git a/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test b/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test index 7a9c4e83f87..347433a6f14 100644 --- a/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test +++ b/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test @@ -180,11 +180,11 @@ SET GLOBAL wsrep_on=OFF; DROP TABLE t1; -CALL mtr.add_suppression('Can\'t find record in \'t1\''); -CALL mtr.add_suppression('Update_rows_v1 apply failed'); -CALL mtr.add_suppression('Inconsistency detected: Inconsistent by consensus on'); -CALL mtr.add_suppression('last left .* greater than drain seqno'); -CALL mtr.add_suppression('WSREP: Failed to apply write set:'); +CALL mtr.add_suppression("Can't find record in 't1'"); +CALL mtr.add_suppression("Update_rows_v1 apply failed"); +CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus on"); +CALL mtr.add_suppression("last left .* greater than drain seqno"); +CALL mtr.add_suppression("WSREP: Failed to apply write set: "); # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test index 20d5955e4fc..db675f64ca9 100644 --- a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test +++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test @@ -54,5 +54,4 @@ CALL mtr.add_suppression("WSREP: failed to send SR rollback for "); --connection node_3 --source include/galera_wait_ready.inc - --enable_ps2_protocol diff --git a/mysql-test/suite/galera_sr/r/MDEV-30838.result b/mysql-test/suite/galera_sr/r/MDEV-30838.result index 6997b9c4d5d..2b55827485f 100644 --- a/mysql-test/suite/galera_sr/r/MDEV-30838.result +++ b/mysql-test/suite/galera_sr/r/MDEV-30838.result @@ -12,4 +12,4 @@ SELECT * FROM t1; f1 SET debug_dbug='-d,ib_create_table_fail_too_many_trx'; DROP TABLE t1; -CALL mtr.add_suppression("Error writing into mysql.wsrep_streaming_log: 177"); +CALL mtr.add_suppression("Error writing into mysql\\.wsrep_streaming_log: 177"); diff --git a/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result b/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result index 19466715c03..9b3d7a9e201 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result @@ -61,7 +61,7 @@ EXPECT_0 0 DROP TABLE t1; connection node_2b; -CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for"); +CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for "); disconnect node_2; connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2; disconnect node_2a; diff --git a/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result index 82a9262b4b6..f62292b0d5d 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result @@ -1,8 +1,8 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -57,4 +57,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); diff --git a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result index 34995d35a4f..fbf62ea42a1 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result @@ -3,7 +3,7 @@ connection node_1; connection node_1; connection node_2; connection node_2; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB; connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result b/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result index b7bdd94dd68..d3ecb699732 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result @@ -30,7 +30,7 @@ COUNT(*) = 100 DROP TABLE t1; DROP TABLE ten; connection node_1; -call mtr.add_suppression('WSREP: transaction size limit.*'); -call mtr.add_suppression('WSREP: rbr write fail.*'); -call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*'); -call mtr.add_suppression('WSREP: transaction size exceeded.*'); +call mtr.add_suppression('WSREP: transaction size limit'); +call mtr.add_suppression('WSREP: rbr write fail'); +call mtr.add_suppression('WSREP: Maximum writeset size exceeded by '); +call mtr.add_suppression('WSREP: transaction size exceeded'); diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result b/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result index 6bd8b6b8212..94aeef9b69e 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result @@ -23,12 +23,12 @@ COUNT(*) = 0 connection node_1; DROP TABLE t1; DROP TABLE ten; -call mtr.add_suppression('WSREP: SR rollback replication failure.*'); -call mtr.add_suppression('WSREP: transaction size limit.*'); -call mtr.add_suppression('WSREP: SR rbr write fail.*'); -call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*'); -call mtr.add_suppression('WSREP: transaction size exceeded.*'); -call mtr.add_suppression('WSREP: fragment replication failed:'); +call mtr.add_suppression('WSREP: SR rollback replication failure'); +call mtr.add_suppression('WSREP: transaction size limit'); +call mtr.add_suppression('WSREP: SR rbr write fail'); +call mtr.add_suppression('WSREP: Maximum writeset size exceeded by '); +call mtr.add_suppression('WSREP: transaction size exceeded'); +call mtr.add_suppression('WSREP: fragment replication failed: '); call mtr.add_suppression('WSREP: post commit failed for SR rollback'); -call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*'); -call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *'); +call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd: '); +call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for '); diff --git a/mysql-test/suite/galera_sr/r/mdev_18631.result b/mysql-test/suite/galera_sr/r/mdev_18631.result index 779ae5266a3..aa3b2c252e8 100644 --- a/mysql-test/suite/galera_sr/r/mdev_18631.result +++ b/mysql-test/suite/galera_sr/r/mdev_18631.result @@ -5,7 +5,7 @@ connection node_1; CREATE TABLE t1(f1 INT PRIMARY KEY) ENGINE=INNODB; INSERT INTO t1 VALUES (1), (2), (3); connection node_2; -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); SELECT * FROM t1; f1 1 diff --git a/mysql-test/suite/galera_sr/t/GCF-1008.test b/mysql-test/suite/galera_sr/t/GCF-1008.test index c6926840bd1..9c7f015c13f 100644 --- a/mysql-test/suite/galera_sr/t/GCF-1008.test +++ b/mysql-test/suite/galera_sr/t/GCF-1008.test @@ -15,4 +15,3 @@ --let $galera_sync_point = before_certify_apply_monitor_enter --source GCF-1008.inc - diff --git a/mysql-test/suite/galera_sr/t/GCF-1051.test b/mysql-test/suite/galera_sr/t/GCF-1051.test index 1db4ed15c41..5e52701165e 100644 --- a/mysql-test/suite/galera_sr/t/GCF-1051.test +++ b/mysql-test/suite/galera_sr/t/GCF-1051.test @@ -47,5 +47,4 @@ SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; SELECT COUNT(*) = 0 FROM t1; SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; - DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/t/GCF-845.test b/mysql-test/suite/galera_sr/t/GCF-845.test index 316317c6a10..6ef50d3a1d5 100644 --- a/mysql-test/suite/galera_sr/t/GCF-845.test +++ b/mysql-test/suite/galera_sr/t/GCF-845.test @@ -27,4 +27,3 @@ DROP TABLE t1; --let $assert_text = No BF-BF log line found --let $assert_only_after = CURRENT_TEST --source include/assert_grep.inc - diff --git a/mysql-test/suite/galera_sr/t/GCF-851.test b/mysql-test/suite/galera_sr/t/GCF-851.test index 28d5302a422..3a6edab6b56 100644 --- a/mysql-test/suite/galera_sr/t/GCF-851.test +++ b/mysql-test/suite/galera_sr/t/GCF-851.test @@ -21,4 +21,3 @@ SELECT COUNT(*) > 0 FROM t1; --connection node_1 SELECT COUNT(*) > 0 FROM t1; DROP TABLE t1; - diff --git a/mysql-test/suite/galera_sr/t/GCF-889.test b/mysql-test/suite/galera_sr/t/GCF-889.test index e785b282019..e4cb3578011 100644 --- a/mysql-test/suite/galera_sr/t/GCF-889.test +++ b/mysql-test/suite/galera_sr/t/GCF-889.test @@ -26,4 +26,3 @@ SET GLOBAL wsrep_ignore_apply_errors = 7; --connection node_1 DROP TABLE t1; - diff --git a/mysql-test/suite/galera_sr/t/MDEV-21613.test b/mysql-test/suite/galera_sr/t/MDEV-21613.test index 8a1fea1b7f5..4d32fee900a 100644 --- a/mysql-test/suite/galera_sr/t/MDEV-21613.test +++ b/mysql-test/suite/galera_sr/t/MDEV-21613.test @@ -21,12 +21,10 @@ INSERT INTO t1 VALUES(1), (2); --connection node_ctrl SET DEBUG_SYNC = "now WAIT_FOR fragment_removal_reached"; - --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 --connection node_1a TRUNCATE TABLE t1; - --connection node_1 --error ER_LOCK_DEADLOCK --reap diff --git a/mysql-test/suite/galera_sr/t/MDEV-30838.test b/mysql-test/suite/galera_sr/t/MDEV-30838.test index 39ca7d2a375..3270c523daf 100644 --- a/mysql-test/suite/galera_sr/t/MDEV-30838.test +++ b/mysql-test/suite/galera_sr/t/MDEV-30838.test @@ -15,4 +15,4 @@ COMMIT; SELECT * FROM t1; SET debug_dbug='-d,ib_create_table_fail_too_many_trx'; DROP TABLE t1; -CALL mtr.add_suppression("Error writing into mysql.wsrep_streaming_log: 177"); +CALL mtr.add_suppression("Error writing into mysql\\.wsrep_streaming_log: 177"); diff --git a/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test b/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test index a019a32eee0..0db36165e59 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test @@ -105,7 +105,7 @@ SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; DROP TABLE t1; --connection node_2b -CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for"); +CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for "); --disconnect node_2 --connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2 diff --git a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test index 5d4a58b2d03..035ef873700 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test @@ -9,7 +9,7 @@ --let $node_2=node_2 --source ../galera/include/auto_increment_offset_save.inc --connection node_2 -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); --connection node_1 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB; diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test b/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test index 98f6e796ef6..c8ae06637ed 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test @@ -64,7 +64,7 @@ DROP TABLE ten; --eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; --enable_query_log -call mtr.add_suppression('WSREP: transaction size limit.*'); -call mtr.add_suppression('WSREP: rbr write fail.*'); -call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*'); -call mtr.add_suppression('WSREP: transaction size exceeded.*'); +call mtr.add_suppression('WSREP: transaction size limit'); +call mtr.add_suppression('WSREP: rbr write fail'); +call mtr.add_suppression('WSREP: Maximum writeset size exceeded by '); +call mtr.add_suppression('WSREP: transaction size exceeded'); diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test b/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test index 2b9bc4819b8..07b79e49461 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test @@ -51,12 +51,12 @@ SELECT COUNT(*) = 0 FROM t1; DROP TABLE t1; DROP TABLE ten; -call mtr.add_suppression('WSREP: SR rollback replication failure.*'); -call mtr.add_suppression('WSREP: transaction size limit.*'); -call mtr.add_suppression('WSREP: SR rbr write fail.*'); -call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*'); -call mtr.add_suppression('WSREP: transaction size exceeded.*'); -call mtr.add_suppression('WSREP: fragment replication failed:'); +call mtr.add_suppression('WSREP: SR rollback replication failure'); +call mtr.add_suppression('WSREP: transaction size limit'); +call mtr.add_suppression('WSREP: SR rbr write fail'); +call mtr.add_suppression('WSREP: Maximum writeset size exceeded by '); +call mtr.add_suppression('WSREP: transaction size exceeded'); +call mtr.add_suppression('WSREP: fragment replication failed: '); call mtr.add_suppression('WSREP: post commit failed for SR rollback'); -call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*'); -call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *'); +call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd: '); +call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for '); diff --git a/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test b/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test index ea40f58db73..3097318dafb 100644 --- a/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test +++ b/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test @@ -35,4 +35,4 @@ DROP TABLE t1; SET GLOBAL wsrep_ignore_apply_errors = 7; CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event"); -CALL mtr.add_suppression("Can't find record in 't1'"); \ No newline at end of file +CALL mtr.add_suppression("Can't find record in 't1'"); diff --git a/mysql-test/suite/galera_sr/t/mdev_18631.test b/mysql-test/suite/galera_sr/t/mdev_18631.test index 0d1ea34c2f2..3e99e9fa9dc 100644 --- a/mysql-test/suite/galera_sr/t/mdev_18631.test +++ b/mysql-test/suite/galera_sr/t/mdev_18631.test @@ -3,7 +3,6 @@ # The configuration is provided in mdev_18631.cnf. # - --source include/galera_cluster.inc --source include/have_innodb.inc @@ -14,7 +13,7 @@ CREATE TABLE t1(f1 INT PRIMARY KEY) ENGINE=INNODB; INSERT INTO t1 VALUES (1), (2), (3); --connection node_2 -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); SELECT * FROM t1; --connection node_1 diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test index d534fcc5524..e30b8cd5763 100644 --- a/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test +++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test @@ -19,4 +19,4 @@ INSERT INTO t1 VALUES (2); COMMIT; SELECT f1 AS expect_1_and_2 FROM t1; -DROP TABLE t1; \ No newline at end of file +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/alter_copy_bulk,OFF.rdiff b/mysql-test/suite/innodb/r/alter_copy_bulk,OFF.rdiff new file mode 100644 index 00000000000..a644139ea78 --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_copy_bulk,OFF.rdiff @@ -0,0 +1,11 @@ +--- bulk_copy_alter.result ++++ bulk_copy_alter,non_bulk_alter_copy.result +@@ -5,7 +5,7 @@ + INSERT INTO t1 SELECT repeat('b', 200), seq FROM seq_3_to_65536; + ALTER TABLE t1 ADD INDEX(f2); + ALTER TABLE t1 ADD PRIMARY KEY(f1(2)); +-ERROR 23000: Duplicate entry 'bb' for key 'PRIMARY' ++ERROR 23000: Duplicate entry 'aa' for key 'PRIMARY' + INSERT INTO t1 VALUES(repeat('a', 200), 1); + ALTER TABLE t1 ADD UNIQUE KEY(f2); + ERROR 23000: Duplicate entry '1' for key 'f2_2' diff --git a/mysql-test/suite/innodb/r/alter_copy_bulk.result b/mysql-test/suite/innodb/r/alter_copy_bulk.result new file mode 100644 index 00000000000..fa232c12dc3 --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_copy_bulk.result @@ -0,0 +1,24 @@ +SET @@alter_algorithm=COPY; +CREATE TABLE t1(f1 CHAR(200), f2 INT NOT NULL)engine=InnoDB; +INSERT INTO t1 SELECT repeat('a', 200), seq FROM seq_1_to_2; +ALTER TABLE t1 FORCE; +INSERT INTO t1 SELECT repeat('b', 200), seq FROM seq_3_to_65536; +ALTER TABLE t1 ADD INDEX(f2); +ALTER TABLE t1 ADD PRIMARY KEY(f1(2)); +ERROR 23000: Duplicate entry 'bb' for key 'PRIMARY' +INSERT INTO t1 VALUES(repeat('a', 200), 1); +ALTER TABLE t1 ADD UNIQUE KEY(f2); +ERROR 23000: Duplicate entry '1' for key 'f2_2' +ALTER IGNORE TABLE t1 MODIFY f1 CHAR(200) NOT NULL; +CREATE TABLE t2(f1 INT NOT NULL, +FOREIGN KEY(f1) REFERENCES t1(f2))ENGINE=InnoDB; +INSERT INTO t2 VALUES(1); +ALTER TABLE t2 FORCE; +DROP TABLE t2, t1; +CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB PARTITION BY HASH(f1) PARTITIONS 2; +INSERT INTO t1 VALUES(1, 1); +INSERT INTO t1 SELECT seq, seq * 2 FROM seq_1_to_2; +ALTER TABLE t1 FORCE; +INSERT INTO t1 SELECT seq, seq * 2 FROM seq_3_to_65536; +ALTER TABLE t1 ADD INDEX(f2); +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result index 80a0afb8d06..9f14194b6dd 100644 --- a/mysql-test/suite/innodb/r/foreign_key.result +++ b/mysql-test/suite/innodb/r/foreign_key.result @@ -1119,4 +1119,26 @@ test.collections check status OK disconnect con1; DROP TABLE binaries, collections; # End of 10.6 tests +CREATE TABLE t1 +( +f1 VARCHAR(32)BINARY NOT NULL, +f2 VARCHAR(32)BINARY NOT NULL, +PRIMARY KEY (f1), +INDEX(f2) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES('MySQL', 'InnoDB'), ('MariaDB', 'NDB'); +CREATE TABLE t2 +( +f1 VARCHAR(32)BINARY NOT NULL, +f2 VARCHAR(255)BINARY NOT NULL, +f3 int, PRIMARY KEY (f1), INDEX(f1), INDEX(f2) +) ENGINE=InnoDB; +INSERT INTO t2 VALUES('MySQL', 'MySQL', 1), +('MariaDB', 'MariaDB', 1); +ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t2 (f2); +ALTER TABLE t2 ADD FOREIGN KEY (f2) REFERENCES t2 (f2), +ADD UNIQUE INDEX(f3); +ERROR HY000: Cannot delete rows from table which is parent in a foreign key constraint 't1_ibfk_1' of table 't1' +drop table t1, t2; SET GLOBAL innodb_stats_persistent = @save_stats_persistent; +# End of 10.11 tests diff --git a/mysql-test/suite/innodb/r/import_bugs.result b/mysql-test/suite/innodb/r/import_bugs.result index 26845e55567..20e70f03fdf 100644 --- a/mysql-test/suite/innodb/r/import_bugs.result +++ b/mysql-test/suite/innodb/r/import_bugs.result @@ -65,6 +65,32 @@ id 4 5 DROP TABLE t2; +# +# MDEV-34181 Instant table aborts after discard tablespace +# +CREATE TABLE t1(c3 INT, c2 INT, c1 INT KEY)ENGINE=InnoDB; +INSERT INTO t1 VALUES(1, 1, 1), (2, 2, 2); +CREATE TABLE t2 (c1 INT KEY) ENGINE=InnoDB; +INSERT INTO t2 VALUES(1); +ALTER TABLE t2 ADD c2 INT; +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +ALTER TABLE t2 DISCARD TABLESPACE; +ALTER TABLE t2 ADD c3 INT FIRST; +Warnings: +Warning 1814 Tablespace has been discarded for table `t2` +ALTER TABLE t2 IMPORT TABLESPACE; +Warnings: +Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c3` int(11) DEFAULT NULL, + `c1` int(11) NOT NULL, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +DROP TABLE t2, t1; # End of 10.5 tests # # MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)' diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch.result b/mysql-test/suite/innodb/r/innodb_stats_fetch.result index ccc8d20594d..1c05d770ce9 100644 --- a/mysql-test/suite/innodb/r/innodb_stats_fetch.result +++ b/mysql-test/suite/innodb/r/innodb_stats_fetch.result @@ -181,3 +181,13 @@ ALTER TABLE mysql.innodb_table_stats FORCE, LOCK=NONE, ALGORITHM=INPLACE; ERROR 0A000: LOCK=NONE is not supported. Reason: innodb_table_stats. Try LOCK=SHARED ALTER TABLE mysql.innodb_index_stats FORCE, LOCK=NONE, ALGORITHM=INPLACE; ERROR 0A000: LOCK=NONE is not supported. Reason: innodb_index_stats. Try LOCK=SHARED +# +# MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 +# in ha_innobase::estimate_rows_upper_bound +# +CREATE TABLE t (c1 INT,c2 INT, +INDEX(c1))STATS_PERSISTENT=1 ENGINE=INNODB; +UPDATE mysql.innodb_index_stats SET stat_value=0 WHERE database_name like "test" and table_name like 't'; +UPDATE mysql.innodb_table_stats SET clustered_index_size= 0, sum_of_other_index_sizes=0 WHERE database_name like "test" and table_name like 't'; +UPDATE t SET c1=+1 ORDER BY c2; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/lock_release.result b/mysql-test/suite/innodb/r/lock_release.result new file mode 100644 index 00000000000..6bafe79a36c --- /dev/null +++ b/mysql-test/suite/innodb/r/lock_release.result @@ -0,0 +1,23 @@ +# +# MDEV-34542 Assertion `lock_trx_has_sys_table_locks(trx) == __null' +# failed in void row_mysql_unfreeze_data_dictionary(trx_t*) +# +# +CREATE TABLE t1 (c1 CHAR(1) ,c2 INT) ENGINE=INNODB +PARTITION BY LINEAR HASH ((c2)) PARTITIONS 512; +CREATE TABLE t2 (a INT) ENGINE=INNODB; +set @old_table_open_cache= @@table_open_cache; +XA START 'a'; +INSERT INTO mysql.innodb_index_stats SELECT * FROM mysql.innodb_index_stats WHERE table_name=''; +SET GLOBAL table_open_cache=10; +INSERT into t2 (a) VALUES (1); +SELECT * FROM t1; +c1 c2 +XA END 'a'; +XA PREPARE 'a'; +SELECT sleep(3); +sleep(3) +0 +XA ROLLBACK 'a'; +DROP TABLE t1, t2; +SET GLOBAL table_open_cache=@old_table_open_cache; diff --git a/mysql-test/suite/innodb/t/alter_copy_bulk.combinations b/mysql-test/suite/innodb/t/alter_copy_bulk.combinations new file mode 100644 index 00000000000..602a6b5ac57 --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_copy_bulk.combinations @@ -0,0 +1,5 @@ +[ON] +--innodb_alter_copy_bulk=ON + +[OFF] +--innodb_alter_copy_bulk=OFF diff --git a/mysql-test/suite/innodb/t/alter_copy_bulk.test b/mysql-test/suite/innodb/t/alter_copy_bulk.test new file mode 100644 index 00000000000..797724dcf2e --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_copy_bulk.test @@ -0,0 +1,44 @@ +--source include/have_innodb.inc +--source include/have_partition.inc +--source include/have_sequence.inc +SET @@alter_algorithm=COPY; + +CREATE TABLE t1(f1 CHAR(200), f2 INT NOT NULL)engine=InnoDB; +INSERT INTO t1 SELECT repeat('a', 200), seq FROM seq_1_to_2; +# Buffer fits in the memory +ALTER TABLE t1 FORCE; + +# Insert more entries +INSERT INTO t1 SELECT repeat('b', 200), seq FROM seq_3_to_65536; +# Alter should use temporary file for sorting +ALTER TABLE t1 ADD INDEX(f2); + +# Error while buffering the insert operation +--error ER_DUP_ENTRY +ALTER TABLE t1 ADD PRIMARY KEY(f1(2)); + +INSERT INTO t1 VALUES(repeat('a', 200), 1); +# Error while applying the bulk insert operation +--error ER_DUP_ENTRY +ALTER TABLE t1 ADD UNIQUE KEY(f2); + +# Ignore shouldn't go through bulk operation +ALTER IGNORE TABLE t1 MODIFY f1 CHAR(200) NOT NULL; + +CREATE TABLE t2(f1 INT NOT NULL, + FOREIGN KEY(f1) REFERENCES t1(f2))ENGINE=InnoDB; +INSERT INTO t2 VALUES(1); +# Bulk operation shouldn't happen because of foreign key constraints +ALTER TABLE t2 FORCE; +DROP TABLE t2, t1; + +CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB PARTITION BY HASH(f1) PARTITIONS 2; +INSERT INTO t1 VALUES(1, 1); +INSERT INTO t1 SELECT seq, seq * 2 FROM seq_1_to_2; +# Buffer fits in the memory +ALTER TABLE t1 FORCE; +# Insert more entries +INSERT INTO t1 SELECT seq, seq * 2 FROM seq_3_to_65536; +# Alter should use temporary file for sorting +ALTER TABLE t1 ADD INDEX(f2); +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test index e793e261abd..8c6ce939bab 100644 --- a/mysql-test/suite/innodb/t/foreign_key.test +++ b/mysql-test/suite/innodb/t/foreign_key.test @@ -1186,6 +1186,30 @@ DROP TABLE binaries, collections; --echo # End of 10.6 tests +CREATE TABLE t1 +( +f1 VARCHAR(32)BINARY NOT NULL, +f2 VARCHAR(32)BINARY NOT NULL, +PRIMARY KEY (f1), +INDEX(f2) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES('MySQL', 'InnoDB'), ('MariaDB', 'NDB'); + +CREATE TABLE t2 +( +f1 VARCHAR(32)BINARY NOT NULL, +f2 VARCHAR(255)BINARY NOT NULL, +f3 int, PRIMARY KEY (f1), INDEX(f1), INDEX(f2) +) ENGINE=InnoDB; +INSERT INTO t2 VALUES('MySQL', 'MySQL', 1), + ('MariaDB', 'MariaDB', 1); +ALTER TABLE t1 ADD FOREIGN KEY (f1) REFERENCES t2 (f2); +# MDEV-33927 TODO: change the warning message +--error ER_FK_CANNOT_DELETE_PARENT +ALTER TABLE t2 ADD FOREIGN KEY (f2) REFERENCES t2 (f2), +ADD UNIQUE INDEX(f3); +drop table t1, t2; SET GLOBAL innodb_stats_persistent = @save_stats_persistent; +--echo # End of 10.11 tests --source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/import_bugs.test b/mysql-test/suite/innodb/t/import_bugs.test index d22b4b67272..bab4a37e22a 100644 --- a/mysql-test/suite/innodb/t/import_bugs.test +++ b/mysql-test/suite/innodb/t/import_bugs.test @@ -82,6 +82,26 @@ INSERT INTO t2() VALUES(); SELECT * FROM t2 ORDER BY id; DROP TABLE t2; +--echo # +--echo # MDEV-34181 Instant table aborts after discard tablespace +--echo # +CREATE TABLE t1(c3 INT, c2 INT, c1 INT KEY)ENGINE=InnoDB; +INSERT INTO t1 VALUES(1, 1, 1), (2, 2, 2); +CREATE TABLE t2 (c1 INT KEY) ENGINE=InnoDB; +INSERT INTO t2 VALUES(1); +ALTER TABLE t2 ADD c2 INT; +FLUSH TABLES t1 FOR EXPORT; +let $datadir=`select @@datadir`; +--copy_file $datadir/test/t1.ibd $datadir/test/imp_t1.ibd +UNLOCK TABLES; +ALTER TABLE t2 DISCARD TABLESPACE; +ALTER TABLE t2 ADD c3 INT FIRST; +--copy_file $datadir/test/imp_t1.ibd $datadir/test/t2.ibd + +--replace_regex /opening '.*\/test\//opening '.\/test\// +ALTER TABLE t2 IMPORT TABLESPACE; +SHOW CREATE TABLE t2; +DROP TABLE t2, t1; --echo # End of 10.5 tests --echo # diff --git a/mysql-test/suite/innodb/t/innodb_stats_fetch.test b/mysql-test/suite/innodb/t/innodb_stats_fetch.test index 11b8926a50b..63f0e6af251 100644 --- a/mysql-test/suite/innodb/t/innodb_stats_fetch.test +++ b/mysql-test/suite/innodb/t/innodb_stats_fetch.test @@ -104,3 +104,15 @@ DROP TABLE t1; ALTER TABLE mysql.innodb_table_stats FORCE, LOCK=NONE, ALGORITHM=INPLACE; --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE mysql.innodb_index_stats FORCE, LOCK=NONE, ALGORITHM=INPLACE; + +--echo # +--echo # MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 +--echo # in ha_innobase::estimate_rows_upper_bound +--echo # + +CREATE TABLE t (c1 INT,c2 INT, + INDEX(c1))STATS_PERSISTENT=1 ENGINE=INNODB; +UPDATE mysql.innodb_index_stats SET stat_value=0 WHERE database_name like "test" and table_name like 't'; +UPDATE mysql.innodb_table_stats SET clustered_index_size= 0, sum_of_other_index_sizes=0 WHERE database_name like "test" and table_name like 't'; +UPDATE t SET c1=+1 ORDER BY c2; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/lock_release.test b/mysql-test/suite/innodb/t/lock_release.test new file mode 100644 index 00000000000..6620bf69d14 --- /dev/null +++ b/mysql-test/suite/innodb/t/lock_release.test @@ -0,0 +1,26 @@ +--source include/have_innodb.inc +--source include/have_partition.inc + +--echo # +--echo # MDEV-34542 Assertion `lock_trx_has_sys_table_locks(trx) == __null' +--echo # failed in void row_mysql_unfreeze_data_dictionary(trx_t*) +--echo # +--echo # +CREATE TABLE t1 (c1 CHAR(1) ,c2 INT) ENGINE=INNODB + PARTITION BY LINEAR HASH ((c2)) PARTITIONS 512; +CREATE TABLE t2 (a INT) ENGINE=INNODB; + +set @old_table_open_cache= @@table_open_cache; +XA START 'a'; +INSERT INTO mysql.innodb_index_stats SELECT * FROM mysql.innodb_index_stats WHERE table_name=''; +SET GLOBAL table_open_cache=10; +INSERT into t2 (a) VALUES (1); +SELECT * FROM t1; +XA END 'a'; +XA PREPARE 'a'; +# Added sleep to make sure that InnoDB main thread is to remove +# the innodb_index_stats from table cache +SELECT sleep(3); +XA ROLLBACK 'a'; +DROP TABLE t1, t2; +SET GLOBAL table_open_cache=@old_table_open_cache; diff --git a/mysql-test/suite/innodb_fts/r/fulltext_order_by.result b/mysql-test/suite/innodb_fts/r/fulltext_order_by.result index 0d3a4a85b86..02142016d40 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext_order_by.result +++ b/mysql-test/suite/innodb_fts/r/fulltext_order_by.result @@ -129,7 +129,7 @@ group by a.text, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -145,7 +145,7 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result index 35711a63a8a..1edea5ceadc 100644 --- a/mysql-test/suite/innodb_gis/r/1.result +++ b/mysql-test/suite/innodb_gis/r/1.result @@ -433,8 +433,8 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) NO NULL DROP TABLE t1; -SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); -ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) +SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) AS val; +val POINT(1 4) explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); id select_type table type possible_keys key key_len ref rows filtered Extra @@ -668,11 +668,11 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (ST_pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; -select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); -(ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) +select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) AS val; +val POINT(10 10) -select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); -(ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) +select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; +val POINT(10 10) create table t1 (g GEOMETRY); select * from t1; diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result index ca37674b05f..3d3dbbec0bf 100644 --- a/mysql-test/suite/innodb_gis/r/gis.result +++ b/mysql-test/suite/innodb_gis/r/gis.result @@ -434,8 +434,8 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) NO NULL DROP TABLE t1; -SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); -ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) +SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) AS val; +val POINT(1 4) explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); id select_type table type possible_keys key key_len ref rows filtered Extra @@ -669,11 +669,11 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (ST_pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; -select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); -(ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) +select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) AS val; +val POINT(10 10) -select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); -(ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) +select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; +val POINT(10 10) create table t1 (g GEOMETRY); select * from t1; diff --git a/mysql-test/suite/innodb_gis/t/1.test b/mysql-test/suite/innodb_gis/t/1.test index 99651842795..a0abbb82479 100644 --- a/mysql-test/suite/innodb_gis/t/1.test +++ b/mysql-test/suite/innodb_gis/t/1.test @@ -136,17 +136,20 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; --replace_column 9 # 10 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; +--disable_view_protocol SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; + --replace_column 9 # 10 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--enable_view_protocol DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; @@ -169,7 +172,7 @@ ALTER TABLE t1 ADD fid INT NOT NULL; SHOW FIELDS FROM t1; DROP TABLE t1; -SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); +SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) AS val; explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_PointFromText('POINT(1 4)')))); SELECT ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)); @@ -398,14 +401,16 @@ insert into t1 values (ST_pointfromtext('point(1,1)')); drop table t1; -select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); -select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); +select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) AS val; +select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; +--disable_view_protocol --enable_metadata create table t1 (g GEOMETRY); select * from t1; select ST_asbinary(g) from t1; --disable_metadata +--enable_view_protocol drop table t1; create table t1 (a TEXT, b GEOMETRY NOT NULL, INDEX(b(5))); diff --git a/mysql-test/suite/innodb_gis/t/geometry.test b/mysql-test/suite/innodb_gis/t/geometry.test index 4e8f0f729b5..4889a613c5f 100644 --- a/mysql-test/suite/innodb_gis/t/geometry.test +++ b/mysql-test/suite/innodb_gis/t/geometry.test @@ -625,17 +625,20 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; --replace_column 9 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; +--disable_view_protocol SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; + --replace_column 9 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--enable_view_protocol --echo # check support of Foreign Key constraint CREATE TABLE parent (id GEOMETRY NOT NULL,PRIMARY KEY (id(10))) ENGINE=INNODB; diff --git a/mysql-test/suite/innodb_gis/t/gis.test b/mysql-test/suite/innodb_gis/t/gis.test index b27e1852d6e..87438f50582 100644 --- a/mysql-test/suite/innodb_gis/t/gis.test +++ b/mysql-test/suite/innodb_gis/t/gis.test @@ -133,17 +133,20 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; --replace_column 9 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; +--disable_view_protocol SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; + --replace_column 9 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--enable_view_protocol DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; @@ -166,7 +169,7 @@ ALTER TABLE t1 ADD fid INT NOT NULL; SHOW FIELDS FROM t1; DROP TABLE t1; -SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); +SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) AS val; explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_PointFromText('POINT(1 4)')))); SELECT ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)); @@ -391,14 +394,16 @@ insert into t1 values (ST_pointfromtext('point(1,1)')); drop table t1; -select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); -select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); +select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) AS val; +select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; +--disable_view_protocol --enable_metadata create table t1 (g GEOMETRY); select * from t1; select ST_asbinary(g) from t1; --disable_metadata +--enable_view_protocol drop table t1; create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b)); diff --git a/mysql-test/suite/json/r/json_table.result b/mysql-test/suite/json/r/json_table.result index ed385f86a31..089ce301114 100644 --- a/mysql-test/suite/json/r/json_table.result +++ b/mysql-test/suite/json/r/json_table.result @@ -1018,6 +1018,31 @@ Jeans SELECT 1 FROM JSON_TABLE (row(1,2), '$' COLUMNS (o FOR ORDINALITY)) AS j; ERROR 21000: Operand should contain 1 column(s) # +# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +# update_correlated_cache() fails to take JSON_TABLE functions in +# subqueries into account. +# +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), +('[{"x":"10"},{"x":"20"}]'), +('[{"x":"100"},{"x":"200"}]'); +select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) as SUBQ +from t1; +c SUBQ +[{"x":"1"},{"x":"2"}] 3 +[{"x":"10"},{"x":"20"}] 30 +[{"x":"100"},{"x":"200"}] 300 +explain select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) as SUBQ +from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table +drop table t1; +# # End of 10.6 tests # # diff --git a/mysql-test/suite/json/t/json_table.test b/mysql-test/suite/json/t/json_table.test index 5a8fe984c79..c5a5d438c60 100644 --- a/mysql-test/suite/json/t/json_table.test +++ b/mysql-test/suite/json/t/json_table.test @@ -873,6 +873,28 @@ SELECT * FROM json_table('[{"name":"Jeans"}]', '$[*]' --error ER_OPERAND_COLUMNS SELECT 1 FROM JSON_TABLE (row(1,2), '$' COLUMNS (o FOR ORDINALITY)) AS j; +--echo # +--echo # MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +--echo # update_correlated_cache() fails to take JSON_TABLE functions in +--echo # subqueries into account. +--echo # + +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), + ('[{"x":"10"},{"x":"20"}]'), + ('[{"x":"100"},{"x":"200"}]'); +select c, + (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) + AS jt) as SUBQ + from t1; + +explain select c, + (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) + AS jt) as SUBQ + from t1; + +drop table t1; + --echo # --echo # End of 10.6 tests --echo # diff --git a/mysql-test/suite/mariabackup/backup_grants.result b/mysql-test/suite/mariabackup/backup_grants.result index c268d4fb19d..0ccb395a523 100644 --- a/mysql-test/suite/mariabackup/backup_grants.result +++ b/mysql-test/suite/mariabackup/backup_grants.result @@ -1,17 +1,21 @@ CREATE user backup@localhost IDENTIFIED BY 'xyz'; NOT FOUND /missing required privilege/ in backup.log +NOT FOUND /xyz/ in mariadb_backup_info FOUND 1 /missing required privilege RELOAD/ in backup.log FOUND 1 /missing required privilege PROCESS/ in backup.log FOUND 1 /GRANT USAGE ON/ in backup.log GRANT RELOAD, PROCESS on *.* to backup@localhost; NOT FOUND /missing required privilege/ in backup.log +NOT FOUND /xyz/ in mariadb_backup_info FOUND 1 /missing required privilege SLAVE MONITOR/ in backup.log GRANT REPLICA MONITOR ON *.* TO backup@localhost; NOT FOUND /missing required privilege/ in backup.log +NOT FOUND /xyz/ in mariadb_backup_info REVOKE REPLICA MONITOR ON *.* FROM backup@localhost; FOUND 1 /missing required privilege REPLICATION SLAVE ADMIN/ in backup.log FOUND 1 /missing required privilege SLAVE MONITOR/ in backup.log GRANT REPLICATION SLAVE ADMIN ON *.* TO backup@localhost; GRANT REPLICA MONITOR ON *.* TO backup@localhost; NOT FOUND /missing required privilege/ in backup.log +NOT FOUND /xyz/ in mariadb_backup_info DROP USER backup@localhost; diff --git a/mysql-test/suite/mariabackup/backup_grants.test b/mysql-test/suite/mariabackup/backup_grants.test index 1e1d6a34f3d..05960e44008 100644 --- a/mysql-test/suite/mariabackup/backup_grants.test +++ b/mysql-test/suite/mariabackup/backup_grants.test @@ -1,14 +1,19 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +let $info=$MYSQLTEST_VARDIR/tmp/backup/mariadb_backup_info; +let $log=$MYSQLTEST_VARDIR/tmp/backup.log; CREATE user backup@localhost IDENTIFIED BY 'xyz'; -let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/backup.log; # backup possible for unprivileges user, with --no-lock --disable_result_log exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 -ubackup -pxyz --no-lock --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1; --enable_result_log +--let SEARCH_FILE=$log --let SEARCH_PATTERN= missing required privilege --source include/search_pattern_in_file.inc +--let SEARCH_FILE=$info +--let SEARCH_PATTERN=xyz +--source include/search_pattern_in_file.inc rmdir $targetdir; # backup fails without --no-lock, because of FTWRL @@ -17,6 +22,7 @@ error 1; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 -ubackup -pxyz --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1; --enable_result_log +--let SEARCH_FILE=$log --let SEARCH_PATTERN= missing required privilege RELOAD --source include/search_pattern_in_file.inc --let SEARCH_PATTERN= missing required privilege PROCESS @@ -30,6 +36,9 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=1 --enable_result_log --let SEARCH_PATTERN= missing required privilege --source include/search_pattern_in_file.inc +--let SEARCH_FILE=$info +--let SEARCH_PATTERN=xyz +--source include/search_pattern_in_file.inc rmdir $targetdir; # MDEV-23607 Warning: missing required privilege REPLICATION CLIENT @@ -40,6 +49,7 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user=backup --enable_result_log rmdir $targetdir; +--let SEARCH_FILE=$log --let SEARCH_PATTERN= missing required privilege SLAVE MONITOR --source include/search_pattern_in_file.inc @@ -49,6 +59,9 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user backup --enable_result_log --let SEARCH_PATTERN= missing required privilege --source include/search_pattern_in_file.inc +--let SEARCH_FILE=$info +--let SEARCH_PATTERN=xyz +--source include/search_pattern_in_file.inc rmdir $targetdir; REVOKE REPLICA MONITOR ON *.* FROM backup@localhost; @@ -59,6 +72,7 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user backup --enable_result_log rmdir $targetdir; +--let SEARCH_FILE=$log --let SEARCH_PATTERN= missing required privilege REPLICATION SLAVE ADMIN --source include/search_pattern_in_file.inc --let SEARCH_PATTERN= missing required privilege SLAVE MONITOR @@ -71,6 +85,9 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxy --enable_result_log --let SEARCH_PATTERN= missing required privilege --source include/search_pattern_in_file.inc +--let SEARCH_FILE=$info +--let SEARCH_PATTERN=xyz +--source include/search_pattern_in_file.inc rmdir $targetdir; DROP USER backup@localhost; diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result index 08e72193bf9..19e9ac025ea 100644 --- a/mysql-test/suite/roles/definer.result +++ b/mysql-test/suite/roles/definer.result @@ -280,7 +280,7 @@ a b c 111 4 0 2 20 200 delete from t1 where a=111; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */; diff --git a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result index 7699c2f47d9..33f479ba2c1 100644 --- a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result +++ b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result @@ -191,10 +191,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint slave-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= use `test`/*!*/; @@ -211,7 +211,7 @@ CREATE TABLE t1 (a INT, b INT, c INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -219,8 +219,8 @@ CREATE TABLE t2 (a INT, b INT, c INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-2-3 ddl -/*!100001 SET @@session.server_id=2*//*!*/; -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.server_id=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -228,8 +228,8 @@ ALTER TABLE t1 ENGINE=BLACKHOLE /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 trans -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -247,7 +247,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4 trans -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -265,7 +265,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5 trans -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -283,7 +283,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 trans -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -301,7 +301,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7 trans -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -319,7 +319,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8 ddl -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -327,7 +327,7 @@ ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9 trans -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -345,7 +345,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10 trans -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -363,7 +363,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-11 trans -/*!100001 SET @@session.gtid_seq_no=11*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; START TRANSACTION /*!*/; # at # @@ -381,7 +381,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-12 ddl -/*!100001 SET @@session.gtid_seq_no=12*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; @@ -389,7 +389,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-13 trans -/*!100001 SET @@session.gtid_seq_no=13*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=13*//*!*/; START TRANSACTION /*!*/; # at # @@ -407,7 +407,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-14 trans -/*!100001 SET @@session.gtid_seq_no=14*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=14*//*!*/; START TRANSACTION /*!*/; # at # @@ -425,7 +425,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-15 trans -/*!100001 SET @@session.gtid_seq_no=15*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=15*//*!*/; START TRANSACTION /*!*/; # at # @@ -443,7 +443,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-16 ddl -/*!100001 SET @@session.gtid_seq_no=16*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=16*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid= SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_change_master_demote.result b/mysql-test/suite/rpl/r/rpl_change_master_demote.result index dc6e5c2ffee..5924b833709 100644 --- a/mysql-test/suite/rpl/r/rpl_change_master_demote.result +++ b/mysql-test/suite/rpl/r/rpl_change_master_demote.result @@ -501,8 +501,7 @@ Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mariadbd restart # Slave needs time to start and stop automatically # Waiting for both SQL and IO threads to have started.. -# Waiting for SQL thread to be killed.. -# Waiting for IO thread to be killed.. +# Waiting for Slave SQL and IO threads to be killed.. # Validating neither SQL nor IO threads are running.. # ..success # Clean slave state of master diff --git a/mysql-test/suite/rpl/r/rpl_mysqldump_gtid_slave_pos.result b/mysql-test/suite/rpl/r/rpl_mysqldump_gtid_slave_pos.result new file mode 100644 index 00000000000..696eb8d867b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_mysqldump_gtid_slave_pos.result @@ -0,0 +1,150 @@ +include/master-slave.inc +[connection master] +# Initialize +connection slave; +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; +# Setup data +connection master; +CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB; +include/save_master_gtid.inc +connection slave; +include/sync_with_master_gtid.inc +# 1. run some replication load that adds records to gtid_slave_pos table +# 2. stop slave, remove loaded data (it will be replicated), delete from +# gtid_slave_pos as the table is going to be restored +# 3. take dump from slave (master has an empty gtid_slave_pos) +# with --gtid and for the default value of both +# --dump-slave and --master-data +# and in loop for the two options do: +# 4. reset the slave state to install some initial state +# 5. restart slave server, restore the dump +# 6. check the final state which must be equal to the dump's one +# 7. start replication to see no error => Q.E.D. +# unless the test runs on a buggy version in which case set to zero. +# 1. +include/stop_slave.inc +delete from mysql.gtid_slave_pos; +connection master; +insert into t1 set a = 5; +insert into t1 set a = 4; +insert into t1 set a = 3; +insert into t1 set a = 2; +insert into t1 set a = 1; +include/save_master_gtid.inc +connection slave; +CHANGE MASTER TO master_use_gtid= no; +include/start_slave.inc +include/sync_with_master_gtid.inc +select * from mysql.gtid_slave_pos; +domain_id sub_id server_id seq_no +0 2 1 1 +0 3 1 2 +0 4 1 3 +0 5 1 4 +0 6 1 5 +0 7 1 6 +select @@global.gtid_slave_pos as "after initial slave got in sync"; +after initial slave got in sync +0-1-6 +# 2. +include/stop_slave.inc +# 3. A +include/stop_slave.inc +include/stop_slave.inc +# 4. +set statement sql_log_bin=0 for delete from mysql.gtid_slave_pos; +insert into mysql.gtid_slave_pos values (99 + 2, 1, 1, 1); +# 5. +include/rpl_restart_server.inc [server_number=2] +select * from mysql.gtid_slave_pos; +domain_id sub_id server_id seq_no +101 1 1 1 +select @@global.gtid_slave_pos as "before dump restore"; +before dump restore +101-1-1 +# 6. +select * from mysql.gtid_slave_pos; +domain_id sub_id server_id seq_no +0 2 1 6 +select @@global.gtid_slave_pos as "after dump restore"; +after dump restore +0-1-6 +# 7. +reset slave; +select @@global.gtid_slave_pos; +@@global.gtid_slave_pos +0-1-6 +change master to master_use_gtid=no; +connection master; +insert into t1 select 1+max(a),2 from t1; +include/save_master_gtid.inc +connection slave; +include/start_slave.inc +include/sync_with_master_gtid.inc +select * from mysql.gtid_slave_pos; +domain_id sub_id server_id seq_no +0 2 1 6 +0 3 1 1 +0 4 1 2 +0 5 1 3 +0 6 1 4 +0 7 1 5 +0 8 1 6 +0 9 1 7 +select @@global.gtid_slave_pos as "after slave got in sync"; +after slave got in sync +0-1-7 +include/stop_slave.inc +# 4. +set statement sql_log_bin=0 for delete from mysql.gtid_slave_pos; +insert into mysql.gtid_slave_pos values (99 + 1, 1, 1, 1); +# 5. +include/rpl_restart_server.inc [server_number=2] +select * from mysql.gtid_slave_pos; +domain_id sub_id server_id seq_no +100 1 1 1 +select @@global.gtid_slave_pos as "before dump restore"; +before dump restore +100-1-1 +# 6. +select * from mysql.gtid_slave_pos; +domain_id sub_id server_id seq_no +0 2 1 6 +select @@global.gtid_slave_pos as "after dump restore"; +after dump restore +0-1-6 +# 7. +reset slave; +select @@global.gtid_slave_pos; +@@global.gtid_slave_pos +0-1-6 +change master to master_use_gtid=no; +connection master; +insert into t1 select 1+max(a),1 from t1; +include/save_master_gtid.inc +connection slave; +include/start_slave.inc +include/sync_with_master_gtid.inc +select * from mysql.gtid_slave_pos; +domain_id sub_id server_id seq_no +0 2 1 6 +0 3 1 1 +0 4 1 2 +0 5 1 3 +0 6 1 4 +0 7 1 5 +0 8 1 6 +0 9 1 7 +0 10 1 8 +select @@global.gtid_slave_pos as "after slave got in sync"; +after slave got in sync +0-1-8 +# +# Cleanup +# +connection master; +DROP TABLE t1; +include/save_master_gtid.inc +connection slave; +include/sync_with_master_gtid.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave_error.result b/mysql-test/suite/rpl/r/rpl_stop_slave_error.result index 956e53cf465..71cb980b5d5 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave_error.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave_error.result @@ -2,7 +2,9 @@ include/master-slave.inc [connection master] connection master; connection slave; +# MDEV-32892: Repeatedly starting/stopping io_thread.. include/stop_slave.inc NOT FOUND /Error reading packet from server: Lost connection/ in slave_log.err +NOT FOUND /error code: 2013/ in slave_log.err include/start_slave.inc include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_xa_empty_transaction.result b/mysql-test/suite/rpl/r/rpl_xa_empty_transaction.result index f3ea53c219a..917041c148d 100644 --- a/mysql-test/suite/rpl/r/rpl_xa_empty_transaction.result +++ b/mysql-test/suite/rpl/r/rpl_xa_empty_transaction.result @@ -1164,6 +1164,88 @@ include/sync_with_master_gtid.inc connection server_1; set @@binlog_format = @sav_binlog_format; set @@global.binlog_format = @sav_binlog_format; +# +# MDEV-33921.1: If a slave's replication of an XA transaction results in +# an empty transaction, e.g. due to replication filters, the slave +# should not binlog any part of the XA transaction. +connection server_1; +create database db1; +create database db2; +create table db1.t1 (a int) engine=innodb; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +include/stop_slave.inc +change master to master_use_gtid=slave_pos; +connection server_2; +include/stop_slave.inc +SET @@GLOBAL.replicate_ignore_db= ""; +SET @@GLOBAL.replicate_do_db= "db2"; +change master to master_use_gtid=slave_pos; +include/start_slave.inc +connection server_1; +use db1; +XA START "x1"; +insert into db1.t1 values (1); +XA END "x1"; +XA PREPARE "x1"; +XA COMMIT "x1"; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +connection server_2; +include/save_master_gtid.inc +connection server_3; +include/start_slave.inc +include/sync_with_master_gtid.inc +# +# 33921.2: If the slave shuts down after "preparing" a filtered-to-empty +# XA transaction (and not completing it), then when the respective +# XA completion (COMMIT in this test) command is replicated, the slave +# should not throw ER_XAER_NOTA. Note that internally, the error is +# thrown, but it is ignored because the target db is filtered. +connection server_3; +include/stop_slave.inc +connection server_1; +use db1; +XA START "x2"; +insert into db1.t1 values (2); +XA END "x2"; +XA PREPARE "x2"; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +# Connection named slave is needed for reconnection +connect slave,localhost,root,,; +connect slave1,localhost,root,,; +include/rpl_restart_server.inc [server_number=2] +connection server_2; +include/stop_slave.inc +SET @@GLOBAL.replicate_do_db= "db2"; +change master to master_use_gtid=slave_pos; +include/start_slave.inc +connection server_1; +XA COMMIT "x2"; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +include/save_master_gtid.inc +connection server_3; +include/start_slave.inc +include/sync_with_master_gtid.inc +# +# 33921.3: Ensure XA commands are not considered by mysqlbinlog's +# --database filter +connection server_1; +# MYSQL_BINLOG datadir/binlog_file --start-position=pre_xa_pos --database=db2 --result-file=assert_file +include/assert_grep.inc [Mysqlbinlog should output all XA commands from the filtered transaction] +connection server_2; +include/stop_slave.inc +SET @@GLOBAL.replicate_do_db=""; +include/start_slave.inc +connection server_1; +drop database db1; +drop database db2; connection server_1; include/rpl_end.inc # End of rpl_xa_empty_transaction.test diff --git a/mysql-test/suite/rpl/t/rpl_change_master_demote.test b/mysql-test/suite/rpl/t/rpl_change_master_demote.test index 9754b03f1cc..255e9e34b9c 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master_demote.test +++ b/mysql-test/suite/rpl/t/rpl_change_master_demote.test @@ -277,36 +277,43 @@ SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHER --echo # position pointing to a previous event (because --echo # master_demote_to_slave=1 merges gtid_binlog_pos into gtid_slave_pos). ---let $pre_start_slave_thread_count= query_get_value(SHOW STATUS LIKE 'Connections', Value, 1) +# Note that we can't use sync_with_master_gtid.inc, +# wait_for_slave_to_start.inc, or wait_for_slave_to_stop.inc because our MTR +# connection thread races with the start/stop of the SQL/IO threads. So +# instead, for slave start, we prove the threads started by waiting for the +# connection count to increase by 2; and for slave stop, we wait for the +# processlist count to return to its pre start slave number. + +--let $pre_start_slave_conn_count= query_get_value(SHOW STATUS LIKE 'Connections', Value, 1) +--let $pre_start_slave_process_count= `SELECT count(*) from information_schema.PROCESSLIST` --replace_result $ssu_middle_binlog_pos ssu_middle_binlog_pos eval START SLAVE UNTIL master_gtid_pos="$ssu_middle_binlog_pos"; --echo # Slave needs time to start and stop automatically --echo # Waiting for both SQL and IO threads to have started.. ---let $expected_cons_after_start_slave= `SELECT ($pre_start_slave_thread_count + 2)` +--let $expected_cons_after_start_slave= `SELECT ($pre_start_slave_conn_count + 2)` --let $status_var= Connections --let $status_var_value= $expected_cons_after_start_slave --let $status_var_comparsion= >= --source include/wait_for_status_var.inc --let $status_var_comparsion= ---echo # Waiting for SQL thread to be killed.. ---let $wait_condition= SELECT count(*)=0 from information_schema.PROCESSLIST where COMMAND="Slave_SQL" ---source include/wait_condition.inc ---echo # Waiting for IO thread to be killed.. ---let $wait_condition= SELECT count(*)=0 from information_schema.PROCESSLIST where COMMAND="Slave_IO" +--echo # Waiting for Slave SQL and IO threads to be killed.. +--let $wait_condition= SELECT count(*)=$pre_start_slave_process_count from information_schema.PROCESSLIST --source include/wait_condition.inc --echo # Validating neither SQL nor IO threads are running.. --let $io_state= query_get_value("SHOW SLAVE STATUS", Slave_IO_State, 1) if (`SELECT strcmp("$io_state","") != 0`) { + --echo # Slave_IO_State is "$io_state" but should be empty die "IO thread should not be running after START SLAVE UNTIL master_gtid_pos using a pre-existing GTID"; } --let $sql_state= query_get_value("SHOW SLAVE STATUS", Slave_SQL_Running_State, 1) if (`SELECT strcmp("$sql_state","") != 0`) { + --echo # Slave_SQL_Running_State is "$sql_state" but should be empty die "SQL thread should not be running after START SLAVE UNTIL master_gtid_pos using a pre-existing GTID"; } --echo # ..success diff --git a/mysql-test/suite/rpl/t/rpl_mdev12179.test b/mysql-test/suite/rpl/t/rpl_mdev12179.test index aa0d05211ff..597295d1136 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev12179.test +++ b/mysql-test/suite/rpl/t/rpl_mdev12179.test @@ -55,9 +55,7 @@ SET sql_log_bin=1; # Restart the slave mysqld server, and verify that the GTID position is # read correctly from the new mysql.gtid_slave_pos_innodb table. ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -94,9 +92,7 @@ DROP TABLE mysql.gtid_slave_pos; RENAME TABLE mysql.gtid_slave_pos_innodb TO mysql.gtid_slave_pos; SET sql_log_bin=1; ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -132,9 +128,7 @@ SET sql_log_bin=0; ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET sql_log_bin=1; ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -176,9 +170,7 @@ INSERT INTO mysql.gtid_slave_pos SELECT * FROM mysql.gtid_slave_pos_InnoDB; DROP TABLE mysql.gtid_slave_pos_InnoDB; SET sql_log_bin=1; ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line "wait" $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -272,9 +264,7 @@ while (!$done) # MDEV-15373 engine gtid_slave_pos table name disobeys lower-case-table-names # This snippet verifies that engine gtid_slave_pos table is found, # its data are up-to-date. ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --connection server_2 --shutdown_server --source include/wait_until_disconnected.inc diff --git a/mysql-test/suite/rpl/t/rpl_mysqldump_gtid_slave_pos.test b/mysql-test/suite/rpl/t/rpl_mysqldump_gtid_slave_pos.test new file mode 100644 index 00000000000..464f68723f9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_mysqldump_gtid_slave_pos.test @@ -0,0 +1,138 @@ +--source include/have_innodb.inc +--source include/master-slave.inc + +--echo # Initialize +--connection slave +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; + +--echo # Setup data +--connection master +CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB; +--source include/save_master_gtid.inc + +--connection slave +--source include/sync_with_master_gtid.inc + +# The following test proves fixes to +# MDEV-15393 gtid_slave_pos duplicate key errors after mysqldump restore +# +--echo # 1. run some replication load that adds records to gtid_slave_pos table +--echo # 2. stop slave, remove loaded data (it will be replicated), delete from +--echo # gtid_slave_pos as the table is going to be restored +--echo # 3. take dump from slave (master has an empty gtid_slave_pos) +--echo # with --gtid and for the default value of both +--echo # --dump-slave and --master-data +--echo # and in loop for the two options do: +--echo # 4. reset the slave state to install some initial state +--echo # 5. restart slave server, restore the dump +--echo # 6. check the final state which must be equal to the dump's one +--echo # 7. start replication to see no error => Q.E.D. +--echo # unless the test runs on a buggy version in which case set $FIXED to zero. + +# set to ZERO when run with mysqldump of buggy version +--let $FIXED= 1 + +--echo # 1. +--source include/stop_slave.inc +delete from mysql.gtid_slave_pos; + +--connection master +--let $trx_number = 5 +--let $i = $trx_number +while ($i) +{ + eval insert into t1 set a = $i; + --dec $i +} +--source include/save_master_gtid.inc + +--connection slave +# due to MDEV-19801 on 10+.10+ +CHANGE MASTER TO master_use_gtid= no; +--source include/start_slave.inc +--source include/sync_with_master_gtid.inc +# Prior tests in a mtr batch could leave the min value of sub_id column with +# arbtirary value. Therefore before dumping let's +# adjust mysql.gtid_slave_pos to have sub_id growing deterministically. +# The value of 2 is choosen. +--disable_query_log + set statement sql_log_bin = 0 for update mysql.gtid_slave_pos set sub_id = sub_id - (select min(sub_id) from mysql.gtid_slave_pos) + 2; +--enable_query_log +select * from mysql.gtid_slave_pos; +select @@global.gtid_slave_pos as "after initial slave got in sync"; + +--echo # 2. +--source include/stop_slave.inc + +--echo # 3. A +# Two dumps prepared to be restored in the following loop +--exec $MYSQL_DUMP_SLAVE --dump-slave --gtid mysql gtid_slave_pos > $MYSQLTEST_VARDIR/tmp/dump_2.sql +--source include/stop_slave.inc + +--exec $MYSQL_DUMP_SLAVE --master-data --gtid mysql gtid_slave_pos > $MYSQLTEST_VARDIR/tmp/dump_1.sql + +--let $i=2 +while ($i) +{ + --disable_warnings + --source include/stop_slave.inc + --enable_warnings + --echo # 4. + set statement sql_log_bin=0 for delete from mysql.gtid_slave_pos; + # setup a new gtid/sub_id state as complication for future backup restore. + # After the restore the new state must be a union of the backup state + # and this one. + --eval insert into mysql.gtid_slave_pos values (99 + $i, 1, 1, 1) + + --echo # 5. + --let $rpl_server_number= 2 + --source include/rpl_restart_server.inc + select * from mysql.gtid_slave_pos; + select @@global.gtid_slave_pos as "before dump restore"; + --let $dump=dump_$i.sql + --exec $MYSQL_SLAVE mysql -e "source $MYSQLTEST_VARDIR/tmp/$dump" + + --echo # 6. + select * from mysql.gtid_slave_pos; + select @@global.gtid_slave_pos as "after dump restore"; + + --echo # 7. + reset slave; + select @@global.gtid_slave_pos; + change master to master_use_gtid=no; + + --connection master + eval insert into t1 select 1+max(a),$i from t1; + --source include/save_master_gtid.inc + + --connection slave + if ($FIXED) + { + --source include/start_slave.inc + --source include/sync_with_master_gtid.inc + } + if (!$FIXED) + { + start slave; + --let $slave_sql_errno= 1942 + --source include/wait_for_slave_sql_error.inc + + --die + } + select * from mysql.gtid_slave_pos; + select @@global.gtid_slave_pos as "after slave got in sync"; + + --dec $i +} +--echo # +--echo # Cleanup +--echo # +--connection master +DROP TABLE t1; +--source include/save_master_gtid.inc + +--connection slave +--remove_files_wildcard $MYSQLTEST_VARDIR/tmp dump_*.sql +--source include/sync_with_master_gtid.inc + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave_error.test b/mysql-test/suite/rpl/t/rpl_stop_slave_error.test index 10d7c7736f1..97542baf563 100644 --- a/mysql-test/suite/rpl/t/rpl_stop_slave_error.test +++ b/mysql-test/suite/rpl/t/rpl_stop_slave_error.test @@ -6,11 +6,26 @@ source include/master-slave.inc; connection master; sync_slave_with_master; + +--let $iter=100 +--echo # MDEV-32892: Repeatedly starting/stopping io_thread.. +--disable_query_log +while ($iter) +{ + stop slave io_thread; + start slave io_thread; + --dec $iter +} +--enable_query_log source include/stop_slave.inc; + let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/slave_log.err; let SEARCH_PATTERN=Error reading packet from server: Lost connection; source include/search_pattern_in_file.inc; +let SEARCH_PATTERN=error code: 2013; +source include/search_pattern_in_file.inc; + source include/start_slave.inc; source include/rpl_end.inc; diff --git a/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.test b/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.test index 61cc0621d5a..85b6bcdb873 100644 --- a/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.test +++ b/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.test @@ -32,6 +32,10 @@ # MDEV-25616: Binlog event for XA COMMIT is generated without matching # XA START, replication aborts # +# MDEV-33921: Replication fails when XA transactions are used where the slave +# has replicate_do_db set and the client has touched a different +# database when running DML such as inserts. +# --source include/have_log_bin.inc --let $rpl_server_count= 3 @@ -167,6 +171,133 @@ set @@global.binlog_format = row; set @@binlog_format = @sav_binlog_format; set @@global.binlog_format = @sav_binlog_format; + +--echo # +--echo # MDEV-33921.1: If a slave's replication of an XA transaction results in +--echo # an empty transaction, e.g. due to replication filters, the slave +--echo # should not binlog any part of the XA transaction. +# +# Note that the MDEV-33921 report is actually about that XA END is filtered +# out (not executed), and then its corresponding XA PREPARE errors because the +# XA state of the transaction is incorrect. This test case inherently tests +# both bugs. + +--connection server_1 +create database db1; +create database db2; +create table db1.t1 (a int) engine=innodb; +--source include/save_master_gtid.inc +--connection server_3 +--source include/sync_with_master_gtid.inc +--source include/stop_slave.inc +change master to master_use_gtid=slave_pos; + +--connection server_2 +--source include/stop_slave.inc +SET @@GLOBAL.replicate_ignore_db= ""; +SET @@GLOBAL.replicate_do_db= "db2"; +change master to master_use_gtid=slave_pos; +--source include/start_slave.inc + +--connection server_1 +--let $pre_xa_gtid= `SELECT @@global.gtid_binlog_pos` +use db1; +XA START "x1"; +insert into db1.t1 values (1); +XA END "x1"; +XA PREPARE "x1"; +XA COMMIT "x1"; +--source include/save_master_gtid.inc + +--connection server_2 +--source include/sync_with_master_gtid.inc +--let $slave_binlogged_gtid= `SELECT @@global.gtid_binlog_pos` +if (`SELECT strcmp("$slave_binlogged_gtid","$pre_xa_gtid")`) +{ + --die Slave binlogged an empty XA transaction yet should not have +} + +--connection server_2 +--source include/save_master_gtid.inc + +--connection server_3 +--source include/start_slave.inc +--source include/sync_with_master_gtid.inc + +--echo # +--echo # 33921.2: If the slave shuts down after "preparing" a filtered-to-empty +--echo # XA transaction (and not completing it), then when the respective +--echo # XA completion (COMMIT in this test) command is replicated, the slave +--echo # should not throw ER_XAER_NOTA. Note that internally, the error is +--echo # thrown, but it is ignored because the target db is filtered. + +--connection server_3 +--source include/stop_slave.inc + +--connection server_1 +--let $pre_xa_gtid= `SELECT @@global.gtid_binlog_pos` + +# Used by mysqlbinlog in part 3 +--let $pre_xa_pos = query_get_value(SHOW MASTER STATUS, Position, 1) + +use db1; +XA START "x2"; +insert into db1.t1 values (2); +XA END "x2"; +XA PREPARE "x2"; +--source include/save_master_gtid.inc + +--connection server_2 +--source include/sync_with_master_gtid.inc +--let $rpl_server_number= 2 +--echo # Connection named slave is needed for reconnection +--connect(slave,localhost,root,,) +--connect(slave1,localhost,root,,) +--source include/rpl_restart_server.inc + +--connection server_2 +--source include/stop_slave.inc +SET @@GLOBAL.replicate_do_db= "db2"; +change master to master_use_gtid=slave_pos; +--source include/start_slave.inc + +--connection server_1 +XA COMMIT "x2"; +--source include/save_master_gtid.inc + +--connection server_2 +--source include/sync_with_master_gtid.inc +--source include/save_master_gtid.inc + +--connection server_3 +--source include/start_slave.inc +--source include/sync_with_master_gtid.inc + +--echo # +--echo # 33921.3: Ensure XA commands are not considered by mysqlbinlog's +--echo # --database filter +--connection server_1 +--let $datadir= `select @@datadir` +--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) +--let assert_file= $MYSQLTEST_VARDIR/tmp/binlog_decoded.out +--echo # MYSQL_BINLOG datadir/binlog_file --start-position=pre_xa_pos --database=db2 --result-file=assert_file +--exec $MYSQL_BINLOG $datadir/$binlog_file --start-position=$pre_xa_pos --database=db2 --result-file=$assert_file + +--let assert_text= Mysqlbinlog should output all XA commands from the filtered transaction +--let assert_count= 4 +--let assert_select= XA START|XA END|XA PREPARE|XA COMMIT +--source include/assert_grep.inc + +--connection server_2 +--source include/stop_slave.inc +SET @@GLOBAL.replicate_do_db=""; +--source include/start_slave.inc + +--connection server_1 +drop database db1; +drop database db2; + + # # Cleanup --connection server_1 diff --git a/mysql-test/suite/s3/mysqldump.result b/mysql-test/suite/s3/mysqldump.result index e0c0caf634e..3d7b3b37771 100644 --- a/mysql-test/suite/s3/mysqldump.result +++ b/mysql-test/suite/s3/mysqldump.result @@ -4,7 +4,7 @@ alter table t1 engine=S3; ##### # mysqldump with --copy-s3-tables=0 (by default) ### -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ ##### # mysqldump with --copy-s3-tables=0 (by default) XML ### @@ -16,7 +16,7 @@ alter table t1 engine=S3; ##### # mysqldump with --copy-s3-tables=1 ### -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( diff --git a/mysql-test/suite/sql_sequence/mysqldump.result b/mysql-test/suite/sql_sequence/mysqldump.result index 428a38285aa..93db304dbad 100644 --- a/mysql-test/suite/sql_sequence/mysqldump.result +++ b/mysql-test/suite/sql_sequence/mysqldump.result @@ -3,7 +3,7 @@ CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024; insert into t1 values (1),(2); CREATE SEQUENCE x1 engine=innodb; # dump whole database -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; DO SETVAL(`a1`, 1, 0); CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; @@ -19,7 +19,7 @@ INSERT INTO `t1` VALUES (1), (2); # dump by tables order 1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; DO SETVAL(`a1`, 1, 0); CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; @@ -35,7 +35,7 @@ INSERT INTO `t1` VALUES (1), (2); # dump by tables order 2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; DO SETVAL(`a1`, 1, 0); CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; @@ -51,7 +51,7 @@ INSERT INTO `t1` VALUES (1), (2); # dump by tables only tables -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -63,7 +63,7 @@ INSERT INTO `t1` VALUES (1), (2); # dump by tables only sequences -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; DO SETVAL(`a1`, 1, 0); CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index a179494f049..9226cb104e9 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -55,6 +55,18 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT OPTIONAL +VARIABLE_NAME INNODB_ALTER_COPY_BULK +SESSION_VALUE NULL +DEFAULT_VALUE ON +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT Allow bulk insert operation for copy alter operation +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY NO +COMMAND_LINE_ARGUMENT NONE VARIABLE_NAME INNODB_AUTOEXTEND_INCREMENT SESSION_VALUE NULL DEFAULT_VALUE 64 diff --git a/mysql-test/suite/versioning/r/data.result b/mysql-test/suite/versioning/r/data.result index 08ab03ffcd4..9832292a7e1 100644 --- a/mysql-test/suite/versioning/r/data.result +++ b/mysql-test/suite/versioning/r/data.result @@ -10,7 +10,7 @@ set timestamp=unix_timestamp('1991-01-02 00:00'); delete from t1 where x=2; set timestamp=default; #MYSQL_DUMP --compact test -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -20,7 +20,7 @@ CREATE TABLE `t1` ( INSERT INTO `t1` VALUES (3); #MYSQL_DUMP --compact --as-of="1990-01-02 00:00" test -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -32,7 +32,7 @@ INSERT INTO `t1` VALUES (2), (3); #MYSQL_DUMP --compact --as-of="1990-08-02 00:00" --databases test -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */; @@ -48,7 +48,7 @@ INSERT INTO `t1` VALUES (2), (3); #MYSQL_DUMP --compact --as-of="1990-08-04 00:00" test t1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -91,7 +91,7 @@ select x, check_fields(x, row_start, row_end) from t2 for system_time all order x check_fields(x, row_start, row_end) 1 [CORRECT] 2 [CORRECT] -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -199,7 +199,7 @@ insert t1 (x) values (2); delete from t1 where x=1; mariadb-dump: Cannot use --dump-history for table `t1` with transaction-precise history mariadb-dump: Cannot use --dump-history for table `t1` with transaction-precise history -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( diff --git a/mysql-test/suite/versioning/r/partition,heap.rdiff b/mysql-test/suite/versioning/r/partition,heap.rdiff index d6c8363fc70..6e611ad5733 100644 --- a/mysql-test/suite/versioning/r/partition,heap.rdiff +++ b/mysql-test/suite/versioning/r/partition,heap.rdiff @@ -1,4 +1,6 @@ -@@ -2132,85 +2132,6 @@ +--- partition.result 2024-07-19 08:48:17.680094893 +0200 ++++ partition,heap.result 2024-07-19 11:32:08.570439183 +0200 +@@ -2244,85 +2244,6 @@ (PARTITION `p0` HISTORY ENGINE = X, PARTITION `pn` CURRENT ENGINE = X) drop tables t1, tp1; @@ -32,7 +34,7 @@ -tp1 CREATE TABLE `tp1` ( - `x` int(11) NOT NULL AUTO_INCREMENT, - `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', -- `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, +- `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, - `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `u` int(11) DEFAULT NULL, - `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', @@ -57,7 +59,7 @@ -t1 CREATE TABLE `t1` ( - `x` int(11) NOT NULL AUTO_INCREMENT, - `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', -- `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, +- `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, - `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `u` int(11) DEFAULT NULL, - `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', @@ -82,9 +84,9 @@ - PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X) -drop tables t1, tp1; # - # End of 10.7 tests + # MDEV-29841 Partition by system_time can be converted into table but not back # -@@ -2765,134 +2686,6 @@ +@@ -2886,134 +2807,6 @@ Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p0`) is out of INTERVAL, need more HISTORY partitions drop prepare s; affected rows: 0 @@ -118,7 +120,7 @@ -t1 CREATE TABLE `t1` ( - `x` int(11) NOT NULL AUTO_INCREMENT, - `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', -- `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, +- `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, - `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `u` int(11) DEFAULT NULL, - `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', @@ -155,7 +157,7 @@ -t1 CREATE TABLE `t1` ( - `x` int(11) NOT NULL AUTO_INCREMENT, - `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', -- `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, +- `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, - `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `u` int(11) DEFAULT NULL, - `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', @@ -190,7 +192,7 @@ -t1 CREATE TABLE `t1` ( - `x` int(11) NOT NULL AUTO_INCREMENT, - `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', -- `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, +- `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, - `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - `u` int(11) DEFAULT NULL, - `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index 228ed14f44a..f2c7ea370a8 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -2258,7 +2258,7 @@ Table Create Table tp1 CREATE TABLE `tp1` ( `x` int(11) NOT NULL AUTO_INCREMENT, `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', - `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, + `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, `u` int(11) DEFAULT NULL, `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', @@ -2283,7 +2283,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `x` int(11) NOT NULL AUTO_INCREMENT, `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', - `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, + `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, `u` int(11) DEFAULT NULL, `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', @@ -2900,7 +2900,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `x` int(11) NOT NULL AUTO_INCREMENT, `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', - `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, + `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, `u` int(11) DEFAULT NULL, `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', @@ -2937,7 +2937,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `x` int(11) NOT NULL AUTO_INCREMENT, `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', - `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, + `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, `u` int(11) DEFAULT NULL, `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', @@ -2972,7 +2972,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `x` int(11) NOT NULL AUTO_INCREMENT, `t` timestamp(6) NULL DEFAULT '2001-11-11 11:11:11.000000', - `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL, + `b` blob /*M!100301 COMPRESSED*/ DEFAULT NULL, `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, `u` int(11) DEFAULT NULL, `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute', diff --git a/mysys/crc32/crc32c_x86.cc b/mysys/crc32/crc32c_x86.cc index 0a4fd9db812..3ddddf1303c 100644 --- a/mysys/crc32/crc32c_x86.cc +++ b/mysys/crc32/crc32c_x86.cc @@ -28,7 +28,8 @@ # elif __GNUC__ >= 14 || (defined __clang_major__ && __clang_major__ >= 18) # define TARGET "pclmul,evex512,avx512f,avx512dq,avx512bw,avx512vl,vpclmulqdq" # define USE_VPCLMULQDQ __attribute__((target(TARGET))) -# elif __GNUC__ >= 11 || (defined __clang_major__ && __clang_major__ >= 8) +# elif __GNUC__ >= 11 || (defined __clang_major__ && __clang_major__ >= 9) +/* clang 8 does not support _xgetbv(), which we also need */ # define TARGET "pclmul,avx512f,avx512dq,avx512bw,avx512vl,vpclmulqdq" # define USE_VPCLMULQDQ __attribute__((target(TARGET))) # endif @@ -38,6 +39,7 @@ extern "C" unsigned crc32c_sse42(unsigned crc, const void* buf, size_t size); constexpr uint32_t cpuid_ecx_SSE42= 1U << 20; constexpr uint32_t cpuid_ecx_SSE42_AND_PCLMUL= cpuid_ecx_SSE42 | 1U << 1; +constexpr uint32_t cpuid_ecx_XSAVE= 1U << 26; static uint32_t cpuid_ecx() { @@ -382,8 +384,19 @@ static unsigned crc32_avx512(unsigned crc, const char *buf, size_t size, } } -static ATTRIBUTE_NOINLINE int have_vpclmulqdq() +#ifdef __GNUC__ +__attribute__((target("xsave"))) +#endif +static bool os_have_avx512() { + // The following flags must be set: SSE, AVX, OPMASK, ZMM_HI256, HI16_ZMM + return !(~_xgetbv(0 /*_XCR_XFEATURE_ENABLED_MASK*/) & 0xe6); +} + +static ATTRIBUTE_NOINLINE bool have_vpclmulqdq(uint32_t cpuid_ecx) +{ + if (!(cpuid_ecx & cpuid_ecx_XSAVE) || !os_have_avx512()) + return false; # ifdef _MSC_VER int regs[4]; __cpuidex(regs, 7, 0); @@ -410,10 +423,11 @@ static unsigned crc32c_vpclmulqdq(unsigned crc, const void *buf, size_t size) extern "C" my_crc32_t crc32_pclmul_enabled(void) { - if (~cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) + const uint32_t ecx= cpuid_ecx(); + if (~ecx & cpuid_ecx_SSE42_AND_PCLMUL) return nullptr; #ifdef USE_VPCLMULQDQ - if (have_vpclmulqdq()) + if (have_vpclmulqdq(ecx)) return crc32_vpclmulqdq; #endif return crc32_pclmul; @@ -421,19 +435,20 @@ extern "C" my_crc32_t crc32_pclmul_enabled(void) extern "C" my_crc32_t crc32c_x86_available(void) { + const uint32_t ecx= cpuid_ecx(); #ifdef USE_VPCLMULQDQ - if (have_vpclmulqdq()) + if (have_vpclmulqdq(ecx)) return crc32c_vpclmulqdq; #endif #if SIZEOF_SIZE_T == 8 - switch (cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) { + switch (ecx & cpuid_ecx_SSE42_AND_PCLMUL) { case cpuid_ecx_SSE42_AND_PCLMUL: return crc32c_3way; case cpuid_ecx_SSE42: return crc32c_sse42; } #else - if (cpuid_ecx() & cpuid_ecx_SSE42) + if (ecx & cpuid_ecx_SSE42) return crc32c_sse42; #endif return nullptr; diff --git a/mysys/thr_rwlock.c b/mysys/thr_rwlock.c index a8711d517f9..821b0328834 100644 --- a/mysys/thr_rwlock.c +++ b/mysys/thr_rwlock.c @@ -81,176 +81,7 @@ int my_rw_destroy(my_rw_lock_t* rwp) } #else - -/* - Source base from Sun Microsystems SPILT, simplified for MySQL use - -- Joshua Chamas - Some cleanup and additional code by Monty -*/ - -/* -* Multithreaded Demo Source -* -* Copyright (C) 1995 by Sun Microsystems, Inc. -* -* -* This file is a product of SunSoft, Inc. and is provided for -* unrestricted use provided that this legend is included on all -* media and as a part of the software program in whole or part. -* Users may copy, modify or distribute this file at will. -* -* THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING -* THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -* -* This file is provided with no support and without any obligation on the -* part of SunSoft, Inc. to assist in its use, correction, modification or -* enhancement. -* -* SUNSOFT AND SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT -* TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS -* FILE OR ANY PART THEREOF. -* -* IN NO EVENT WILL SUNSOFT OR SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY -* LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL -* DAMAGES, EVEN IF THEY HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH -* DAMAGES. -* -* SunSoft, Inc. -* 2550 Garcia Avenue -* Mountain View, California 94043 -*/ - -int my_rw_init(my_rw_lock_t *rwp) -{ - pthread_condattr_t cond_attr; - - pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST); - pthread_condattr_init( &cond_attr ); - pthread_cond_init( &rwp->readers, &cond_attr ); - pthread_cond_init( &rwp->writers, &cond_attr ); - pthread_condattr_destroy(&cond_attr); - - rwp->state = 0; - rwp->waiters = 0; -#ifdef SAFE_MUTEX - rwp->write_thread = 0; -#endif - - return(0); -} - - -int my_rw_destroy(my_rw_lock_t *rwp) -{ - DBUG_ASSERT(rwp->state == 0); - pthread_mutex_destroy( &rwp->lock ); - pthread_cond_destroy( &rwp->readers ); - pthread_cond_destroy( &rwp->writers ); - return(0); -} - - -int my_rw_rdlock(my_rw_lock_t *rwp) -{ - pthread_mutex_lock(&rwp->lock); - - /* active or queued writers */ - while (( rwp->state < 0 ) || rwp->waiters) - pthread_cond_wait( &rwp->readers, &rwp->lock); - - rwp->state++; - pthread_mutex_unlock(&rwp->lock); - return(0); -} - -int my_rw_tryrdlock(my_rw_lock_t *rwp) -{ - int res; - pthread_mutex_lock(&rwp->lock); - if ((rwp->state < 0 ) || rwp->waiters) - res= EBUSY; /* Can't get lock */ - else - { - res=0; - rwp->state++; - } - pthread_mutex_unlock(&rwp->lock); - return(res); -} - - -int my_rw_wrlock(my_rw_lock_t *rwp) -{ - pthread_mutex_lock(&rwp->lock); - rwp->waiters++; /* another writer queued */ - - my_rw_lock_assert_not_write_owner(rwp); - - while (rwp->state) - pthread_cond_wait(&rwp->writers, &rwp->lock); - rwp->state = -1; - rwp->waiters--; -#ifdef SAFE_MUTEX - rwp->write_thread= pthread_self(); -#endif - pthread_mutex_unlock(&rwp->lock); - return(0); -} - - -int my_rw_trywrlock(my_rw_lock_t *rwp) -{ - int res; - - pthread_mutex_lock(&rwp->lock); - if (rwp->state) - res= EBUSY; /* Can't get lock */ - else - { - res=0; - rwp->state = -1; -#ifdef SAFE_MUTEX - rwp->write_thread= pthread_self(); -#endif - } - pthread_mutex_unlock(&rwp->lock); - return(res); -} - - -int my_rw_unlock(my_rw_lock_t *rwp) -{ - DBUG_PRINT("rw_unlock", - ("state: %d waiters: %d", rwp->state, rwp->waiters)); - pthread_mutex_lock(&rwp->lock); - - DBUG_ASSERT(rwp->state != 0); - - if (rwp->state == -1) /* writer releasing */ - { - my_rw_lock_assert_write_owner(rwp); - rwp->state= 0; /* mark as available */ -#ifdef SAFE_MUTEX - rwp->write_thread= 0; -#endif - - if ( rwp->waiters ) /* writers queued */ - pthread_cond_signal( &rwp->writers ); - else - pthread_cond_broadcast( &rwp->readers ); - } - else - { - if ( --rwp->state == 0 && /* no more readers */ - rwp->waiters) - pthread_cond_signal( &rwp->writers ); - } - - pthread_mutex_unlock( &rwp->lock ); - return(0); -} - +#error no pthread_rwlock_init #endif /* !defined _WIN32 */ #endif /* NEED_MY_RW_LOCK*/ diff --git a/plugin/func_test/plugin.cc b/plugin/func_test/plugin.cc index 5cbf05f4f24..c19d60ccdc2 100644 --- a/plugin/func_test/plugin.cc +++ b/plugin/func_test/plugin.cc @@ -42,7 +42,7 @@ public: } const char *fully_qualified_func_name() const override { return "sysconst_test()"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/plugin/type_inet/item_inetfunc.h b/plugin/type_inet/item_inetfunc.h index 69d1a2a79a2..aba05d7449f 100644 --- a/plugin/type_inet/item_inetfunc.h +++ b/plugin/type_inet/item_inetfunc.h @@ -45,7 +45,7 @@ public: unsigned_flag= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -72,7 +72,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -118,7 +118,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } String *val_str(String *to) override; @@ -156,7 +156,7 @@ public: return FALSE; } String *val_str_ascii(String *to) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -178,7 +178,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("is_ipv4") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; @@ -201,7 +201,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("is_ipv6") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; @@ -223,7 +223,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("is_ipv4_compat") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; }; @@ -244,7 +244,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("is_ipv4_mapped") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; }; diff --git a/plugin/type_uuid/item_uuidfunc.h b/plugin/type_uuid/item_uuidfunc.h index aa6ff999b99..cd70981e88d 100644 --- a/plugin/type_uuid/item_uuidfunc.h +++ b/plugin/type_uuid/item_uuidfunc.h @@ -45,7 +45,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -60,7 +60,7 @@ public: return name; } bool val_native(THD *thd, Native *to) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh index 06229cf3d25..ad1838579b7 100644 --- a/scripts/mysql_secure_installation.sh +++ b/scripts/mysql_secure_installation.sh @@ -27,6 +27,7 @@ echo_c= basedir= defaults_file= defaults_extra_file= +defaults_group_suffix= no_defaults= case "$0" in @@ -58,6 +59,7 @@ parse_arguments() --basedir=*) basedir=`parse_arg "$arg"` ;; --defaults-file=*) defaults_file="$arg" ;; --defaults-extra-file=*) defaults_extra_file="$arg" ;; + --defaults-group-suffix=*) defaults_group_suffix="$arg" ;; --no-defaults) no_defaults="$arg" ;; *) if test -n "$pick_args" @@ -190,7 +192,7 @@ fi # Now we can get arguments from the group [client] and [client-server] # in the my.cfg file, then re-run to merge with command line arguments. -parse_arguments `$print_defaults $defaults_file $defaults_extra_file $no_defaults client client-server client-mariadb` +parse_arguments `$print_defaults $defaults_file $defaults_extra_file $defaults_group_suffix $no_defaults client client-server client-mariadb` parse_arguments PICK-ARGS-FROM-ARGV "$@" set_echo_compat() { diff --git a/scripts/mytop.sh b/scripts/mytop.sh index 65bfb8c976e..e5d926ef616 100644 --- a/scripts/mytop.sh +++ b/scripts/mytop.sh @@ -147,7 +147,12 @@ if (-e $config) if (/(\S+)\s*=\s*(.*\S)/) { - $config{lc $1} = $2 if exists $config{lc $1}; + my ($k, $v) = ($1, $2); + if ($k =~ /^filter_/i) { + $config{lc $k} = StringOrRegex($v) if exists $config{lc $k}; + } else { + $config{lc $k} = $v if exists $config{lc $k}; + } } } close CFG; diff --git a/sql/field.h b/sql/field.h index 038fa5e4404..c949a16bd5a 100644 --- a/sql/field.h +++ b/sql/field.h @@ -4301,7 +4301,7 @@ private: void sql_type(String &str) const override { Field_varstring::sql_type(str); - str.append(STRING_WITH_LEN(" /*!100301 COMPRESSED*/")); + str.append(STRING_WITH_LEN(" /*M!100301 COMPRESSED*/")); } uint32 max_display_length() const override { return field_length - 1; } uint32 character_octet_length() const override { return field_length - 1; } @@ -4739,7 +4739,7 @@ private: void sql_type(String &str) const override { Field_blob::sql_type(str); - str.append(STRING_WITH_LEN(" /*!100301 COMPRESSED*/")); + str.append(STRING_WITH_LEN(" /*M!100301 COMPRESSED*/")); } /* diff --git a/sql/handler.cc b/sql/handler.cc index 79d1e6e6d9b..1cdeeb60fb5 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -320,7 +320,9 @@ Storage_engine_name::resolve_storage_engine_with_error(THD *thd, } *ha= NULL; - if (thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) + if ((thd_sql_command(thd) != SQLCOM_CREATE_TABLE && + thd_sql_command(thd) != SQLCOM_ALTER_TABLE) || + thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) { my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), m_storage_engine_name.str); return true; @@ -1556,6 +1558,22 @@ int ha_prepare(THD *thd) error=1; } } + else if (thd->rgi_slave) + { + /* + Slave threads will always process XA COMMITs in the binlog handler (see + MDEV-25616 and MDEV-30423), so if this is a slave thread preparing a + transaction which proved empty during replication (e.g. because of + replication filters) then mark it as XA_ROLLBACK_ONLY so the follow up + XA COMMIT will know to roll it back, rather than try to commit and binlog + a standalone XA COMMIT (without its preceding XA START - XA PREPARE). + + If the xid_cache is cleared before the completion event comes, before + issuing ER_XAER_NOTA, first check if the event targets an ignored + database, and ignore the error if so. + */ + thd->transaction->xid_state.set_rollback_only(); + } DBUG_RETURN(error); } diff --git a/sql/item.cc b/sql/item.cc index 468ba687573..cf3f37d7653 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1282,6 +1282,25 @@ bool Item::eq(const Item *item, bool binary_cmp) const } +Item *Item::multiple_equality_transformer(THD *thd, uchar *arg) +{ + if (const_item()) + { + /* + Mark constant item in the condition with the MARKER_IMMUTABLE flag. + It is needed to prevent cleanup of the sub-items of this item and following + fix_fields() call that can cause a crash on this step of the optimization. + This flag will be removed at the end of the pushdown optimization by + remove_immutable_flag_processor processor. + */ + int new_flag= MARKER_IMMUTABLE; + this->walk(&Item::set_extraction_flag_processor, false, + (void*)&new_flag); + } + return this; +} + + Item *Item::safe_charset_converter(THD *thd, CHARSET_INFO *tocs) { if (!needs_charset_converter(tocs)) @@ -2182,6 +2201,37 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref) my_error(ER_RESERVED_SYNTAX, MYF(0), "NAME_CONST"); return TRUE; } + + /* + If we have either of the following: + ... WHERE foo=NAME_CONST(...) + ... JOIN ... ON foo=NAME_CONST(...) + then we have an opportunity to unwrap the NAME_CONST and + use the enclosed value directly, replacing NAME_CONST in + the parse tree with the value it encloses. + */ + if ((thd->where == THD_WHERE::WHERE_CLAUSE || + thd->where == THD_WHERE::ON_CLAUSE) && + (value_item->type() == CONST_ITEM || + value_item->type() == FUNC_ITEM) && + !thd->lex->is_ps_or_view_context_analysis()) + { + thd->change_item_tree(ref, value_item); + + /* + We're replacing NAME_CONST('name', value_item) with value_item. + Only a few constants and functions are possible as value_item, see + Create_func_name_const::create_2_arg. + Set the value_item's coercibility to be the same as NAME_CONST(...) + would have (see how it's set a few lines below). + */ + if (value_item->collation.derivation != DERIVATION_NUMERIC) + value_item->collation.set(value_item->collation.collation, + DERIVATION_IMPLICIT); + return FALSE; + } + // else, could not unwrap, fall back to default handling below. + if (value_item->collation.derivation == DERIVATION_NUMERIC) collation= DTCollation_numeric(); else @@ -2721,7 +2771,7 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll, @retval 0 on a failure */ -Item* Item_func_or_sum::build_clone(THD *thd) +Item* Item_func_or_sum::do_build_clone(THD *thd) const { Item *copy_tmp_args[2]= {0,0}; Item **copy_args= copy_tmp_args; @@ -3041,7 +3091,7 @@ Item_sp::init_result_field(THD *thd, uint max_length, uint maybe_null, 0 if an error occurred */ -Item* Item_ref::build_clone(THD *thd) +Item* Item_ref::do_build_clone(THD *thd) const { Item_ref *copy= (Item_ref *) get_copy(thd); if (unlikely(!copy) || @@ -3870,7 +3920,7 @@ void Item_decimal::set_decimal_value(my_decimal *value_par) } -Item *Item_decimal::clone_item(THD *thd) +Item *Item_decimal::clone_item(THD *thd) const { return new (thd->mem_root) Item_decimal(thd, name.str, &decimal_value, decimals, max_length); @@ -3891,7 +3941,7 @@ my_decimal *Item_float::val_decimal(my_decimal *decimal_value) } -Item *Item_float::clone_item(THD *thd) +Item *Item_float::clone_item(THD *thd) const { return new (thd->mem_root) Item_float(thd, name.str, value, decimals, max_length); @@ -4055,7 +4105,7 @@ Item *Item_null::safe_charset_converter(THD *thd, CHARSET_INFO *tocs) return this; } -Item *Item_null::clone_item(THD *thd) +Item *Item_null::clone_item(THD *thd) const { return new (thd->mem_root) Item_null(thd, name.str); } @@ -4879,7 +4929,7 @@ bool Item_param::basic_const_item() const } -Item *Item_param::value_clone_item(THD *thd) +Item *Item_param::value_clone_item(THD *thd) const { MEM_ROOT *mem_root= thd->mem_root; switch (value.type_handler()->cmp_type()) { @@ -4893,12 +4943,15 @@ Item *Item_param::value_clone_item(THD *thd) case DECIMAL_RESULT: return 0; // Should create Item_decimal. See MDEV-11361. case STRING_RESULT: + { + String value_copy = value.m_string; // to preserve constness of the func return new (mem_root) Item_string(thd, name, - Lex_cstring(value.m_string.ptr(), - value.m_string.length()), - value.m_string.charset(), + Lex_cstring(value_copy.ptr(), + value_copy.length()), + value_copy.charset(), collation.derivation, collation.repertoire); + } case TIME_RESULT: break; case ROW_RESULT: @@ -4912,7 +4965,7 @@ Item *Item_param::value_clone_item(THD *thd) /* see comments in the header file */ Item * -Item_param::clone_item(THD *thd) +Item_param::clone_item(THD *thd) const { // There's no "default". See comments in Item_param::save_in_field(). switch (state) { @@ -5560,7 +5613,7 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list) is ambiguous. */ my_error(ER_NON_UNIQ_ERROR, MYF(0), - find_item->full_name(), current_thd->where); + find_item->full_name(), thd_where(current_thd)); return NULL; } } @@ -5645,7 +5698,7 @@ resolve_ref_in_select_and_group(THD *thd, Item_ident *ref, SELECT_LEX *select) push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_NON_UNIQ_ERROR, ER_THD(thd,ER_NON_UNIQ_ERROR), ref->full_name(), - thd->where); + thd_where(thd)); } } @@ -5979,7 +6032,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) if (upward_lookup) { // We can't say exactly what absent table or field - my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), thd->where); + my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), thd_where(thd)); } else { @@ -6206,7 +6259,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference) { /* The column to which we link isn't valid. */ my_error(ER_BAD_FIELD_ERROR, MYF(0), (*res)->name.str, - thd->where); + thd_where(thd)); return(1); } @@ -6251,7 +6304,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference) if (unlikely(!select)) { - my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), thd->where); + my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), thd_where(thd)); goto error; } if ((ret= fix_outer_field(thd, &from_field, reference)) < 0) @@ -7021,7 +7074,7 @@ int Item_string::save_in_field(Field *field, bool no_conversions) } -Item *Item_string::clone_item(THD *thd) +Item *Item_string::clone_item(THD *thd) const { LEX_CSTRING val; str_value.get_value(&val); @@ -7085,7 +7138,7 @@ int Item_int::save_in_field(Field *field, bool no_conversions) } -Item *Item_int::clone_item(THD *thd) +Item *Item_int::clone_item(THD *thd) const { return new (thd->mem_root) Item_int(thd, name.str, value, max_length, unsigned_flag); } @@ -7125,7 +7178,7 @@ int Item_decimal::save_in_field(Field *field, bool no_conversions) } -Item *Item_int_with_ref::clone_item(THD *thd) +Item *Item_int_with_ref::clone_item(THD *thd) const { DBUG_ASSERT(ref->const_item()); /* @@ -7221,7 +7274,7 @@ Item *Item_uint::neg(THD *thd) } -Item *Item_uint::clone_item(THD *thd) +Item *Item_uint::clone_item(THD *thd) const { return new (thd->mem_root) Item_uint(thd, name.str, value, max_length); } @@ -7357,10 +7410,8 @@ void Item_hex_constant::hex_string_init(THD *thd, const char *str, size_t str_le void Item_hex_hybrid::print(String *str, enum_query_type query_type) { - uint32 len= MY_MIN(str_value.length(), sizeof(longlong)); - const char *ptr= str_value.ptr() + str_value.length() - len; - str->append("0x",2); - str->append_hex(ptr, len); + str->append("0x", 2); + str->append_hex(str_value.ptr(), str_value.length()); } @@ -7461,7 +7512,7 @@ void Item_date_literal::print(String *str, enum_query_type query_type) } -Item *Item_date_literal::clone_item(THD *thd) +Item *Item_date_literal::clone_item(THD *thd) const { return new (thd->mem_root) Item_date_literal(thd, &cached_time); } @@ -7486,7 +7537,7 @@ void Item_datetime_literal::print(String *str, enum_query_type query_type) } -Item *Item_datetime_literal::clone_item(THD *thd) +Item *Item_datetime_literal::clone_item(THD *thd) const { return new (thd->mem_root) Item_datetime_literal(thd, &cached_time, decimals); } @@ -7511,7 +7562,7 @@ void Item_time_literal::print(String *str, enum_query_type query_type) } -Item *Item_time_literal::clone_item(THD *thd) +Item *Item_time_literal::clone_item(THD *thd) const { return new (thd->mem_root) Item_time_literal(thd, &cached_time, decimals); } @@ -8229,7 +8280,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) if (unlikely(!outer_context)) { /* The current reference cannot be resolved in this query. */ - my_error(ER_BAD_FIELD_ERROR,MYF(0), full_name(), thd->where); + my_error(ER_BAD_FIELD_ERROR,MYF(0), full_name(), thd_where(thd)); goto error; } @@ -8380,7 +8431,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) { /* The item was not a table field and not a reference */ my_error(ER_BAD_FIELD_ERROR, MYF(0), - this->full_name(), thd->where); + this->full_name(), thd_where(thd)); goto error; } /* Should be checked in resolve_ref_in_select_and_group(). */ @@ -10478,7 +10529,7 @@ void Item_cache_temporal::store_packed(longlong val_arg, Item *example_arg) } -Item *Item_cache_temporal::clone_item(THD *thd) +Item *Item_cache_temporal::clone_item(THD *thd) const { Item_cache *tmp= type_handler()->Item_get_cache(thd, this); Item_cache_temporal *item= static_cast(tmp); diff --git a/sql/item.h b/sql/item.h index b58ec71cb65..7bdb6b5bebd 100644 --- a/sql/item.h +++ b/sql/item.h @@ -30,6 +30,7 @@ #include "sql_time.h" #include "sql_schema.h" #include "mem_root_array.h" +#include #include "cset_narrowing.h" @@ -1895,10 +1896,57 @@ public: raise_error_not_evaluable(); return true; // Error } - /* cloning of constant items (0 if it is not const) */ - virtual Item *clone_item(THD *thd) { return 0; } - /* deep copy item */ - virtual Item* build_clone(THD *thd) { return get_copy(thd); } + + /* + Create a shallow copy of the item (usually invoking copy constructor). + For deep copying see build_clone(). + + Return value: + - pointer to a copy of the Item + - nullptr if the item is not copyable + */ + Item *get_copy(THD *thd) const + { + Item *copy= do_get_copy(thd); + if (copy) + { + // Make sure the copy is of same type as this item + DBUG_ASSERT(typeid(*copy) == typeid(*this)); + } + return copy; + } + + /* + Creates a clone of the item by deep copying. + + Return value: + - pointer to a clone of the Item + - nullptr if the item is not clonable + */ + Item* build_clone(THD *thd) const + { + Item *clone= do_build_clone(thd); + if (clone) + { + // Make sure the clone is of same type as this item + DBUG_ASSERT(typeid(*clone) == typeid(*this)); + } + return clone; + } + + /* + Clones the constant item (not necessary returning the same item type) + + Return value: + - pointer to a clone of the Item + - nullptr if the item is not clonable + + Note: the clone may have item type different from this + (i.e., instance of another basic constant class may be returned). + For real clones look at build_clone()/get_copy() methods + */ + virtual Item *clone_item(THD *thd) const { return nullptr; } + virtual cond_result eq_cmp_result() const { return COND_OK; } inline uint float_length(uint decimals_par) const { return decimals < FLOATING_POINT_DECIMALS ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;} @@ -2407,12 +2455,6 @@ public: */ virtual bool find_not_null_fields(table_map allowed) { return false; } - /* - Does not guarantee deep copy (depends on copy ctor). - See build_clone() for deep copy. - */ - virtual Item *get_copy(THD *thd)=0; - bool cache_const_expr_analyzer(uchar **arg); Item* cache_const_expr_transformer(THD *thd, uchar *arg); @@ -2516,8 +2558,7 @@ public: { return this; } virtual Item *field_transformer_for_having_pushdown(THD *thd, uchar *arg) { return this; } - virtual Item *multiple_equality_transformer(THD *thd, uchar *arg) - { return this; } + virtual Item *multiple_equality_transformer(THD *thd, uchar *arg); virtual Item* date_conds_transformer(THD *thd, uchar *arg) { return this; } virtual bool expr_cache_is_needed(THD *) { return FALSE; } @@ -2750,12 +2791,27 @@ public: DBUG_ASSERT(fixed()); return false; } + +protected: + /* + Service function for public method get_copy(). See comments for get_copy() + above. Override this method in derived classes to create shallow copies of + the item + */ + virtual Item *do_get_copy(THD *thd) const = 0; + + /* + Service function for public method build_clone(). See comments for + build_clone() above. Override this method in derived classes to create + deep copies (clones) of the item where possible + */ + virtual Item* do_build_clone(THD *thd) const = 0; }; MEM_ROOT *get_thd_memroot(THD *thd); template -inline Item* get_item_copy (THD *thd, T* item) +inline Item* get_item_copy (THD *thd, const T* item) { Item *copy= new (get_thd_memroot(thd)) T(*item); if (likely(copy)) @@ -3210,7 +3266,8 @@ public: bool append_for_log(THD *thd, String *str) override; - Item *get_copy(THD *) override { return nullptr; } + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } /* Override the inherited create_field_for_create_select(), @@ -3255,6 +3312,9 @@ public: :Item_splocal(thd, rh, sp_var_name, sp_var_idx, &type_handler_null, pos_in_q, len_in_q) { } + + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -3287,6 +3347,9 @@ public: Item **this_item_addr(THD *thd, Item **) override; bool append_for_log(THD *thd, String *str) override; void print(String *str, enum_query_type query_type) override; + + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -3307,6 +3370,9 @@ public: { } bool fix_fields(THD *thd, Item **it) override; void print(String *str, enum_query_type query_type) override; + + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -3350,7 +3416,8 @@ public: purposes. */ void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *) override { return nullptr; } + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } private: uint m_case_expr_id; @@ -3430,8 +3497,9 @@ public: { return mark_unsupported_function("name_const()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -3821,8 +3889,9 @@ public: bool cleanup_excluding_const_fields_processor(void *arg) override { return field && const_item() ? 0 : cleanup_processor(arg); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item* do_build_clone(THD *thd) const override { return get_copy(thd); } bool is_outer_field() const override { DBUG_ASSERT(fixed()); @@ -3847,7 +3916,7 @@ public: :Item_field(thd, field), Item_args() { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } const Type_handler *type_handler() const override @@ -3896,7 +3965,7 @@ public: const Type_handler *type_handler() const override { return &type_handler_null; } bool basic_const_item() const override { return true; } - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; bool const_is_null() const override { return true; } bool is_null() override { return true; } @@ -3910,8 +3979,9 @@ public: Item_basic_constant *make_string_literal_concat(THD *thd, const LEX_CSTRING *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; class Item_null_result :public Item_null @@ -4120,7 +4190,7 @@ class Item_param :public Item_basic_value, PValue value; const String *value_query_val_str(THD *thd, String* str) const; - Item *value_clone_item(THD *thd); + Item *value_clone_item(THD *thd) const; bool is_evaluable_expression() const override; bool check_assignability_to(const Field *field, bool ignore) const override; bool can_return_value() const; @@ -4372,7 +4442,7 @@ public: basic_const_item returned TRUE. */ Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override; - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; void set_param_type_and_swap_value(Item_param *from); Rewritable_query_parameter *get_rewritable_query_parameter() override @@ -4382,7 +4452,9 @@ public: bool append_for_log(THD *thd, String *str) override; bool check_vcol_func_processor(void *) override { return false; } - Item *get_copy(THD *) override { return nullptr; } + Item *do_get_copy(THD *thd) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } + bool add_as_clone(THD *thd); void sync_clones(); bool register_clone(Item_param *i) { return m_clones.push_back(i); } @@ -4472,13 +4544,14 @@ public: String *val_str(String*) override; int save_in_field(Field *field, bool no_conversions) override; bool is_order_clause_position() const override { return true; } - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; void print(String *str, enum_query_type query_type) override; Item *neg(THD *thd) override; decimal_digits_t decimal_precision() const override { return (decimal_digits_t) (max_length - MY_TEST(value < 0)); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4508,6 +4581,9 @@ public: predicate at various condition optimization stages in sql_select. */ } + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4523,6 +4599,9 @@ public: { DBUG_ASSERT(0); } void cleanup() override {} + + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } }; /* The following variablese are stored in a read only segment */ @@ -4534,12 +4613,12 @@ public: Item_uint(THD *thd, const char *str_arg, size_t length); Item_uint(THD *thd, ulonglong i): Item_int(thd, i, 10) {} Item_uint(THD *thd, const char *str_arg, longlong i, uint length); - double val_real() override { return ulonglong2double((ulonglong)value); } - Item *clone_item(THD *thd) override; + double val_real() override { return ulonglong2double((ulonglong)value); } + Item *clone_item(THD *thd) const override; Item *neg(THD *thd) override; decimal_digits_t decimal_precision() const override { return decimal_digits_t(max_length); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4592,7 +4671,7 @@ public: const my_decimal *const_ptr_my_decimal() const override { return &decimal_value; } int save_in_field(Field *field, bool no_conversions) override; - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; void print(String *str, enum_query_type query_type) override { decimal_value.to_string(&str_value); @@ -4602,8 +4681,9 @@ public: decimal_digits_t decimal_precision() const override { return decimal_value.precision(); } void set_decimal_value(my_decimal *value_par); - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4645,11 +4725,12 @@ public: } String *val_str(String*) override; my_decimal *val_decimal(my_decimal *) override; - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; Item *neg(THD *thd) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4765,7 +4846,7 @@ public: int save_in_field(Field *field, bool no_conversions) override; const Type_handler *type_handler() const override { return &type_handler_varchar; } - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override { return const_charset_converter(thd, tocs, true); @@ -4808,8 +4889,9 @@ public: const LEX_CSTRING *) override; Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4829,6 +4911,9 @@ public: { return true; } + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5018,8 +5103,9 @@ public: return field->store_hex_hybrid(str_value.ptr(), str_value.length()); } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5057,8 +5143,9 @@ public: collation.collation); } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5114,8 +5201,9 @@ public: { m_value= value; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5182,7 +5270,7 @@ public: { return cached_time.get_mysql_time(); } - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; longlong val_int() override { return update_null() ? 0 : cached_time.to_longlong(); @@ -5204,8 +5292,9 @@ public: return update_null() ? 0 : cached_time.valid_date_to_packed(); } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5231,7 +5320,7 @@ public: { return cached_time.get_mysql_time(); } - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; longlong val_int() override { return cached_time.to_longlong(); } double val_real() override { return cached_time.to_double(); } String *val_str(String *to) override @@ -5247,8 +5336,9 @@ public: { return Time(thd, this).to_native(to, decimals); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5284,7 +5374,7 @@ public: { return cached_time.get_mysql_time(); } - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; longlong val_int() override { return update_null() ? 0 : cached_time.to_longlong(); @@ -5306,8 +5396,9 @@ public: return update_null() ? 0 : cached_time.valid_datetime_to_packed(); } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5372,6 +5463,9 @@ public: cached_time.copy_to_mysql_time(ltime); return (null_value= false); } + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5593,7 +5687,7 @@ public: virtual bool fix_length_and_dec(THD *thd)= 0; bool const_item() const override { return const_item_cache; } table_map used_tables() const override { return used_tables_cache; } - Item* build_clone(THD *thd) override; + Item* do_build_clone(THD *thd) const override; Sql_mode_dependency value_depends_on_sql_mode() const override { return Item_args::value_depends_on_sql_mode_bit_or().soft_to_hard(); @@ -5843,11 +5937,11 @@ public: DBUG_ASSERT(ref); return (*ref)->is_outer_field(); } - Item* build_clone(THD *thd) override; + Item *do_build_clone(THD *thd) const override; /** Checks if the item tree that ref points to contains a subquery. */ - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool excl_dep_on_table(table_map tab_map) override { @@ -5928,7 +6022,7 @@ public: longlong val_datetime_packed(THD *) override; longlong val_time_packed(THD *) override; Ref_Type ref_type() override { return DIRECT_REF; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *remove_item_direct_ref() override { return (*ref)->remove_item_direct_ref(); } @@ -6097,9 +6191,9 @@ public: { return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } - Item *build_clone(THD *) override { return nullptr; } + Item *do_build_clone(THD *) const override { return nullptr; } }; @@ -6311,7 +6405,7 @@ public: my_decimal *val_decimal_result(my_decimal *val) override; bool val_bool_result() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *field_transformer_for_having_pushdown(THD *, uchar *) override { return this; } @@ -6376,6 +6470,9 @@ public: table_map not_null_tables() const override { return 0; } Ref_Type ref_type() override { return OUTER_REF; } bool check_inner_refs_processor(void * arg) override; + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -6412,7 +6509,7 @@ public: bool val_native(THD *thd, Native *to) override; void print(String *str, enum_query_type query_type) override; table_map used_tables() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -6438,8 +6535,11 @@ public: { return ref->save_in_field(field, no_conversions); } - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; Item *real_item() override { return ref; } + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; #ifdef MYSQL_SERVER @@ -6575,8 +6675,9 @@ public: { return get_date_from_string(thd, ltime, fuzzydate); } void copy() override; int save_in_field(Field *field, bool no_conversions) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -6646,8 +6747,9 @@ public: DBUG_ASSERT(sane()); return null_value || m_value.to_native(to, decimals); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -6929,8 +7031,9 @@ public: param->set_default(); return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -6967,8 +7070,9 @@ public: return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7326,8 +7430,9 @@ public: bool cache_value() override; int save_in_field(Field *field, bool no_conversions) override; Item *convert_to_basic_const_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7340,6 +7445,7 @@ public: { return type_handler_year.Item_get_date_with_warn(thd, this, to, mode); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7364,7 +7470,7 @@ public: is a constant and need not be optimized further. Important when storing packed datetime values. */ - Item *clone_item(THD *thd) override; + Item *clone_item(THD *thd) const override; Item *convert_to_basic_const_item(THD *thd) override; virtual Item *make_literal(THD *) =0; }; @@ -7376,7 +7482,7 @@ public: Item_cache_time(THD *thd) :Item_cache_temporal(thd, &type_handler_time2) { } bool cache_value() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *make_literal(THD *) override; longlong val_datetime_packed(THD *thd) override @@ -7416,7 +7522,7 @@ class Item_cache_datetime: public Item_cache_temporal public: Item_cache_datetime(THD *thd) :Item_cache_temporal(thd, &type_handler_datetime2) { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *make_literal(THD *) override; longlong val_datetime_packed(THD *) override @@ -7451,7 +7557,7 @@ class Item_cache_date: public Item_cache_temporal public: Item_cache_date(THD *thd) :Item_cache_temporal(thd, &type_handler_newdate) { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *make_literal(THD *) override; longlong val_datetime_packed(THD *) override @@ -7484,8 +7590,9 @@ class Item_cache_timestamp: public Item_cache public: Item_cache_timestamp(THD *thd) :Item_cache(thd, &type_handler_timestamp2) { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } bool cache_value() override; String* val_str(String *to) override { @@ -7544,8 +7651,9 @@ public: :Item_cache_real(thd, &type_handler_double) { } String *val_str(String *str) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7556,8 +7664,9 @@ public: :Item_cache_real(thd, &type_handler_float) { } String *val_str(String *str) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7579,8 +7688,9 @@ public: } bool cache_value() override; Item *convert_to_basic_const_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7609,8 +7719,9 @@ public: int save_in_field(Field *field, bool no_conversions) override; bool cache_value() override; Item *convert_to_basic_const_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7634,8 +7745,9 @@ public: */ return Item::safe_charset_converter(thd, tocs); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7711,8 +7823,9 @@ public: } bool cache_value() override; void set_null() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7781,7 +7894,8 @@ public: make_and_init_table_field(root, &name, Record_addr(maybe_null()), *this, table); } - Item* get_copy(THD *) override { return nullptr; } + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *) const override { return nullptr; } }; @@ -7935,7 +8049,7 @@ public: Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override; Item *get_tmp_table_item(THD *thd) override { return m_item->get_tmp_table_item(thd); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } COND *build_equal_items(THD *thd, COND_EQUAL *inherited, bool link_item_fields, @@ -8006,7 +8120,7 @@ public: { return m_item->excl_dep_on_grouping_fields(sel); } bool is_expensive() override { return m_item->is_expensive(); } void set_item(Item *item) { m_item= item; } - Item *build_clone(THD *thd) override + Item *do_build_clone(THD *thd) const override { Item *clone_item= m_item->build_clone(thd); if (clone_item) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 9cb20236e1b..1ff28487942 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -5539,17 +5539,16 @@ void Item_cond::neg_arguments(THD *thd) 0 if an error occurred */ -Item *Item_cond::build_clone(THD *thd) +Item *Item_cond::do_build_clone(THD *thd) const { - List_iterator_fast li(list); - Item *item; Item_cond *copy= (Item_cond *) get_copy(thd); if (!copy) return 0; copy->list.empty(); - while ((item= li++)) + + for (const Item &item : list) { - Item *arg_clone= item->build_clone(thd); + Item *arg_clone= item.build_clone(thd); if (!arg_clone) return 0; if (copy->list.push_back(arg_clone, thd->mem_root)) diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 1e713fd4296..ee1ac166a1e 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -296,7 +296,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("istrue") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -317,7 +317,7 @@ public: return name; } bool find_not_null_fields(table_map allowed) override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool eval_not_null_tables(void *) override { not_null_tables_cache= 0; return false; } @@ -338,7 +338,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("isfalse") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -359,7 +359,7 @@ public: return name; } bool find_not_null_fields(table_map allowed) override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool eval_not_null_tables(void *) override { not_null_tables_cache= 0; return false; } @@ -435,7 +435,7 @@ public: void restore_first_argument(); Item* get_wrapped_in_subselect_item() { return args[1]; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } enum precedence precedence() const override { return args[1]->precedence(); } }; @@ -608,10 +608,10 @@ public: return add_key_fields_optimize_op(join, key_fields, and_level, usable_tables, sargables, false); } - Item *build_clone(THD *thd) override + Item *do_build_clone(THD *thd) const override { Item_bool_rowready_func2 *clone= - (Item_bool_rowready_func2 *) Item_func::build_clone(thd); + (Item_bool_rowready_func2 *) Item_func::do_build_clone(thd); if (clone) { clone->cmp.comparators= 0; @@ -646,7 +646,7 @@ public: Item_args::propagate_equal_fields(thd, Context_boolean(), cond); return this; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -666,7 +666,7 @@ public: Item *neg_transformer(THD *thd) override; bool fix_fields(THD *, Item **) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -719,7 +719,7 @@ public: void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -767,7 +767,7 @@ public: return name; } Item *neg_transformer(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -810,7 +810,7 @@ public: uint in_equality_no; uint exists2in_reserved_items() override { return 1; }; friend class Arg_comparator; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item* date_conds_transformer(THD *thd, uchar *arg) override { return do_date_conds_transformation(thd, this); } @@ -841,7 +841,7 @@ public: return add_key_fields_optimize_op(join, key_fields, and_level, usable_tables, sargables, true); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -861,7 +861,7 @@ public: return name; } Item *negated_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item* date_conds_transformer(THD *thd, uchar *arg) override { return do_date_conds_transformation(thd, this); } @@ -883,7 +883,7 @@ public: return name; } Item *negated_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item* date_conds_transformer(THD *thd, uchar *arg) override { return do_date_conds_transformation(thd, this); } @@ -905,7 +905,7 @@ public: return name; } Item *negated_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item* date_conds_transformer(THD *thd, uchar *arg) override { return do_date_conds_transformation(thd, this); } @@ -927,7 +927,7 @@ public: return name; } Item *negated_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item* date_conds_transformer(THD *thd, uchar *arg) override { return do_date_conds_transformation(thd, this); } @@ -954,7 +954,7 @@ public: Item *negated_item(THD *thd) override; void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1052,7 +1052,7 @@ public: cond); return this; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int_cmp_string(); @@ -1088,7 +1088,7 @@ public: fix_char_length(2); // returns "1" or "0" or "-1" return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1127,7 +1127,7 @@ public: str->append(func_name_cstring()); print_args(str, 0, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1159,7 +1159,7 @@ public: return name; } table_map not_null_tables() const override { return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1254,7 +1254,7 @@ public: } table_map not_null_tables() const override { return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1333,7 +1333,7 @@ public: bool eval_not_null_tables(void *opt_arg) override; void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: void cache_type_info(Item *source); @@ -1359,7 +1359,7 @@ public: { return fix_length_and_dec2_eliminate_null(args + 1); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1453,7 +1453,7 @@ public: cond, &args[2]); return this; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *derived_field_transformer_for_having(THD *thd, uchar *arg) override { reset_first_arg_if_needed(); return this; } @@ -2403,7 +2403,7 @@ public: return this; } Item *find_item() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2453,7 +2453,7 @@ public: Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) override; Item *find_item() override; - Item *build_clone(THD *thd) override + Item *do_build_clone(THD *thd) const override { Item_func_case_simple *clone= (Item_func_case_simple *) Item_func_case::build_clone(thd); @@ -2462,7 +2462,7 @@ public: return NULL; return clone; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2482,7 +2482,7 @@ public: void print(String *str, enum_query_type query_type) override; bool fix_length_and_dec(THD *thd) override; Item *find_item() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2654,11 +2654,11 @@ public: void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge) override; bool count_sargable_conds(void *arg) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } - Item *build_clone(THD *thd) override + Item *do_build_clone(THD *thd) const override { - Item_func_in *clone= (Item_func_in *) Item_func::build_clone(thd); + Item_func_in *clone= (Item_func_in *) Item_func::do_build_clone(thd); if (clone) { clone->array= 0; @@ -2806,7 +2806,7 @@ public: table_map not_null_tables() const override { return 0; } bool find_not_null_fields(table_map allowed) override; Item *neg_transformer(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2859,7 +2859,7 @@ public: { return is_top_level_item() ? not_null_tables_cache : 0; } Item *neg_transformer(THD *thd) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3022,7 +3022,7 @@ public: bool find_selective_predicates_list_processor(void *arg) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3120,7 +3120,7 @@ public: return name; } enum precedence precedence() const override { return IN_PRECEDENCE; } - Item *get_copy(THD *) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } void print(String *str, enum_query_type query_type) override { print_op(str, query_type); @@ -3164,7 +3164,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("regexp_instr") }; return name; } - Item *get_copy(THD *thd) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } }; @@ -3263,7 +3263,7 @@ public: } bool eval_not_null_tables(void *opt_arg) override; bool find_not_null_fields(table_map allowed) override; - Item *build_clone(THD *thd) override; + Item *do_build_clone(THD *thd) const override; bool excl_dep_on_table(table_map tab_map) override; bool excl_dep_on_grouping_fields(st_select_lex *sel) override; @@ -3452,7 +3452,7 @@ public: void set_context_field(Item_field *ctx_field) { context_field= ctx_field; } void set_link_equal_fields(bool flag) { link_equal_fields= flag; } - Item* get_copy(THD *thd) override { return 0; } + Item* do_get_copy(THD *thd) const override { return 0; } /* This does not comply with the specification of the virtual method, but Item_equal items are processed distinguishly anyway @@ -3623,7 +3623,7 @@ public: table_map usable_tables, SARGABLE_PARAM **sargables) override; SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3651,7 +3651,7 @@ public: table_map not_null_tables() const override { return and_tables_cache; } Item *copy_andor_structure(THD *thd) override; Item *neg_transformer(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3666,7 +3666,7 @@ public: return name; } bool need_parentheses_in_default() override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3682,7 +3682,7 @@ public: return name; } bool need_parentheses_in_default() override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3715,7 +3715,7 @@ public: return name; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3734,7 +3734,7 @@ public: return name; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3753,7 +3753,7 @@ public: return name; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_func.cc b/sql/item_func.cc index 2c86f433648..ec3618edd2f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3146,11 +3146,27 @@ longlong Item_func_char_length::val_int() } +bool Item_func_coercibility::fix_length_and_dec(THD *thd) +{ + max_length=10; + base_flags&= ~item_base_t::MAYBE_NULL; + /* + Since this is a const item which doesn't use tables (see used_tables()), + we don't want to access the function arguments during execution. + That's why we store the derivation here during the preparation phase + and only return it later at the execution phase + */ + DBUG_ASSERT(args[0]->fixed()); + m_cached_collation_derivation= (longlong) args[0]->collation.derivation; + return false; +} + + longlong Item_func_coercibility::val_int() { DBUG_ASSERT(fixed()); null_value= 0; - return (longlong) args[0]->collation.derivation; + return m_cached_collation_derivation; } diff --git a/sql/item_func.h b/sql/item_func.h index c7d1af0a374..c69c544fa0d 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1291,7 +1291,7 @@ public: bool fix_length_and_dec(THD *thd) override; const Type_handler *type_handler() const override { return &type_handler_slong; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } LEX_CSTRING func_name_cstring() const override { @@ -1307,7 +1307,7 @@ public: :Item_func_hash(thd, item) {} longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } LEX_CSTRING func_name_cstring() const override { @@ -1373,7 +1373,7 @@ public: { return Cursor_ref::print_func(str, func_name_cstring()); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1398,7 +1398,7 @@ public: return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1470,7 +1470,7 @@ public: decimal_digits_t decimal_precision() const override { return args[0]->decimal_precision(); } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1505,7 +1505,7 @@ public: } decimal_digits_t decimal_precision() const override { return max_length; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1546,7 +1546,7 @@ public: } void print(String *str, enum_query_type query_type) override; bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1601,7 +1601,7 @@ public: nr.to_string(str, decimals); return str; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1623,7 +1623,7 @@ public: return name; } double val_real() override { return val_real_with_truncate(DBL_MAX); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1653,7 +1653,7 @@ public: longlong int_op() override; double real_op() override; my_decimal *decimal_op(my_decimal *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1692,7 +1692,7 @@ public: Item_func_additive_op::fix_length_and_dec_int(); fix_unsigned_flag(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1715,7 +1715,7 @@ public: bool fix_length_and_dec(THD *thd) override; bool check_partition_func_processor(void *int_arg) override {return FALSE;} bool check_vcol_func_processor(void *arg) override { return FALSE;} - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1738,7 +1738,7 @@ public: void fix_length_and_dec_double(); void fix_length_and_dec_int(); void result_precision() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1766,7 +1766,7 @@ public: bool check_partition_func_processor(void *int_arg) override {return FALSE;} bool check_vcol_func_processor(void *arg) override { return FALSE;} bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1804,7 +1804,7 @@ public: } bool check_partition_func_processor(void *int_arg) override {return FALSE;} bool check_vcol_func_processor(void *arg) override { return FALSE;} - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1835,7 +1835,7 @@ public: decimal_digits_t decimal_precision() const override { return args[0]->decimal_precision(); } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1857,7 +1857,7 @@ public: void fix_length_and_dec_double(); void fix_length_and_dec_decimal(); bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1889,7 +1889,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("exp") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1904,7 +1904,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("ln") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1920,7 +1920,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("log") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1935,7 +1935,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("log2") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1950,7 +1950,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("log10") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1965,7 +1965,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("sqrt") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1980,7 +1980,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("pow") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1995,7 +1995,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("acos") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2009,7 +2009,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("asin") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2024,7 +2024,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("atan") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2038,7 +2038,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("cos") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2052,7 +2052,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("sin") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2066,7 +2066,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("tan") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2080,7 +2080,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("cot") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2127,7 +2127,7 @@ public: my_decimal *decimal_op(my_decimal *) override; bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; bool time_op(THD *thd, MYSQL_TIME *ltime) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2147,7 +2147,7 @@ public: my_decimal *decimal_op(my_decimal *) override; bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; bool time_op(THD *thd, MYSQL_TIME *ltime) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2197,7 +2197,7 @@ public: */ return args[0]->real_type_handler()->Item_func_round_fix_length_and_dec(this); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2227,7 +2227,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2276,7 +2276,7 @@ public: return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } /* This function is used in insert, update and delete */ void store_pointer_to_row_counter(ha_rows *row_counter) { @@ -2301,7 +2301,7 @@ public: decimal_digits_t decimal_precision() const override { return 1; } bool fix_length_and_dec(THD *thd) override { fix_char_length(2); return FALSE; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2328,7 +2328,7 @@ public: max_length= float_length(decimals); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2434,7 +2434,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("least") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2447,7 +2447,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("greatest") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2487,7 +2487,7 @@ public: Type_std_attributes::set(*args[0]); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2513,7 +2513,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("octet_length") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2533,7 +2533,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("bit_length") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2548,12 +2548,14 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("char_length") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; class Item_func_coercibility :public Item_long_func { + longlong m_cached_collation_derivation; + bool check_arguments() const override { return args[0]->check_type_can_return_str(func_name_cstring()); } public: @@ -2564,12 +2566,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("coercibility") }; return name; } - bool fix_length_and_dec(THD *thd) override - { - max_length=10; - base_flags&= ~item_base_t::MAYBE_NULL; - return FALSE; - } + bool fix_length_and_dec(THD *thd) override; bool eval_not_null_tables(void *) override { not_null_tables_cache= 0; @@ -2583,8 +2580,9 @@ public: override { return this; } bool const_item() const override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + table_map used_tables() const override { return 0; } }; @@ -2620,7 +2618,7 @@ public: return agg_arg_charsets_for_comparison(cmp_collation, args, 2); } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2639,7 +2637,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2658,7 +2656,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override { max_length=3; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2676,7 +2674,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("ord") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2698,7 +2696,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2744,7 +2742,7 @@ public: return name; } enum precedence precedence() const override { return BITOR_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2760,7 +2758,7 @@ public: return name; } enum precedence precedence() const override { return BITAND_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2776,7 +2774,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2792,7 +2790,7 @@ public: return name; } enum precedence precedence() const override { return SHIFT_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2808,7 +2806,7 @@ public: return name; } enum precedence precedence() const override { return SHIFT_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2828,7 +2826,7 @@ public: str->append(func_name_cstring()); args[0]->print_parenthesised(str, query_type, precedence()); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2858,7 +2856,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2891,7 +2889,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2922,7 +2920,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3079,7 +3077,7 @@ class Item_func_udf_float :public Item_udf_func const Type_handler *type_handler() const override { return &type_handler_double; } bool fix_length_and_dec(THD *thd) override { fix_num_length_and_dec(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3106,7 +3104,7 @@ public: return &type_handler_slonglong; } bool fix_length_and_dec(THD *thd) override { decimals= 0; max_length= 21; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3134,7 +3132,7 @@ public: const Type_handler *type_handler() const override { return &type_handler_newdecimal; } bool fix_length_and_dec(THD *thd) override { fix_num_length_and_dec(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3174,7 +3172,7 @@ public: const Type_handler *type_handler() const override { return string_type_handler(); } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3279,7 +3277,7 @@ class Item_func_get_lock final :public Item_func_lock set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override final + Item *do_get_copy(THD *thd) const override final { return get_item_copy(thd, this); } }; @@ -3295,7 +3293,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("release_all_locks") }; return name; } - Item *get_copy(THD *thd) override final + Item *do_get_copy(THD *thd) const override final { return get_item_copy(thd, this); } }; @@ -3319,7 +3317,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override final + Item *do_get_copy(THD *thd) const override final { return get_item_copy(thd, this); } }; @@ -3360,7 +3358,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3389,7 +3387,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3510,7 +3508,7 @@ public: bool register_field_in_bitmap(void *arg) override; bool set_entry(THD *thd, bool create_if_not_exists); void cleanup() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool excl_dep_on_table(table_map tab_map) override { return false; } }; @@ -3543,7 +3541,7 @@ public: table_map used_tables() const override { return const_item() ? 0 : RAND_TABLE_BIT; } bool eq(const Item *item, bool binary_cmp) const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override; @@ -3626,8 +3624,9 @@ public: void set_value(const char *str, uint length, CHARSET_INFO* cs); const Type_handler *type_handler() const override { return &type_handler_double; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -3689,7 +3688,7 @@ public: void cleanup() override; bool check_vcol_func_processor(void *arg) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3752,9 +3751,9 @@ public: { return mark_unsupported_function("match ... against()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } - Item *build_clone(THD *thd) override { return 0; } + Item *do_build_clone(THD *thd) const override { return nullptr; } private: /** Check whether storage engine for given table, @@ -3804,7 +3803,7 @@ public: return name; } enum precedence precedence() const override { return BITXOR_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3832,7 +3831,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3859,7 +3858,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3928,7 +3927,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4066,7 +4065,7 @@ public: { return TRUE; } - Item *get_copy(THD *) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } bool eval_not_null_tables(void *opt_arg) override { not_null_tables_cache= 0; @@ -4101,7 +4100,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4124,7 +4123,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4154,7 +4153,7 @@ public: max_length= 11; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4181,7 +4180,7 @@ public: return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4222,7 +4221,7 @@ public: Item_func::update_used_tables(); copy_flags(last_value, item_base_t::MAYBE_NULL); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4267,7 +4266,7 @@ public: } } bool const_item() const override { return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void print(String *str, enum_query_type query_type) override; bool check_vcol_func_processor(void *arg) override @@ -4290,7 +4289,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("lastval") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4315,7 +4314,7 @@ public: return name; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index 5e7fe2acecd..288fb71904a 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -219,7 +219,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -241,7 +241,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -267,7 +267,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -284,7 +284,7 @@ public: } String *val_str_ascii(String *) override; bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -309,7 +309,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -336,7 +336,7 @@ public: } bool fix_length_and_dec(THD *thd) override; String *val_str_ascii(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -359,7 +359,7 @@ public: set_maybe_null(); return FALSE; }; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -398,7 +398,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -418,7 +418,7 @@ public: { return &type_handler_point; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -437,7 +437,7 @@ public: { return &type_handler_polygon; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -475,7 +475,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -498,7 +498,7 @@ public: { return &type_handler_point; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -527,7 +527,7 @@ public: } } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -564,7 +564,7 @@ public: } } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -624,7 +624,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("geometrycollection") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -644,7 +644,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("linestring") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -664,7 +664,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("polygon") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -686,7 +686,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("multilinestring") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -708,7 +708,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("multipoint") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -730,7 +730,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("multipolygon") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -782,7 +782,7 @@ public: usable_tables, sargables, false); } bool need_parentheses_in_default() override { return false; } - Item *build_clone(THD *thd) override { return 0; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -794,7 +794,7 @@ public: { } longlong val_int() override; LEX_CSTRING func_name_cstring() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -810,7 +810,7 @@ public: { } longlong val_int() override; LEX_CSTRING func_name_cstring() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -837,7 +837,7 @@ public: return name; } bool need_parentheses_in_default() override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -874,7 +874,7 @@ public: { Item_func::print(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -935,7 +935,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -954,7 +954,7 @@ public: bool fix_length_and_dec(THD *thd) override { set_maybe_null(); return FALSE; } bool need_parentheses_in_default() override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -975,7 +975,7 @@ public: } bool fix_length_and_dec(THD *thd) override { decimals=0; max_length=2; return FALSE; } decimal_digits_t decimal_precision() const override { return 1; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -992,7 +992,7 @@ public: } bool fix_length_and_dec(THD *thd) override { decimals=0; max_length=2; return FALSE; } decimal_digits_t decimal_precision() const override { return 1; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1006,7 +1006,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("st_isring") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1023,7 +1023,7 @@ public: } bool fix_length_and_dec(THD *thd) override { max_length= 10; set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1045,7 +1045,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1067,7 +1067,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1085,7 +1085,7 @@ public: } bool fix_length_and_dec(THD *thd) override { max_length= 10; set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1103,7 +1103,7 @@ public: } bool fix_length_and_dec(THD *thd) override { max_length= 10; set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1121,7 +1121,7 @@ public: } bool fix_length_and_dec(THD *thd) override { max_length= 10; set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1143,7 +1143,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1167,7 +1167,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1185,7 +1185,7 @@ public: } bool fix_length_and_dec(THD *thd) override { max_length= 10; set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1206,7 +1206,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("st_distance") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1224,7 +1224,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("st_distance_sphere") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1248,7 +1248,7 @@ public: { return &type_handler_point; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1270,7 +1270,7 @@ class Item_func_gis_debug: public Item_long_func { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; #endif diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h index 5c86e747bf6..f6113e5cf02 100644 --- a/sql/item_jsonfunc.h +++ b/sql/item_jsonfunc.h @@ -104,7 +104,7 @@ public: static const Lex_cstring fmt(STRING_WITH_LEN("json")); return to->set_format_name(fmt); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } enum Functype functype() const override { return JSON_VALID_FUNC; } }; @@ -121,7 +121,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; }; @@ -142,7 +142,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; }; @@ -190,7 +190,7 @@ public: { return je->check_and_get_value_scalar(res, error); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -218,7 +218,7 @@ public: { return je->check_and_get_value_complex(res, error, JSON_VALUE_UNINITIALIZED); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -237,7 +237,7 @@ public: } bool fix_length_and_dec(THD *thd) override; String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -256,7 +256,7 @@ public: } bool fix_length_and_dec(THD *thd) override; String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -311,7 +311,7 @@ public: double val_real() override; my_decimal *val_decimal(my_decimal *) override; uint get_n_paths() const override { return arg_count - 1; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -334,7 +334,7 @@ public: } bool fix_length_and_dec(THD *thd) override; longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -361,7 +361,7 @@ public: bool fix_fields(THD *thd, Item **ref) override; bool fix_length_and_dec(THD *thd) override; longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -383,7 +383,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("json_array") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -404,7 +404,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("json_array_append") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -420,7 +420,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("json_array_insert") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -438,7 +438,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("json_object") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -456,7 +456,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("json_merge_preserve") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -471,7 +471,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -488,7 +488,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -507,7 +507,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -539,7 +539,7 @@ public: } bool fix_length_and_dec(THD *thd) override; longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -559,7 +559,7 @@ public: } bool fix_length_and_dec(THD *thd) override { max_length= 10; return FALSE; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -577,7 +577,7 @@ public: } bool fix_length_and_dec(THD *thd) override; String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -603,7 +603,7 @@ public: return (mode_insert ? (mode_replace ? json_set : json_insert) : json_replace); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -623,7 +623,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("json_remove") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -644,7 +644,7 @@ public: } bool fix_length_and_dec(THD *thd) override; String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -673,7 +673,7 @@ public: bool fix_length_and_dec(THD *thd) override; String *val_str(String *) override; uint get_n_paths() const override { return arg_count > 4 ? arg_count - 4 : 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -701,7 +701,7 @@ public: bool fix_length_and_dec(THD *thd) override; String *val_str(String *str) override; String *val_json(String *str) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -747,7 +747,7 @@ public: String* val_str(String *str) override; Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -796,7 +796,7 @@ public: String* val_str(String* str) override; Item *copy_or_same(THD* thd) override; void no_rows_in_result() override {} - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -818,7 +818,7 @@ public: } bool fix_length_and_dec(THD *thd) override; longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -845,7 +845,7 @@ public: } bool fix_length_and_dec(THD *thd) override; longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void cleanup() override; }; @@ -872,7 +872,7 @@ public: return je->check_and_get_value_complex(res, error, JSON_VALUE_OBJECT); } bool get_key_value(json_engine_t *je, String *str); - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -896,7 +896,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("json_array_intersect") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void cleanup() override { @@ -926,7 +926,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("json_object_filter_keys") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void cleanup() override diff --git a/sql/item_row.cc b/sql/item_row.cc index 3981392b0ae..d877bf605b9 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -180,7 +180,7 @@ void Item_row::bring_value() } -Item* Item_row::build_clone(THD *thd) +Item* Item_row::do_build_clone(THD *thd) const { Item **copy_args= static_cast (alloc_root(thd->mem_root, sizeof(Item*) * arg_count)); diff --git a/sql/item_row.h b/sql/item_row.h index fbf632ba3b7..012bc0f29f0 100644 --- a/sql/item_row.h +++ b/sql/item_row.h @@ -148,9 +148,9 @@ public: } bool check_vcol_func_processor(void *arg) override {return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } - Item *build_clone(THD *thd) override; + Item *do_build_clone(THD *thd) const override; }; #endif /* ITEM_ROW_INCLUDED */ diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index f2caae5b996..ad357806c7e 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -3989,9 +3989,8 @@ String *Item_func_charset::val_str(String *str) DBUG_ASSERT(fixed()); uint dummy_errors; - CHARSET_INFO *cs= args[0]->charset_for_protocol(); null_value= 0; - str->copy(cs->cs_name.str, cs->cs_name.length, + str->copy(m_cached_charset_info.str, m_cached_charset_info.length, &my_charset_latin1, collation.collation, &dummy_errors); return str; } diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index f8558a60831..915adfd79e5 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -159,7 +159,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("md5") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -175,7 +175,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("sha") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -191,7 +191,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("sha2") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -208,7 +208,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("to_base64") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -225,7 +225,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("from_base64") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -272,7 +272,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("aes_encrypt") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -291,7 +291,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("aes_decrypt") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -307,7 +307,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } @@ -344,7 +344,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("concat") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -375,7 +375,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } @@ -400,7 +400,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("decode_histogram") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -417,7 +417,7 @@ public: return name; } table_map not_null_tables() const override { return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -438,7 +438,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } @@ -458,7 +458,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("reverse") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -484,7 +484,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("replace") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -509,7 +509,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -549,7 +549,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("regexp_replace") }; return name; } - Item *get_copy(THD *thd) override { return 0;} + Item *do_get_copy(THD *thd) const override { return 0;} }; @@ -594,7 +594,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("regexp_substr") }; return name; } - Item *get_copy(THD *thd) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } }; @@ -612,7 +612,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("insert") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -639,7 +639,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -653,7 +653,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -671,7 +671,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("left") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -688,7 +688,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("right") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -717,7 +717,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("substr") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -734,7 +734,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("sformat") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -770,7 +770,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -787,7 +787,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("substring_index") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -830,7 +830,7 @@ public: } void print(String *str, enum_query_type query_type) override; virtual LEX_CSTRING mode_name() const { return { "both", 4}; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -851,7 +851,7 @@ public: set_maybe_null(); return res; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -874,7 +874,7 @@ public: } LEX_CSTRING mode_name() const override { return { STRING_WITH_LEN("leading") }; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -895,7 +895,7 @@ public: set_maybe_null(); return res; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -914,7 +914,7 @@ public: } LEX_CSTRING mode_name() const override { return { STRING_WITH_LEN("trailing") }; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -935,7 +935,7 @@ public: set_maybe_null(); return res; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -978,7 +978,7 @@ public: } static char *alloc(THD *thd, const char *password, size_t pass_len, enum PW_Alg al); - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -999,7 +999,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("des_encrypt") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1018,7 +1018,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("des_decrypt") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1063,7 +1063,7 @@ public: { return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1087,7 +1087,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("encode") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } protected: virtual void crypto_transform(String *); @@ -1112,7 +1112,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("decode") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } protected: void crypto_transform(String *) override; @@ -1158,7 +1158,7 @@ public: } const char *fully_qualified_func_name() const override { return "database()"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1186,7 +1186,7 @@ public: base_flags&= ~item_base_t::MAYBE_NULL; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1224,7 +1224,7 @@ public: { return save_str_value_in_field(field, &str_value); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1286,7 +1286,7 @@ public: return mark_unsupported_function(fully_qualified_func_name(), arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1303,7 +1303,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("soundex") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1321,7 +1321,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("elt") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1339,7 +1339,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("make_set") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1360,7 +1360,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("format") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1389,7 +1389,7 @@ public: return name; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1409,7 +1409,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("chr") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1426,7 +1426,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("repeat") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1442,7 +1442,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("space") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1463,7 +1463,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1505,7 +1505,7 @@ public: return name; } Sql_mode_dependency value_depends_on_sql_mode() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1539,7 +1539,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1565,7 +1565,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("lpad") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1599,7 +1599,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1622,7 +1622,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1672,7 +1672,7 @@ public: fix_char_length(char_length); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1698,7 +1698,7 @@ public: max_length=(1+args[0]->max_length)/2; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1737,7 +1737,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("like_range_min") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1752,7 +1752,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("like_range_max") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; #endif @@ -1784,7 +1784,7 @@ public: return name; } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1811,7 +1811,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1832,7 +1832,7 @@ class Item_func_export_set: public Item_str_func static LEX_CSTRING name= {STRING_WITH_LEN("export_set") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1859,7 +1859,7 @@ public: max_length= (uint32) MY_MIN(max_result_length, MAX_BLOB_WIDTH); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1955,7 +1955,7 @@ public: return name; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } int save_in_field(Field*, bool) override; }; @@ -1984,7 +1984,7 @@ public: return args[0]->field_for_view_update(); } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2010,6 +2010,8 @@ public: class Item_func_charset :public Item_func_expr_str_metadata { + LEX_CSTRING m_cached_charset_info; + public: Item_func_charset(THD *thd, Item *a) :Item_func_expr_str_metadata(thd, a) { } @@ -2019,8 +2021,25 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("charset") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + table_map used_tables() const override { return 0; } + bool fix_length_and_dec(THD* thd) override + { + if (Item_func_expr_str_metadata::fix_length_and_dec(thd)) + return true; + /* + Since this is a const item which doesn't use tables (see used_tables()), + we don't want to access the function arguments during execution. + That's why we store the charset here during the preparation phase + and only return it later at the execution phase + */ + DBUG_ASSERT(args[0]->fixed()); + m_cached_charset_info.str= args[0]->charset_for_protocol()->cs_name.str; + m_cached_charset_info.length= + args[0]->charset_for_protocol()->cs_name.length; + return false; + } }; @@ -2035,7 +2054,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("collation") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2075,7 +2094,7 @@ public: override { return this; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2106,7 +2125,7 @@ public: } bool fix_length_and_dec(THD *thd) override { max_length=10; return FALSE; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2127,7 +2146,7 @@ public: set_maybe_null(); return FALSE; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2154,7 +2173,7 @@ public: return name; } String *val_str(String *) override ZLIB_DEPENDED_FUNCTION - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2176,7 +2195,7 @@ public: return name; } String *val_str(String *) override ZLIB_DEPENDED_FUNCTION - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2203,7 +2222,7 @@ public: String *val_str(String *) override; void print(String *str, enum_query_type query_type) override; enum Functype functype() const override { return DYNCOL_FUNC; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2221,7 +2240,7 @@ public: } String *val_str(String *) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2243,7 +2262,7 @@ public: decimals= 0; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2293,7 +2312,7 @@ public: bool get_dyn_value(THD *thd, DYNAMIC_COLUMN_VALUE *val, String *tmp); bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2315,7 +2334,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2341,7 +2360,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2365,7 +2384,7 @@ public: fix_length_and_charset(sizeof(m_value_buffer), default_charset()); return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } @@ -2392,7 +2411,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2413,7 +2432,7 @@ public: set_maybe_null(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2431,7 +2450,7 @@ public: return name; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; #endif /* WITH_WSREP */ diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index cb1650aa99b..2d1a5e99f5c 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -43,6 +43,7 @@ #include "sql_cte.h" #include "sql_test.h" #include "opt_trace.h" +#include "my_json_writer.h" double get_post_group_estimate(JOIN* join, double join_op_rows); @@ -197,6 +198,7 @@ void Item_in_subselect::cleanup() in_strategy&= ~SUBS_STRATEGY_CHOSEN; */ first_execution= TRUE; + materialization_tracker= NULL; pushed_cond_guards= NULL; Item_subselect::cleanup(); DBUG_VOID_RETURN; @@ -242,7 +244,7 @@ Item_subselect::select_transformer(JOIN *join) bool Item_subselect::fix_fields(THD *thd_param, Item **ref) { - char const *save_where= thd_param->where; + THD_WHERE save_where= thd_param->where; uint8 uncacheable; bool res; @@ -321,7 +323,7 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref) if (have_to_be_excluded) engine->exclude(); substitution= 0; - thd->where= "checking transformed subquery"; + thd->where= THD_WHERE::CHECKING_TRANSFORMED_SUBQUERY; res= (*ref)->fix_fields_if_needed(thd, ref); goto end; @@ -1647,6 +1649,7 @@ Item_in_subselect::Item_in_subselect(THD *thd, Item * left_exp, st_select_lex *select_lex): Item_exists_subselect(thd), left_expr_cache(0), first_execution(TRUE), in_strategy(SUBS_NOT_TRANSFORMED), + materialization_tracker(NULL), pushed_cond_guards(NULL), do_not_convert_to_sj(FALSE), is_jtbm_merged(FALSE), is_jtbm_const_tab(FALSE), is_flattenable_semijoin(FALSE), is_registered_semijoin(FALSE), @@ -3275,6 +3278,7 @@ bool Item_exists_subselect::exists2in_processor(void *opt_arg) set_exists_transformed(); first_select->limit_params.select_limit= NULL; + first_select->limit_params.explicit_limit= FALSE; if (!(in_subs= new (thd->mem_root) Item_in_subselect(thd, left_exp, first_select))) { @@ -3466,13 +3470,13 @@ Item_in_subselect::select_in_like_transformer(JOIN *join) { Query_arena *arena= 0, backup; SELECT_LEX *current= thd->lex->current_select; - const char *save_where= thd->where; + THD_WHERE save_where= thd->where; bool trans_res= true; bool result; DBUG_ENTER("Item_in_subselect::select_in_like_transformer"); DBUG_ASSERT(thd == join->thd); - thd->where= "IN/ALL/ANY subquery"; + thd->where= THD_WHERE::IN_ALL_ANY_SUBQUERY; /* In some optimisation cases we will not need this Item_in_optimizer @@ -3559,7 +3563,7 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref) { uint outer_cols_num; List *inner_cols; - char const *save_where= thd_arg->where; + THD_WHERE save_where= thd_arg->where; DBUG_ENTER("Item_in_subselect::fix_fields"); thd= thd_arg; @@ -3568,7 +3572,7 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref) if (test_strategy(SUBS_SEMI_JOIN)) DBUG_RETURN( !( (*ref)= new (thd->mem_root) Item_int(thd, 1)) ); - thd->where= "IN/ALL/ANY subquery"; + thd->where= THD_WHERE::IN_ALL_ANY_SUBQUERY; /* Check if the outer and inner IN operands match in those cases when we will not perform IN=>EXISTS transformation. Currently this is when we @@ -3749,6 +3753,26 @@ bool Item_in_subselect::init_cond_guards() return FALSE; } +/** + Initialize the tracker which will be used to provide information for + the output of EXPLAIN and ANALYZE +*/ +void Item_in_subselect::init_subq_materialization_tracker(THD *thd) +{ + if (test_strategy(SUBS_MATERIALIZATION | SUBS_PARTIAL_MATCH_ROWID_MERGE | + SUBS_PARTIAL_MATCH_TABLE_SCAN)) + { + Explain_query *qw= thd->lex->explain; + DBUG_ASSERT(qw); + Explain_node *node= qw->get_node(unit->first_select()->select_number); + if (!node) + return; + node->subq_materialization= new(qw->mem_root) + Explain_subq_materialization(qw->mem_root); + materialization_tracker= node->subq_materialization->get_tracker(); + } +} + bool Item_allany_subselect::select_transformer(JOIN *join) @@ -4079,7 +4103,7 @@ int join_read_next_same_or_null(READ_RECORD *info); int subselect_single_select_engine::exec() { - char const *save_where= thd->where; + THD_WHERE save_where= thd->where; SELECT_LEX *save_select= thd->lex->current_select; thd->lex->current_select= select_lex; bool exec_error= 0; @@ -4201,7 +4225,7 @@ int subselect_single_select_engine::exec() int subselect_union_engine::exec() { - char const *save_where= thd->where; + THD_WHERE save_where= thd->where; int res= unit->exec(); thd->where= save_where; return res; @@ -4348,12 +4372,14 @@ int subselect_uniquesubquery_engine::exec() empty_result_set= TRUE; table->status= 0; Item_in_subselect *in_subs= item->get_IN_subquery(); + Subq_materialization_tracker *tracker= in_subs->get_materialization_tracker(); DBUG_ASSERT(in_subs); DBUG_ASSERT(thd); if (!tab->preread_init_done && tab->preread_init()) DBUG_RETURN(1); - + if (tracker) + tracker->increment_loops_count(); if (in_subs->left_expr_has_null()) { /* @@ -5107,6 +5133,9 @@ subselect_hash_sj_engine::choose_partial_match_strategy( partial_match_key_parts_arg); if (pm_buff_size > thd->variables.rowid_merge_buff_size) strategy= PARTIAL_MATCH_SCAN; + else + item->get_IN_subquery()->get_materialization_tracker()-> + report_partial_match_buffer_size(pm_buff_size); } } @@ -5885,6 +5914,7 @@ int subselect_hash_sj_engine::exec() } } + item_in->get_materialization_tracker()->report_exec_strategy(strategy); if (pm_engine) lookup_engine= pm_engine; item_in->change_engine(lookup_engine); @@ -6367,6 +6397,9 @@ int subselect_partial_match_engine::exec() DBUG_ASSERT(!(item_in->left_expr_has_null() && item_in->is_top_level_item())); + Subq_materialization_tracker *tracker= item_in->get_materialization_tracker(); + tracker->increment_loops_count(); + if (!item_in->left_expr_has_null()) { /* Try to find a matching row by index lookup. */ @@ -6380,6 +6413,7 @@ int subselect_partial_match_engine::exec() else { /* Search for a complete match. */ + tracker->increment_index_lookups(); if ((lookup_res= lookup_engine->index_lookup())) { /* An error occurred during lookup(). */ @@ -6424,6 +6458,7 @@ int subselect_partial_match_engine::exec() if (tmp_table->file->inited) tmp_table->file->ha_index_end(); + tracker->increment_partial_matches(); if (partial_match()) { /* The result of IN is UNKNOWN. */ @@ -6631,6 +6666,8 @@ subselect_rowid_merge_engine::init(MY_BITMAP *non_null_key_parts, 0, 0)) return TRUE; + item->get_IN_subquery()->get_materialization_tracker()-> + report_partial_merge_keys(merge_keys, merge_keys_count); return FALSE; } @@ -7089,3 +7126,12 @@ void Item_subselect::init_expr_cache_tracker(THD *thd) DBUG_ASSERT(expr_cache->type() == Item::EXPR_CACHE_ITEM); node->cache_tracker= ((Item_cache_wrapper *)expr_cache)->init_tracker(qw->mem_root); } + + +void Subq_materialization_tracker::report_partial_merge_keys( + Ordered_key **merge_keys, uint merge_keys_count) +{ + partial_match_array_sizes.resize(merge_keys_count, 0); + for (uint i= 0; i < merge_keys_count; i++) + partial_match_array_sizes[i]= merge_keys[i]->get_key_buff_elements(); +} diff --git a/sql/item_subselect.h b/sql/item_subselect.h index e49858c0975..5bac04e2d15 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -18,6 +18,7 @@ /* subselect Item */ +#include "item.h" #ifdef USE_PRAGMA_INTERFACE #pragma interface /* gcc class implementation */ #endif @@ -43,6 +44,8 @@ typedef class st_select_lex SELECT_LEX; */ typedef Comp_creator* (*chooser_compare_func_creator)(bool invert); class Cached_item; +class Subq_materialization_tracker; +class Explain_subq_materialization; /* base class for subselects */ @@ -274,8 +277,8 @@ public: void register_as_with_rec_ref(With_element *with_elem); void init_expr_cache_tracker(THD *thd); - Item* build_clone(THD *thd) override { return 0; } - Item* get_copy(THD *thd) override { return 0; } + Item* do_build_clone(THD *thd) const override { return nullptr; } + Item *do_get_copy(THD *thd) const override { return 0; } st_select_lex *wrap_tvc_into_select(THD *thd, st_select_lex *tvc_sl); @@ -495,6 +498,8 @@ protected: bool was_null; /* A bitmap of possible execution strategies for an IN predicate. */ uchar in_strategy; + /* Tracker collecting execution parameters of a materialized subquery */ + Subq_materialization_tracker *materialization_tracker; protected: /* Used to trigger on/off conditions that were pushed down to subselect */ bool *pushed_cond_guards; @@ -519,6 +524,7 @@ protected: left_expr could later be changed to something on the execution arena. */ Item *left_expr_orig; + public: /* Priority of this predicate in the convert-to-semi-join-nest process. */ int sj_convert_priority; @@ -620,7 +626,7 @@ public: Item_in_subselect(THD *thd_arg, Item * left_expr, st_select_lex *select_lex); Item_in_subselect(THD *thd_arg): Item_exists_subselect(thd_arg), left_expr_cache(0), first_execution(TRUE), - in_strategy(SUBS_NOT_TRANSFORMED), + in_strategy(SUBS_NOT_TRANSFORMED), materialization_tracker(NULL), pushed_cond_guards(NULL), func(NULL), do_not_convert_to_sj(FALSE), is_jtbm_merged(FALSE), is_jtbm_const_tab(FALSE), upper_item(0), converted_from_in_predicate(FALSE) {} @@ -772,6 +778,9 @@ public: { return left_expr; } inline Item* left_exp_orig() const { return left_expr_orig; } + void init_subq_materialization_tracker(THD *thd); + Subq_materialization_tracker *get_materialization_tracker() const + { return materialization_tracker; } friend class Item_ref_null_helper; friend class Item_is_not_null_test; @@ -1156,6 +1165,15 @@ public: select_result_interceptor *result, bool temp= FALSE) override; bool no_tables() const override;//=>base class + /* Possible execution strategies that can be used to compute hash semi-join.*/ + enum exec_strategy { + UNDEFINED= 0, + COMPLETE_MATCH, /* Use regular index lookups. */ + PARTIAL_MATCH, /* Use some partial matching strategy. */ + PARTIAL_MATCH_MERGE, /* Use partial matching through index merging. */ + PARTIAL_MATCH_SCAN, /* Use partial matching through table scan. */ + IMPOSSIBLE /* Subquery materialization is not applicable. */ + }; protected: /* The engine used to compute the IN predicate. */ @@ -1167,15 +1185,6 @@ protected: uint count_partial_match_columns; uint count_null_only_columns; uint count_columns_with_nulls; - /* Possible execution strategies that can be used to compute hash semi-join.*/ - enum exec_strategy { - UNDEFINED, - COMPLETE_MATCH, /* Use regular index lookups. */ - PARTIAL_MATCH, /* Use some partial matching strategy. */ - PARTIAL_MATCH_MERGE, /* Use partial matching through index merging. */ - PARTIAL_MATCH_SCAN, /* Use partial matching through table scan. */ - IMPOSSIBLE /* Subquery materialization is not applicable. */ - }; /* The chosen execution strategy. Computed after materialization. */ exec_strategy strategy; exec_strategy get_strategy_using_schema(); @@ -1308,6 +1317,7 @@ public: rownum_t get_max_null_row() { return max_null_row; } MY_BITMAP * get_null_key() { return &null_key; } ha_rows get_null_count() { return null_count; } + ha_rows get_key_buff_elements() { return key_buff_elements; } /* Get the search key element that corresponds to the i-th key part of this index. @@ -1548,4 +1558,93 @@ public: void cleanup() override; enum_engine_type engine_type() override { return TABLE_SCAN_ENGINE; } }; + +/** + @brief Subquery materialization tracker + + @details + Used to track various parameters of the materialized subquery execution, + such as the execution strategy, sizes of buffers employed, etc +*/ +class Subq_materialization_tracker +{ +public: + using Strategy = subselect_hash_sj_engine::exec_strategy; + + Subq_materialization_tracker(MEM_ROOT *mem_root) + : exec_strategy(Strategy::UNDEFINED), + partial_match_buffer_size(0), + partial_match_array_sizes(mem_root), + loops_count(0), + index_lookups_count(0), + partial_matches_count(0) + {} + + void report_partial_merge_keys(Ordered_key **merge_keys, + uint merge_keys_count); + + void report_exec_strategy(Strategy es) + { + exec_strategy= es; + } + + void report_partial_match_buffer_size(longlong sz) + { + partial_match_buffer_size= sz; + } + + void increment_loops_count() + { + loops_count++; + } + + void increment_index_lookups() + { + index_lookups_count++; + } + + void increment_partial_matches() + { + partial_matches_count++; + } + + void print_json_members(Json_writer *writer) const; +private: + Strategy exec_strategy; + ulonglong partial_match_buffer_size; + Dynamic_array partial_match_array_sizes; + + /* Number of times subquery predicate was evaluated */ + ulonglong loops_count; + + /* + Number of times we made a lookup in the materialized temptable + (we do this when all parts of left_expr are not NULLs) + */ + ulonglong index_lookups_count; + + /* + Number of times we had to check for a partial match (either by + scanning the materialized subquery or by doing a merge) + */ + ulonglong partial_matches_count; + + const char *get_exec_strategy() const + { + switch (exec_strategy) + { + case Strategy::UNDEFINED: + return "undefined"; + case Strategy::COMPLETE_MATCH: + return "index_lookup"; + case Strategy::PARTIAL_MATCH_MERGE: + return "index_lookup;array merge for partial match"; + case Strategy::PARTIAL_MATCH_SCAN: + return "index_lookup;full scan for partial match"; + default: + return "unsupported"; + } + } +}; + #endif /* ITEM_SUBSELECT_INCLUDED */ diff --git a/sql/item_sum.h b/sql/item_sum.h index f56baf0c4a0..52cf926d09b 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -866,7 +866,7 @@ public: } Item *copy_or_same(THD* thd) override; void remove() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool supports_removal() const override @@ -941,7 +941,7 @@ public: return has_with_distinct() ? name_distinct : name_normal; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool supports_removal() const override @@ -999,7 +999,7 @@ public: count= 0; Item_sum_sum::cleanup(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool supports_removal() const override @@ -1088,7 +1088,7 @@ public: m_stddev= Stddev(); Item_sum_double::cleanup(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1114,7 +1114,7 @@ class Item_sum_std final :public Item_sum_variance return sample ? stddev_samp_name : std_name; } Item *copy_or_same(THD* thd) override final; - Item *get_copy(THD *thd) override final + Item *do_get_copy(THD *thd) const override final { return get_item_copy(thd, this); } }; @@ -1217,7 +1217,7 @@ public: return sum_name; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1236,7 +1236,7 @@ public: return sum_name; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1329,7 +1329,7 @@ public: return sum_name; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -1350,7 +1350,7 @@ public: return sum_min_name; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -1369,7 +1369,7 @@ public: return sum_min_name; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -1513,7 +1513,7 @@ public: { return sp_result_field; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *copy_or_same(THD *thd) override; }; @@ -1579,8 +1579,9 @@ public: String *val_str(String *str) override { return val_string_from_real(str); } double val_real() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -1609,8 +1610,9 @@ public: return VDec(this).to_string_round(str, decimals); } my_decimal *val_decimal(my_decimal *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -1631,8 +1633,9 @@ public: bool is_null() override { update_null_value(); return null_value; } const Type_handler *type_handler() const override { return &type_handler_double; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -1644,8 +1647,9 @@ public: { } enum Type type() const override { return FIELD_STD_ITEM; } double val_real() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -1743,7 +1747,7 @@ class Item_sum_udf_float :public Item_udf_sum bool fix_length_and_dec(THD *thd) override { fix_num_length_and_dec(); return FALSE; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1770,7 +1774,7 @@ public: } bool fix_length_and_dec(THD *thd) override { decimals=0; max_length=21; return FALSE; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1812,7 +1816,7 @@ public: { return string_type_handler(); } bool fix_length_and_dec(THD *thd) override; Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1844,7 +1848,7 @@ public: bool fix_length_and_dec(THD *thd) override { fix_num_length_and_dec(); return FALSE; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2104,7 +2108,7 @@ public: void print(String *str, enum_query_type query_type) override; bool change_context_processor(void *cntx) override { context= (Name_resolution_context *)cntx; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } qsort_cmp2 get_comparator_function_for_distinct(); qsort_cmp2 get_comparator_function_for_order_by(); diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 9884ede1591..d5af342b18b 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -67,7 +67,7 @@ public: max_length=6*MY_CHARSET_BIN_MB_MAXLEN; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -90,7 +90,7 @@ public: max_length=6*MY_CHARSET_BIN_MB_MAXLEN; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -120,7 +120,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -153,7 +153,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -181,7 +181,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -210,7 +210,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -236,7 +236,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -264,7 +264,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -292,7 +292,7 @@ public: { return !has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -320,7 +320,7 @@ public: { return !has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -348,7 +348,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -376,7 +376,7 @@ public: { return !has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -414,7 +414,7 @@ public: { return arg_count == 2; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -447,7 +447,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -478,7 +478,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -513,7 +513,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -540,7 +540,7 @@ class Item_func_dayname :public Item_str_func { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -609,7 +609,7 @@ public: } longlong int_op() override; my_decimal *decimal_op(my_decimal* buf) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -637,7 +637,7 @@ public: } longlong int_op() override; my_decimal *decimal_op(my_decimal* buf) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -745,7 +745,7 @@ public: return name; } void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -760,7 +760,7 @@ public: return name; } void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -792,7 +792,7 @@ public: return name; } void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -807,7 +807,7 @@ public: return name; } void store_now_in_TIME(THD* thd, MYSQL_TIME *now_time) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -850,7 +850,7 @@ public: int save_in_field(Field *field, bool no_conversions) override; void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override; enum Functype functype() const override { return NOW_FUNC; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -871,7 +871,7 @@ public: return mark_unsupported_function(func_name(), "()", arg, VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -899,7 +899,7 @@ public: VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC); } enum Functype functype() const override { return SYSDATE_FUNC; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -922,7 +922,7 @@ public: { return has_date_args() || has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -959,7 +959,7 @@ public: return false; return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -974,7 +974,7 @@ public: return name; } bool check_vcol_func_processor(void *arg) override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1028,7 +1028,7 @@ public: return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1051,7 +1051,7 @@ class Item_func_from_unixtime :public Item_datetimefunc { return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1101,7 +1101,7 @@ class Item_func_convert_tz :public Item_datetimefunc } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; void cleanup() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1124,7 +1124,7 @@ public: static LEX_CSTRING name= {STRING_WITH_LEN("sec_to_time") }; return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1148,7 +1148,7 @@ public: void print(String *str, enum_query_type query_type) override; enum precedence precedence() const override { return INTERVAL_PRECEDENCE; } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1260,7 +1260,7 @@ class Item_extract :public Item_int_func, } return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1307,7 +1307,7 @@ public: } void print(String *str, enum_query_type query_type) override; bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1349,7 +1349,7 @@ public: { return args[0]->type_handler()->Item_date_typecast_fix_length_and_dec(this); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1375,7 +1375,7 @@ public: Item_time_typecast_fix_length_and_dec(this); } Sql_mode_dependency value_depends_on_sql_mode() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1401,7 +1401,7 @@ public: Item_datetime_typecast_fix_length_and_dec(this); } Sql_mode_dependency value_depends_on_sql_mode() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1419,7 +1419,7 @@ public: return name; } bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1460,7 +1460,7 @@ public: return (null_value= Sec6_add(dt.get_mysql_time(), it.get_mysql_time(), 1). to_datetime(ltime)); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1492,7 +1492,7 @@ public: static LEX_CSTRING subtime= { STRING_WITH_LEN("subtime") }; return sign > 0 ? addtime : subtime; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1517,7 +1517,7 @@ public: return FALSE; } bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1544,7 +1544,7 @@ public: return name; } bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1572,7 +1572,7 @@ public: { return !has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1601,7 +1601,7 @@ public: return FALSE; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1632,7 +1632,7 @@ public: return FALSE; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1656,7 +1656,7 @@ public: return name; } bool fix_length_and_dec(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1673,7 +1673,7 @@ public: return name; } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_vers.h b/sql/item_vers.h index 88c8cea837a..ecd3f16a920 100644 --- a/sql/item_vers.h +++ b/sql/item_vers.h @@ -49,7 +49,7 @@ public: return name; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -65,7 +65,7 @@ public: return (trt_field == TR_table::FLD_BEGIN_TS) ? begin_name : commit_name; } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool fix_length_and_dec(THD *thd) override { fix_attributes_datetime(decimals); return FALSE; } @@ -110,7 +110,7 @@ public: } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -127,7 +127,7 @@ public: return name; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index 0dfc683ccf1..c832fcf367a 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -150,7 +150,7 @@ public: return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -225,7 +225,7 @@ public: } Item_sum_int::cleanup(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -298,7 +298,7 @@ class Item_sum_dense_rank: public Item_sum_int } Item_sum_int::cleanup(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -362,7 +362,7 @@ class Item_sum_first_value : public Item_sum_hybrid_simple return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -389,7 +389,7 @@ class Item_sum_last_value : public Item_sum_hybrid_simple return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -411,7 +411,7 @@ class Item_sum_nth_value : public Item_sum_hybrid_simple return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -433,7 +433,7 @@ class Item_sum_lead : public Item_sum_hybrid_simple return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -455,7 +455,7 @@ class Item_sum_lag : public Item_sum_hybrid_simple return name; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -570,7 +570,7 @@ class Item_sum_percent_rank: public Item_sum_double, Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -658,7 +658,7 @@ class Item_sum_cume_dist: public Item_sum_double, Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -735,7 +735,7 @@ class Item_sum_ntile : public Item_sum_int, Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -899,7 +899,7 @@ public: Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void setup_window_func(THD *thd, Window_spec *window_spec) override; void setup_hybrid(THD *thd, Item *item); @@ -1036,7 +1036,7 @@ public: Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void setup_window_func(THD *thd, Window_spec *window_spec) override; void setup_hybrid(THD *thd, Item *item); @@ -1391,7 +1391,7 @@ public: void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } }; diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 09bf52203d6..cfcb08319ce 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -221,7 +221,7 @@ public: return { STRING_WITH_LEN("xpath_rootelement") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -237,7 +237,7 @@ public: return { STRING_WITH_LEN("xpath_union") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -277,7 +277,7 @@ public: return { STRING_WITH_LEN("xpath_selfbyname") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -294,7 +294,7 @@ public: return { STRING_WITH_LEN("xpath_childbyname") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -313,7 +313,7 @@ public: return { STRING_WITH_LEN("xpath_descendantbyname") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -332,7 +332,7 @@ public: return { STRING_WITH_LEN("xpath_ancestorbyname") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -350,7 +350,7 @@ public: return { STRING_WITH_LEN("xpath_parentbyname") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -367,7 +367,7 @@ public: return { STRING_WITH_LEN("xpath_attributebyname") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -387,7 +387,7 @@ public: return { STRING_WITH_LEN("xpath_predicate") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -403,7 +403,7 @@ public: return { STRING_WITH_LEN("xpath_elementbyindex") }; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -434,7 +434,7 @@ public: } return args[0]->val_real() ? 1 : 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -451,7 +451,7 @@ public: return { STRING_WITH_LEN("xpath_cast_number") }; } double val_real() override { return args[0]->val_real(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -471,7 +471,7 @@ public: } bool fix_length_and_dec(THD *thd) override { max_length= MAX_BLOB_WIDTH; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -495,7 +495,7 @@ public: return tmp_native_value.element(0).pos + 1; return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -521,7 +521,7 @@ public: return predicate_supplied_context_size; return tmp_native_value.elements(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -569,7 +569,7 @@ public: } return sum; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -654,7 +654,7 @@ public: } return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_xmlfunc.h b/sql/item_xmlfunc.h index f6e153c9451..b895d93af34 100644 --- a/sql/item_xmlfunc.h +++ b/sql/item_xmlfunc.h @@ -137,7 +137,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -158,7 +158,7 @@ public: return name; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/json_table.cc b/sql/json_table.cc index 6713e796eb7..a6e048e0464 100644 --- a/sql/json_table.cc +++ b/sql/json_table.cc @@ -1154,7 +1154,7 @@ bool push_table_function_arg_context(LEX *lex, MEM_ROOT *alloc) bool Table_function_json_table::setup(THD *thd, TABLE_LIST *sql_table, SELECT_LEX *s_lex) { - thd->where= "JSON_TABLE argument"; + thd->where= THD_WHERE::JSON_TABLE_ARGUMENT; if (!m_context_setup_done) { diff --git a/sql/key.cc b/sql/key.cc index e0a89e5db08..0f5ea18eca3 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -759,10 +759,12 @@ ulong key_hashnr(KEY *key_info, uint used_key_parts, const uchar *key) if (is_string) { /* - Prefix keys are not possible in BNLH joins. - Use the whole string to calculate the hash. + Surprisingly, BNL-H joins may use prefix keys. This may happen + when there is a real index on the column used in equi-join. + + In this case, the passed key tuple is already a prefix, no + special handling is required. */ - DBUG_ASSERT((key_part->key_part_flag & HA_PART_KEY_SEG) == 0); cs->hash_sort(pos+pack_length, length, &nr, &nr2); key+= pack_length; } @@ -866,10 +868,10 @@ bool key_buf_cmp(KEY *key_info, uint used_key_parts, if (is_string) { /* - Prefix keys are not possible in BNLH joins. - Compare whole strings. + Surprisingly, BNL-H joins may use prefix keys. This may happen + when there is a real index on the column used in equi-join. + In this case, we get properly truncated prefixes here. */ - DBUG_ASSERT((key_part->key_part_flag & HA_PART_KEY_SEG) == 0); if (cs->strnncollsp(pos1 + pack_length, length1, pos2 + pack_length, length2)) return true; diff --git a/sql/log.cc b/sql/log.cc index 93f0b830684..e292ba9392c 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3258,7 +3258,7 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time, } if (thd->db.str && strcmp(thd->db.str, db)) { // Database changed - if (my_b_printf(&log_file,"use %s;\n",thd->db.str)) + if (my_b_printf(&log_file,"use %`s;\n",thd->db.str)) goto err; strmov(db,thd->db.str); } @@ -3471,16 +3471,6 @@ void MYSQL_BIN_LOG::cleanup() } -/* Init binlog-specific vars */ -void MYSQL_BIN_LOG::init(ulong max_size_arg) -{ - DBUG_ENTER("MYSQL_BIN_LOG::init"); - max_size= max_size_arg; - DBUG_PRINT("info",("max_size: %lu", max_size)); - DBUG_VOID_RETURN; -} - - void MYSQL_BIN_LOG::init_pthread_objects() { Event_log::init_pthread_objects(); @@ -3737,7 +3727,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name, DBUG_RETURN(1); /* all warnings issued */ } - init(max_size_arg); + max_size= max_size_arg; open_count++; @@ -5333,10 +5323,8 @@ int MYSQL_BIN_LOG::new_file_impl() */ if (unlikely((error= generate_new_name(new_name, name, 0)))) { -#ifdef ENABLE_AND_FIX_HANG - close_on_error= TRUE; -#endif - goto end2; + mysql_mutex_unlock(&LOCK_index); + DBUG_RETURN(error); } new_name_ptr=new_name; @@ -5444,7 +5432,6 @@ end: last_used_log_number--; } -end2: if (delay_close) { clear_inuse_flag_when_closing(old_file); diff --git a/sql/log_event.h b/sql/log_event.h index a4804092a4d..24c5f520116 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -865,6 +865,7 @@ typedef struct st_print_event_info uint lc_time_names_number; uint charset_database_number; uint verbose; + uchar gtid_ev_flags2; uint32 flags2; uint32 server_id; uint32 domain_id; @@ -984,6 +985,8 @@ typedef struct st_print_event_info { m_is_event_group_filtering_enabled= TRUE; } + + my_bool is_xa_trans(); } PRINT_EVENT_INFO; #endif // MYSQL_CLIENT @@ -2272,7 +2275,7 @@ public: /* !!! Public in this patch to allow old usage */ If true, the event always be applied by slave SQL thread or be printed by mysqlbinlog */ - bool is_trans_keyword() + bool is_trans_keyword(bool is_xa) { /* Before the patch for bug#50407, The 'SAVEPOINT and ROLLBACK TO' @@ -2285,10 +2288,11 @@ public: /* !!! Public in this patch to allow old usage */ but we don't handle these cases and after the patch, both quiries are binlogged in upper case with no comments. */ - return !strncmp(query, "BEGIN", q_len) || - !strncmp(query, "COMMIT", q_len) || - !strncasecmp(query, "SAVEPOINT", 9) || - !strncasecmp(query, "ROLLBACK", 8); + return is_xa ? !strncasecmp(query, C_STRING_WITH_LEN("XA ")) + : (!strncmp(query, "BEGIN", q_len) || + !strncmp(query, "COMMIT", q_len) || + !strncasecmp(query, "SAVEPOINT", 9) || + !strncasecmp(query, "ROLLBACK", 8)); } virtual bool is_begin() { return !strcmp(query, "BEGIN"); } virtual bool is_commit() { return !strcmp(query, "COMMIT"); } diff --git a/sql/log_event_client.cc b/sql/log_event_client.cc index f24d1d91190..d57e5fd9f57 100644 --- a/sql/log_event_client.cc +++ b/sql/log_event_client.cc @@ -1838,7 +1838,7 @@ bool Query_log_event::print_query_header(IO_CACHE* file, if ((flags & LOG_EVENT_SUPPRESS_USE_F)) { - if (!is_trans_keyword()) + if (!is_trans_keyword(print_event_info->is_xa_trans())) print_event_info->db[0]= '\0'; } else if (db) @@ -3655,6 +3655,7 @@ st_print_event_info::st_print_event_info() bzero(time_zone_str, sizeof(time_zone_str)); delimiter[0]= ';'; delimiter[1]= 0; + gtid_ev_flags2= 0; flags2_inited= 0; flags2= 0; sql_mode_inited= 0; @@ -3690,6 +3691,11 @@ st_print_event_info::st_print_event_info() #endif } +my_bool st_print_event_info::is_xa_trans() +{ + return (gtid_ev_flags2 & + (Gtid_log_event::FL_PREPARED_XA | Gtid_log_event::FL_COMPLETED_XA)); +} bool copy_event_cache_to_string_and_reinit(IO_CACHE *cache, LEX_STRING *to) { @@ -3761,7 +3767,7 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) print_event_info->allow_parallel != !!(flags2 & FL_ALLOW_PARALLEL)) { if (my_b_printf(&cache, - "/*!100101 SET @@session.skip_parallel_replication=%u*/%s\n", + "/*M!100101 SET @@session.skip_parallel_replication=%u*/%s\n", !(flags2 & FL_ALLOW_PARALLEL), print_event_info->delimiter)) goto err; @@ -3773,7 +3779,7 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) print_event_info->domain_id != domain_id) { if (my_b_printf(&cache, - "/*!100001 SET @@session.gtid_domain_id=%u*/%s\n", + "/*M!100001 SET @@session.gtid_domain_id=%u*/%s\n", domain_id, print_event_info->delimiter)) goto err; print_event_info->domain_id= domain_id; @@ -3783,7 +3789,7 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) if (!print_event_info->server_id_printed || print_event_info->server_id != server_id) { - if (my_b_printf(&cache, "/*!100001 SET @@session.server_id=%u*/%s\n", + if (my_b_printf(&cache, "/*M!100001 SET @@session.server_id=%u*/%s\n", server_id, print_event_info->delimiter)) goto err; print_event_info->server_id= server_id; @@ -3791,7 +3797,7 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) } if (!is_flashback) - if (my_b_printf(&cache, "/*!100001 SET @@session.gtid_seq_no=%s*/%s\n", + if (my_b_printf(&cache, "/*M!100001 SET @@session.gtid_seq_no=%s*/%s\n", buf, print_event_info->delimiter)) goto err; } @@ -3810,6 +3816,8 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) goto err; } + print_event_info->gtid_ev_flags2= flags2; + return cache.flush_data(); err: return 1; diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc index 32c4bc7d2a9..8219024173c 100644 --- a/sql/log_event_server.cc +++ b/sql/log_event_server.cc @@ -1422,7 +1422,7 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, is created we create tables with thd->variables.wsrep_on=false to avoid replicating wsrep_schema tables to other nodes. */ - if (WSREP_ON && !is_trans_keyword()) + if (WSREP_ON && !is_trans_keyword(false)) { thd->wsrep_PA_safe= false; } @@ -1923,7 +1923,11 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, ::do_apply_event(), then the companion SET also have so we don't need to reset_one_shot_variables(). */ - if (is_trans_keyword() || rpl_filter->db_ok(thd->db.str)) + if (rpl_filter->is_db_empty() || + is_trans_keyword( + (rgi->gtid_ev_flags2 & (Gtid_log_event::FL_PREPARED_XA | + Gtid_log_event::FL_COMPLETED_XA))) || + rpl_filter->db_ok(thd->db.str)) { bool is_rb_alter= gtid_flags_extra & Gtid_log_event::FL_ROLLBACK_ALTER_E1; @@ -2283,6 +2287,16 @@ compare_errors: actual_error == ER_CONNECTION_KILLED) thd->reset_killed(); } + else if (actual_error == ER_XAER_NOTA && !rpl_filter->db_ok(get_db())) + { + /* + If there is an XA query whos XID cannot be found, if the replication + filter is active and filters the target database, assume that the XID + cache has been cleared (e.g. by server restart) since it was prepared, + so we can just ignore this event. + */ + thd->clear_error(1); + } /* Other cases: mostly we expected no error and get one. */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b2d251d3cd5..f2ed018af7c 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2115,10 +2115,11 @@ static void wait_for_signal_thread_to_end() if (err && err != ESRCH) { sql_print_error("Failed to send kill signal to signal handler thread, " - "pthread_kill() errno: %d", err); + "pthread_kill() errno: %d", + err); } - if (i == n_waits && signal_thread_in_use && !opt_bootstrap) + if (i == n_waits && signal_thread_in_use) { sql_print_warning("Signal handler thread did not exit in a timely manner. " "Continuing to wait for it to stop.."); @@ -3169,8 +3170,10 @@ void init_signals(void) (void) sigemptyset(&set); my_sigset(SIGPIPE,SIG_IGN); sigaddset(&set,SIGPIPE); +#ifndef IGNORE_SIGHUP_SIGQUIT sigaddset(&set,SIGQUIT); sigaddset(&set,SIGHUP); +#endif sigaddset(&set,SIGTERM); /* Fix signals if blocked by parents (can happen on Mac OS X) */ @@ -3261,20 +3264,20 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) (void) sigaddset(&set,SIGINT); (void) pthread_sigmask(SIG_UNBLOCK,&set,NULL); } - (void) sigemptyset(&set); + (void) sigemptyset(&set); // Setup up SIGINT for debug #ifdef USE_ONE_SIGNAL_HAND (void) sigaddset(&set,THR_SERVER_ALARM); // For alarms #endif +#ifndef IGNORE_SIGHUP_SIGQUIT (void) sigaddset(&set,SIGQUIT); + (void) sigaddset(&set,SIGHUP); +#endif (void) sigaddset(&set,SIGTERM); (void) sigaddset(&set,SIGTSTP); /* Save pid to this process (or thread on Linux) */ if (!opt_bootstrap) - { - (void) sigaddset(&set,SIGHUP); create_pid_file(); - } /* signal to start_signal_handler that we are ready diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 2866616f2d2..f577d0367d1 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -684,8 +684,8 @@ int check_and_do_in_subquery_rewrites(JOIN *join) { SELECT_LEX *current= thd->lex->current_select; thd->lex->current_select= current->return_after_parsing(); - char const *save_where= thd->where; - thd->where= "IN/ALL/ANY subquery"; + THD_WHERE save_where= thd->where; + thd->where= THD_WHERE::IN_ALL_ANY_SUBQUERY; Item **left= in_subs->left_exp_ptr(); bool failure= (*left)->fix_fields_if_needed(thd, left); diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 1b65de6e3c0..7d1fb2b48ab 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -1985,7 +1985,7 @@ bool partition_info::add_column_list_value(THD *thd, Item *item) part_column_list_val *col_val; Name_resolution_context *context= &thd->lex->current_select->context; TABLE_LIST *save_list= context->table_list; - const char *save_where= thd->where; + THD_WHERE save_where= thd->where; DBUG_ENTER("partition_info::add_column_list_value"); if (part_type == LIST_PARTITION && @@ -1999,9 +1999,9 @@ bool partition_info::add_column_list_value(THD *thd, Item *item) context->table_list= 0; if (column_list) - thd->where= "field list"; + thd->where= THD_WHERE::FIELD_LIST; else - thd->where= "partition function"; + thd->where= THD_WHERE::PARTITION_FUNCTION; if (item->walk(&Item::check_partition_func_processor, 0, NULL)) { diff --git a/sql/procedure.h b/sql/procedure.h index c59b766d2b9..5abe3ee454c 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -70,7 +70,7 @@ public: { return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate); } - Item* get_copy(THD *thd) override { return 0; } + Item* do_get_copy(THD *thd) const override { return 0; } }; class Item_proc_real :public Item_proc @@ -125,6 +125,8 @@ public: { s->set(value, default_charset()); return s; } my_decimal *val_decimal(my_decimal *) override; unsigned int size_of() { return sizeof(*this);} + Item *do_get_copy(THD *thd) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -165,6 +167,8 @@ public: my_decimal *val_decimal(my_decimal *) override; void cleanup() override { value.free(); } unsigned int size_of() { return sizeof(*this);} + Item *do_get_copy(THD *thd) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; /* The procedure class definitions */ diff --git a/sql/rpl_filter.cc b/sql/rpl_filter.cc index 982c0c9482d..76c5b8b3ca6 100644 --- a/sql/rpl_filter.cc +++ b/sql/rpl_filter.cc @@ -268,6 +268,13 @@ Rpl_filter::is_on() } +bool +Rpl_filter::is_db_empty() +{ + return do_db.is_empty() && ignore_db.is_empty(); +} + + /** Parse and add the given comma-separated sequence of filter rules. diff --git a/sql/rpl_filter.h b/sql/rpl_filter.h index ee3b9d516b7..87f5c5ce805 100644 --- a/sql/rpl_filter.h +++ b/sql/rpl_filter.h @@ -56,6 +56,7 @@ public: bool db_ok_with_wild_table(const char *db); bool is_on(); + bool is_db_empty(); /* Setters - add filtering rules */ diff --git a/sql/slave.cc b/sql/slave.cc index 53bd0db77af..2bdc2d61448 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2280,6 +2280,9 @@ past_checksum: if (unlikely(mysql_real_query(mysql, STRING_WITH_LEN("SET skip_replication=1")))) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2324,6 +2327,9 @@ past_checksum: STRINGIFY_ARG(MARIA_SLAVE_CAPABILITY_MINE))); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2373,6 +2379,9 @@ after_set_capability: !(master_res= mysql_store_result(mysql)) || !(master_row= mysql_fetch_row(master_res))) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2408,6 +2417,9 @@ after_set_capability: rc= mysql_real_query(mysql, query_str.ptr(), query_str.length()); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2441,6 +2453,9 @@ after_set_capability: rc= mysql_real_query(mysql, query_str.ptr(), query_str.length()); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2474,6 +2489,9 @@ after_set_capability: rc= mysql_real_query(mysql, query_str.ptr(), query_str.length()); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2510,6 +2528,9 @@ after_set_capability: rc= mysql_real_query(mysql, query_str.ptr(), query_str.length()); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -3698,7 +3719,7 @@ static ulong read_event(MYSQL* mysql, Master_info *mi, bool* suppress_warnings, } else { - if (!mi->rli.abort_slave) + if (!(mi->rli.abort_slave || io_slave_killed(mi))) { sql_print_error("Error reading packet from server: %s (server_errno=%d)", mysql_error(mysql), mysql_errno(mysql)); @@ -7268,7 +7289,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi, mi->port, 0, client_flag) == 0)) { /* Don't repeat last error */ - if ((int)mysql_errno(mysql) != last_errno) + if ((int)mysql_errno(mysql) != last_errno && !io_slave_killed(mi)) { last_errno=mysql_errno(mysql); suppress_warnings= 0; diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 983070a9b3d..c553154894d 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -915,6 +915,10 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, result_code = (table->table->file->*operator_func)(thd, check_opt); THD_STAGE_INFO(thd, stage_sending_data); DBUG_PRINT("admin", ("operator_func returned: %d", result_code)); +#ifdef WITH_PARTITION_STORAGE_ENGINE + if (lex->alter_info.partition_flags & ALTER_PARTITION_ADMIN) + set_part_state(&lex->alter_info, table->table->part_info, PART_NORMAL); +#endif } /* Note: compl_result_code can be different from result_code here */ diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 93b0dbb3ac7..7d34bc67f2e 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -258,7 +258,9 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len) info->decimals++; if (str == end) { - info->dval = my_atof(begin); + int error; + const char *end2= end; + info->dval= my_strtod(begin, (char **) &end2, &error); DBUG_RETURN(1); } } diff --git a/sql/sql_array.h b/sql/sql_array.h index 85a53ae1a6f..5f095edfbfb 100644 --- a/sql/sql_array.h +++ b/sql/sql_array.h @@ -140,12 +140,24 @@ public: DBUG_ASSERT(idx < array.elements); return *(((Elem*)array.buffer) + idx); } + /// Const variant of at(), which cannot change data const Elem& at(size_t idx) const { return *(((Elem*)array.buffer) + idx); } + Elem& operator[](size_t idx) + { + return at(idx); + } + + /// Const variant of operator[] + const Elem& operator[](size_t idx) const + { + return at(idx); + } + /// @returns pointer to first element Elem *front() { diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 999399c3df3..b797f01d486 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -6291,7 +6291,7 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name, si { if (nj_col) { - my_error(ER_NON_UNIQ_ERROR, MYF(0), name, thd->where); + my_error(ER_NON_UNIQ_ERROR, MYF(0), name, thd_where(thd)); DBUG_RETURN(NULL); } nj_col= curr_nj_col; @@ -6936,7 +6936,7 @@ find_field_in_tables(THD *thd, Item_ident *item, item->cached_field_index= NO_CACHED_FIELD_INDEX; } - DBUG_ASSERT(thd->where); + DBUG_ASSERT(thd->where != THD_WHERE::NOWHERE); /* If we found a fully qualified field we return it directly as it can't have duplicates. @@ -6949,7 +6949,7 @@ find_field_in_tables(THD *thd, Item_ident *item, if (report_error == REPORT_ALL_ERRORS || report_error == IGNORE_EXCEPT_NON_UNIQUE) my_error(ER_NON_UNIQ_ERROR, MYF(0), - table_name ? item->full_name() : name, thd->where); + table_name ? item->full_name() : name, thd_where(thd)); return (Field*) 0; } found= cur_field; @@ -6977,13 +6977,13 @@ find_field_in_tables(THD *thd, Item_ident *item, strxnmov(buff,sizeof(buff)-1,db,".",table_name,NullS); table_name=buff; } - my_error(ER_UNKNOWN_TABLE, MYF(0), table_name, thd->where); + my_error(ER_UNKNOWN_TABLE, MYF(0), table_name, thd_where(thd)); } else { if (report_error == REPORT_ALL_ERRORS || report_error == REPORT_EXCEPT_NON_UNIQUE) - my_error(ER_BAD_FIELD_ERROR, MYF(0), item->full_name(), thd->where); + my_error(ER_BAD_FIELD_ERROR, MYF(0), item->full_name(), thd_where(thd)); else found= not_found_field; } @@ -7116,7 +7116,7 @@ find_item_in_list(Item *find, List &items, uint *counter, */ if (report_error != IGNORE_ERRORS) my_error(ER_NON_UNIQ_ERROR, MYF(0), - find->full_name(), current_thd->where); + find->full_name(), thd_where(current_thd)); return (Item**) 0; } found_unaliased= li.ref(); @@ -7147,7 +7147,7 @@ find_item_in_list(Item *find, List &items, uint *counter, continue; // Same field twice if (report_error != IGNORE_ERRORS) my_error(ER_NON_UNIQ_ERROR, MYF(0), - find->full_name(), current_thd->where); + find->full_name(), thd_where(current_thd)); return (Item**) 0; } found= li.ref(); @@ -7202,7 +7202,7 @@ find_item_in_list(Item *find, List &items, uint *counter, { if (report_error != IGNORE_ERRORS) my_error(ER_NON_UNIQ_ERROR, MYF(0), - find->full_name(), current_thd->where); + find->full_name(), thd_where(current_thd)); return (Item **) 0; } if (found_unaliased) @@ -7219,7 +7219,7 @@ find_item_in_list(Item *find, List &items, uint *counter, { if (report_error == REPORT_ALL_ERRORS) my_error(ER_BAD_FIELD_ERROR, MYF(0), - find->full_name(), current_thd->where); + find->full_name(), thd_where(current_thd)); return (Item **) 0; } else @@ -7425,7 +7425,7 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, DBUG_PRINT ("info", ("match c1.is_common=%d", nj_col_1->is_common)); if (cur_nj_col_2->is_common || found) { - my_error(ER_NON_UNIQ_ERROR, MYF(0), field_name_1->str, thd->where); + my_error(ER_NON_UNIQ_ERROR, MYF(0), field_name_1->str, thd_where(thd)); goto err; } if ((!using_fields && !field_2_invisible) || is_using_column_1) @@ -7639,7 +7639,7 @@ store_natural_using_join_columns(THD *thd, TABLE_LIST *natural_using_join, if (!(common_field= it++)) { my_error(ER_BAD_FIELD_ERROR, MYF(0), using_field_name_ptr, - current_thd->where); + thd_where(current_thd)); goto err; } if (!my_strcasecmp(system_charset_info, @@ -7893,7 +7893,7 @@ static bool setup_natural_join_row_types(THD *thd, Name_resolution_context *context) { DBUG_ENTER("setup_natural_join_row_types"); - thd->where= "from clause"; + thd->where= THD_WHERE::FROM_CLAUSE; if (from_clause->elements == 0) DBUG_RETURN(false); /* We come here in the case of UNIONs. */ @@ -8067,7 +8067,7 @@ bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array, lex->current_select->nest_level); if (allow_sum_func) lex->allow_sum_func.set_bit(lex->current_select->nest_level); - thd->where= THD::DEFAULT_WHERE; + thd->where= THD_WHERE::DEFAULT_WHERE; save_is_item_list_lookup= lex->current_select->is_item_list_lookup; lex->current_select->is_item_list_lookup= 0; @@ -8824,7 +8824,7 @@ bool setup_on_expr(THD *thd, TABLE_LIST *table, bool is_update) embedded= embedding; if (embedded->on_expr) { - thd->where="on clause"; + thd->where= THD_WHERE::ON_CLAUSE; embedded->on_expr->mark_as_condition_AND_part(embedded); if (embedded->on_expr->fix_fields_if_needed_for_bool(thd, &embedded->on_expr)) @@ -8925,7 +8925,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List &leaves, if (*conds) { - thd->where="where clause"; + thd->where= THD_WHERE::WHERE_CLAUSE; DBUG_EXECUTE("where", print_where(*conds, "WHERE in setup_conds", diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 8ec0b0a71f7..a0b9b48ae17 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -84,8 +84,6 @@ char internal_table_name[2]= "*"; char empty_c_string[1]= {0}; /* used for not defined db */ -const char * const THD::DEFAULT_WHERE= "field list"; - /**************************************************************************** ** User variables ****************************************************************************/ @@ -630,6 +628,64 @@ extern "C" void thd_kill_timeout(THD* thd) thd->awake(KILL_TIMEOUT); } +const char *thd_where(THD *thd) +{ + switch(thd->where) { + case THD_WHERE::CHECKING_TRANSFORMED_SUBQUERY: + return "checking transformed subquery"; + break; + case THD_WHERE::IN_ALL_ANY_SUBQUERY: + return "IN/ALL/ANY subquery"; + break; + case THD_WHERE::JSON_TABLE_ARGUMENT: + return "JSON_TABLE argument"; + break; + case THD_WHERE::DEFAULT_WHERE: // same as FIELD_LIST + case THD_WHERE::FIELD_LIST: + return "field list"; + break; + case THD_WHERE::PARTITION_FUNCTION: + return "partition function"; + break; + case THD_WHERE::FROM_CLAUSE: + return "from clause"; + break; + case THD_WHERE::ON_CLAUSE: + return "on clause"; + break; + case THD_WHERE::WHERE_CLAUSE: + return "where clause"; + break; + case THD_WHERE::CONVERT_CHARSET_CONST: + return "convert character set partition constant"; + break; + case THD_WHERE::FOR_SYSTEM_TIME: + return "FOR SYSTEM_TIME"; + break; + case THD_WHERE::ORDER_CLAUSE: + return "order clause"; + break; + case THD_WHERE::HAVING_CLAUSE: + return "having clause"; + break; + case THD_WHERE::GROUP_STATEMENT: + return "group statement"; + break; + case THD_WHERE::PROCEDURE_LIST: + return "procedure list"; + break; + case THD_WHERE::CHECK_OPTION: + return "check option"; + break; + case THD_WHERE::USE_WHERE_STRING: + return thd->where_str; + default: + break; // "fall-through" to default return below + }; + DBUG_ASSERT(false); + return "UNKNOWN"; +} + THD::THD(my_thread_id id, bool is_wsrep_applier) :Statement(&main_lex, &main_mem_root, STMT_CONVENTIONAL_EXECUTION, /* statement id */ 0), @@ -835,7 +891,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) /* Variables with default values */ proc_info="login"; - where= THD::DEFAULT_WHERE; + where= THD_WHERE::DEFAULT_WHERE; slave_net = 0; m_command=COM_CONNECT; *scramble= '\0'; @@ -2313,7 +2369,7 @@ void THD::cleanup_after_query() /* Free Items that were created during this execution */ free_items(); /* Reset where. */ - where= THD::DEFAULT_WHERE; + where= THD_WHERE::DEFAULT_WHERE; /* reset table map for multi-table update */ table_map_for_update= 0; m_binlog_invoker= INVOKER_NONE; diff --git a/sql/sql_class.h b/sql/sql_class.h index 2f0a526a7a7..59ea3a95f99 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -220,6 +220,7 @@ extern "C" const char *thd_client_ip(MYSQL_THD thd); extern "C" LEX_CSTRING *thd_current_db(MYSQL_THD thd); extern "C" int thd_current_status(MYSQL_THD thd); extern "C" enum enum_server_command thd_current_command(MYSQL_THD thd); +extern "C" int thd_double_innodb_cardinality(MYSQL_THD thd); /** @class CSET_STRING @@ -2665,6 +2666,33 @@ struct thd_async_state }; +enum class THD_WHERE +{ + NOWHERE = 0, + CHECKING_TRANSFORMED_SUBQUERY, + IN_ALL_ANY_SUBQUERY, + JSON_TABLE_ARGUMENT, + FIELD_LIST, + PARTITION_FUNCTION, + FROM_CLAUSE, + DEFAULT_WHERE, + ON_CLAUSE, + WHERE_CLAUSE, + CONVERT_CHARSET_CONST, + FOR_SYSTEM_TIME, + ORDER_CLAUSE, + HAVING_CLAUSE, + GROUP_STATEMENT, + PROCEDURE_LIST, + CHECK_OPTION, + USE_WHERE_STRING, // ugh, a compromise for vcol... +}; + + +class THD; +const char *thd_where(THD *thd); + + /** @class THD For each client connection we create a separate thread with THD serving as @@ -2718,13 +2746,6 @@ public: MDL_request *backup_commit_lock; void reset_for_next_command(bool do_clear_errors= 1); - /* - Constant for THD::where initialization in the beginning of every query. - - It's needed because we do not save/restore THD::where normally during - primary (non subselect) query execution. - */ - static const char * const DEFAULT_WHERE; #ifdef EMBEDDED_LIBRARY struct st_mysql *mysql; @@ -2881,12 +2902,15 @@ public: const char *get_proc_info() const { return proc_info; } + // Used by thd_where() when where==USE_WHERE_STRING + const char *where_str; + /* Used in error messages to tell user in what part of MySQL we found an error. E. g. when where= "having clause", if fix_fields() fails, user will know that the error was in having clause. */ - const char *where; + THD_WHERE where; /* Needed by MariaDB semi sync replication */ Trans_binlog_info *semisync_info; diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 848907ab6dc..71c8550f21c 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -431,7 +431,7 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived) derived->on_expr= expr; derived->prep_on_expr= expr->copy_andor_structure(thd); } - thd->where= "on clause"; + thd->where= THD_WHERE::ON_CLAUSE; if (derived->on_expr && derived->on_expr->fix_fields_if_needed_for_bool(thd, &derived->on_expr)) { @@ -1566,6 +1566,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived) if (sl != first_sl) { DBUG_ASSERT(sl->item_list.elements == first_sl->item_list.elements); + sl->save_item_list_names(thd); List_iterator_fast it(sl->item_list); List_iterator_fast nm_it(unit->types); while (Item *item= it++) diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 97638215977..5eb0030603f 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -24,6 +24,7 @@ #include "my_json_writer.h" #include "opt_range.h" #include "sql_expression_cache.h" +#include "item_subselect.h" #include @@ -989,6 +990,18 @@ bool Explain_node::print_explain_json_cache(Json_writer *writer, } +bool Explain_node::print_explain_json_subq_materialization(Json_writer *writer, + bool is_analyze) +{ + if (subq_materialization) + { + subq_materialization->print_explain_json(writer, is_analyze); + return true; + } + return false; +} + + Explain_basic_join::~Explain_basic_join() { if (join_tabs) @@ -1136,6 +1149,8 @@ void Explain_select::print_explain_json(Explain_query *query, Json_writer_nesting_guard guard(writer); bool started_cache= print_explain_json_cache(writer, is_analyze); + bool started_subq_mat= print_explain_json_subq_materialization(writer, + is_analyze); if (message || select_type == pushed_derived_text || @@ -1248,6 +1263,8 @@ void Explain_select::print_explain_json(Explain_query *query, writer->end_object(); } + if (started_subq_mat) + writer->end_object(); if (started_cache) writer->end_object(); } @@ -3002,3 +3019,41 @@ void Explain_range_checked_fer::print_json(Json_writer *writer, writer->end_object(); } } + + +void Explain_subq_materialization::print_explain_json(Json_writer *writer, + bool is_analyze) +{ + writer->add_member("materialization").start_object(); + if (is_analyze) + tracker.print_json_members(writer); +} + + +void Subq_materialization_tracker::print_json_members(Json_writer *writer) const +{ + writer->add_member("r_strategy").add_str(get_exec_strategy()); + if (loops_count) + writer->add_member("r_loops").add_ull(loops_count); + + if (index_lookups_count) + writer->add_member("r_index_lookups").add_ull(index_lookups_count); + + if (partial_matches_count) + writer->add_member("r_partial_matches").add_ull(partial_matches_count); + + if (partial_match_buffer_size) + { + writer->add_member("r_partial_match_buffer_size"). + add_size(partial_match_buffer_size); + } + + if (partial_match_array_sizes.elements()) + { + writer->add_member("r_partial_match_array_sizes").start_array(); + for(size_t i= 0; i < partial_match_array_sizes.elements(); i++) + writer->add_ull(partial_match_array_sizes[i]); + writer->end_array(); + } +} + diff --git a/sql/sql_explain.h b/sql/sql_explain.h index be4685b6c65..a8b56bb3d42 100644 --- a/sql/sql_explain.h +++ b/sql/sql_explain.h @@ -84,6 +84,7 @@ class Explain_node : public Sql_alloc public: Explain_node(MEM_ROOT *root) : cache_tracker(NULL), + subq_materialization(NULL), connection_type(EXPLAIN_NODE_OTHER), children(root) {} @@ -113,6 +114,12 @@ public: */ Expression_cache_tracker* cache_tracker; + /** + If not NULL, this node is a SELECT (or UNION) in a materialized + IN-subquery. + */ + Explain_subq_materialization* subq_materialization; + /* How this node is connected to its parent. (NOTE: EXPLAIN_NODE_NON_MERGED_SJ is set very late currently) @@ -141,6 +148,8 @@ public: void print_explain_json_for_children(Explain_query *query, Json_writer *writer, bool is_analyze); bool print_explain_json_cache(Json_writer *writer, bool is_analyze); + bool print_explain_json_subq_materialization(Json_writer *writer, + bool is_analyze); virtual ~Explain_node() = default; }; @@ -1079,4 +1088,26 @@ public: }; +/* + EXPLAIN data structure for subquery materialization. + + All decisions are made at execution time so here we just store the tracker + that has all the info. +*/ + +class Explain_subq_materialization : public Sql_alloc +{ +public: + Explain_subq_materialization(MEM_ROOT *mem_root) + : tracker(mem_root) + {} + + Subq_materialization_tracker *get_tracker() { return &tracker; } + + void print_explain_json(Json_writer *writer, bool is_analyze); + +private: + Subq_materialization_tracker tracker; +}; + #endif //SQL_EXPLAIN_INCLUDED diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 105c2c8a3a6..0f5e4eb0061 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4356,7 +4356,16 @@ bool select_insert::prepare_eof() if (info.ignore || info.handle_duplicates != DUP_ERROR) if (table->file->ha_table_flags() & HA_DUPLICATE_POS) table->file->ha_rnd_end(); - table->file->extra(HA_EXTRA_END_ALTER_COPY); + if (error <= 0) + { + error= table->file->extra(HA_EXTRA_END_ALTER_COPY); + if (error == HA_ERR_FOUND_DUPP_KEY) + { + uint key_nr= table->file->get_dup_key(error); + if ((int)key_nr >= 0 && key_nr < table->s->keys) + print_keydup_error(table, &table->key_info[key_nr], MYF(0)); + } + } table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 564e6ed0efe..8b8edaf4020 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -5488,6 +5488,9 @@ void st_select_lex::update_correlated_cache() while ((tl= ti++)) { + if (tl->table_function) + is_correlated|= MY_TEST(tl->table_function->used_tables() & + OUTER_REF_TABLE_BIT); // is_correlated|= tl->is_with_table_recursive_reference(); if (tl->on_expr) is_correlated|= MY_TEST(tl->on_expr->used_tables() & OUTER_REF_TABLE_BIT); @@ -8205,7 +8208,7 @@ bool LEX::check_expr_allows_fields_or_error(THD *thd, const char *name) const { if (select_stack_top > 0) return false; // OK, fields are allowed - my_error(ER_BAD_FIELD_ERROR, MYF(0), name, thd->where); + my_error(ER_BAD_FIELD_ERROR, MYF(0), name, thd_where(thd)); return true; // Error, fields are not allowed } @@ -8228,7 +8231,7 @@ Item *LEX::create_item_ident_nospvar(THD *thd, if (unlikely(current_select->no_table_names_allowed)) { - my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), a->str, thd->where); + my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), a->str, thd_where(thd)); return NULL; } @@ -8443,7 +8446,7 @@ Item *LEX::create_item_ident(THD *thd, if (current_select->no_table_names_allowed) { - my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), b->str, thd->where); + my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), b->str, thd_where(thd)); return NULL; } @@ -11097,7 +11100,10 @@ void mark_or_conds_to_avoid_pushdown(Item *cond) (if cond is marked with MARKER_FULL_EXTRACTION or cond is an AND condition and some of its parts are marked with MARKER_FULL_EXTRACTION) - In this case condition is transformed and pushed into attach_to_conds + In this case condition is transformed with multiple_equality_transformer + transformer. It transforms all multiple equalities in the extracted + condition into the set of equalities. + After that the transformed condition is attached into attach_to_conds list. 2. Part of some other condition c1 that can't be entirely pushed (if Ñ1 isn't marked with any flag). @@ -11114,10 +11120,6 @@ void mark_or_conds_to_avoid_pushdown(Item *cond) In this case build_pushable_cond() is called for c1. This method builds a clone of the c1 part that can be pushed. - Transformation mentioned above is made with multiple_equality_transformer - transformer. It transforms all multiple equalities in the extracted - condition into the set of equalities. - @note Conditions that can be pushed are collected in attach_to_conds in this way: 1. if cond is an AND condition its parts that can be pushed into WHERE diff --git a/sql/sql_list.h b/sql/sql_list.h index faec566ccdc..55666f1358c 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -537,10 +537,9 @@ public: class Iterator; using value_type= T; using iterator= Iterator; - using const_iterator= const Iterator; - Iterator begin() const { return Iterator(first); } - Iterator end() const { return Iterator(); } + iterator begin() const { return iterator(first); } + iterator end() const { return iterator(); } class Iterator { @@ -561,7 +560,7 @@ public: return *this; } - T operator++(int) + Iterator operator++(int) { Iterator tmp(*this); operator++(); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f4d580018af..05f4f799a1a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -7340,6 +7340,7 @@ __attribute__((optimize("-O0"))) #endif check_stack_overrun(THD *thd, long margin, uchar *buf __attribute__((unused))) { +#ifndef __SANITIZE_ADDRESS__ long stack_used; DBUG_ASSERT(thd == current_thd); if ((stack_used= available_stack_size(thd->thread_stack, &stack_used)) >= @@ -7362,6 +7363,7 @@ check_stack_overrun(THD *thd, long margin, uchar *buf __attribute__((unused))) #ifndef DBUG_OFF max_stack_used= MY_MAX(max_stack_used, stack_used); #endif +#endif /* __SANITIZE_ADDRESS__ */ return 0; } @@ -8130,7 +8132,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, } bool has_alias_ptr= alias != nullptr; - void *memregion= thd->calloc(sizeof(TABLE_LIST)); + void *memregion= thd->alloc(sizeof(TABLE_LIST)); TABLE_LIST *ptr= new (memregion) TABLE_LIST(thd, db, fqtn, alias_str, has_alias_ptr, table, lock_type, mdl_type, table_options, diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 3b3e0a081e3..f7f06b969a6 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -137,11 +137,11 @@ Item* convert_charset_partition_constant(Item *item, CHARSET_INFO *cs) THD *thd= current_thd; Name_resolution_context *context= &thd->lex->current_select->context; TABLE_LIST *save_list= context->table_list; - const char *save_where= thd->where; + THD_WHERE save_where= thd->where; item= item->safe_charset_converter(thd, cs); context->table_list= NULL; - thd->where= "convert character set partition constant"; + thd->where= THD_WHERE::CONVERT_CHARSET_CONST; if (item && item->fix_fields_if_needed(thd, (Item**)NULL)) item= NULL; thd->where= save_where; @@ -836,7 +836,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table, func_expr->walk(&Item::change_context_processor, 0, &lex.first_select_lex()->context); - thd->where= "partition function"; + thd->where= THD_WHERE::PARTITION_FUNCTION; /* In execution we must avoid the use of thd->change_item_tree since we might release memory before statement is completed. We do this diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 71d48a84ec6..c6f17ead883 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1314,7 +1314,7 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables) if (vers_conditions.is_set() && vers_conditions.type != SYSTEM_TIME_HISTORY) { - thd->where= "FOR SYSTEM_TIME"; + thd->where= THD_WHERE::FOR_SYSTEM_TIME; /* TODO: do resolve fix_length_and_dec(), fix_fields(). This requires storing vers_conditions as Item and make some magic related to vers_system_time_t/VERS_TRX_ID at stage of fix_fields() @@ -1599,7 +1599,7 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num, { nesting_map save_allow_sum_func= thd->lex->allow_sum_func; thd->lex->allow_sum_func.set_bit(select_lex->nest_level); - thd->where= "order clause"; + thd->where= THD_WHERE::ORDER_CLAUSE; for (ORDER *order= select_lex->order_list.first; order; order= order->next) { /* Don't add the order items to all fields. Just resolve them to ensure @@ -1615,7 +1615,7 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num, if (having) { nesting_map save_allow_sum_func= thd->lex->allow_sum_func; - thd->where="having clause"; + thd->where= THD_WHERE::HAVING_CLAUSE; thd->lex->allow_sum_func.set_bit(select_lex_arg->nest_level); select_lex->having_fix_field= 1; /* @@ -1949,6 +1949,11 @@ bool JOIN::build_explain() curr_tab->tracker= tmp->get_using_temporary_read_tracker(); } } + if (is_in_subquery()) + { + Item_in_subselect *subq= unit->item->get_IN_subquery(); + subq->init_subq_materialization_tracker(thd); + } DBUG_RETURN(0); } @@ -27760,7 +27765,7 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, if (!count || count > fields.elements) { my_error(ER_BAD_FIELD_ERROR, MYF(0), - order_item->full_name(), thd->where); + order_item->full_name(), thd_where(thd)); return TRUE; } thd->change_item_tree((Item **)&order->item, (Item *)&ref_pointer_array[count - 1]); @@ -27839,7 +27844,7 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, ER_NON_UNIQ_ERROR, ER_THD(thd, ER_NON_UNIQ_ERROR), ((Item_ident*) order_item)->field_name.str, - thd->where); + thd_where(thd)); } } else if (from_window_spec) @@ -27909,7 +27914,7 @@ int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, SELECT_LEX *select = thd->lex->current_select; enum_parsing_place context_analysis_place= thd->lex->current_select->context_analysis_place; - thd->where="order clause"; + thd->where= THD_WHERE::ORDER_CLAUSE; const bool for_union= select->master_unit()->is_unit_op() && select == select->master_unit()->fake_select_lex; for (uint number = 1; order; order=order->next, number++) @@ -27988,7 +27993,7 @@ setup_group(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, uint org_fields=all_fields.elements; - thd->where="group statement"; + thd->where= THD_WHERE::GROUP_STATEMENT; for (ord= order; ord; ord= ord->next) { if (find_order_in_list(thd, ref_pointer_array, tables, ord, fields, @@ -28106,7 +28111,7 @@ setup_new_fields(THD *thd, List &fields, new_field->item=item; /* Change to shared Item */ else { - thd->where="procedure list"; + thd->where= THD_WHERE::PROCEDURE_LIST; if ((*new_field->item)->fix_fields(thd, new_field->item)) DBUG_RETURN(1); /* purecov: inspected */ all_fields.push_front(*new_field->item, thd->mem_root); diff --git a/sql/sql_string.h b/sql/sql_string.h index 346a767237c..1e82fa54124 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -585,7 +585,7 @@ public: LEX_CSTRING tmp= {Ptr, str_length}; return tmp; } - inline LEX_CSTRING *get_value(LEX_CSTRING *res) + inline LEX_CSTRING *get_value(LEX_CSTRING *res) const { res->str= Ptr; res->length= str_length; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 6410ca7412c..37f24b4f454 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -12013,6 +12013,61 @@ static int online_alter_read_from_binlog(THD *thd, rpl_group_info *rgi, } #endif + +/** Handle the error when copying data from source to target table. +@param error error code +@param ignore alter ignore statement +@param to target table handler +@param thd Mysql Thread +@param alter_ctx Runtime context for alter statement +@retval false in case of error +@retval true in case of skipping the row and continue alter operation */ +static bool +copy_data_error_ignore(int &error, bool ignore, TABLE *to, + THD *thd, Alter_table_ctx *alter_ctx) +{ + if (to->file->is_fatal_error(error, HA_CHECK_DUP)) + { + /* Not a duplicate key error. */ + to->file->print_error(error, MYF(0)); + error= 1; + return false; + } + /* Duplicate key error. */ + if (unlikely(alter_ctx->fk_error_if_delete_row)) + { + /* We are trying to omit a row from the table which serves + as parent in a foreign key. This might have broken + referential integrity so emit an error. Note that we + can't ignore this error even if we are + executing ALTER IGNORE TABLE. IGNORE allows to skip rows, but + doesn't allow to break unique or foreign key constraints, */ + my_error(ER_FK_CANNOT_DELETE_PARENT, MYF(0), + alter_ctx->fk_error_id, + alter_ctx->fk_error_table); + return false; + } + if (ignore) + return true; + /* Ordinary ALTER TABLE. Report duplicate key error. */ + uint key_nr= to->file->get_dup_key(error); + if (key_nr <= MAX_KEY) + { + const char *err_msg= ER_THD(thd, ER_DUP_ENTRY_WITH_KEY_NAME); + if (key_nr == 0 && to->s->keys > 0 && + (to->key_info[0].key_part[0].field->flags & + AUTO_INCREMENT_FLAG)) + err_msg= ER_THD(thd, ER_DUP_ENTRY_AUTOINCREMENT_CASE); + print_keydup_error(to, + key_nr >= to->s->keys ? NULL : + &to->key_info[key_nr], + err_msg, MYF(0)); + } + else + to->file->print_error(error, MYF(0)); + return false; +} + static int copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, bool ignore, @@ -12379,9 +12434,15 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, } bulk_insert_started= 0; - if (!ignore) - to->file->extra(HA_EXTRA_END_ALTER_COPY); - + if (!ignore && error <= 0) + { + int alt_error= to->file->extra(HA_EXTRA_END_ALTER_COPY); + if (alt_error > 0) + { + error= alt_error; + copy_data_error_ignore(error, false, to, thd, alter_ctx); + } + } cleanup_done= 1; to->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc index 487f7cc9ebc..a472327481f 100644 --- a/sql/sql_tvc.cc +++ b/sql/sql_tvc.cc @@ -312,7 +312,7 @@ bool table_value_constr::prepare(THD *thd, SELECT_LEX *sl, (thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIEW) */ - thd->where="order clause"; + thd->where= THD_WHERE::ORDER_CLAUSE; ORDER *order= sl->order_list.first; for (; order; order=order->next) { @@ -327,7 +327,7 @@ bool table_value_constr::prepare(THD *thd, SELECT_LEX *sl, if (!count || count > first_elem->elements) { my_error(ER_BAD_FIELD_ERROR, MYF(0), - order_item->full_name(), thd->where); + order_item->full_name(), thd_where(thd)); DBUG_RETURN(true); } order->in_field_list= 1; diff --git a/sql/sql_type_fixedbin.h b/sql/sql_type_fixedbin.h index 3210569e475..7643fe75438 100644 --- a/sql/sql_type_fixedbin.h +++ b/sql/sql_type_fixedbin.h @@ -290,8 +290,9 @@ public: str->append(tmp); str->append('\''); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } // Non-overriding methods void set_value(const Fbt &value) @@ -869,8 +870,9 @@ public: { return Item::save_in_field(field, no_conversions); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; class Item_char_typecast_func_handler_fbt_to_binary: @@ -970,7 +972,7 @@ public: Fbt_null tmp(args[0]); return null_value= tmp.is_null() || tmp.to_native(to); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -980,8 +982,9 @@ public: public: Item_cache_fbt(THD *thd) :Item_cache(thd, singleton()) { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } bool cache_value() override { if (!example) diff --git a/sql/sql_window.cc b/sql/sql_window.cc index 1d10eec9d8c..a578fd6fcab 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -262,9 +262,12 @@ setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, For "win_func() OVER (ORDER BY order_list RANGE BETWEEN ...)", - ORDER BY order_list must not be ommitted - the list must have a single element. + But it really only matters if the frame is bounded. */ if (win_spec->window_frame && - win_spec->window_frame->units == Window_frame::UNITS_RANGE) + win_spec->window_frame->units == Window_frame::UNITS_RANGE && + !(win_spec->window_frame->top_bound->is_unbounded() && + win_spec->window_frame->bottom_bound->is_unbounded())) { if (win_spec->order_list->elements != 1) { diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index f2ac9764c57..057086065c0 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -12347,7 +12347,7 @@ opt_order_clause: order_clause: ORDER_SYM BY { - thd->where= "ORDER clause"; + thd->where= THD_WHERE::ORDER_CLAUSE; } order_list { diff --git a/sql/table.cc b/sql/table.cc index bb533a4e84f..8d473caffae 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1215,7 +1215,8 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table, expr_str.length(parse_vcol_keyword.length); expr_str.append((char*)pos, expr_length); - thd->where= vcol_type_name(static_cast(type)); + thd->where= THD_WHERE::USE_WHERE_STRING; + thd->where_str= vcol_type_name(static_cast(type)); switch (type) { case VCOL_GENERATED_VIRTUAL: @@ -6005,6 +6006,7 @@ TABLE_LIST::TABLE_LIST(THD *thd, List *index_hints_ptr, LEX_STRING *option_ptr) { + reset(); db= db_str; is_fqtn= fqtn; alias= alias_str; @@ -6421,8 +6423,8 @@ bool TABLE_LIST::prep_check_option(THD *thd, uint8 check_opt_type) if (check_option) { - const char *save_where= thd->where; - thd->where= "check option"; + THD_WHERE save_where= thd->where; + thd->where= THD_WHERE::CHECK_OPTION; if (check_option->fix_fields_if_needed_for_bool(thd, &check_option)) DBUG_RETURN(TRUE); thd->where= save_where; diff --git a/sql/tztime.cc b/sql/tztime.cc index 2481284f5b4..ad09b474d97 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2767,7 +2767,7 @@ main(int argc, char **argv) printf("set @wsrep_is_on=(%s);\n", wsrep_is_on); printf("SET STATEMENT SQL_MODE='' FOR " - "SELECT concat('%%', GROUP_CONCAT(OPTION), '%%') INTO @replicate_opt " + "SELECT concat('%%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%%') INTO @replicate_opt " " FROM" " (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION" " FROM information_schema.TABLES" @@ -2778,8 +2778,7 @@ main(int argc, char **argv) " 'time_zone_transition_type'," " 'time_zone_leap_second')" " AND ENGINE in ('MyISAM'," - " 'Aria')) AS o" - " ORDER BY OPTION DESC;\n"); + " 'Aria')) AS o;\n"); printf("set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (%s);\n", wsrep_cannot_replicate_tz); if (opt_skip_write_binlog) /* We turn off session wsrep if we cannot replicate using galera. diff --git a/sql/xa.cc b/sql/xa.cc index 333ffb8f22b..332c715f4bc 100644 --- a/sql/xa.cc +++ b/sql/xa.cc @@ -187,6 +187,14 @@ void XID_STATE::set_online_alter_cache(Online_alter_cache_list *cache) xid_cache_element->xid.online_alter_cache= cache; } +void XID_STATE::set_rollback_only() +{ + xid_cache_element->xa_state= XA_ROLLBACK_ONLY; + if (current_thd) + MYSQL_SET_TRANSACTION_XA_STATE(current_thd->m_transaction_psi, + XA_ROLLBACK_ONLY); +} + void XID_STATE::er_xaer_rmfail() const { static const char *xa_state_names[]= @@ -553,8 +561,21 @@ bool trans_xa_prepare(THD *thd) } else { - thd->transaction->xid_state.xid_cache_element->xa_state= XA_PREPARED; - MYSQL_SET_TRANSACTION_XA_STATE(thd->m_transaction_psi, XA_PREPARED); + if (thd->transaction->xid_state.xid_cache_element->xa_state != + XA_ROLLBACK_ONLY) + { + thd->transaction->xid_state.xid_cache_element->xa_state= XA_PREPARED; + MYSQL_SET_TRANSACTION_XA_STATE(thd->m_transaction_psi, XA_PREPARED); + } + else + { + /* + In the non-err case, XA_ROLLBACK_ONLY should only be set by a slave + thread which prepared an empty transaction, to prevent binlogging a + standalone XA COMMIT. + */ + DBUG_ASSERT(thd->rgi_slave && !(thd->transaction->all.ha_list)); + } res= thd->variables.pseudo_slave_mode || thd->slave_thread ? slave_applier_reset_xa_trans(thd) : 0; } diff --git a/sql/xa.h b/sql/xa.h index 7c23b8c735e..a6732039140 100644 --- a/sql/xa.h +++ b/sql/xa.h @@ -35,6 +35,7 @@ struct XID_STATE { bool is_explicit_XA() const { return xid_cache_element != 0; } void set_error(uint error); void set_online_alter_cache(Online_alter_cache_list *); + void set_rollback_only(); void er_xaer_rmfail() const; XID *get_xid() const; enum xa_states get_state_code() const; diff --git a/storage/columnstore/columnstore b/storage/columnstore/columnstore index a81afdaf5bb..9040430422b 160000 --- a/storage/columnstore/columnstore +++ b/storage/columnstore/columnstore @@ -1 +1 @@ -Subproject commit a81afdaf5bb995ab50a029c201772c859d711447 +Subproject commit 9040430422b58d131ad5c50c6e6f980ab674bee2 diff --git a/storage/connect/mysql-test/connect/r/mysql.result b/storage/connect/mysql-test/connect/r/mysql.result index d1c68dcc96a..6e61fe3f4d7 100644 --- a/storage/connect/mysql-test/connect/r/mysql.result +++ b/storage/connect/mysql-test/connect/r/mysql.result @@ -229,7 +229,7 @@ a 20 30 # Start of mysqldump ------ -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index 2d5756b0dbf..461976497f5 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -1301,11 +1301,9 @@ dberr_t btr_cur_t::search_leaf(const dtuple_t *tuple, page_cur_mode_t mode, } switch (latch_mode) { - case BTR_SEARCH_PREV: - static_assert(BTR_SEARCH_PREV & BTR_SEARCH_LEAF, ""); + case BTR_SEARCH_PREV: /* btr_pcur_move_to_prev() */ ut_ad(!latch_by_caller); - ut_ad(rw_latch == - rw_lock_type_t(latch_mode & (RW_X_LATCH | RW_S_LATCH))); + ut_ad(rw_latch == RW_S_LATCH); /* latch also siblings from left to right */ if (page_has_prev(block->page.frame) && @@ -1479,7 +1477,7 @@ release_tree: rw_latch= RW_X_LATCH; break; case BTR_SEARCH_PREV: /* btr_pcur_move_to_prev() */ - ut_ad(rw_latch == RW_S_LATCH || rw_latch == RW_X_LATCH); + ut_ad(rw_latch == RW_S_LATCH); if (!not_first_access) buf_read_ahead_linear(page_id, zip_size); diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc index 527ecfe354a..10005e5b501 100644 --- a/storage/innobase/btr/btr0pcur.cc +++ b/storage/innobase/btr/btr0pcur.cc @@ -336,10 +336,9 @@ btr_pcur_t::restore_position(btr_latch_mode restore_latch_mode, mtr_t *mtr) ut_a(old_n_core_fields <= index->n_core_fields); ut_a(old_n_fields); - static_assert(BTR_SEARCH_PREV == (4 | BTR_SEARCH_LEAF), ""); + static_assert(int{BTR_SEARCH_PREV} == (4 | BTR_SEARCH_LEAF), ""); - switch (restore_latch_mode | 4) { - case BTR_SEARCH_PREV: + if ((restore_latch_mode | 4) == BTR_SEARCH_PREV) { /* Try optimistic restoration. */ if (btr_pcur_optimistic_latch_leaves(this, &restore_latch_mode, mtr)) { @@ -561,19 +560,13 @@ btr_pcur_move_backward_from_page( ut_ad(btr_pcur_is_before_first_on_page(cursor)); ut_ad(!btr_pcur_is_before_first_in_tree(cursor)); - const auto latch_mode = cursor->latch_mode; - ut_ad(latch_mode == BTR_SEARCH_LEAF || latch_mode == BTR_MODIFY_LEAF); - btr_pcur_store_position(cursor, mtr); mtr_commit(mtr); mtr_start(mtr); - static_assert(BTR_SEARCH_PREV == (4 | BTR_SEARCH_LEAF), ""); - - if (UNIV_UNLIKELY(cursor->restore_position( - btr_latch_mode(4 | latch_mode), mtr) + if (UNIV_UNLIKELY(cursor->restore_position(BTR_SEARCH_PREV, mtr) == btr_pcur_t::CORRUPTED)) { return true; } @@ -605,7 +598,7 @@ btr_pcur_move_backward_from_page( mtr->rollback_to_savepoint(1); ut_ad(block == mtr->at_savepoint(0)); - cursor->latch_mode = latch_mode; + cursor->latch_mode = BTR_SEARCH_LEAF; cursor->old_rec = nullptr; return false; } @@ -622,7 +615,7 @@ btr_pcur_move_to_prev( mtr_t* mtr) /*!< in: mtr */ { ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); - ut_ad(cursor->latch_mode != BTR_NO_LATCHES); + ut_ad(cursor->latch_mode == BTR_SEARCH_LEAF); cursor->old_rec = nullptr; diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc index d0a0f0dce4b..3ed84cc75a7 100644 --- a/storage/innobase/buf/buf0dump.cc +++ b/storage/innobase/buf/buf0dump.cc @@ -666,9 +666,7 @@ buf_load() ut_free(dump); - if (i == dump_n) { - os_aio_wait_until_no_pending_reads(true); - } + os_aio_wait_until_no_pending_reads(true); ut_sprintf_timestamp(now); diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index ca0e68859e9..06119620c80 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -3451,25 +3451,35 @@ dict_stats_fetch_table_stats_step( break; case 1: /* mysql.innodb_table_stats.clustered_index_size */ - + { ut_a(dtype_get_mtype(type) == DATA_INT); ut_a(len == 8); table->stat_clustered_index_size - = (ulint) mach_read_from_8(data); - + = std::max( + (ulint) mach_read_from_8(data), 1); break; + } case 2: /* mysql.innodb_table_stats.sum_of_other_index_sizes */ - + { ut_a(dtype_get_mtype(type) == DATA_INT); ut_a(len == 8); - table->stat_sum_of_other_index_sizes + ulint stat_other_idx_size = (ulint) mach_read_from_8(data); + if (!stat_other_idx_size + && UT_LIST_GET_LEN(table->indexes) > 1) { + stat_other_idx_size + = UT_LIST_GET_LEN(table->indexes) - 1; + } + table->stat_sum_of_other_index_sizes + = std::max( + (ulint) mach_read_from_8(data), + UT_LIST_GET_LEN(table->indexes) - 1); break; - + } default: /* someone changed SELECT @@ -3652,12 +3662,14 @@ dict_stats_fetch_index_stats_step( if (stat_name_len == 4 /* strlen("size") */ && strncasecmp("size", stat_name, stat_name_len) == 0) { - index->stat_index_size = (ulint) stat_value; + index->stat_index_size + = std::max((ulint) stat_value, 1); arg->stats_were_modified = true; } else if (stat_name_len == 12 /* strlen("n_leaf_pages") */ && strncasecmp("n_leaf_pages", stat_name, stat_name_len) == 0) { - index->stat_n_leaf_pages = (ulint) stat_value; + index->stat_n_leaf_pages + = std::max((ulint) stat_value, 1); arg->stats_were_modified = true; } else if (stat_name_len > PFX_LEN /* e.g. stat_name=="n_diff_pfx01" */ && strncasecmp(PFX, stat_name, PFX_LEN) == 0) { @@ -3727,7 +3739,8 @@ dict_stats_fetch_index_stats_step( index->stat_n_diff_key_vals[n_pfx - 1] = stat_value; if (sample_size != UINT64_UNDEFINED) { - index->stat_n_sample_sizes[n_pfx - 1] = sample_size; + index->stat_n_sample_sizes[n_pfx - 1] = + std::max(sample_size, 1); } else { /* hmm, strange... the user must have UPDATEd the table manually and SET sample_size = NULL */ diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index 0d67e1a9f6c..41d6648fd01 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -1348,6 +1348,8 @@ inline bool fil_space_t::acquire_if_not_stopped() bool fil_crypt_must_default_encrypt() { + /* prevents a race condition with fil_crypt_set_rotate_key_age() */ + mysql_mutex_assert_owner(&fil_system.mutex); return !srv_fil_crypt_rotate_key_age || !srv_encrypt_rotate; } @@ -2201,6 +2203,27 @@ void fil_crypt_set_rotation_iops(uint val) mysql_mutex_unlock(&fil_crypt_threads_mutex); } +/** Add the import tablespace to default_encrypt list +if necessary and signal fil_crypt_threads +@param space imported tablespace */ +void fil_crypt_add_imported_space(fil_space_t *space) +{ + mysql_mutex_lock(&fil_crypt_threads_mutex); + + mysql_mutex_lock(&fil_system.mutex); + + if (fil_crypt_must_default_encrypt()) + { + fil_system.default_encrypt_tables.push_back(*space); + space->is_in_default_encrypt= true; + } + + mysql_mutex_unlock(&fil_system.mutex); + + pthread_cond_broadcast(&fil_crypt_threads_cond); + mysql_mutex_unlock(&fil_crypt_threads_mutex); +} + /********************************************************************* Adjust encrypt tables @param[in] val New setting for innodb-encrypt-tables */ diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index ff9efedbda2..7bdbf0fd0b6 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -13372,7 +13372,7 @@ ha_innobase::discard_or_import_tablespace( | HA_STATUS_VARIABLE | HA_STATUS_AUTO); - fil_crypt_set_encrypt_tables(srv_encrypt_tables); + fil_crypt_add_imported_space(m_prebuilt->table->space); } } @@ -15769,6 +15769,26 @@ ha_innobase::extra( break; case HA_EXTRA_END_ALTER_COPY: trx = check_trx_exists(ha_thd()); + if (m_prebuilt->table->skip_alter_undo) { + if (dberr_t err= trx->bulk_insert_apply()) { + m_prebuilt->table->skip_alter_undo = 0; + return convert_error_code_to_mysql( + err, + m_prebuilt->table->flags, + trx->mysql_thd); + } + + trx->end_bulk_insert(*m_prebuilt->table); + trx->bulk_insert = false; + /* During copy alter operation, InnoDB + updates the stats only for non-persistent + tables. */ + if (!dict_stats_is_persistent_enabled( + m_prebuilt->table)) { + dict_stats_update_if_needed( + m_prebuilt->table, *trx); + } + } m_prebuilt->table->skip_alter_undo = 0; if (!m_prebuilt->table->is_temporary() && !high_level_read_only) { @@ -19658,6 +19678,10 @@ static MYSQL_SYSVAR_BOOL(force_primary_key, "Do not allow creating a table without primary key (off by default)", NULL, NULL, FALSE); +static MYSQL_SYSVAR_BOOL(alter_copy_bulk, innodb_alter_copy_bulk, + PLUGIN_VAR_NOCMDARG, + "Allow bulk insert operation for copy alter operation", NULL, NULL, TRUE); + const char *page_compression_algorithms[]= { "none", "zlib", "lz4", "lzo", "lzma", "bzip2", "snappy", 0 }; static TYPELIB page_compression_algorithms_typelib= { @@ -19884,6 +19908,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(saved_page_number_debug), #endif /* UNIV_DEBUG */ MYSQL_SYSVAR(force_primary_key), + MYSQL_SYSVAR(alter_copy_bulk), MYSQL_SYSVAR(fatal_semaphore_wait_threshold), /* Table page compression feature */ MYSQL_SYSVAR(compression_default), diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 8e42044de10..a2600e9c347 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -374,10 +374,12 @@ found_j: } } - /* In case of discarded tablespace, InnoDB can't - read the root page. So assign the null bytes based - on nullabled fields */ - if (!oindex.table->space) { + /* Discard tablespace doesn't remove the instantness + from the table definition. if n_core_null_bytes wasn't + initialized then assign it based on nullable fields */ + if (!oindex.table->space + && oindex.n_core_null_bytes + == dict_index_t::NO_CORE_NULL_BYTES) { oindex.n_core_null_bytes = static_cast( UT_BITS_IN_BYTES(unsigned(oindex.n_nullable))); } @@ -845,14 +847,13 @@ inline void dict_table_t::rollback_instant( } } -/* Report an InnoDB error to the client by invoking my_error(). */ -static ATTRIBUTE_COLD __attribute__((nonnull)) +/* Report an InnoDB error to the client by invoking my_error(). +@param error InnoDB error code +@param table table name +@param flags table flags */ +ATTRIBUTE_COLD __attribute__((nonnull)) void -my_error_innodb( -/*============*/ - dberr_t error, /*!< in: InnoDB error code */ - const char* table, /*!< in: table name */ - ulint flags) /*!< in: table flags */ +my_error_innodb(dberr_t error, const char *table, ulint flags) { switch (error) { case DB_MISSING_HISTORY: diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index c4221274975..97e8377fa65 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -2410,7 +2410,7 @@ public: } /** @return whether a DDL operation is in progress on this table */ - bool is_active_ddl() const + bool is_native_online_ddl() const { return UT_LIST_GET_FIRST(indexes)->online_log; } diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h index f43965cd165..d83923e2326 100644 --- a/storage/innobase/include/fil0crypt.h +++ b/storage/innobase/include/fil0crypt.h @@ -337,6 +337,11 @@ Adjust rotation iops @param[in] val New max roation iops */ void fil_crypt_set_rotation_iops(uint val); +/** Add the import tablespace to default_encrypt list +if necessary and signal fil_crypt_threads +@param space imported tablespace */ +void fil_crypt_add_imported_space(fil_space_t *space); + /********************************************************************* Adjust encrypt tables @param[in] val New setting for innodb-encrypt-tables */ diff --git a/storage/innobase/include/mach0data.inl b/storage/innobase/include/mach0data.inl index 8fdeaffedf5..968f0ed2639 100644 --- a/storage/innobase/include/mach0data.inl +++ b/storage/innobase/include/mach0data.inl @@ -25,6 +25,7 @@ to the machine format. Created 11/28/1995 Heikki Tuuri ***********************************************************************/ +#include "my_valgrind.h" #ifndef UNIV_INNOCHECKSUM #include "mtr0types.h" @@ -39,7 +40,7 @@ mach_write_to_1( byte* b, /*!< in: pointer to byte where to store */ ulint n) /*!< in: ulint integer to be stored, >= 0, < 256 */ { -#ifndef HAVE_valgrind +#if !defined HAVE_valgrind || __has_feature(memory_sanitizer) ut_ad((n & ~0xFFUL) == 0); #endif @@ -58,7 +59,7 @@ mach_write_to_2( byte* b, /*!< in: pointer to two bytes where to store */ ulint n) /*!< in: ulint integer to be stored */ { -#ifndef HAVE_valgrind +#if !defined HAVE_valgrind || __has_feature(memory_sanitizer) ut_ad((n & ~0xFFFFUL) == 0); #endif diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h index 1c2af128229..fc39a9d24d9 100644 --- a/storage/innobase/include/row0merge.h +++ b/storage/innobase/include/row0merge.h @@ -416,6 +416,14 @@ row_merge_read_rec( ulint space) /*!< in: space id */ MY_ATTRIBUTE((warn_unused_result)); +/* Report an InnoDB error to the client by invoking my_error(). +@param error InnoDB error code +@param table table name +@param flags table flags */ +ATTRIBUTE_COLD __attribute__((nonnull)) +void +my_error_innodb(dberr_t error, const char *table, ulint flags); + /** Buffer for bulk insert */ class row_merge_bulk_t { diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index d42f3a1f4e3..41a93c7d129 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -297,6 +297,7 @@ extern ulong srv_checksum_algorithm; extern my_bool srv_force_primary_key; +extern my_bool innodb_alter_copy_bulk; extern ulong srv_max_purge_lag; extern ulong srv_max_purge_lag_delay; diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 7457addbbb6..361265fc4e3 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1173,8 +1173,8 @@ public: { if (UNIV_LIKELY(!bulk_insert)) return nullptr; - ut_ad(!check_unique_secondary); - ut_ad(!check_foreigns); + ut_ad(table->skip_alter_undo || !check_unique_secondary); + ut_ad(table->skip_alter_undo || !check_foreigns); auto it= mod_tables.find(table); if (it == mod_tables.end() || !it->second.bulk_buffer_exist()) return nullptr; diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 2450690ecf0..0acb85307bd 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -3910,6 +3910,9 @@ dberr_t lock_table(dict_table_t *table, dict_table_t *const*fktable, } lock_sys.rd_unlock(); +#ifdef WITH_WSREP + DEBUG_SYNC_C("after_lock_table_for_trx"); +#endif return err; } @@ -4623,6 +4626,38 @@ static bool lock_release_on_prepare_try(trx_t *trx) return all_released; } +/*********************************************************************//** +Removes table locks of the transaction on a table to be dropped. */ +static +void +lock_trx_table_locks_remove( +/*========================*/ + const lock_t* lock_to_remove) /*!< in: lock to remove */ +{ + trx_t* trx = lock_to_remove->trx; + + ut_ad(lock_to_remove->is_table()); + lock_sys.assert_locked(*lock_to_remove->un_member.tab_lock.table); + ut_ad(trx->mutex_is_owner()); + + for (lock_list::iterator it = trx->lock.table_locks.begin(), + end = trx->lock.table_locks.end(); it != end; ++it) { + const lock_t* lock = *it; + + ut_ad(!lock || trx == lock->trx); + ut_ad(!lock || lock->is_table()); + ut_ad(!lock || lock->un_member.tab_lock.table); + + if (lock == lock_to_remove) { + *it = NULL; + return; + } + } + + /* Lock must exist in the vector. */ + ut_error; +} + /** Release non-exclusive locks on XA PREPARE, and release possible other transactions waiting because of these locks. */ void lock_release_on_prepare(trx_t *trx) @@ -4682,6 +4717,7 @@ void lock_release_on_prepare(trx_t *trx) case LOCK_IS: case LOCK_S: lock_table_dequeue(lock, false); + lock_trx_table_locks_remove(lock); break; case LOCK_IX: case LOCK_X: @@ -4734,38 +4770,6 @@ void lock_release_on_rollback(trx_t *trx, dict_table_t *table) trx->mutex_unlock(); } -/*********************************************************************//** -Removes table locks of the transaction on a table to be dropped. */ -static -void -lock_trx_table_locks_remove( -/*========================*/ - const lock_t* lock_to_remove) /*!< in: lock to remove */ -{ - trx_t* trx = lock_to_remove->trx; - - ut_ad(lock_to_remove->is_table()); - lock_sys.assert_locked(*lock_to_remove->un_member.tab_lock.table); - ut_ad(trx->mutex_is_owner()); - - for (lock_list::iterator it = trx->lock.table_locks.begin(), - end = trx->lock.table_locks.end(); it != end; ++it) { - const lock_t* lock = *it; - - ut_ad(!lock || trx == lock->trx); - ut_ad(!lock || lock->is_table()); - ut_ad(!lock || lock->un_member.tab_lock.table); - - if (lock == lock_to_remove) { - *it = NULL; - return; - } - } - - /* Lock must exist in the vector. */ - ut_error; -} - /*===================== VALIDATION AND DEBUGGING ====================*/ /** Print info of a table lock. @@ -5011,7 +5015,7 @@ void lock_trx_print_wait_and_mvcc_state(FILE *file, const trx_t *trx, if (const lock_t* wait_lock = trx->lock.wait_lock) { const my_hrtime_t suspend_time= trx->lock.suspend_time; fprintf(file, - "------- TRX HAS BEEN WAITING %llu ns" + "------- TRX HAS BEEN WAITING %llu us" " FOR THIS LOCK TO BE GRANTED:\n", now.val - suspend_time.val); diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index a27f0d39834..b86b30ba5e0 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -131,6 +131,7 @@ bool log_t::create() #endif latch.SRW_LOCK_INIT(log_latch_key); + lsn_lock.init(); last_checkpoint_lsn= FIRST_LSN; log_capacity= 0; @@ -1338,6 +1339,7 @@ void log_t::close() #endif latch.destroy(); + lsn_lock.destroy(); recv_sys.close(); diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 1249cbbdb7a..57e07a685ed 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -3471,11 +3471,11 @@ int os_aio_resize(ulint n_reader_threads, ulint n_writer_threads) void os_aio_free() { - srv_thread_pool->disable_aio(); delete read_slots; delete write_slots; read_slots= nullptr; write_slots= nullptr; + srv_thread_pool->disable_aio(); } /** Wait until there are no pending asynchronous writes. */ diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc index 1060e702db4..e98022fb56b 100644 --- a/storage/innobase/page/page0page.cc +++ b/storage/innobase/page/page0page.cc @@ -790,11 +790,11 @@ zip_reorganize: the predefined infimum record, then it would still be the infimum, and we would have ret_pos == 0. */ - if (UNIV_UNLIKELY(!ret_pos - || ret_pos == ULINT_UNDEFINED)) { + if (UNIV_UNLIKELY(ret_pos == ULINT_UNDEFINED)) { *err = DB_CORRUPTION; return nullptr; } + *err = page_zip_reorganize(new_block, index, page_zip_level, mtr); switch (*err) { diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index 3ec994ad095..c20412f10f3 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -2698,7 +2698,7 @@ err_exit: block = btr_pcur_get_block(&pcur); - DBUG_EXECUTE_IF("row_ins_row_level", goto skip_bulk_insert;); + DBUG_EXECUTE_IF("row_ins_row_level", goto row_level_insert;); if (!(flags & BTR_NO_UNDO_LOG_FLAG) && page_is_empty(block->page.frame) @@ -2706,37 +2706,33 @@ err_exit: && !trx->check_unique_secondary && !trx->check_foreigns && !trx->dict_operation && block->page.id().page_no() == index->page - && !index->table->skip_alter_undo - && !index->table->n_rec_locks - && !index->table->is_active_ddl() - && !index->table->has_spatial_index() - && !index->table->versioned() - && (!dict_table_is_partition(index->table) + && !index->table->is_native_online_ddl() + && (!dict_table_is_partition(index->table) || thd_sql_command(trx->mysql_thd) == SQLCOM_INSERT)) { - DEBUG_SYNC_C("empty_root_page_insert"); - trx->bulk_insert = true; + if (!index->table->n_rec_locks + && !index->table->versioned() + && !index->table->is_temporary() + && !index->table->has_spatial_index()) { - if (!index->table->is_temporary()) { + ut_ad(!index->table->skip_alter_undo); + trx->bulk_insert = true; err = lock_table(index->table, NULL, LOCK_X, thr); - if (err != DB_SUCCESS) { trx->error_state = err; trx->bulk_insert = false; goto err_exit; } - if (index->table->n_rec_locks) { avoid_bulk: trx->bulk_insert = false; - goto skip_bulk_insert; + goto row_level_insert; } - #ifdef WITH_WSREP if (trx->is_wsrep()) { if (!wsrep_thd_is_local_transaction(trx->mysql_thd)) - goto skip_bulk_insert; + goto row_level_insert; if (wsrep_append_table_key(trx->mysql_thd, *index->table)) { trx->error_state = DB_ROLLBACK; @@ -2771,9 +2767,32 @@ avoid_bulk: export_vars.innodb_bulk_operations++; goto err_exit; } + } else if (flags == (BTR_NO_UNDO_LOG_FLAG | BTR_NO_LOCKING_FLAG) + && !index->table->n_rec_locks) { + + ut_ad(index->table->skip_alter_undo); + ut_ad(!entry->is_metadata()); + if (innodb_alter_copy_bulk + && !index->table->is_temporary() + && !index->table->versioned() + && !index->table->has_spatial_index()) { + ut_ad(page_is_empty(block->page.frame)); + /* This code path has been executed at the + start of the alter operation. Consecutive + insert operation are buffered in the + bulk buffer and doesn't check for constraint + validity of foreign key relationship. */ + trx_start_if_not_started(trx, true); + trx->bulk_insert = true; + auto m = trx->mod_tables.emplace(index->table, 0); + m.first->second.start_bulk_insert(index->table); + err = m.first->second.bulk_insert_buffered( + *entry, *index, trx); + goto err_exit; + } } -skip_bulk_insert: +row_level_insert: if (UNIV_UNLIKELY(entry->info_bits != 0)) { const rec_t* rec = btr_pcur_get_rec(&pcur); @@ -3361,9 +3380,12 @@ row_ins_index_entry( if (index->is_btree()) { if (auto t= trx->check_bulk_buffer(index->table)) { - /* MDEV-25036 FIXME: check also foreign key - constraints */ - ut_ad(!trx->check_foreigns); + /* MDEV-25036 FIXME: + row_ins_check_foreign_constraint() check + should be done before buffering the insert + operation. */ + ut_ad(index->table->skip_alter_undo + || !trx->check_foreigns); return t->bulk_insert_buffered(*entry, *index, trx); } } diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 08ccaea279f..2d19aa343e1 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -5320,6 +5320,9 @@ func_exit: else if (index->is_primary() && table->persistent_autoinc) btr_write_autoinc(index, table->autoinc - 1); err= btr_bulk.finish(err); + if (err == DB_SUCCESS && index->is_clust()) + table->stat_n_rows= (file && file->fd != OS_FILE_CLOSED) + ? file->n_rec : buf.n_tuples; return err; } @@ -5333,8 +5336,17 @@ dberr_t row_merge_bulk_t::write_to_table(dict_table_t *table, trx_t *trx) continue; dberr_t err= write_to_index(i, trx); - if (err != DB_SUCCESS) + switch (err) { + default: + if (table->skip_alter_undo) + my_error_innodb(err, table->name.m_name, table->flags); return err; + case DB_SUCCESS: + break; + case DB_DUPLICATE_KEY: + trx->error_info= index; + return err; + } i++; } diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 7d2a6072c3c..cd218d97b8c 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -327,6 +327,10 @@ my_bool srv_print_innodb_lock_monitor; PRIMARY KEY */ my_bool srv_force_primary_key; +/** innodb_alter_copy_bulk; Whether to allow bulk insert operation +inside InnoDB alter for copy algorithm; */ +my_bool innodb_alter_copy_bulk; + /** Key version to encrypt the temporary tablespace */ my_bool innodb_encrypt_temporary_tables; diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index 2923dc6477d..cf6c050e623 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -1840,7 +1840,7 @@ trx_undo_report_row_operation( auto m = trx->mod_tables.emplace(index->table, trx->undo_no); ut_ad(m.first->second.valid(trx->undo_no)); - if (m.second && index->table->is_active_ddl()) { + if (m.second && index->table->is_native_online_ddl()) { trx->apply_online_log= true; } diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index 126d8aadacb..fd88caa84d0 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -151,7 +151,7 @@ inline void trx_t::rollback_low(trx_savept_t *savept) mod_tables.erase(j); } else if (!apply_online_log) - apply_online_log= j->first->is_active_ddl(); + apply_online_log= j->first->is_native_online_ddl(); } MONITOR_INC(MONITOR_TRX_ROLLBACK_SAVEPOINT); } diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc index 0801ddb2b26..93d68036755 100644 --- a/storage/innobase/trx/trx0undo.cc +++ b/storage/innobase/trx/trx0undo.cc @@ -309,7 +309,7 @@ inline void UndorecApplier::apply_undo_rec(const trx_undo_rec_t *rec) dict_sys.unfreeze(); ut_ad(table); - if (!table->is_active_ddl()) + if (!table->is_native_online_ddl()) return; dict_index_t *index= dict_table_get_first_index(table); diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index d9d2e85307e..c6bf227ed16 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include "mrn.hpp" #include "mrn_mysql.h" #include "mrn_mysql_compat.h" @@ -296,6 +297,7 @@ static PSI_mutex_info mrn_mutexes[] = #endif /* global variables */ +bool mrn_initialized = false; handlerton *mrn_hton_ptr; HASH mrn_open_tables; mysql_mutex_t mrn_open_tables_mutex; @@ -1963,6 +1965,8 @@ static int mrn_init(void *p) mrn::PathMapper::default_mysql_data_home_path = mysql_data_home; #endif + mrn_initialized = true; + return 0; error_allocated_long_term_share_hash_init: @@ -2057,6 +2061,8 @@ static int mrn_deinit(void *p) mysql_mutex_destroy(&mrn_query_log_mutex); mysql_mutex_destroy(&mrn_log_mutex); + mrn_initialized = false; + return 0; } diff --git a/storage/mroonga/mrn.hpp b/storage/mroonga/mrn.hpp new file mode 100644 index 00000000000..41d3a5df4be --- /dev/null +++ b/storage/mroonga/mrn.hpp @@ -0,0 +1,29 @@ +/* + Copyright (C) 2024 Sutou Kouhei + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +extern bool mrn_initialized; + +#ifdef __cplusplus +} +#endif diff --git a/storage/mroonga/sources.am b/storage/mroonga/sources.am index c7ddcfa5acc..20ab3e6eb7f 100644 --- a/storage/mroonga/sources.am +++ b/storage/mroonga/sources.am @@ -1,4 +1,5 @@ sources = \ + mrn.hpp \ mrn_macro.hpp \ mrn_constants.hpp \ ha_mroonga.cpp \ diff --git a/storage/mroonga/udf/mrn_udf_command.cpp b/storage/mroonga/udf/mrn_udf_command.cpp index 10123c6252d..46911c56e25 100644 --- a/storage/mroonga/udf/mrn_udf_command.cpp +++ b/storage/mroonga/udf/mrn_udf_command.cpp @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -51,6 +52,15 @@ MRN_API my_bool mroonga_command_init(UDF_INIT *init, UDF_ARGS *args, CommandInfo *info = NULL; init->ptr = NULL; + + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Mroonga isn't initialized"); + goto error; + } + if (args->arg_count == 0) { grn_snprintf(message, MYSQL_ERRMSG_SIZE, diff --git a/storage/mroonga/udf/mrn_udf_escape.cpp b/storage/mroonga/udf/mrn_udf_escape.cpp index 72182790fea..55a3639565e 100644 --- a/storage/mroonga/udf/mrn_udf_escape.cpp +++ b/storage/mroonga/udf/mrn_udf_escape.cpp @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -44,6 +45,15 @@ MRN_API my_bool mroonga_escape_init(UDF_INIT *init, UDF_ARGS *args, bool script_mode = false; init->ptr = NULL; + + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_escape(): Mroonga isn't initialized"); + goto error; + } + if (!(1 <= args->arg_count && args->arg_count <= 2)) { snprintf(message, MYSQL_ERRMSG_SIZE, diff --git a/storage/mroonga/udf/mrn_udf_highlight_html.cpp b/storage/mroonga/udf/mrn_udf_highlight_html.cpp index 12f54a7d16a..d986777caff 100644 --- a/storage/mroonga/udf/mrn_udf_highlight_html.cpp +++ b/storage/mroonga/udf/mrn_udf_highlight_html.cpp @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -211,6 +212,14 @@ MRN_API my_bool mroonga_highlight_html_init(UDF_INIT *init, init->ptr = NULL; + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): Mroonga isn't initialized"); + goto error; + } + if (args->arg_count < 1) { snprintf(message, MYSQL_ERRMSG_SIZE, "mroonga_highlight_html(): wrong number of arguments: %u for 1+", diff --git a/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp b/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp index 46176bc8641..f40dcf0055f 100644 --- a/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp +++ b/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -29,6 +30,13 @@ MRN_BEGIN_DECLS MRN_API my_bool last_insert_grn_id_init(UDF_INIT *init, UDF_ARGS *args, char *message) { + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "last_insert_grn_id(): Mroonga isn't initialized"); + return 1; + } if (args->arg_count != 0) { strcpy(message, "last_insert_grn_id must not have arguments"); return 1; diff --git a/storage/mroonga/udf/mrn_udf_normalize.cpp b/storage/mroonga/udf/mrn_udf_normalize.cpp index 303623516f1..0ebee2ff608 100644 --- a/storage/mroonga/udf/mrn_udf_normalize.cpp +++ b/storage/mroonga/udf/mrn_udf_normalize.cpp @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -53,6 +54,15 @@ MRN_API my_bool mroonga_normalize_init(UDF_INIT *init, UDF_ARGS *args, String *result_str = NULL; init->ptr = NULL; + + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_normalize(): Mroonga isn't initialized"); + goto error; + } + if (!(1 <= args->arg_count && args->arg_count <= 2)) { sprintf(message, "mroonga_normalize(): Incorrect number of arguments: %u for 1..2", diff --git a/storage/mroonga/udf/mrn_udf_query_expand.cpp b/storage/mroonga/udf/mrn_udf_query_expand.cpp index 03bef3215c7..76a5dad53b4 100644 --- a/storage/mroonga/udf/mrn_udf_query_expand.cpp +++ b/storage/mroonga/udf/mrn_udf_query_expand.cpp @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -74,6 +75,15 @@ MRN_API my_bool mroonga_query_expand_init(UDF_INIT *init, MRN_DBUG_ENTER_FUNCTION(); init->ptr = NULL; + + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): Mroonga isn't initialized"); + goto error; + } + if (args->arg_count != 4) { sprintf(message, "mroonga_query_expand(): wrong number of arguments: %u for 4", diff --git a/storage/mroonga/udf/mrn_udf_snippet.cpp b/storage/mroonga/udf/mrn_udf_snippet.cpp index 90d3721e7e0..1bd6cb7d722 100644 --- a/storage/mroonga/udf/mrn_udf_snippet.cpp +++ b/storage/mroonga/udf/mrn_udf_snippet.cpp @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -137,6 +138,13 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *init, UDF_ARGS *args, char *messa st_mrn_snip_info *snip_info = NULL; bool can_open_snippet = TRUE; init->ptr = NULL; + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_snippet(): Mroonga isn't initialized"); + goto error; + } if (args->arg_count < 11 || (args->arg_count - 11) % 3) { sprintf(message, "Incorrect number of arguments for mroonga_snippet(): %u", diff --git a/storage/mroonga/udf/mrn_udf_snippet_html.cpp b/storage/mroonga/udf/mrn_udf_snippet_html.cpp index 311c91bf665..ba0cdadda99 100644 --- a/storage/mroonga/udf/mrn_udf_snippet_html.cpp +++ b/storage/mroonga/udf/mrn_udf_snippet_html.cpp @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -194,6 +195,14 @@ MRN_API my_bool mroonga_snippet_html_init(UDF_INIT *init, init->ptr = NULL; + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): Mroonga isn't initialized"); + goto error; + } + if (args->arg_count < 1) { snprintf(message, MYSQL_ERRMSG_SIZE, "mroonga_snippet_html(): wrong number of arguments: %u for 1+", diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 7785542a58f..51e214f848e 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -488,6 +488,25 @@ error_wide_handler_alloc: DBUG_RETURN(error_num); } +/* + Given a SPIDER_SHARE that will be freed, update all SPIDER_TRX_HAs + of spider_current_trx to point to a NULL share, which will cause the + removal of the SPIDER_TRX_HA in spider_check_trx_ha(). +*/ +static void spider_update_current_trx_ha_with_freed_share(SPIDER_SHARE *share) +{ + SPIDER_TRX *trx= spider_current_trx; + if (trx) + { + for (uint i = 0; i < trx->trx_ha_hash.records; i++) + { + SPIDER_TRX_HA *trx_ha = (SPIDER_TRX_HA *) my_hash_element(&trx->trx_ha_hash, i); + if (trx_ha->share == share) + trx_ha->share= NULL; + } + } +} + int ha_spider::close() { int error_num= 0, roop_count; @@ -582,6 +601,7 @@ int ha_spider::close() result_list.tmp_sqls = NULL; } + spider_update_current_trx_ha_with_freed_share(share); spider_free_share(share); is_clone = FALSE; pt_clone_source_handler = NULL; @@ -914,6 +934,8 @@ int ha_spider::external_lock( } } + if ((error_num= spider_check_trx_and_get_conn(thd, this))) + DBUG_RETURN(error_num); if (!partition_handler || !partition_handler->handlers) { DBUG_RETURN(lock_tables()); /* Non-partitioned table */ @@ -5825,6 +5847,8 @@ int ha_spider::rnd_next( DBUG_RETURN(error_num); use_pre_call = FALSE; } + if ((error_num= spider_check_trx_and_get_conn(ha_thd(), this))) + DBUG_RETURN(error_num); DBUG_RETURN(rnd_next_internal(buf)); } @@ -10032,6 +10056,15 @@ void ha_spider::sync_from_clone_source_base( DBUG_VOID_RETURN; } +/* + Set the initial values for each dbton_handler's first_link_idx and + strict_group_by. + + First, reset first_link_idx to -1. + Then, for each active remote server, if the corresponding + dbton_handler has not been set yet (first_link_idx == -1), set its + first_link_idx to be the index of the connection. +*/ void ha_spider::set_first_link_idx() { int roop_count, all_link_idx; @@ -10071,6 +10104,16 @@ void ha_spider::set_first_link_idx() DBUG_VOID_RETURN; } +/* + Reset the initial values for each dbton_handler's first_link_idx to + -1. + + Also, set the search_link_idx'th active server's first_link_idx to + search_link_idx. + + search_link_idx is commonly randomly set using + spider_conn_first_link_idx - see the commentary of that function. +*/ void ha_spider::reset_first_link_idx() { int all_link_idx; diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h index d7bbeb22b01..93b6e2c204b 100644 --- a/storage/spider/ha_spider.h +++ b/storage/spider/ha_spider.h @@ -124,7 +124,7 @@ public: #ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT bool auto_inc_temporary; #endif - int bulk_size; + int bulk_size= 0; int direct_dup_insert; int store_error_num; uint dup_key_idx; diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_27902.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_27902.result new file mode 100644 index 00000000000..7460bbca85e --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_27902.result @@ -0,0 +1,49 @@ +# +# MDEV-27902 Crashes, asserts, hangs and corruptions in Spider when using HANDLER +# +for master_1 +for child2 +for child3 +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +Warnings: +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +HANDLER t READ next; +ERROR HY000: Unable to connect to foreign data source: localhost +dummy; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'dummy' at line 1 +HANDLER t READ next; +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t; +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +Warnings: +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +HANDLER t READ FIRST; +ERROR HY000: Unable to connect to foreign data source: localhost +HANDLER t READ NEXT; +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t; +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +Warnings: +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +HANDLER t READ NEXT; +ERROR HY000: Unable to connect to foreign data source: localhost +SELECT * FROM t; +ERROR HY000: Unable to connect to foreign data source: localhost +HANDLER t READ NEXT; +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t; +drop server srv; +for master_1 +for child2 +for child3 +# +# end of test mdev_27902 +# diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_29962.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_29962.result new file mode 100644 index 00000000000..0767df7d988 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_29962.result @@ -0,0 +1,23 @@ +# +# MDEV-29962 SIGSEGV in ha_spider::lock_tables on BEGIN after table lock +# +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +CREATE TABLE t (c INT) ENGINE=InnoDB; +CREATE TABLE t1 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"'; +SELECT * FROM t1; +c +LOCK TABLES t1 WRITE CONCURRENT,t1 AS t2 READ; +BEGIN; +drop table t, t1; +drop server srv; +for master_1 +for child2 +for child3 +# +# end of test mdev_29962 +# diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_30408.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_30408.result new file mode 100644 index 00000000000..aa44e683102 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_30408.result @@ -0,0 +1,30 @@ +for master_1 +for child2 +for child3 +set @@optimizer_switch="semijoin=off"; +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +create table ten(a int primary key); +insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, b int); +insert into t2 select a,a from ten; +create table t1 (a int, b int) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; +select a.a, a.b from t1 a where exists (select * from t1 b where b.b = a.b); +a b +0 0 +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +drop table ten, t1, t2; +drop server srv; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_32492.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_32492.result new file mode 100644 index 00000000000..6cf0e4ad0a8 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_32492.result @@ -0,0 +1,67 @@ +# +# MDEV-32492 SIGSEGV in spider_conn_first_link_idx on DELETE +# +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +CREATE TABLE t (c INT, PRIMARY KEY(c)) ENGINE=Spider; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `c` int(11) NOT NULL, + PRIMARY KEY (`c`) +) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +Warnings: +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +DROP TABLE t; +CREATE TABLE t (c INT) ENGINE=Spider COMMENT='port "1 1"'; +DELETE FROM t; +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t; +CREATE TABLE t1 (a INT,b VARCHAR(255),PRIMARY KEY(a)) ENGINE=Spider comment="srv 'srv', table 't1', read_only_mode '1'"; +INSERT INTO t1 VALUES (1,'aaa'),(2,'bbb'),(3,'ccc'),(4,'ddd'); +ERROR HY000: Table 'test.t1' is read only +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='srv ''srv'', table ''t1'', read_only_mode ''1''' +Warnings: +Error 12719 An infinite loop is detected when opening table test.t1 +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=Spider comment="port '123 456'"; +INSERT IGNORE INTO t1 VALUES (42),(42); +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t1; +CREATE TABLE t1 (c INT, KEY(c)) ENGINE=Spider COMMENT='WRAPPER "mysql", SRV "srv",TABLE "t2", PK_NAME "f"'; +SET GLOBAL general_log=1; +INSERT INTO t1 VALUES (1, "aaa"),(2, "bbb"),(3, "ccc"),(4, "ddd"); +ERROR 21S01: Column count doesn't match value count at row 1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` int(11) DEFAULT NULL, + KEY `c` (`c`) +) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='WRAPPER "mysql", SRV "srv",TABLE "t2", PK_NAME "f"' +Warnings: +Error 12702 Remote table 'test.t2' is not found +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=Spider comment='port "123 456"'; +SELECT * FROM t1; +ERROR HY000: Unable to connect to foreign data source: localhost +INSERT IGNORE INTO t1 VALUES (42),(42); +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t1; +drop server srv; +for master_1 +for child2 +for child3 +# +# end of test mdev_32492 +# diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_34421.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_34421.result new file mode 100644 index 00000000000..d42f09a8f1c --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_34421.result @@ -0,0 +1,13 @@ +SET sql_mode=''; +INSTALL SONAME 'ha_spider'; +CREATE TABLE t (c INT) ENGINE=Spider PARTITION BY KEY(c) (PARTITION p); +UNINSTALL SONAME IF EXISTS 'ha_spider'; +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown +INSERT INTO t SELECT 1; +ERROR 42000: Unknown storage engine 'SPIDER' +drop table t; +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Note 1305 PLUGIN SPIDER_ALLOC_MEM does not exist +Note 1305 PLUGIN SPIDER_WRAPPER_PROTOCOLS does not exist diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_34541.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_34541.result new file mode 100644 index 00000000000..acc1528efc4 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_34541.result @@ -0,0 +1,35 @@ +for master_1 +for child2 +for child3 +SET SESSION spider_same_server_link=1; +SET sql_mode=''; +set @old_table_open_cache=@@global.table_open_cache; +set global table_open_cache=10; +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +CREATE TABLE t1 (c INT) ENGINE=InnoDB; +CREATE TABLE t2 (c INT) ENGINE=InnoDB; +CREATE TABLE t3 (c INT) ENGINE=InnoDB; +CREATE TABLE ta (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t5 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t6 (c INT KEY) ENGINE=InnoDB PARTITION BY RANGE (c) (PARTITION p VALUES LESS THAN (5)); +CREATE TABLE t7 (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t8 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +SELECT * FROM t8; +ERROR HY000: Remote table 'test.t' is not found +CREATE TEMPORARY TABLE t7 (c INT) ENGINE=InnoDB SELECT * FROM t7; +ERROR HY000: Remote table 'test.t' is not found +CALL foo; +ERROR 42000: PROCEDURE test.foo does not exist +CREATE TEMPORARY TABLE t7 (c INT) ENGINE=InnoDB; +SELECT * FROM t7 JOIN t6 ON tc=t0.c; +ERROR 42S22: Unknown column 'tc' in 'on clause' +SHOW TABLE STATUS; +drop table ta, t8, t7, t6, t5, t3, t2, t1; +drop table t7; +drop server srv; +set global table_open_cache=@old_table_open_cache; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_34555.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_34555.result new file mode 100644 index 00000000000..5e464ea77bb --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_34555.result @@ -0,0 +1,32 @@ +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE '',user 'Spider', password 'foo'); +CREATE TABLE tSpider (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t2 (c INT,c2 CHAR(1)) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +XA START 'a'; +SELECT * FROM information_schema.table_constraints; +SELECT SLEEP (1); +SLEEP (1) +0 +SELECT * FROM t2; +ERROR HY000: Unable to connect to foreign data source: srv +SELECT SLEEP (1); +SLEEP (1) +0 +SELECT * FROM t2; +ERROR HY000: Unable to connect to foreign data source: srv +SELECT SLEEP (1); +SLEEP (1) +0 +SELECT * FROM t2; +ERROR HY000: Unable to connect to foreign data source: srv +xa end 'a'; +xa rollback 'a'; +drop table tSpider, t2; +drop server srv; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27902.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_27902.test new file mode 100644 index 00000000000..2b46250ec33 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27902.test @@ -0,0 +1,56 @@ +--echo # +--echo # MDEV-27902 Crashes, asserts, hangs and corruptions in Spider when using HANDLER +--echo # +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +# original case +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ next; +--error ER_PARSE_ERROR +dummy; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ next; + +drop table t; + +# case by nayuta +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ FIRST; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ NEXT; + +drop table t; + +# Another case by Roel +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ NEXT; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ NEXT; + +drop table t; + +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log +--echo # +--echo # end of test mdev_27902 +--echo # diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_29962.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_29962.test new file mode 100644 index 00000000000..65735d43e7d --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_29962.test @@ -0,0 +1,30 @@ +--echo # +--echo # MDEV-29962 SIGSEGV in ha_spider::lock_tables on BEGIN after table lock +--echo # +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +CREATE TABLE t (c INT) ENGINE=InnoDB; +CREATE TABLE t1 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"'; +SELECT * FROM t1; +LOCK TABLES t1 WRITE CONCURRENT,t1 AS t2 READ; +BEGIN; + +drop table t, t1; +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log +--echo # +--echo # end of test mdev_29962 +--echo # diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_30408.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_30408.test new file mode 100644 index 00000000000..8f76c1209b6 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_30408.test @@ -0,0 +1,26 @@ +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +set @@optimizer_switch="semijoin=off"; +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +create table ten(a int primary key); +insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, b int); +insert into t2 select a,a from ten; +create table t1 (a int, b int) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; +select a.a, a.b from t1 a where exists (select * from t1 b where b.b = a.b); +drop table ten, t1, t2; +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_32492.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_32492.test new file mode 100644 index 00000000000..13fc4fe64f8 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_32492.test @@ -0,0 +1,62 @@ +--echo # +--echo # MDEV-32492 SIGSEGV in spider_conn_first_link_idx on DELETE +--echo # +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +CREATE TABLE t (c INT, PRIMARY KEY(c)) ENGINE=Spider; +--disable_ps_protocol +SHOW CREATE TABLE t; +--enable_ps_protocol +DROP TABLE t; +CREATE TABLE t (c INT) ENGINE=Spider COMMENT='port "1 1"'; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +DELETE FROM t; +drop table t; + +CREATE TABLE t1 (a INT,b VARCHAR(255),PRIMARY KEY(a)) ENGINE=Spider comment="srv 'srv', table 't1', read_only_mode '1'"; +--error 12518 +INSERT INTO t1 VALUES (1,'aaa'),(2,'bbb'),(3,'ccc'),(4,'ddd'); +--disable_ps_protocol +SHOW CREATE TABLE t1; +--enable_ps_protocol +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=Spider comment="port '123 456'"; +# bug crash site +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +INSERT IGNORE INTO t1 VALUES (42),(42); +drop table t1; + +CREATE TABLE t1 (c INT, KEY(c)) ENGINE=Spider COMMENT='WRAPPER "mysql", SRV "srv",TABLE "t2", PK_NAME "f"'; +SET GLOBAL general_log=1; +--error ER_WRONG_VALUE_COUNT_ON_ROW +INSERT INTO t1 VALUES (1, "aaa"),(2, "bbb"),(3, "ccc"),(4, "ddd"); +--disable_ps_protocol +SHOW CREATE TABLE t1; +--enable_ps_protocol +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=Spider comment='port "123 456"'; +# bug crash site +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t1; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +INSERT IGNORE INTO t1 VALUES (42),(42); +drop table t1; + +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log +--echo # +--echo # end of test mdev_32492 +--echo # diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_34421.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_34421.test new file mode 100644 index 00000000000..a63993446e9 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_34421.test @@ -0,0 +1,10 @@ +--source include/have_partition.inc +SET sql_mode=''; +INSTALL SONAME 'ha_spider'; +CREATE TABLE t (c INT) ENGINE=Spider PARTITION BY KEY(c) (PARTITION p); +UNINSTALL SONAME IF EXISTS 'ha_spider'; +--error ER_UNKNOWN_STORAGE_ENGINE +INSERT INTO t SELECT 1; +drop table t; +--disable_query_log +--source ../../include/clean_up_spider.inc diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_34541.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_34541.test new file mode 100644 index 00000000000..8a36eb58f10 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_34541.test @@ -0,0 +1,48 @@ +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +SET SESSION spider_same_server_link=1; +SET sql_mode=''; + +set @old_table_open_cache=@@global.table_open_cache; +set global table_open_cache=10; + +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +CREATE TABLE t1 (c INT) ENGINE=InnoDB; +CREATE TABLE t2 (c INT) ENGINE=InnoDB; +CREATE TABLE t3 (c INT) ENGINE=InnoDB; +CREATE TABLE ta (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t5 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t6 (c INT KEY) ENGINE=InnoDB PARTITION BY RANGE (c) (PARTITION p VALUES LESS THAN (5)); +CREATE TABLE t7 (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t8 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +--error 12702 +SELECT * FROM t8; +--error 12702 +CREATE TEMPORARY TABLE t7 (c INT) ENGINE=InnoDB SELECT * FROM t7; +--error ER_SP_DOES_NOT_EXIST +CALL foo; +CREATE TEMPORARY TABLE t7 (c INT) ENGINE=InnoDB; +--error ER_BAD_FIELD_ERROR +SELECT * FROM t7 JOIN t6 ON tc=t0.c; +--disable_result_log +SHOW TABLE STATUS; +--enable_result_log + +# we need to drop t7 twice +drop table ta, t8, t7, t6, t5, t3, t2, t1; +drop table t7; +drop server srv; +set global table_open_cache=@old_table_open_cache; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_34555.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_34555.test new file mode 100644 index 00000000000..3a1cf604140 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_34555.test @@ -0,0 +1,33 @@ +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE '',user 'Spider', password 'foo'); +CREATE TABLE tSpider (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t2 (c INT,c2 CHAR(1)) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +XA START 'a'; +--disable_result_log +--error 0,ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM information_schema.table_constraints; +--enable_result_log +SELECT SLEEP (1); +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t2; +SELECT SLEEP (1); +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t2; +SELECT SLEEP (1); +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t2; +xa end 'a'; +xa rollback 'a'; +drop table tSpider, t2; +drop server srv; +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log diff --git a/storage/spider/mysql-test/spider/r/connection_override.result b/storage/spider/mysql-test/spider/r/connection_override.result new file mode 100644 index 00000000000..8ecc0139212 --- /dev/null +++ b/storage/spider/mysql-test/spider/r/connection_override.result @@ -0,0 +1,44 @@ +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'invalid',user 'root'); +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +c +1 +2 +3 +drop table t1, t2; +drop server srv; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'invalid',user 'root'); +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +CONNECTION='WRAPPER "mysql", srv "srv",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +c +1 +2 +3 +drop table t1, t2; +drop server srv; +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +CONNECTION='user "root", database "invalid"' +COMMENT='WRAPPER "mysql", SOCKET "$MASTER_1_MYSOCK",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +c +1 +2 +3 +drop table t1, t2; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/t/connection_override.cnf b/storage/spider/mysql-test/spider/t/connection_override.cnf new file mode 100644 index 00000000000..b0853e32654 --- /dev/null +++ b/storage/spider/mysql-test/spider/t/connection_override.cnf @@ -0,0 +1,2 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf diff --git a/storage/spider/mysql-test/spider/t/connection_override.test b/storage/spider/mysql-test/spider/t/connection_override.test new file mode 100644 index 00000000000..1672b27decb --- /dev/null +++ b/storage/spider/mysql-test/spider/t/connection_override.test @@ -0,0 +1,43 @@ +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log +set spider_same_server_link= 1; + +# COMMENT overrides SERVER +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'invalid',user 'root'); +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +drop table t1, t2; +drop server srv; + +# CONNECTION overrides SERVER +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'invalid',user 'root'); +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +CONNECTION='WRAPPER "mysql", srv "srv",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +drop table t1, t2; +drop server srv; + +# COMMENT overrides CONNECTION +create table t2 (c int); +evalp create table t1 (c int) ENGINE=Spider +CONNECTION='user "root", database "invalid"' +COMMENT='WRAPPER "mysql", SOCKET "$MASTER_1_MYSOCK",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +drop table t1, t2; + +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc index fed6bc2728f..40dcb5e8629 100644 --- a/storage/spider/spd_conn.cc +++ b/storage/spider/spd_conn.cc @@ -376,6 +376,19 @@ void spider_free_conn_from_trx( DBUG_VOID_RETURN; } +static inline void spider_memcpy_or_null(char **dest, char *alloced, + char *src, uint *dest_len, + uint tgt_len) +{ + *dest_len= tgt_len; + if (src) + { + *dest= alloced; + memcpy(*dest, src, tgt_len); + } else + *dest= NULL; +} + SPIDER_CONN *spider_create_conn( SPIDER_SHARE *share, ha_spider *spider, @@ -454,124 +467,68 @@ SPIDER_CONN *spider_create_conn( memcpy(conn->conn_key, share->conn_keys[link_idx], share->conn_keys_lengths[link_idx]); conn->conn_key_hash_value = share->conn_keys_hash_value[link_idx]; - conn->tgt_host_length = share->tgt_hosts_lengths[link_idx]; - conn->tgt_host = tmp_host; - memcpy(conn->tgt_host, share->tgt_hosts[link_idx], - share->tgt_hosts_lengths[link_idx]); - - conn->tgt_username_length = share->tgt_usernames_lengths[link_idx]; - conn->tgt_username = tmp_username; - if (conn->tgt_username_length) - memcpy(conn->tgt_username, share->tgt_usernames[link_idx], - share->tgt_usernames_lengths[link_idx]); - - conn->tgt_password_length = share->tgt_passwords_lengths[link_idx]; - conn->tgt_password = tmp_password; - if (conn->tgt_password_length) - memcpy(conn->tgt_password, share->tgt_passwords[link_idx], - share->tgt_passwords_lengths[link_idx]); - - conn->tgt_socket_length = share->tgt_sockets_lengths[link_idx]; - conn->tgt_socket = tmp_socket; - if (conn->tgt_socket_length) - memcpy(conn->tgt_socket, share->tgt_sockets[link_idx], - share->tgt_sockets_lengths[link_idx]); - - conn->tgt_wrapper_length = share->tgt_wrappers_lengths[link_idx]; - conn->tgt_wrapper = tmp_wrapper; - memcpy(conn->tgt_wrapper, share->tgt_wrappers[link_idx], - share->tgt_wrappers_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_host, tmp_host, + share->tgt_hosts[link_idx], &conn->tgt_host_length, + share->tgt_hosts_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_username, tmp_username, + share->tgt_usernames[link_idx], + &conn->tgt_username_length, + share->tgt_usernames_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_password, tmp_password, + share->tgt_passwords[link_idx], + &conn->tgt_password_length, + share->tgt_passwords_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_socket, tmp_socket, + share->tgt_sockets[link_idx], + &conn->tgt_socket_length, + share->tgt_sockets_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_wrapper, tmp_wrapper, + share->tgt_wrappers[link_idx], + &conn->tgt_wrapper_length, + share->tgt_wrappers_lengths[link_idx]); if (!tables_on_different_db_are_joinable) { - conn->tgt_db_length = share->tgt_dbs_lengths[link_idx]; - conn->tgt_db = tmp_db; - memcpy(conn->tgt_db, share->tgt_dbs[link_idx], - share->tgt_dbs_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_db, tmp_db, share->tgt_dbs[link_idx], + &conn->tgt_db_length, + share->tgt_dbs_lengths[link_idx]); } - conn->tgt_ssl_ca_length = share->tgt_ssl_cas_lengths[link_idx]; - if (conn->tgt_ssl_ca_length) - { - conn->tgt_ssl_ca = tmp_ssl_ca; - memcpy(conn->tgt_ssl_ca, share->tgt_ssl_cas[link_idx], - share->tgt_ssl_cas_lengths[link_idx]); - } else - conn->tgt_ssl_ca = NULL; - conn->tgt_ssl_capath_length = share->tgt_ssl_capaths_lengths[link_idx]; - if (conn->tgt_ssl_capath_length) - { - conn->tgt_ssl_capath = tmp_ssl_capath; - memcpy(conn->tgt_ssl_capath, share->tgt_ssl_capaths[link_idx], - share->tgt_ssl_capaths_lengths[link_idx]); - } else - conn->tgt_ssl_capath = NULL; - conn->tgt_ssl_cert_length = share->tgt_ssl_certs_lengths[link_idx]; - if (conn->tgt_ssl_cert_length) - { - conn->tgt_ssl_cert = tmp_ssl_cert; - memcpy(conn->tgt_ssl_cert, share->tgt_ssl_certs[link_idx], - share->tgt_ssl_certs_lengths[link_idx]); - } else - conn->tgt_ssl_cert = NULL; - conn->tgt_ssl_cipher_length = share->tgt_ssl_ciphers_lengths[link_idx]; - if (conn->tgt_ssl_cipher_length) - { - conn->tgt_ssl_cipher = tmp_ssl_cipher; - memcpy(conn->tgt_ssl_cipher, share->tgt_ssl_ciphers[link_idx], - share->tgt_ssl_ciphers_lengths[link_idx]); - } else - conn->tgt_ssl_cipher = NULL; - conn->tgt_ssl_key_length = share->tgt_ssl_keys_lengths[link_idx]; - if (conn->tgt_ssl_key_length) - { - conn->tgt_ssl_key = tmp_ssl_key; - memcpy(conn->tgt_ssl_key, share->tgt_ssl_keys[link_idx], - share->tgt_ssl_keys_lengths[link_idx]); - } else - conn->tgt_ssl_key = NULL; - conn->tgt_default_file_length = share->tgt_default_files_lengths[link_idx]; - if (conn->tgt_default_file_length) - { - conn->tgt_default_file = tmp_default_file; - memcpy(conn->tgt_default_file, share->tgt_default_files[link_idx], - share->tgt_default_files_lengths[link_idx]); - } else - conn->tgt_default_file = NULL; - conn->tgt_default_group_length = - share->tgt_default_groups_lengths[link_idx]; - if (conn->tgt_default_group_length) - { - conn->tgt_default_group = tmp_default_group; - memcpy(conn->tgt_default_group, share->tgt_default_groups[link_idx], - share->tgt_default_groups_lengths[link_idx]); - } else - conn->tgt_default_group = NULL; - conn->tgt_dsn_length = - share->tgt_dsns_lengths[link_idx]; - if (conn->tgt_dsn_length) - { - conn->tgt_dsn = tmp_dsn; - memcpy(conn->tgt_dsn, share->tgt_dsns[link_idx], - share->tgt_dsns_lengths[link_idx]); - } else - conn->tgt_dsn = NULL; - conn->tgt_filedsn_length = - share->tgt_filedsns_lengths[link_idx]; - if (conn->tgt_filedsn_length) - { - conn->tgt_filedsn = tmp_filedsn; - memcpy(conn->tgt_filedsn, share->tgt_filedsns[link_idx], - share->tgt_filedsns_lengths[link_idx]); - } else - conn->tgt_filedsn = NULL; - conn->tgt_driver_length = - share->tgt_drivers_lengths[link_idx]; - if (conn->tgt_driver_length) - { - conn->tgt_driver = tmp_driver; - memcpy(conn->tgt_driver, share->tgt_drivers[link_idx], - share->tgt_drivers_lengths[link_idx]); - } else - conn->tgt_driver = NULL; + spider_memcpy_or_null(&conn->tgt_ssl_ca, tmp_ssl_ca, + share->tgt_ssl_cas[link_idx], + &conn->tgt_ssl_ca_length, + share->tgt_ssl_cas_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_ssl_capath, tmp_ssl_capath, + share->tgt_ssl_capaths[link_idx], + &conn->tgt_ssl_capath_length, + share->tgt_ssl_capaths_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_ssl_cert, tmp_ssl_cert, + share->tgt_ssl_certs[link_idx], + &conn->tgt_ssl_cert_length, + share->tgt_ssl_certs_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_ssl_cipher, tmp_ssl_cipher, + share->tgt_ssl_ciphers[link_idx], + &conn->tgt_ssl_cipher_length, + share->tgt_ssl_ciphers_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_ssl_key, tmp_ssl_key, + share->tgt_ssl_keys[link_idx], + &conn->tgt_ssl_key_length, + share->tgt_ssl_keys_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_default_file, tmp_default_file, + share->tgt_default_files[link_idx], + &conn->tgt_default_file_length, + share->tgt_default_files_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_default_group, tmp_default_group, + share->tgt_default_groups[link_idx], + &conn->tgt_default_group_length, + share->tgt_default_groups_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_dsn, tmp_dsn, share->tgt_dsns[link_idx], + &conn->tgt_dsn_length, + share->tgt_dsns_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_filedsn, tmp_filedsn, share->tgt_filedsns[link_idx], + &conn->tgt_filedsn_length, + share->tgt_filedsns_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_driver, tmp_driver, share->tgt_drivers[link_idx], + &conn->tgt_driver_length, + share->tgt_drivers_lengths[link_idx]); conn->tgt_port = share->tgt_ports[link_idx]; conn->tgt_ssl_vsc = share->tgt_ssl_vscs[link_idx]; conn->dbton_id = share->sql_dbton_ids[link_idx]; @@ -1105,21 +1062,35 @@ void spider_conn_queue_UTC_time_zone( DBUG_VOID_RETURN; } +/* + Construct merged values and insert into the loop check queue + + Search the loop_check_queue for the data node table, and if one does + not exist, construct the merged value in the same format as the + right hand side. Otherwise, merge the right hand side of the + existing SPIDER_CONN_LOOP_CHECK with the right hand side of lcptr + into one right hand side. In either case, add the + SPIDER_CONN_LOOP_CHECK to the loop check queue +*/ int spider_conn_queue_and_merge_loop_check( SPIDER_CONN *conn, SPIDER_CONN_LOOP_CHECK *lcptr ) { int error_num = HA_ERR_OUT_OF_MEM; - char *tmp_name, *from_name, *cur_name, *to_name, *full_name, *from_value, + char *tmp_name, *cur_name, *to_name, *full_name, *from_value, *merged_value; SPIDER_CONN_LOOP_CHECK *lcqptr, *lcrptr; DBUG_ENTER("spider_conn_queue_and_merge_loop_check"); DBUG_PRINT("info", ("spider conn=%p", conn)); - if (unlikely(!(lcqptr = (SPIDER_CONN_LOOP_CHECK *) + if (!(lcqptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_search_using_hash_value(&conn->loop_check_queue, lcptr->hash_value_to, - (uchar *) lcptr->to_name.str, lcptr->to_name.length)))) + (uchar *) lcptr->to_name.str, lcptr->to_name.length))) { + /* + Construct the right hand side: + ---- + */ DBUG_PRINT("info", ("spider create merged_value and insert")); lcptr->merged_value.length = spider_unique_id.length + lcptr->cur_name.length + lcptr->from_value.length + 1; @@ -1137,10 +1108,10 @@ int spider_conn_queue_and_merge_loop_check( } lcptr->flag |= SPIDER_LOP_CHK_QUEUED; } else { + /* Merge lcptr and lcqptr into a newly created lcrptr. */ DBUG_PRINT("info", ("spider append merged_value and replace")); if (unlikely(!spider_bulk_malloc(spider_current_trx, 271, MYF(MY_WME), &lcrptr, (uint) (sizeof(SPIDER_CONN_LOOP_CHECK)), - &from_name, (uint) (lcqptr->from_name.length + 1), &cur_name, (uint) (lcqptr->cur_name.length + 1), &to_name, (uint) (lcqptr->to_name.length + 1), &full_name, (uint) (lcqptr->full_name.length + 1), @@ -1152,11 +1123,11 @@ int spider_conn_queue_and_merge_loop_check( )) { goto error_alloc_loop_check_replace; } + /* + TODO: the new lcrptr has the same cur_name, to_name, full_name + and from_value as lcqptr, but they do not seem to be relevant. + */ lcrptr->hash_value_to = lcqptr->hash_value_to; - lcrptr->hash_value_full = lcqptr->hash_value_full; - lcrptr->from_name.str = from_name; - lcrptr->from_name.length = lcqptr->from_name.length; - memcpy(from_name, lcqptr->from_name.str, lcqptr->from_name.length + 1); lcrptr->cur_name.str = cur_name; lcrptr->cur_name.length = lcqptr->cur_name.length; memcpy(cur_name, lcqptr->cur_name.str, lcqptr->cur_name.length + 1); @@ -1169,8 +1140,14 @@ int spider_conn_queue_and_merge_loop_check( lcrptr->from_value.str = from_value; lcrptr->from_value.length = lcqptr->from_value.length; memcpy(from_value, lcqptr->from_value.str, lcqptr->from_value.length + 1); + /* + The merged_value of lcrptr is a concatenation of that of lcqptr + and constructed merged_value from lcptr. + */ lcrptr->merged_value.str = merged_value; - lcrptr->merged_value.length = lcqptr->merged_value.length; + lcrptr->merged_value.length = + lcqptr->merged_value.length + spider_unique_id.length + + lcptr->cur_name.length + 1 + lcptr->from_value.length; memcpy(merged_value, lcqptr->merged_value.str, lcqptr->merged_value.length); merged_value += lcqptr->merged_value.length; @@ -1197,9 +1174,6 @@ int spider_conn_queue_and_merge_loop_check( goto error_hash_insert_queue; } lcptr->flag = SPIDER_LOP_CHK_MERAGED; - lcptr->next = NULL; - if (!conn->loop_check_meraged_first) - conn->loop_check_meraged_first = lcptr; } DBUG_RETURN(0); @@ -1215,7 +1189,6 @@ error_hash_insert: int spider_conn_reset_queue_loop_check( SPIDER_CONN *conn ) { - int error_num; SPIDER_CONN_LOOP_CHECK *lcptr; DBUG_ENTER("spider_conn_reset_queue_loop_check"); uint l = 0; @@ -1232,30 +1205,8 @@ int spider_conn_reset_queue_loop_check( ++l; } - lcptr = conn->loop_check_ignored_first; - while (lcptr) - { - lcptr->flag = 0; - if ((error_num = spider_conn_queue_and_merge_loop_check(conn, lcptr))) - { - goto error_queue_and_merge; - } - lcptr = lcptr->next; - } - conn->loop_check_meraged_first = NULL; pthread_mutex_unlock(&conn->loop_check_mutex); DBUG_RETURN(0); - -error_queue_and_merge: - lcptr = lcptr->next; - while (lcptr) - { - lcptr->flag = 0; - lcptr = lcptr->next; - } - conn->loop_check_meraged_first = NULL; - pthread_mutex_unlock(&conn->loop_check_mutex); - DBUG_RETURN(error_num); } int spider_conn_queue_loop_check( @@ -1266,7 +1217,7 @@ int spider_conn_queue_loop_check( int error_num = HA_ERR_OUT_OF_MEM; uint conn_link_idx = spider->conn_link_idx[link_idx], buf_sz; char path[FN_REFLEN + 1]; - char *tmp_name, *from_name, *cur_name, *to_name, *full_name, *from_value, + char *tmp_name, *cur_name, *to_name, *full_name, *from_value, *merged_value; user_var_entry *loop_check; char *loop_check_buf; @@ -1277,6 +1228,17 @@ int spider_conn_queue_loop_check( LEX_CSTRING lex_str, from_str, to_str; DBUG_ENTER("spider_conn_queue_loop_check"); DBUG_PRINT("info", ("spider conn=%p", conn)); + /* + construct loop check user var name (left hand side) into + lex_str. It is of the format + + spider_lc_ + + So if the spider table name is ./test/t1, then the constructed + user var name is: + + spider_lc_./test/t1 + */ lex_str.length = top_share->path.length + SPIDER_SQL_LOP_CHK_PRM_PRF_LEN; buf_sz = lex_str.length + 2; loop_check_buf = (char *) my_alloca(buf_sz); @@ -1302,6 +1264,16 @@ int spider_conn_queue_loop_check( } else { lex_str.str = loop_check->value; lex_str.length = loop_check->length; + /* + Validate that there are at least four dashes in the user var + value: ---- + + Note: if the value is merged from multiple values, such as + + "------------" + + then only the first component is put into from_str + */ DBUG_PRINT("info", ("spider from_str=%s", lex_str.str)); if (unlikely(!(tmp_name = strchr(loop_check->value, '-')))) { @@ -1329,12 +1301,23 @@ int spider_conn_queue_loop_check( } else { + /* + Validation passed. Put the first component of rhs in from_str + */ from_str.str = lex_str.str; from_str.length = tmp_name - lex_str.str + 1; } } my_afree(loop_check_buf); + /* + construct loop_check_buf as -- e.g. + "---./test/t0--./test/t1-./test/t2", later used as + full_name + from_str is the first component in the user var value (RHS) or + empty if user var value is empty, cur is the spider table, to_str + is the remote data node table + */ to_str.length = build_table_filename(path, FN_REFLEN, share->tgt_dbs[conn_link_idx] ? share->tgt_dbs[conn_link_idx] : "", share->tgt_table_names[conn_link_idx], "", 0); @@ -1364,7 +1347,7 @@ int spider_conn_queue_loop_check( lcptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_search_using_hash_value(&conn->loop_checked, hash_value, (uchar *) loop_check_buf, buf_sz - 1); - if (unlikely( + if ( !lcptr || ( !lcptr->flag && @@ -1373,7 +1356,7 @@ int spider_conn_queue_loop_check( memcmp(lcptr->from_value.str, lex_str.str, lex_str.length) ) ) - )) + ) { if (unlikely(lcptr)) { @@ -1384,7 +1367,6 @@ int spider_conn_queue_loop_check( DBUG_PRINT("info", ("spider alloc_lcptr")); if (unlikely(!spider_bulk_malloc(spider_current_trx, 272, MYF(MY_WME), &lcptr, (uint) (sizeof(SPIDER_CONN_LOOP_CHECK)), - &from_name, (uint) (from_str.length + 1), &cur_name, (uint) (top_share->path.length + 1), &to_name, (uint) (to_str.length + 1), &full_name, (uint) (buf_sz), @@ -1397,9 +1379,6 @@ int spider_conn_queue_loop_check( goto error_alloc_loop_check; } lcptr->flag = 0; - lcptr->from_name.str = from_name; - lcptr->from_name.length = from_str.length; - memcpy(from_name, from_str.str, from_str.length + 1); lcptr->cur_name.str = cur_name; lcptr->cur_name.length = top_share->path.length; memcpy(cur_name, top_share->path.str, top_share->path.length + 1); @@ -1412,29 +1391,28 @@ int spider_conn_queue_loop_check( lcptr->from_value.str = from_value; lcptr->from_value.length = lex_str.length; memcpy(from_value, lex_str.str, lex_str.length + 1); + /* + merged_value will only be populated later, in + spider_conn_queue_and_merge_loop_check() + */ lcptr->merged_value.str = merged_value; - lcptr->hash_value_to = my_calc_hash(&conn->loop_checked, + lcptr->hash_value_to = my_calc_hash(&conn->loop_check_queue, (uchar *) to_str.str, to_str.length); - lcptr->hash_value_full = hash_value; + /* + Mark as checked. It will be added to loop_check_queue in + spider_conn_queue_and_merge_loop_check() below for checking + */ if (unlikely(my_hash_insert(&conn->loop_checked, (uchar *) lcptr))) { my_afree(loop_check_buf); goto error_hash_insert; } } else { + /* Already marked as checked, ignore and return. */ if (!lcptr->flag) { DBUG_PRINT("info", ("spider add to ignored list")); lcptr->flag |= SPIDER_LOP_CHK_IGNORED; - lcptr->next = NULL; - if (!conn->loop_check_ignored_first) - { - conn->loop_check_ignored_first = lcptr; - conn->loop_check_ignored_last = lcptr; - } else { - conn->loop_check_ignored_last->next = lcptr; - conn->loop_check_ignored_last = lcptr; - } } pthread_mutex_unlock(&conn->loop_check_mutex); my_afree(loop_check_buf); diff --git a/storage/spider/spd_conn.h b/storage/spider/spd_conn.h index 1759f06baa6..4afa85a18b1 100644 --- a/storage/spider/spd_conn.h +++ b/storage/spider/spd_conn.h @@ -24,22 +24,60 @@ #define SPIDER_SIMPLE_RECORDS 3 #define SPIDER_SIMPLE_CHECKSUM_TABLE 4 +/* + The SPIDER_CONN_LOOP_CHECK has been added to the loop_check queue to + check for self-reference. +*/ #define SPIDER_LOP_CHK_QUEUED (1 << 0) +/* + The SPIDER_CONN_LOOP_CHECK is a merge of multiple + SPIDER_CONN_LOOP_CHECKs with the same data node table +*/ #define SPIDER_LOP_CHK_MERAGED (1 << 1) +/* + The SPIDER_CONN_LOOP_CHECK has been ignored because it has already + been marked as checked +*/ #define SPIDER_LOP_CHK_IGNORED (1 << 2) +/* Used for self-reference check. */ typedef struct st_spider_conn_loop_check { + /* + Could be 0, SPIDER_LOP_CHK_QUEUED, SPIDER_LOP_CHK_MERAGED, or + SPIDER_LOP_CHK_IGNORED + */ uint flag; + /* hash value of to_name, used for the hash conn->loop_checked */ my_hash_value_type hash_value_to; - my_hash_value_type hash_value_full; - LEX_CSTRING from_name; + /* + The fully qualified name of the current spider table, which will + also be used to construct the user var name to set in the data + node + */ LEX_CSTRING cur_name; + /* + The fully qualified data node table name, also used as key in + conn->loop_check_queue + */ LEX_CSTRING to_name; + /* + A concatenation of from_value, cur_name and to_name, used as key + in hash conn->loop_checked + */ LEX_CSTRING full_name; + /* + The first component of the uservar value on the current server, + consisting of information of a table that uses the current spider + table as a data node + */ LEX_CSTRING from_value; + /* + The uservar value to set in the data node, a concatenation of info + of tables, mac addresses and process ids of tables that use the + current spider table as the data node + */ LEX_CSTRING merged_value; - st_spider_conn_loop_check *next; } SPIDER_CONN_LOOP_CHECK; uchar *spider_conn_get_key( diff --git a/storage/spider/spd_db_include.cc b/storage/spider/spd_db_include.cc index 514470a2c80..466e2eadf0c 100644 --- a/storage/spider/spd_db_include.cc +++ b/storage/spider/spd_db_include.cc @@ -64,7 +64,7 @@ spider_db_conn::spider_db_conn( DBUG_VOID_RETURN; } -int spider_db_conn::fin_loop_check() +int spider_db_conn::fin_loop_check() /* reset flags of all relevant SPIDER_CONN_LOOP_CHECKs */ { st_spider_conn_loop_check *lcptr; DBUG_ENTER("spider_db_conn::fin_loop_check"); @@ -80,20 +80,6 @@ int spider_db_conn::fin_loop_check() } my_hash_reset(&conn->loop_check_queue); } - lcptr = conn->loop_check_ignored_first; - while (lcptr) - { - lcptr->flag = 0; - lcptr = lcptr->next; - } - conn->loop_check_ignored_first = NULL; - lcptr = conn->loop_check_meraged_first; - while (lcptr) - { - lcptr->flag = 0; - lcptr = lcptr->next; - } - conn->loop_check_meraged_first = NULL; DBUG_RETURN(0); } diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h index c65e27f2e64..0d7bcf4f84b 100644 --- a/storage/spider/spd_db_include.h +++ b/storage/spider/spd_db_include.h @@ -1109,6 +1109,7 @@ public: uint dbton_id; ha_spider *spider; spider_db_share *db_share; + /* Index of active server, used in query construction. */ int first_link_idx; SPIDER_LINK_IDX_CHAIN *link_idx_chain; bool strict_group_by= false; diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index 186837e224f..0215af8018b 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -5232,7 +5232,23 @@ int spider_db_mbase_util::append_time_zone( to the value of `"$spider_unique_id$spider_table_path-"`, where $target_table_path is the path to the data node table ("to"), and $spider_table_path the path to the spider table ("from") -*/ + + + iterate over loop_check_queue and build queries for loop check + + The query is in the form of + + set @`spider_lc_.` = + '--------...' + + where from_table1, from_table2 etc. are spider tables whose direct + or indirect remote data nodes contain to_table. + + e.g. if t0->t1->t2, then the query could be: + + set @`spider_lc_./test/t2` = + '-234567890abc-def012-./test/t1--1234567890ab-cdef01-./test/t0-' + */ int spider_db_mbase_util::append_loop_check( spider_string *str, SPIDER_CONN *conn diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc index 1a15ce0246a..ba7ef98dc41 100644 --- a/storage/spider/spd_direct_sql.cc +++ b/storage/spider/spd_direct_sql.cc @@ -218,25 +218,25 @@ int spider_udf_direct_sql_create_conn_key( tables_on_different_db_are_joinable(); direct_sql->conn_key_length = 1 - + direct_sql->tgt_wrapper_length + 1 - + direct_sql->tgt_host_length + 1 - + 5 + 1 - + direct_sql->tgt_socket_length + 1 - + (tables_on_different_db_are_joinable ? - 0 : direct_sql->tgt_default_db_name_length + 1) - + direct_sql->tgt_username_length + 1 - + direct_sql->tgt_password_length + 1 - + direct_sql->tgt_ssl_ca_length + 1 - + direct_sql->tgt_ssl_capath_length + 1 - + direct_sql->tgt_ssl_cert_length + 1 - + direct_sql->tgt_ssl_cipher_length + 1 - + direct_sql->tgt_ssl_key_length + 1 - + 1 + 1 - + direct_sql->tgt_default_file_length + 1 - + direct_sql->tgt_default_group_length + 1 - + direct_sql->tgt_dsn_length + 1 - + direct_sql->tgt_filedsn_length + 1 - + direct_sql->tgt_driver_length; + + (direct_sql->tgt_wrapper ? direct_sql->tgt_wrapper_length + 2 : 0) + + (direct_sql->tgt_host ? direct_sql->tgt_host_length + 2 : 0) + + 5 + 2 + + (direct_sql->tgt_socket ? direct_sql->tgt_socket_length + 2 : 0) + + (!tables_on_different_db_are_joinable && direct_sql->tgt_default_db_name ? + direct_sql->tgt_default_db_name_length + 2 : 0) + + (direct_sql->tgt_username ? direct_sql->tgt_username_length + 2 : 0) + + (direct_sql->tgt_password ? direct_sql->tgt_password_length + 2 : 0) + + (direct_sql->tgt_ssl_ca ? direct_sql->tgt_ssl_ca_length + 2 : 0) + + (direct_sql->tgt_ssl_capath ? direct_sql->tgt_ssl_capath_length + 2 : 0) + + (direct_sql->tgt_ssl_cert ? direct_sql->tgt_ssl_cert_length + 2 : 0) + + (direct_sql->tgt_ssl_cipher ? direct_sql->tgt_ssl_cipher_length + 2 : 0) + + (direct_sql->tgt_ssl_key ? direct_sql->tgt_ssl_key_length + 2 : 0) + + 1 + 2 + + (direct_sql->tgt_default_file ? direct_sql->tgt_default_file_length + 2 : 0) + + (direct_sql->tgt_default_group ? direct_sql->tgt_default_group_length + 2 : 0) + + (direct_sql->tgt_dsn ? direct_sql->tgt_dsn_length + 2 : 0) + + (direct_sql->tgt_filedsn ? direct_sql->tgt_filedsn_length + 2 : 0) + + (direct_sql->tgt_driver ? direct_sql->tgt_driver_length + 2 : 0); if (!(direct_sql->conn_key = (char *) spider_malloc(spider_current_trx, SPD_MID_UDF_DIRECT_SQL_CREATE_CONN_KEY_1, direct_sql->conn_key_length + 1, MYF(MY_WME | MY_ZEROFILL))) @@ -246,119 +246,38 @@ int spider_udf_direct_sql_create_conn_key( *direct_sql->conn_key = '0' + 48 - direct_sql->connection_channel; else *direct_sql->conn_key = '0' + direct_sql->connection_channel; - DBUG_PRINT("info",("spider tgt_wrapper=%s", direct_sql->tgt_wrapper)); - tmp_name = strmov(direct_sql->conn_key + 1, direct_sql->tgt_wrapper); - if (direct_sql->tgt_host) - { - DBUG_PRINT("info",("spider tgt_host=%s", direct_sql->tgt_host)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_host); - } else { - DBUG_PRINT("info",("spider tgt_host=NULL")); - tmp_name++; - } + int counter= 0; + tmp_name= direct_sql->conn_key + 1; + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_wrapper); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_host); my_sprintf(port_str, (port_str, "%05ld", direct_sql->tgt_port)); - DBUG_PRINT("info",("spider port_str=%s", port_str)); - tmp_name = strmov(tmp_name + 1, port_str); - if (direct_sql->tgt_socket) - { - DBUG_PRINT("info",("spider tgt_socket=%s", direct_sql->tgt_socket)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_socket); - } - else + spider_create_conn_key_add_one(&counter, &tmp_name, port_str); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_socket); + counter++; + if (!tables_on_different_db_are_joinable && direct_sql->tgt_default_db_name) { + *tmp_name= (char) counter; + tmp_name = strmov(tmp_name + 1, direct_sql->tgt_default_db_name); tmp_name++; } - if (!tables_on_different_db_are_joinable) - { - if (direct_sql->tgt_default_db_name) - { - DBUG_PRINT("info",("spider tgt_default_db_name=%s", - direct_sql->tgt_default_db_name)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_default_db_name); - } else - tmp_name++; - } - if (direct_sql->tgt_username) - { - DBUG_PRINT("info",("spider tgt_username=%s", direct_sql->tgt_username)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_username); - } else - tmp_name++; - if (direct_sql->tgt_password) - { - DBUG_PRINT("info",("spider tgt_password=%s", direct_sql->tgt_password)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_password); - } else - tmp_name++; - if (direct_sql->tgt_ssl_ca) - { - DBUG_PRINT("info",("spider tgt_ssl_ca=%s", direct_sql->tgt_ssl_ca)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_ca); - } else - tmp_name++; - if (direct_sql->tgt_ssl_capath) - { - DBUG_PRINT("info",("spider tgt_ssl_capath=%s", - direct_sql->tgt_ssl_capath)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_capath); - } else - tmp_name++; - if (direct_sql->tgt_ssl_cert) - { - DBUG_PRINT("info",("spider tgt_ssl_cert=%s", direct_sql->tgt_ssl_cert)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_cert); - } else - tmp_name++; - if (direct_sql->tgt_ssl_cipher) - { - DBUG_PRINT("info",("spider tgt_ssl_cipher=%s", - direct_sql->tgt_ssl_cipher)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_cipher); - } else - tmp_name++; - if (direct_sql->tgt_ssl_key) - { - DBUG_PRINT("info",("spider tgt_ssl_key=%s", direct_sql->tgt_ssl_key)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_key); - } else - tmp_name++; - tmp_name++; - *tmp_name = '0' + ((char) direct_sql->tgt_ssl_vsc); - if (direct_sql->tgt_default_file) - { - DBUG_PRINT("info",("spider tgt_default_file=%s", - direct_sql->tgt_default_file)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_default_file); - } else - tmp_name++; - if (direct_sql->tgt_default_group) - { - DBUG_PRINT("info",("spider tgt_default_group=%s", - direct_sql->tgt_default_group)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_default_group); - } else - tmp_name++; - if (direct_sql->tgt_dsn) - { - DBUG_PRINT("info",("spider tgt_dsn=%s", - direct_sql->tgt_dsn)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_dsn); - } else - tmp_name++; - if (direct_sql->tgt_filedsn) - { - DBUG_PRINT("info",("spider tgt_filedsn=%s", - direct_sql->tgt_filedsn)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_filedsn); - } else - tmp_name++; - if (direct_sql->tgt_driver) - { - DBUG_PRINT("info",("spider tgt_driver=%s", - direct_sql->tgt_driver)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_driver); - } else - tmp_name++; + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_username); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_password); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_ca); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_capath); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_cert); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_cipher); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_key); + counter++; + *tmp_name= (char) counter; + tmp_name++; + *tmp_name = '0' + ((char) direct_sql->tgt_ssl_vsc); + tmp_name++; + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_default_file); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_default_group); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_dsn); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_filedsn); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_driver); + tmp_name++; direct_sql->conn_key_hash_value = my_calc_hash(&spider_open_connections, (uchar*) direct_sql->conn_key, direct_sql->conn_key_length); DBUG_RETURN(0); @@ -372,7 +291,7 @@ static inline void spider_maybe_memcpy_string( uint src_len) { *dest_len= src_len; - if (src_len) + if (src) { *dest= tmp; memcpy(*dest, src, src_len); @@ -442,13 +361,12 @@ SPIDER_CONN *spider_udf_direct_sql_create_conn( conn->conn_key_length = direct_sql->conn_key_length; conn->conn_key = tmp_name; memcpy(conn->conn_key, direct_sql->conn_key, direct_sql->conn_key_length); - conn->tgt_wrapper_length = direct_sql->tgt_wrapper_length; - conn->tgt_wrapper = tmp_wrapper; - memcpy(conn->tgt_wrapper, direct_sql->tgt_wrapper, - direct_sql->tgt_wrapper_length); - conn->tgt_host_length = direct_sql->tgt_host_length; - conn->tgt_host = tmp_host; - memcpy(conn->tgt_host, direct_sql->tgt_host, direct_sql->tgt_host_length); + spider_maybe_memcpy_string( + &conn->tgt_wrapper, direct_sql->tgt_wrapper, tmp_wrapper, + &conn->tgt_wrapper_length, direct_sql->tgt_wrapper_length); + spider_maybe_memcpy_string( + &conn->tgt_host, direct_sql->tgt_host, tmp_host, + &conn->tgt_host_length, direct_sql->tgt_host_length); conn->tgt_port = direct_sql->tgt_port; spider_maybe_memcpy_string( &conn->tgt_socket, direct_sql->tgt_socket, tmp_socket, diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h index d829bb4ebfc..d8fde166cc3 100644 --- a/storage/spider/spd_include.h +++ b/storage/spider/spd_include.h @@ -779,19 +779,24 @@ typedef struct st_spider_conn SPIDER_IP_PORT_CONN *ip_port_conn; pthread_mutex_t loop_check_mutex; + /* + A hash of SPIDER_CONN_LOOP_CHECK, indexed by + SPIDER_CONN_LOOP_CHECK::full_name + */ HASH loop_checked; uint loop_checked_id; const char *loop_checked_func_name; const char *loop_checked_file_name; ulong loop_checked_line_no; + /* + A hash of SPIDER_CONN_LOOP_CHECK, indexed by + SPIDER_CONN_LOOP_CHECK::to_name + */ HASH loop_check_queue; uint loop_check_queue_id; const char *loop_check_queue_func_name; const char *loop_check_queue_file_name; ulong loop_check_queue_line_no; - SPIDER_CONN_LOOP_CHECK *loop_check_ignored_first; - SPIDER_CONN_LOOP_CHECK *loop_check_ignored_last; - SPIDER_CONN_LOOP_CHECK *loop_check_meraged_first; } SPIDER_CONN; typedef struct st_spider_lgtm_tblhnd_share @@ -997,6 +1002,10 @@ typedef struct st_spider_share /* Number of all links, i.e. all remote servers for the spider table. */ uint all_link_count; + /* + The bitmap size of ha_spider::conn_can_fo, where the ha_spider + is the one `this' associates with (i.e. spider->share == this) + */ uint link_bitmap_size; pthread_mutex_t mutex; pthread_mutex_t sts_mutex; @@ -1535,16 +1544,42 @@ public: ulong sort; }; +/* + A SPIDER_TRX_HA contains the HA information of a spider table or + partition. + + Each SPIDER_TRX_HA is stored in a hash belonging to a SPIDER_TRX + i.e. its trx_ha_hash field. + + It thus may have a different lifespan from the ha_spider or + SPIDER_SHARE associated with the same spider table/partition. +*/ typedef struct st_spider_trx_ha { + /* + A fully qualified table name, used as the key in + SPIDER_TRX::trx_ha_hash + */ char *table_name; uint table_name_length; - SPIDER_TRX *trx; + /* + The associated SPIDER_SHARE. Will be used to check against a + given SPIDER_SHARE + */ SPIDER_SHARE *share; + /* + link_count and link_bitmap_size are read from and checked against + the corresponding fields of the associated SPIDER_SHARE. + */ uint link_count; uint link_bitmap_size; + /* + conn_link_idx and conn_can_fo are read from and written to the + corresponding fields of the associated ha_spider. + */ uint *conn_link_idx; uchar *conn_can_fo; + /* TODO: document */ bool wait_for_reusing; } SPIDER_TRX_HA; diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 0593c8f5b0b..371cf770d2b 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -1014,12 +1014,7 @@ int spider_create_string_list( tmp_ptr = str; while (*tmp_ptr == ' ') tmp_ptr++; - if (*tmp_ptr) - *list_length = 1; - else { - *string_list = NULL; - DBUG_RETURN(0); - } + *list_length= 1; bool last_esc_flg = FALSE; while (TRUE) @@ -3963,6 +3958,44 @@ void spider_print_keys( } #endif +void spider_create_conn_key_add_one(int* counter, char** target, char* src) +{ + (*counter)++; + if (src) + { + **target= (char) *counter; + *target= strmov(*target + 1, src); + (*target)++; + } +} + +/* + The conn keys are strings of the following format: + + 0 \ \0 \ \0 ... \ \0 + + Where idx1, idx2, etc. are the index of first, second, etc. options + where the value is specified. We have the wrapper as the first + option, host as the second, port as the third, socket as the fourth, + and so on (see below for the order of all options). So here would be + a conn key where only the host and the port are specified and + nothing else: + + 0\002localhost\000\00303306\000 + + And it has length 1 + 1 + 9 + 1 + 1 + 5 + 1 = 19. + + In case of HA, say we have another link with the same options + specified except that the port is 3307, then we place an extra NUL + before placing the next conn_key: + + 0\002localhost\000\00303306\000\0000\002localhost\000\00303307\000 + ^ ^ + conn_keys[0] conn_keys[1] + + Thus the total number of chars (share->conn_keys_charlen) needed is + (19 + 1) * 2 = 40 +*/ int spider_create_conn_keys( SPIDER_SHARE *share ) { @@ -4034,26 +4067,26 @@ int spider_create_conn_keys( } conn_keys_lengths[all_link_idx] = 1 - + share->tgt_wrappers_lengths[all_link_idx] + 1 - + share->tgt_hosts_lengths[all_link_idx] + 1 - + 5 + 1 - + share->tgt_sockets_lengths[all_link_idx] + 1 - + (tables_on_different_db_are_joinable ? - 0 : share->tgt_dbs_lengths[all_link_idx] + 1) - + share->tgt_usernames_lengths[all_link_idx] + 1 - + share->tgt_passwords_lengths[all_link_idx] + 1 - + share->tgt_ssl_cas_lengths[all_link_idx] + 1 - + share->tgt_ssl_capaths_lengths[all_link_idx] + 1 - + share->tgt_ssl_certs_lengths[all_link_idx] + 1 - + share->tgt_ssl_ciphers_lengths[all_link_idx] + 1 - + share->tgt_ssl_keys_lengths[all_link_idx] + 1 - + 1 + 1 - + share->tgt_default_files_lengths[all_link_idx] + 1 - + share->tgt_default_groups_lengths[all_link_idx] + 1 - + share->tgt_dsns_lengths[all_link_idx] + 1 - + share->tgt_filedsns_lengths[all_link_idx] + 1 - + share->tgt_drivers_lengths[all_link_idx]; - share->conn_keys_charlen += conn_keys_lengths[all_link_idx] + 2; + + (share->tgt_wrappers[all_link_idx] ? share->tgt_wrappers_lengths[all_link_idx] + 2 : 0) + + (share->tgt_hosts[all_link_idx] ? share->tgt_hosts_lengths[all_link_idx] + 2 : 0) + + 5 + 2 + + (share->tgt_sockets[all_link_idx] ? share->tgt_sockets_lengths[all_link_idx] + 2 : 0) + + (!tables_on_different_db_are_joinable && share->tgt_dbs[all_link_idx] ? + share->tgt_dbs_lengths[all_link_idx] + 2 : 0) + + (share->tgt_usernames[all_link_idx] ? share->tgt_usernames_lengths[all_link_idx] + 2 : 0) + + (share->tgt_passwords[all_link_idx] ? share->tgt_passwords_lengths[all_link_idx] + 2 : 0) + + (share->tgt_ssl_cas[all_link_idx] ? share->tgt_ssl_cas_lengths[all_link_idx] + 2 : 0) + + (share->tgt_ssl_capaths[all_link_idx] ? share->tgt_ssl_capaths_lengths[all_link_idx] + 2 : 0) + + (share->tgt_ssl_certs[all_link_idx] ? share->tgt_ssl_certs_lengths[all_link_idx] + 2 : 0) + + (share->tgt_ssl_ciphers[all_link_idx] ? share->tgt_ssl_ciphers_lengths[all_link_idx] + 2 : 0) + + (share->tgt_ssl_keys[all_link_idx] ? share->tgt_ssl_keys_lengths[all_link_idx] + 2 : 0) + + 1 + 2 + + (share->tgt_default_files[all_link_idx] ? share->tgt_default_files_lengths[all_link_idx] + 2 : 0) + + (share->tgt_default_groups[all_link_idx] ? share->tgt_default_groups_lengths[all_link_idx] + 2 : 0) + + (share->tgt_dsns[all_link_idx] ? share->tgt_dsns_lengths[all_link_idx] + 2 : 0) + + (share->tgt_filedsns[all_link_idx] ? share->tgt_filedsns_lengths[all_link_idx] + 2 : 0) + + (share->tgt_drivers[all_link_idx] ? share->tgt_drivers_lengths[all_link_idx] + 2 : 0); + share->conn_keys_charlen += conn_keys_lengths[all_link_idx] + 1; } if (!(share->conn_keys = (char **) spider_bulk_malloc(spider_current_trx, SPD_MID_CREATE_CONN_KEYS_1, @@ -4090,123 +4123,37 @@ int spider_create_conn_keys( share->conn_keys[roop_count] = tmp_name; *tmp_name = '0'; - DBUG_PRINT("info",("spider tgt_wrappers[%d]=%s", roop_count, - share->tgt_wrappers[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_wrappers[roop_count]); - if (share->tgt_hosts[roop_count]) - { - DBUG_PRINT("info",("spider tgt_hosts[%d]=%s", roop_count, - share->tgt_hosts[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_hosts[roop_count]); - } else { - tmp_name++; - } + tmp_name++; + int counter= 0; + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_wrappers[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_hosts[roop_count]); my_sprintf(port_str, (port_str, "%05ld", share->tgt_ports[roop_count])); - DBUG_PRINT("info",("spider port_str=%s", port_str)); - tmp_name = strmov(tmp_name + 1, port_str); - if (share->tgt_sockets[roop_count]) + spider_create_conn_key_add_one(&counter, &tmp_name, port_str); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_sockets[roop_count]); + counter++; + if (!tables_on_different_db_are_joinable && share->tgt_dbs[roop_count]) { - DBUG_PRINT("info",("spider tgt_sockets[%d]=%s", roop_count, - share->tgt_sockets[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_sockets[roop_count]); - } else + *tmp_name= (char) counter; + tmp_name = strmov(tmp_name + 1, share->tgt_dbs[roop_count]); tmp_name++; - if (!tables_on_different_db_are_joinable) - { - if (share->tgt_dbs[roop_count]) - { - DBUG_PRINT("info",("spider tgt_dbs[%d]=%s", roop_count, - share->tgt_dbs[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_dbs[roop_count]); - } else - tmp_name++; } - if (share->tgt_usernames[roop_count]) - { - DBUG_PRINT("info",("spider tgt_usernames[%d]=%s", roop_count, - share->tgt_usernames[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_usernames[roop_count]); - } else - tmp_name++; - if (share->tgt_passwords[roop_count]) - { - DBUG_PRINT("info",("spider tgt_passwords[%d]=%s", roop_count, - share->tgt_passwords[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_passwords[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_cas[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_cas[%d]=%s", roop_count, - share->tgt_ssl_cas[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_cas[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_capaths[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_capaths[%d]=%s", roop_count, - share->tgt_ssl_capaths[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_capaths[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_certs[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_certs[%d]=%s", roop_count, - share->tgt_ssl_certs[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_certs[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_ciphers[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_ciphers[%d]=%s", roop_count, - share->tgt_ssl_ciphers[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_ciphers[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_keys[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_keys[%d]=%s", roop_count, - share->tgt_ssl_keys[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_keys[roop_count]); - } else - tmp_name++; + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_usernames[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_passwords[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_cas[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_capaths[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_certs[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_ciphers[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_keys[roop_count]); + counter++; + *tmp_name= (char) counter; tmp_name++; *tmp_name = '0' + ((char) share->tgt_ssl_vscs[roop_count]); - if (share->tgt_default_files[roop_count]) - { - DBUG_PRINT("info",("spider tgt_default_files[%d]=%s", roop_count, - share->tgt_default_files[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_default_files[roop_count]); - } else - tmp_name++; - if (share->tgt_default_groups[roop_count]) - { - DBUG_PRINT("info",("spider tgt_default_groups[%d]=%s", roop_count, - share->tgt_default_groups[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_default_groups[roop_count]); - } else - tmp_name++; - if (share->tgt_dsns[roop_count]) - { - DBUG_PRINT("info",("spider tgt_dsns[%d]=%s", roop_count, - share->tgt_dsns[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_dsns[roop_count]); - } else - tmp_name++; - if (share->tgt_filedsns[roop_count]) - { - DBUG_PRINT("info",("spider tgt_filedsns[%d]=%s", roop_count, - share->tgt_filedsns[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_filedsns[roop_count]); - } else - tmp_name++; - if (share->tgt_drivers[roop_count]) - { - DBUG_PRINT("info",("spider tgt_drivers[%d]=%s", roop_count, - share->tgt_drivers[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_drivers[roop_count]); - } else - tmp_name++; + tmp_name++; + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_default_files[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_default_groups[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_dsns[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_filedsns[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_drivers[roop_count]); tmp_name++; tmp_name++; share->conn_keys_hash_value[roop_count] = my_calc_hash( diff --git a/storage/spider/spd_table.h b/storage/spider/spd_table.h index a0a9df1837d..10e89683976 100644 --- a/storage/spider/spd_table.h +++ b/storage/spider/spd_table.h @@ -165,6 +165,8 @@ void spider_print_keys( ); #endif +void spider_create_conn_key_add_one(int* counter, char** target, char* src); + int spider_create_conn_keys( SPIDER_SHARE *share ); diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc index 124e47364e6..37d955c71b6 100644 --- a/storage/spider/spd_trx.cc +++ b/storage/spider/spd_trx.cc @@ -1124,6 +1124,7 @@ int spider_free_trx_alloc( DBUG_RETURN(0); } +/* Get or create a trx associated with the given THD. */ SPIDER_TRX *spider_get_trx( THD *thd, bool regist_allocated_thds, @@ -3656,6 +3657,13 @@ void spider_free_tmp_thd( DBUG_VOID_RETURN; } +/* + Check the info of a given SPIDER_TRX_HA with spider->share. If it + does not match or if the given SPIDER_TRX_HA is NULL, then create a + new one from spider and spider->share, and add the new SPIDER_TRX_HA + to trx->trx_ha_hash. On mismatch and non-NULL trx_ha, then it will + be removed from the hash and freed before the creation of a new one. +*/ int spider_create_trx_ha( SPIDER_TRX *trx, ha_spider *spider, @@ -3701,7 +3709,6 @@ int spider_create_trx_ha( memcpy(trx_ha->table_name, share->table_name, share->table_name_length); trx_ha->table_name[share->table_name_length] = '\0'; trx_ha->table_name_length = share->table_name_length; - trx_ha->trx = trx; trx_ha->share = share; trx_ha->link_count = share->link_count; trx_ha->link_bitmap_size = share->link_bitmap_size; @@ -3736,15 +3743,29 @@ SPIDER_TRX_HA *spider_check_trx_ha( SPIDER_TRX_HA *trx_ha; SPIDER_SHARE *share = spider->share; DBUG_ENTER("spider_check_trx_ha"); + /* + Check for mismatch in trx_ha->share, link_count and + link_bitmap_size, which is an indication of a share that has been + freed. Delete the trx_ha and return NULL on mismatch. + */ if ((trx_ha = (SPIDER_TRX_HA *) my_hash_search_using_hash_value( &trx->trx_ha_hash, share->table_name_hash_value, (uchar*) share->table_name, share->table_name_length))) { - memcpy(spider->conn_link_idx, trx_ha->conn_link_idx, - sizeof(uint) * share->link_count); - memcpy(spider->conn_can_fo, trx_ha->conn_can_fo, - sizeof(uint) * share->link_bitmap_size); - DBUG_RETURN(trx_ha); + if (trx_ha->share == share && trx_ha->link_count == share->link_count && + trx_ha->link_bitmap_size == share->link_bitmap_size) + { + memcpy(spider->conn_link_idx, trx_ha->conn_link_idx, + sizeof(uint) * share->link_count); + memcpy(spider->conn_can_fo, trx_ha->conn_can_fo, + sizeof(uint) * share->link_bitmap_size); + DBUG_RETURN(trx_ha); + } + else + { + my_hash_delete(&trx->trx_ha_hash, (uchar*) trx_ha); + spider_free(trx, trx_ha, MYF(0)); + } } DBUG_RETURN(NULL); } diff --git a/strings/dtoa.c b/strings/dtoa.c index 9bdeeacf574..21eb95479da 100644 --- a/strings/dtoa.c +++ b/strings/dtoa.c @@ -1465,22 +1465,22 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s s00= s; esign= 0; if (++s < end) - switch (c= *s) { + switch (*s) { case '-': esign= 1; /* fall through */ - case '+': c= *++s; + case '+': s++; } - if (s < end && c >= '0' && c <= '9') + if (s < end && *s >= '0' && *s <= '9') { - while (s < end && c == '0') - c= *++s; - if (s < end && c > '0' && c <= '9') { - L= c - '0'; + while (s < end && *s == '0') + s++; + if (s < end && *s > '0' && *s <= '9') { + L= *s - '0'; s1= s; - while (++s < end && (c= *s) >= '0' && c <= '9') + while (++s < end && *s >= '0' && *s <= '9') { if (L < 19999) - L= 10*L + c - '0'; + L= 10*L + *s - '0'; } if (s - s1 > 8 || L > 19999) /* Avoid confusion from exponents diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh index 028e90fcea9..afaba2cecad 100644 --- a/support-files/rpm/server-postin.sh +++ b/support-files/rpm/server-postin.sh @@ -71,7 +71,7 @@ if [ -x /usr/sbin/semodule ] ; then /usr/sbin/semodule -i /usr/share/mariadb/policy/selinux/mariadb.pp fi -if [ -x /sbin/restorecon ] ; then +if [ -x /sbin/restorecon -a -d /var/lib/mysql ] ; then /sbin/restorecon -R /var/lib/mysql fi