diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-05 20:30:57 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-05 20:30:57 +0300 |
commit | 65d0c57c1a2036c8a8c065d3e3bd4f85d0cc5d57 (patch) | |
tree | 9165f331634b0725bcf628390fcfd8a3381f7147 /mysql-test | |
parent | df97eb1432f91ad13e562111bda393b3650719d0 (diff) | |
parent | c0eda62aec1de8b74ca51791df5ad142dee2ef08 (diff) | |
download | mariadb-git-65d0c57c1a2036c8a8c065d3e3bd4f85d0cc5d57.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test')
25 files changed, 430 insertions, 20 deletions
diff --git a/mysql-test/include/ipv6.inc b/mysql-test/include/ipv6.inc index 3d8fdcfbc3c..05c65d7817a 100644 --- a/mysql-test/include/ipv6.inc +++ b/mysql-test/include/ipv6.inc @@ -22,4 +22,3 @@ eval SET PASSWORD FOR testuser1@'$IPv6' = PASSWORD ('9876'); --replace_result ::1 localhost SELECT USER(); eval DROP USER testuser1@'$IPv6'; - diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc index 9ed206b2c22..5b603fbfdb3 100644 --- a/mysql-test/include/master-slave.inc +++ b/mysql-test/include/master-slave.inc @@ -1,3 +1,5 @@ +--source include/no_valgrind_without_big.inc + # ==== Purpose ==== # # Configure two servers to be replication master and slave. diff --git a/mysql-test/main/log_slow.test b/mysql-test/main/log_slow.test index 64fd8202985..b51777d859e 100644 --- a/mysql-test/main/log_slow.test +++ b/mysql-test/main/log_slow.test @@ -1,3 +1,5 @@ +--source include/no_valgrind_without_big.inc + # # Testing of slow log query options # diff --git a/mysql-test/main/plugin_auth.test b/mysql-test/main/plugin_auth.test index 30e4fa6e0ad..6912462066c 100644 --- a/mysql-test/main/plugin_auth.test +++ b/mysql-test/main/plugin_auth.test @@ -2,6 +2,7 @@ --source include/not_embedded.inc --source include/mysql_upgrade_preparation.inc --source include/have_innodb.inc +--source include/no_valgrind_without_big.inc SET GLOBAL SQL_MODE=""; SET LOCAL SQL_MODE=""; diff --git a/mysql-test/std_data/wsrep_notify.sh b/mysql-test/std_data/wsrep_notify.sh index 48edad4306f..5050ff9bc3e 100755 --- a/mysql-test/std_data/wsrep_notify.sh +++ b/mysql-test/std_data/wsrep_notify.sh @@ -4,11 +4,31 @@ # It will create 'wsrep' schema and two tables in it: 'membeship' and 'status' # and fill them on every membership or node status change. # -# Edit parameters below to specify the address and login to server. - +# Edit parameters below to specify the address and login to server: +# USER=root +PSWD= +# +# If these parameters are not set, then the values +# passed by the server are taken: +# HOST=127.0.0.1 PORT=$NODE_MYPORT_1 +# +# Edit parameters below to specify SSL parameters: +# +ssl_key= +ssl_cert= +ssl_ca= +ssl_capath= +ssl_cipher= +ssl_crl= +ssl_crlpath= +ssl_verify_server_cert=0 +# +# Client executable path: +# +CLIENT="$EXE_MYSQL" SCHEMA="mtr_wsrep_notify" MEMB_TABLE="$SCHEMA.membership" @@ -19,7 +39,7 @@ SET wsrep_on=0; CREATE SCHEMA IF NOT EXISTS $SCHEMA; CREATE TABLE IF NOT EXISTS $MEMB_TABLE ( idx INT, - uuid CHAR(40), /* node UUID */ + uuid CHAR(40), /* node UUID */ name VARCHAR(32), /* node name */ addr VARCHAR(256) /* node address */ ) ENGINE=MEMORY; @@ -40,7 +60,7 @@ configuration_change() local idx=0 - for NODE in $(echo $MEMBERS | sed s/,/\ /g) + for NODE in $(echo "$MEMBERS" | sed s/,/\ /g) do echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, " # Don't forget to properly quote string values @@ -59,17 +79,44 @@ status_update() echo "$BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;" } +trim_string() +{ + if [ -n "${BASH_VERSION:-}" ]; then + local pattern="[![:space:]${2:-}]" + local x="${1#*$pattern}" + local z=${#1} + x=${#x} + if [ $x -ne $z ]; then + local y="${1%$pattern*}" + y=${#y} + x=$(( z-x-1 )) + y=$(( y-x+1 )) + printf '%s' "${1:$x:$y}" + else + printf '' + fi + else + local pattern="[[:space:]${2:-}]" + echo "$1" | sed -E "s/^$pattern+|$pattern+\$//g" + fi +} + COM=status_update # not a configuration change by default -while [ $# -gt 0 ] -do +STATUS="" +CLUSTER_UUID="" +PRIMARY="0" +INDEX="" +MEMBERS="" + +while [ $# -gt 0 ]; do case $1 in --status) - STATUS=$2 + STATUS=$(trim_string "$2") shift ;; --uuid) - CLUSTER_UUID=$2 + CLUSTER_UUID=$(trim_string "$2") shift ;; --primary) @@ -78,22 +125,75 @@ do shift ;; --index) - INDEX=$2 + INDEX=$(trim_string "$2") shift ;; --members) - MEMBERS=$2 + MEMBERS=$(trim_string "$2") shift ;; esac shift done +USER=$(trim_string "$USER") +PSWD=$(trim_string "$PSWD") + +HOST=$(trim_string "$HOST") +PORT=$(trim_string "$PORT") + +case "$HOST" in +\[*) + HOST="${HOST##\[}" + HOST=$(trim_string "${HOST%%\]}") + ;; +esac + +if [ -z "$HOST" ]; then + HOST="${NOTIFY_HOST:-}" +fi +if [ -z "$PORT" ]; then + PORT="${NOTIFY_PORT:-}" +fi + +ssl_key=$(trim_string "$ssl_key"); +ssl_cert=$(trim_string "$ssl_cert"); +ssl_ca=$(trim_string "$ssl_ca"); +ssl_capath=$(trim_string "$ssl_capath"); +ssl_cipher=$(trim_string "$ssl_cipher"); +ssl_crl=$(trim_string "$ssl_crl"); +ssl_crlpath=$(trim_string "$ssl_crlpath"); +ssl_verify_server_cert=$(trim_string "$ssl_verify_server_cert"); + +SSL_PARAM="" + +if [ -n "$ssl_key" -o -n "$ssl_cert" -o \ + -n "$ssl_ca" -o -n "$ssl_capath" -o \ + -n "$ssl_cipher" ] +then + SSL_PARAM=' --ssl' + [ -n "$ssl_key" ] && SSL_PARAM="$SSL_PARAM --ssl-key='$ssl_key'" + [ -n "$ssl_cert" ] && SSL_PARAM="$SSL_PARAM --ssl-cert='$ssl_cert'" + [ -n "$ssl_ca" ] && SSL_PARAM="$SSL_PARAM --ssl-ca='$ssl_ca'" + [ -n "$ssl_capath" ] && SSL_PARAM="$SSL_PARAM --ssl-capath='$ssl_capath'" + [ -n "$ssl_cipher" ] && SSL_PARAM="$SSL_PARAM --ssl-cipher='$ssl_cipher'" + [ -n "$ssl_crl" ] && SSL_PARAM="$SSL_PARAM --ssl-crl='$ssl_crl'" + [ -n "$ssl_crlpath" ] && SSL_PARAM="$SSL_PARAM --ssl-crlpath='$ssl_crlpath'" + if [ -n "$ssl_verify_server_cert" ]; then + if [ $ssl_verify_server_cert -ne 0 ]; then + SSL_PARAM+=' --ssl-verify-server-cert' + fi + fi +fi + case $STATUS in "joined" | "donor" | "synced") - $COM | mysql -B -u$USER -h$HOST -P$PORT + "$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\ + "-h'$HOST'" "-P$PORT"$SSL_PARAM ;; - *) - exit 0 + *) + # The node might be shutting down ;; esac + +exit 0 diff --git a/mysql-test/std_data/wsrep_notify_ssl.sh b/mysql-test/std_data/wsrep_notify_ssl.sh new file mode 100755 index 00000000000..0e416a2f448 --- /dev/null +++ b/mysql-test/std_data/wsrep_notify_ssl.sh @@ -0,0 +1,195 @@ +#!/bin/sh -eu + +# This is a simple example of wsrep notification script (wsrep_notify_cmd). +# It will create 'wsrep' schema and two tables in it: 'membeship' and 'status' +# and fill them on every membership or node status change. +# +# Edit parameters below to specify the address and login to server: +# +USER=root +PSWD= +# +# If these parameters are not set, then the values +# passed by the server are taken: +# +HOST=127.0.0.1 +PORT=$NODE_MYPORT_1 +# +# Edit parameters below to specify SSL parameters: +# +ssl_cert="$MYSQL_TEST_DIR/std_data/client-cert.pem" +ssl_key="$MYSQL_TEST_DIR/std_data/client-key.pem" +ssl_ca="$MYSQL_TEST_DIR/std_data/cacert.pem" +ssl_capath= +ssl_cipher= +ssl_crl= +ssl_crlpath= +ssl_verify_server_cert=0 +# +# Client executable path: +# +CLIENT="$EXE_MYSQL" + +SCHEMA="mtr_wsrep_notify" +MEMB_TABLE="$SCHEMA.membership" +STATUS_TABLE="$SCHEMA.status" + +BEGIN=" +SET wsrep_on=0; +CREATE SCHEMA IF NOT EXISTS $SCHEMA; +CREATE TABLE IF NOT EXISTS $MEMB_TABLE ( + idx INT, + uuid CHAR(40), /* node UUID */ + name VARCHAR(32), /* node name */ + addr VARCHAR(256) /* node address */ +) ENGINE=MEMORY; +CREATE TABLE IF NOT EXISTS $STATUS_TABLE ( + size INT, /* component size */ + idx INT, /* this node index */ + status CHAR(16), /* this node status */ + uuid CHAR(40), /* cluster UUID */ + prim BOOLEAN /* if component is primary */ +) ENGINE=MEMORY; +BEGIN; +" +END="COMMIT;" + +configuration_change() +{ + echo "$BEGIN;" + + local idx=0 + + for NODE in $(echo "$MEMBERS" | sed s/,/\ /g) + do + echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, " + # Don't forget to properly quote string values + echo "'$NODE'" | sed s/\\//\',\'/g + echo ");" + idx=$(( $idx + 1 )) + done + + echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);" + + echo "$END" +} + +status_update() +{ + echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;" +} + +trim_string() +{ + if [ -n "${BASH_VERSION:-}" ]; then + local pattern="[![:space:]${2:-}]" + local x="${1#*$pattern}" + local z=${#1} + x=${#x} + if [ $x -ne $z ]; then + local y="${1%$pattern*}" + y=${#y} + x=$(( z-x-1 )) + y=$(( y-x+1 )) + printf '%s' "${1:$x:$y}" + else + printf '' + fi + else + local pattern="[[:space:]${2:-}]" + echo "$1" | sed -E "s/^$pattern+|$pattern+\$//g" + fi +} + +COM=status_update # not a configuration change by default + +STATUS="" +CLUSTER_UUID="" +PRIMARY="0" +INDEX="" +MEMBERS="" + +while [ $# -gt 0 ]; do + case $1 in + --status) + STATUS=$(trim_string "$2") + shift + ;; + --uuid) + CLUSTER_UUID=$(trim_string "$2") + shift + ;; + --primary) + [ "$2" = "yes" ] && PRIMARY="1" || PRIMARY="0" + COM=configuration_change + shift + ;; + --index) + INDEX=$(trim_string "$2") + shift + ;; + --members) + MEMBERS=$(trim_string "$2") + shift + ;; + esac + shift +done + +USER=$(trim_string "$USER") +PSWD=$(trim_string "$PSWD") + +HOST=$(trim_string "$HOST") +PORT=$(trim_string "$PORT") + +case "$HOST" in +\[*) + HOST="${HOST##\[}" + HOST=$(trim_string "${HOST%%\]}") + ;; +esac + +if [ -z "$HOST" ]; then + HOST="${NOTIFY_HOST:-}" +fi +if [ -z "$PORT" ]; then + PORT="${NOTIFY_PORT:-}" +fi + +ssl_key=$(trim_string "$ssl_key"); +ssl_cert=$(trim_string "$ssl_cert"); +ssl_ca=$(trim_string "$ssl_ca"); +ssl_capath=$(trim_string "$ssl_capath"); +ssl_cipher=$(trim_string "$ssl_cipher"); +ssl_crl=$(trim_string "$ssl_crl"); +ssl_crlpath=$(trim_string "$ssl_crlpath"); +ssl_verify_server_cert=$(trim_string "$ssl_verify_server_cert"); + +SSL_PARAM="" + +if [ -n "$ssl_key" -o -n "$ssl_cert" -o \ + -n "$ssl_ca" -o -n "$ssl_capath" -o \ + -n "$ssl_cipher" ] +then + SSL_PARAM=' --ssl' + [ -n "$ssl_key" ] && SSL_PARAM="$SSL_PARAM --ssl-key='$ssl_key'" + [ -n "$ssl_cert" ] && SSL_PARAM="$SSL_PARAM --ssl-cert='$ssl_cert'" + [ -n "$ssl_ca" ] && SSL_PARAM="$SSL_PARAM --ssl-ca='$ssl_ca'" + [ -n "$ssl_capath" ] && SSL_PARAM="$SSL_PARAM --ssl-capath='$ssl_capath'" + [ -n "$ssl_cipher" ] && SSL_PARAM="$SSL_PARAM --ssl-cipher='$ssl_cipher'" + [ -n "$ssl_crl" ] && SSL_PARAM="$SSL_PARAM --ssl-crl='$ssl_crl'" + [ -n "$ssl_crlpath" ] && SSL_PARAM="$SSL_PARAM --ssl-crlpath='$ssl_crlpath'" + if [ -n "$ssl_verify_server_cert" ]; then + if [ $ssl_verify_server_cert -ne 0 ]; then + SSL_PARAM+=' --ssl-verify-server-cert' + fi + fi +fi + +# Undefined means node is shutting down +if [ "$STATUS" != 'Undefined' ]; then + "$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\ + "-h'$HOST'" "-P$PORT"$SSL_PARAM +fi + +exit 0 diff --git a/mysql-test/suite/galera/r/galera_var_notify_ssl_ipv6.result b/mysql-test/suite/galera/r/galera_var_notify_ssl_ipv6.result new file mode 100644 index 00000000000..823407fbba7 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_var_notify_ssl_ipv6.result @@ -0,0 +1,11 @@ +connection node_1; +SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership; +EXPECT_2 +2 +SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status; +EXPECT_2 +2 +SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status; +EXPECT_2 +2 +DROP SCHEMA mtr_wsrep_notify; diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt new file mode 100644 index 00000000000..99c5889916b --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt @@ -0,0 +1 @@ +--wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify_ssl.sh --wsrep-sync-wait=0 diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf new file mode 100644 index 00000000000..ce121d20e03 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf @@ -0,0 +1,20 @@ +!include ../galera_2nodes.cnf + +[mysqld] +ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem +ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem +ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem +bind-address=:: + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port;gcache.size=1;pc.ignore_sb=true' +wsrep_node_incoming_address='[::1]:@mysqld.1.port' +wsrep_node_address=::1 +wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port' + +[mysqld.2] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port;gcache.size=1;pc.ignore_sb=true' +wsrep_node_address=::1 +wsrep_node_incoming_address='[::1]:@mysqld.2.port' +wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port' diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test new file mode 100644 index 00000000000..2c2b106c2ae --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test @@ -0,0 +1,20 @@ +# +# Test wsrep_notify_cmd. We use a version of the support-files/wsrep_notify.sh script that writes +# notifications into a table. +# + +--source include/galera_cluster.inc +--source include/have_ssl_communication.inc +--source include/check_ipv6.inc +--source include/force_restart.inc + +--connection node_1 +--let $wait_condition = SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership; +--source include/wait_condition.inc + +SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership; +SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status; +SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status; + +# CLEANUP +DROP SCHEMA mtr_wsrep_notify; diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result index bb0fb7bbf0b..7d938f3ef81 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result @@ -148,10 +148,7 @@ lock table t write; connection prevent_purge; commit; connection default; -InnoDB 0 transactions not purged disconnect lock_table; -start transaction with consistent snapshot; -commit; InnoDB 0 transactions not purged set global debug_dbug=@old_dbug; drop table t; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test index 9549c2f0f10..253ad4095f7 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test @@ -189,10 +189,7 @@ lock table t write; connection prevent_purge; commit; connection default; ---source ../../innodb/include/wait_all_purged.inc disconnect lock_table; -start transaction with consistent snapshot; -commit; --source ../../innodb/include/wait_all_purged.inc set global debug_dbug=@old_dbug; drop table t; diff --git a/mysql-test/suite/innodb/r/purge_secondary.result b/mysql-test/suite/innodb/r/purge_secondary.result index 1b5f2896887..1a3b241580c 100644 --- a/mysql-test/suite/innodb/r/purge_secondary.result +++ b/mysql-test/suite/innodb/r/purge_secondary.result @@ -167,4 +167,19 @@ buffer_LRU_batch_evict_total_pages buffer # FLUSH TABLES t1 FOR EXPORT; # UNLOCK TABLES; DROP TABLE t1; +# +# MDEV-29666 InnoDB fails to purge secondary index records +# when indexed virtual columns exist +# +CREATE TABLE t1 (a INT, b INT, a1 INT AS(a) VIRTUAL, +INDEX(a1),INDEX(b)) ENGINE=InnoDB; +INSERT INTO t1 SET a=1, b=1; +UPDATE t1 SET a=2, b=3; +InnoDB 0 transactions not purged +FLUSH TABLE t1 FOR EXPORT; +page 4: N_RECS=0x0001 +page 5: N_RECS=0x0001 +UNLOCK TABLES; +DROP TABLE t1; +# End of 10.3 tests SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/innodb/t/alter_missing_tablespace.test b/mysql-test/suite/innodb/t/alter_missing_tablespace.test index c1cfc0fa092..20088ef9dd3 100644 --- a/mysql-test/suite/innodb/t/alter_missing_tablespace.test +++ b/mysql-test/suite/innodb/t/alter_missing_tablespace.test @@ -1,5 +1,6 @@ --source include/not_embedded.inc --source include/innodb_page_size.inc +--source include/no_valgrind_without_big.inc --echo # --echo # Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING diff --git a/mysql-test/suite/innodb/t/ibuf_not_empty.test b/mysql-test/suite/innodb/t/ibuf_not_empty.test index a3f4ad9ac5c..b61d2ca8b6c 100644 --- a/mysql-test/suite/innodb/t/ibuf_not_empty.test +++ b/mysql-test/suite/innodb/t/ibuf_not_empty.test @@ -5,6 +5,7 @@ --source include/not_embedded.inc # The test is not big enough to use change buffering with larger page size. --source include/have_innodb_max_16k.inc +--source include/no_valgrind_without_big.inc SET GLOBAL innodb_purge_rseg_truncate_frequency=1; --disable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test index 47db92a0c6d..b4b170b89f9 100644 --- a/mysql-test/suite/innodb/t/innodb-get-fk.test +++ b/mysql-test/suite/innodb/t/innodb-get-fk.test @@ -2,6 +2,8 @@ --source include/default_charset.inc # need to restart server --source include/not_embedded.inc +--source include/no_valgrind_without_big.inc + CREATE SCHEMA `repro`; CREATE TABLE `repro`.`crew` ( diff --git a/mysql-test/suite/innodb/t/missing_tablespaces.test b/mysql-test/suite/innodb/t/missing_tablespaces.test index b4da9745ba4..996b77aa6c1 100644 --- a/mysql-test/suite/innodb/t/missing_tablespaces.test +++ b/mysql-test/suite/innodb/t/missing_tablespaces.test @@ -4,6 +4,7 @@ --source include/not_embedded.inc #Windows has trouble creating files/directories with long names --source include/not_windows.inc +--source include/no_valgrind_without_big.inc --echo # --echo # Bug#19419026 WHEN A TABLESPACE IS NOT FOUND, DO NOT REPORT "TABLE NOT FOUND" diff --git a/mysql-test/suite/innodb/t/purge_secondary.test b/mysql-test/suite/innodb/t/purge_secondary.test index bf702b6b737..530da2c33d9 100644 --- a/mysql-test/suite/innodb/t/purge_secondary.test +++ b/mysql-test/suite/innodb/t/purge_secondary.test @@ -149,4 +149,36 @@ WHERE NAME="buffer_LRU_batch_evict_total_pages" AND COUNT > 0; DROP TABLE t1; +--echo # +--echo # MDEV-29666 InnoDB fails to purge secondary index records +--echo # when indexed virtual columns exist +--echo # + +CREATE TABLE t1 (a INT, b INT, a1 INT AS(a) VIRTUAL, +INDEX(a1),INDEX(b)) ENGINE=InnoDB; +INSERT INTO t1 SET a=1, b=1; + +UPDATE t1 SET a=2, b=3; +let DATADIR=`select @@datadir`; +let PAGE_SIZE=`select @@innodb_page_size`; + +source include/wait_all_purged.inc; +FLUSH TABLE t1 FOR EXPORT; + +perl; +my $ps = $ENV{PAGE_SIZE}; +my $file = "$ENV{DATADIR}/test/t1.ibd"; +open(FILE, "<", $file) or die "Unable to open $file\n"; +die "Unable to read $file\n" unless + sysread(FILE, $_, 6*$ps) == 6*$ps; +close(FILE); +print "page 4: N_RECS=0x", unpack("H*", substr($_, 4 * $ps + 54, 2)), "\n"; +print "page 5: N_RECS=0x", unpack("H*", substr($_, 5 * $ps + 54, 2)), "\n"; +EOF + +UNLOCK TABLES; +DROP TABLE t1; + +--echo # End of 10.3 tests + SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/innodb/t/table_flags.test b/mysql-test/suite/innodb/t/table_flags.test index 79b2c3dd77a..92ebdda442a 100644 --- a/mysql-test/suite/innodb/t/table_flags.test +++ b/mysql-test/suite/innodb/t/table_flags.test @@ -2,6 +2,12 @@ # Embedded server tests do not support restarting --source include/not_embedded.inc --source include/maybe_debug.inc +# Slow shutdown may take more than 120 seconds under Valgrind, +# causing the server to be (silently) killed. +# Due to that, crash recovery could "heal" the damage that our +# Perl code is inflicting, and the SELECT statements could succeed +# instead of failing with ER_NO_SUCH_TABLE_IN_ENGINE. +--source include/not_valgrind.inc --disable_query_log call mtr.add_suppression("InnoDB: Table `mysql`\\.`innodb_table_stats` not found"); diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test index bb8e3316860..f0fbb1a94c3 100644 --- a/mysql-test/suite/innodb/t/xa_recovery.test +++ b/mysql-test/suite/innodb/t/xa_recovery.test @@ -1,6 +1,7 @@ --source include/have_innodb.inc # Embedded server does not support restarting. --source include/not_embedded.inc +--source include/no_valgrind_without_big.inc # MDEV-8841 - close tables opened by previous tests, # so they don't get marked crashed when the server gets crashed diff --git a/mysql-test/suite/mariabackup/log_page_corruption.test b/mysql-test/suite/mariabackup/log_page_corruption.test index 0151afb96b4..e14735fd024 100644 --- a/mysql-test/suite/mariabackup/log_page_corruption.test +++ b/mysql-test/suite/mariabackup/log_page_corruption.test @@ -1,4 +1,5 @@ --source include/have_debug.inc +--source include/no_valgrind_without_big.inc --echo ######## --echo # Test for generating "innodb_corrupted_pages" file during full and diff --git a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test index fd4cdf71f6f..5d0d39cadce 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test @@ -1,6 +1,7 @@ --let $rpl_topology=1->2 --source include/rpl_init.inc --source include/have_innodb.inc +--source include/no_valgrind_without_big.inc --echo *** Test normal shutdown/restart of slave server configured as a GTID slave. *** diff --git a/mysql-test/suite/rpl/t/rpl_mdev12179.test b/mysql-test/suite/rpl/t/rpl_mdev12179.test index e3caccde6b4..962ce3f0135 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev12179.test +++ b/mysql-test/suite/rpl/t/rpl_mdev12179.test @@ -1,6 +1,7 @@ --source include/have_innodb.inc --let $rpl_topology=1->2 --source include/rpl_init.inc +--source include/no_valgrind_without_big.inc --connection server_2 call mtr.add_suppression("The automatically created table.*name may not be entirely in lowercase"); diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test index feb7bf05638..072d1cec1a4 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test @@ -5,6 +5,7 @@ -- source include/have_innodb.inc # include/restart_mysqld.inc does not work in embedded mode -- source include/not_embedded.inc +-- source include/no_valgrind_without_big.inc # Check the default value SET @orig = @@global.innodb_buffer_pool_dump_at_shutdown; diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_method_func.test b/mysql-test/suite/sys_vars/t/innodb_flush_method_func.test index aad91d0f4a3..7293a99db41 100644 --- a/mysql-test/suite/sys_vars/t/innodb_flush_method_func.test +++ b/mysql-test/suite/sys_vars/t/innodb_flush_method_func.test @@ -1,6 +1,8 @@ --source include/have_innodb.inc # Embedded server tests do not support restarting. --source include/not_embedded.inc +# InnoDB: Cannot read first page of './ibdata1' I/O error +--source include/not_valgrind.inc call mtr.add_suppression("InnoDB: Failed to set .*DIRECT"); --replace_result unbuffered fsync |