summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD/FINISH.sh12
-rw-r--r--debian/mariadb-test-data.lintian-overrides2
-rw-r--r--debian/mariadb-test.lintian-overrides2
-rw-r--r--debian/source/lintian-overrides8
-rw-r--r--include/mysql/plugin.h12
-rw-r--r--include/mysql/plugin_audit.h.pp10
-rw-r--r--include/mysql/plugin_auth.h.pp10
-rw-r--r--include/mysql/plugin_data_type.h.pp10
-rw-r--r--include/mysql/plugin_encryption.h.pp10
-rw-r--r--include/mysql/plugin_ftparser.h.pp10
-rw-r--r--include/mysql/plugin_function.h.pp10
-rw-r--r--include/mysql/plugin_password_validation.h.pp10
-rw-r--r--libmysqld/lib_sql.cc15
-rw-r--r--mysql-test/README-gcov15
-rwxr-xr-xmysql-test/dgcov.pl57
-rw-r--r--mysql-test/include/have_file_key_management.inc6
-rw-r--r--mysql-test/include/master-slave.inc2
-rw-r--r--mysql-test/lib/My/Debugger.pm2
-rw-r--r--mysql-test/main/bad_startup_options.test3
-rw-r--r--mysql-test/main/fix_priv_tables.result4
-rw-r--r--mysql-test/main/func_encrypt_ucs2.result8
-rw-r--r--mysql-test/main/func_encrypt_ucs2.test5
-rw-r--r--mysql-test/main/gis-json.result3
-rw-r--r--mysql-test/main/gis-json.test1
-rw-r--r--mysql-test/main/grant.result34
-rw-r--r--mysql-test/main/grant2.result4
-rw-r--r--mysql-test/main/grant3.result4
-rw-r--r--mysql-test/main/grant5.result24
-rw-r--r--mysql-test/main/grant5.test19
-rw-r--r--mysql-test/main/information_schema.result2
-rw-r--r--mysql-test/main/kill.test4
-rw-r--r--mysql-test/main/mysql_upgrade.result163
-rw-r--r--mysql-test/main/mysql_upgrade.test15
-rw-r--r--mysql-test/main/mysql_upgrade_view.result1
-rw-r--r--mysql-test/main/mysql_upgrade_view.test1
-rw-r--r--mysql-test/main/partition_alter.result13
-rw-r--r--mysql-test/main/partition_alter.test10
-rw-r--r--mysql-test/main/precedence_bugs.result18
-rw-r--r--mysql-test/main/precedence_bugs.test16
-rw-r--r--mysql-test/main/stat_tables_rbr.result1
-rw-r--r--mysql-test/main/stat_tables_rbr.test2
-rw-r--r--mysql-test/main/type_float.result7
-rw-r--r--mysql-test/main/type_float.test10
-rw-r--r--mysql-test/main/union.result19
-rw-r--r--mysql-test/main/union.test50
-rw-r--r--mysql-test/main/varbinary.test3
-rw-r--r--mysql-test/main/view.result8
-rw-r--r--mysql-test/main/view.test9
-rw-r--r--mysql-test/main/windows_debug.result10
-rw-r--r--mysql-test/main/windows_debug.test12
-rwxr-xr-xmysql-test/mariadb-test-run.pl1
-rw-r--r--mysql-test/std_data/mysql80/ibdata1_16384bin0 -> 16384 bytes
-rw-r--r--mysql-test/std_data/mysql80/ibdata1_32768bin0 -> 32768 bytes
-rw-r--r--mysql-test/std_data/mysql80/ibdata1_4096bin0 -> 4096 bytes
-rw-r--r--mysql-test/std_data/mysql80/ibdata1_65536bin0 -> 65536 bytes
-rw-r--r--mysql-test/std_data/mysql80/ibdata1_8192bin0 -> 8192 bytes
-rw-r--r--mysql-test/std_data/mysql80/t1.ibdbin0 -> 16384 bytes
-rw-r--r--mysql-test/std_data/vcol_autoinc.MYIbin1024 -> 1024 bytes
-rw-r--r--mysql-test/std_data/vcol_autoinc.frmbin951 -> 8587 bytes
-rwxr-xr-xmysql-test/std_data/wsrep_notify.sh57
-rwxr-xr-xmysql-test/std_data/wsrep_notify_ssl.sh51
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_binlog.result1
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result1
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_do_db.result1
-rw-r--r--mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result1
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_binlog.test1
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test2
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_do_db.test2
-rw-r--r--mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test2
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change2.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb_import.result3
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03.result12
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result12
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraints.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_column_privileges.result16
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03.result12
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result12
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03.result12
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result12
-rw-r--r--mysql-test/suite/galera/disabled.def35
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_shutdown.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result3
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_new_cluster.result20
-rw-r--r--mysql-test/suite/galera/r/partition.result8
-rw-r--r--mysql-test/suite/galera/r/query_cache.result1758
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_shutdown.test16
-rw-r--r--mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test3
-rw-r--r--mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf8
-rw-r--r--mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_wsrep_new_cluster.test82
-rw-r--r--mysql-test/suite/galera/t/query_cache.cnf9
-rw-r--r--mysql-test/suite/galera/t/query_cache.test1112
-rw-r--r--mysql-test/suite/galera_3nodes/disabled.def27
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_slave_options_do.result28
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_slave_options_ignore.result28
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result6
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result4
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_slave_options_do.cnf7
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_slave_options_do.test34
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.cnf7
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test35
-rw-r--r--mysql-test/suite/galera_3nodes_sr/disabled.def18
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-582.result20
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-606.result4
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result256
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result100
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result177
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result3
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result6
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result44
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-582.test13
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-606.test8
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test137
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test49
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test70
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test7
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test10
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test26
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test1
-rw-r--r--mysql-test/suite/galera_sr/disabled.def1
-rw-r--r--mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc4
-rw-r--r--mysql-test/suite/gcol/inc/gcol_column_def_options.inc15
-rw-r--r--mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result3
-rw-r--r--mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result3
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result18
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result18
-rw-r--r--mysql-test/suite/innodb/r/deadlock_in_subqueries_join.result50
-rw-r--r--mysql-test/suite/innodb/r/full_crc32_import.result5
-rw-r--r--mysql-test/suite/innodb/r/import_tablespace_race.result27
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-timestamp.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-table-online.result20
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-1.result16
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522.result6
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_bugs.result2
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_import.result2
-rw-r--r--mysql-test/suite/innodb/r/restart.result10
-rw-r--r--mysql-test/suite/innodb/t/create_isl_with_direct.test7
-rw-r--r--mysql-test/suite/innodb/t/deadlock_in_subqueries_join.test81
-rw-r--r--mysql-test/suite/innodb/t/import_tablespace_race.test55
-rw-r--r--mysql-test/suite/innodb/t/innodb-table-online.test21
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-1.test31
-rw-r--r--mysql-test/suite/innodb/t/restart.test62
-rw-r--r--mysql-test/suite/innodb_fts/r/fulltext2.result17
-rw-r--r--mysql-test/suite/innodb_fts/t/fulltext2.test16
-rw-r--r--mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result6
-rw-r--r--mysql-test/suite/innodb_zip/r/wl5522_zip.result4
-rw-r--r--mysql-test/suite/parts/inc/partition_auto_increment.inc13
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_blackhole.result12
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_innodb.result12
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_maria.result12
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_memory.result12
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_myisam.result12
-rw-r--r--mysql-test/suite/parts/t/partition_special_myisam.test1
-rw-r--r--mysql-test/suite/roles/recursive.result6
-rw-r--r--mysql-test/suite/roles/recursive_dbug.result6
-rw-r--r--mysql-test/suite/roles/set_role-table-column-priv.result4
-rw-r--r--mysql-test/suite/rpl/include/rpl_ssl.inc1
-rw-r--r--mysql-test/suite/rpl/r/rpl_ignore_table.result8
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_event.test1
-rw-r--r--mysql-test/suite/vcol/r/not_supported.result13
-rw-r--r--mysql-test/suite/vcol/r/upgrade.result2
-rw-r--r--mysql-test/suite/vcol/t/not_supported.test15
-rw-r--r--mysys/my_delete.c171
-rw-r--r--mysys/my_rename.c29
-rw-r--r--mysys/my_winfile.c38
-rw-r--r--mysys/mysys_priv.h39
-rw-r--r--plugin/handler_socket/handlersocket/handlersocket.cpp6
-rw-r--r--scripts/mysql_system_tables_fix.sql2
-rw-r--r--sql/derived_handler.cc2
-rw-r--r--sql/field.cc5
-rw-r--r--sql/field.h7
-rw-r--r--sql/ha_partition.h3
-rw-r--r--sql/item.cc33
-rw-r--r--sql/item.h1
-rw-r--r--sql/item_cmpfunc.h4
-rw-r--r--sql/item_func.h4
-rw-r--r--sql/item_strfunc.h2
-rw-r--r--sql/item_subselect.h1
-rw-r--r--sql/log.cc2
-rw-r--r--sql/mysqld.cc28
-rw-r--r--sql/partition_info.cc21
-rw-r--r--sql/partition_info.h1
-rw-r--r--sql/spatial.cc3
-rw-r--r--sql/sql_acl.cc12
-rw-r--r--sql/sql_class.h5
-rw-r--r--sql/sql_connect.cc3
-rw-r--r--sql/sql_select.cc1
-rw-r--r--sql/sql_table.cc5
-rw-r--r--sql/table.cc26
-rw-r--r--storage/connect/ha_connect.cc11
-rw-r--r--storage/connect/mysql-test/connect/r/index.result36
-rw-r--r--storage/connect/mysql-test/connect/r/mysql.result38
-rw-r--r--storage/connect/mysql-test/connect/t/index.test26
-rw-r--r--storage/connect/mysql-test/connect/t/mysql.test30
-rw-r--r--storage/connect/xindex.cpp4
-rw-r--r--storage/innobase/btr/btr0btr.cc18
-rw-r--r--storage/innobase/btr/btr0defragment.cc2
-rw-r--r--storage/innobase/btr/btr0sea.cc14
-rw-r--r--storage/innobase/buf/buf0buf.cc5
-rw-r--r--storage/innobase/buf/buf0lru.cc2
-rw-r--r--storage/innobase/dict/dict0stats.cc5
-rw-r--r--storage/innobase/fsp/fsp0file.cc22
-rw-r--r--storage/innobase/handler/ha_innodb.cc33
-rw-r--r--storage/innobase/handler/handler0alter.cc15
-rw-r--r--storage/innobase/include/btr0sea.h2
-rw-r--r--storage/innobase/include/fsp0fsp.h14
-rw-r--r--storage/innobase/mtr/mtr0mtr.cc16
-rw-r--r--storage/innobase/page/page0zip.cc2
-rw-r--r--storage/innobase/row/row0import.cc24
-rw-r--r--storage/innobase/row/row0ins.cc6
-rw-r--r--storage/innobase/row/row0log.cc3
-rw-r--r--storage/innobase/row/row0quiesce.cc15
-rw-r--r--storage/maria/ha_maria.cc1
-rw-r--r--storage/rocksdb/ha_rocksdb.cc21
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_28996.result34
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_28996.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_28996.test40
-rw-r--r--storage/spider/spd_db_mysql.cc22
-rw-r--r--storage/spider/spd_direct_sql.cc11
-rw-r--r--strings/dtoa.c5
-rwxr-xr-xsupport-files/wsrep_notify.sh66
225 files changed, 2265 insertions, 4469 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh
index 14347ca8232..cc66ed09f5d 100644
--- a/BUILD/FINISH.sh
+++ b/BUILD/FINISH.sh
@@ -62,11 +62,15 @@ commands="$commands
path=`dirname $0`
. \"$path/autorun.sh\""
-if [ -z "$just_clean" ]
+if [ -z "$just_clean"]
then
-commands="$commands
-git submodule update
-CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\" CXXLDFLAGS=\"$CXXLDFLAGS\" $configure"
+ if test -d .git
+ then
+ commands="$commands
+ git submodule update"
+ fi
+ commands="$commands
+ CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\" CXXLDFLAGS=\"$CXXLDFLAGS\" $configure"
fi
if [ -z "$just_configure" -a -z "$just_clean" ]
diff --git a/debian/mariadb-test-data.lintian-overrides b/debian/mariadb-test-data.lintian-overrides
index de210af2a39..85e40a8b429 100644
--- a/debian/mariadb-test-data.lintian-overrides
+++ b/debian/mariadb-test-data.lintian-overrides
@@ -1,6 +1,8 @@
# These should be moved, see https://jira.mariadb.org/browse/MDEV-21654
arch-dependent-file-in-usr-share usr/share/mysql/mysql-test/suite/plugins/pam/pam_mariadb_mtr.so
+arch-dependent-file-in-usr-share [usr/share/mysql/mysql-test/suite/plugins/pam/pam_mariadb_mtr.so]
arch-independent-package-contains-binary-or-object usr/share/mysql/mysql-test/suite/plugins/pam/pam_mariadb_mtr.so
+arch-independent-package-contains-binary-or-object [usr/share/mysql/mysql-test/suite/plugins/pam/pam_mariadb_mtr.so]
# 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/mysql/mysql-test/std_data/checkDBI_DBD-MariaDB.pl]
incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mysql-test/suite/engines/rr_trx/run_stress_tx_rr.pl]
diff --git a/debian/mariadb-test.lintian-overrides b/debian/mariadb-test.lintian-overrides
index b9f45b862b5..5bac3d60cac 100644
--- a/debian/mariadb-test.lintian-overrides
+++ b/debian/mariadb-test.lintian-overrides
@@ -1,6 +1,8 @@
# These should be moved, see https://jira.mariadb.org/browse/MDEV-21653
arch-dependent-file-in-usr-share usr/share/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
arch-dependent-file-in-usr-share usr/share/mysql/mysql-test/lib/My/SafeProcess/wsrep_check_version
+arch-dependent-file-in-usr-share [usr/share/mysql/mysql-test/lib/My/SafeProcess/my_safe_process]
+arch-dependent-file-in-usr-share [usr/share/mysql/mysql-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/mysql/mysql-test/lib/process-purecov-annotations.pl]
incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mysql-test/lib/v1/mysql-test-run.pl]
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
index 28b990a6a95..740a7871a2e 100644
--- a/debian/source/lintian-overrides
+++ b/debian/source/lintian-overrides
@@ -28,12 +28,20 @@ version-substvar-for-external-package Replaces (line 748) ${source:Version} mari
version-substvar-for-external-package Replaces (line 748) ${source:Version} mariadb-server -> mariadb-server-10.10
# 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 *
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index 6ef0afb980b..14c752511c7 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -204,6 +204,18 @@ struct system_status_var;
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type);
+static inline
+struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
+ mysql_show_var_func func_arg)
+{
+ struct st_mysql_show_var tmp;
+ tmp.name= name;
+ tmp.value= (void*) func_arg;
+ tmp.type= SHOW_FUNC;
+ return tmp;
+};
+
+
/*
Constants for plugin flags.
*/
diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp
index d1e9580a053..a01e4ff8c17 100644
--- a/include/mysql/plugin_audit.h.pp
+++ b/include/mysql/plugin_audit.h.pp
@@ -517,6 +517,16 @@ struct st_mysql_show_var {
};
struct system_status_var;
typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type);
+static inline
+struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
+ mysql_show_var_func func_arg)
+{
+ struct st_mysql_show_var tmp;
+ tmp.name= name;
+ tmp.value= (void*) func_arg;
+ tmp.type= SHOW_FUNC;
+ return tmp;
+};
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(THD* thd,
diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp
index 2c89bc47de3..1844f7b7248 100644
--- a/include/mysql/plugin_auth.h.pp
+++ b/include/mysql/plugin_auth.h.pp
@@ -517,6 +517,16 @@ struct st_mysql_show_var {
};
struct system_status_var;
typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type);
+static inline
+struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
+ mysql_show_var_func func_arg)
+{
+ struct st_mysql_show_var tmp;
+ tmp.name= name;
+ tmp.value= (void*) func_arg;
+ tmp.type= SHOW_FUNC;
+ return tmp;
+};
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(THD* thd,
diff --git a/include/mysql/plugin_data_type.h.pp b/include/mysql/plugin_data_type.h.pp
index bd4ef6af15f..80b5a863fa5 100644
--- a/include/mysql/plugin_data_type.h.pp
+++ b/include/mysql/plugin_data_type.h.pp
@@ -517,6 +517,16 @@ struct st_mysql_show_var {
};
struct system_status_var;
typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type);
+static inline
+struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
+ mysql_show_var_func func_arg)
+{
+ struct st_mysql_show_var tmp;
+ tmp.name= name;
+ tmp.value= (void*) func_arg;
+ tmp.type= SHOW_FUNC;
+ return tmp;
+};
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(THD* thd,
diff --git a/include/mysql/plugin_encryption.h.pp b/include/mysql/plugin_encryption.h.pp
index 96100d3791b..ac5798b1323 100644
--- a/include/mysql/plugin_encryption.h.pp
+++ b/include/mysql/plugin_encryption.h.pp
@@ -517,6 +517,16 @@ struct st_mysql_show_var {
};
struct system_status_var;
typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type);
+static inline
+struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
+ mysql_show_var_func func_arg)
+{
+ struct st_mysql_show_var tmp;
+ tmp.name= name;
+ tmp.value= (void*) func_arg;
+ tmp.type= SHOW_FUNC;
+ return tmp;
+};
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(THD* thd,
diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp
index 4760e31c4bd..919c9aaef70 100644
--- a/include/mysql/plugin_ftparser.h.pp
+++ b/include/mysql/plugin_ftparser.h.pp
@@ -517,6 +517,16 @@ struct st_mysql_show_var {
};
struct system_status_var;
typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type);
+static inline
+struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
+ mysql_show_var_func func_arg)
+{
+ struct st_mysql_show_var tmp;
+ tmp.name= name;
+ tmp.value= (void*) func_arg;
+ tmp.type= SHOW_FUNC;
+ return tmp;
+};
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(THD* thd,
diff --git a/include/mysql/plugin_function.h.pp b/include/mysql/plugin_function.h.pp
index 5c1f34d8184..f5b22dbd826 100644
--- a/include/mysql/plugin_function.h.pp
+++ b/include/mysql/plugin_function.h.pp
@@ -517,6 +517,16 @@ struct st_mysql_show_var {
};
struct system_status_var;
typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type);
+static inline
+struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
+ mysql_show_var_func func_arg)
+{
+ struct st_mysql_show_var tmp;
+ tmp.name= name;
+ tmp.value= (void*) func_arg;
+ tmp.type= SHOW_FUNC;
+ return tmp;
+};
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(THD* thd,
diff --git a/include/mysql/plugin_password_validation.h.pp b/include/mysql/plugin_password_validation.h.pp
index a56a177b8fa..115cbf2636e 100644
--- a/include/mysql/plugin_password_validation.h.pp
+++ b/include/mysql/plugin_password_validation.h.pp
@@ -517,6 +517,16 @@ struct st_mysql_show_var {
};
struct system_status_var;
typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type);
+static inline
+struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
+ mysql_show_var_func func_arg)
+{
+ struct st_mysql_show_var tmp;
+ tmp.name= name;
+ tmp.value= (void*) func_arg;
+ tmp.type= SHOW_FUNC;
+ return tmp;
+};
struct st_mysql_sys_var;
struct st_mysql_value;
typedef int (*mysql_var_check_func)(THD* thd,
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 75d4eecd4d8..14515cdcf4d 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -526,7 +526,6 @@ int init_embedded_server(int argc, char **argv, char **groups)
*/
int *argcp;
char ***argvp;
- int fake_argc = 1;
char *fake_argv[] = { (char *)"", 0 };
const char *fake_groups[] = { "server", "embedded", 0 };
my_bool acl_error;
@@ -539,16 +538,14 @@ int init_embedded_server(int argc, char **argv, char **groups)
if (init_early_variables())
return 1;
- if (argc)
+ if (!argc)
{
- argcp= &argc;
- argvp= (char***) &argv;
- }
- else
- {
- argcp= &fake_argc;
- argvp= (char ***) &fake_argv;
+ argc= 1;
+ argv= fake_argv;
}
+ argcp= &argc;
+ argvp= &argv;
+
if (!groups)
groups= (char**) fake_groups;
diff --git a/mysql-test/README-gcov b/mysql-test/README-gcov
index ba22a796423..64a97ce47e2 100644
--- a/mysql-test/README-gcov
+++ b/mysql-test/README-gcov
@@ -2,14 +2,7 @@ To be able to see the level of coverage with the current test suite,
do the following:
- Make sure gcov is installed
- - Compile the MySQL distribution with BUILD/compile-pentium64-gcov (if your
- machine does not have a pentium CPU, hack this script, or just live with
- the pentium-specific stuff)
- - In the mysql-test directory, run this command: ./mysql-test-run -gcov
- - To see the level of coverage for a given source file:
- grep -1 source_file_name ../mysql-test-gcov.msg
- - To see which lines are not yet covered, look at source_file_name.gcov in
- the source tree. You can find this by doing something like:
- find source-directory -name "mysqld.cc.gcov"
- Then think hard about a test case that will cover those lines, and write
- one!
+ - Compile the MariaDB distribution with -DENABLE_GCOV=1
+ - In the mysql-test directory, run this command: `./mysql-test-run --gcov`
+ - see var/last_changes.dgcov for the coverage of uncommitted code
+ - see `./dgcov -h` for more options
diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl
index a71174a441d..db3ce429bac 100755
--- a/mysql-test/dgcov.pl
+++ b/mysql-test/dgcov.pl
@@ -36,6 +36,7 @@ my $opt_skip_gcov;
my %cov;
my $file_no=0;
+Getopt::Long::Configure ("bundling");
GetOptions
("v|verbose+" => \$opt_verbose,
"h|help" => \$opt_help,
@@ -62,13 +63,16 @@ my $res;
my $cmd;
if ($opt_purge)
{
- $cmd= "find . -name '*.da' -o -name '*.gcda' -o -name '*.gcov' -o ".
+ $cmd= "find . -name '*.da' -o -name '*.gcda*' -o -name '*.gcov' -o ".
"-name '*.dgcov' | xargs rm -f ''";
logv "Running: $cmd";
system($cmd)==0 or die "system($cmd): $? $!";
exit 0;
}
+my $gcc_version= `gcc -dumpversion`;
+$gcc_version=~ s/^(\d+).*$/$1/ or die "Cannot parse gcc -dumpversion: $gcc_version";
+
find(\&gcov_one_file, $root);
find(\&write_coverage, $root) if $opt_generate;
exit 0 if $opt_only_gcov;
@@ -167,26 +171,43 @@ sub gcov_one_file {
{
return;
}
- for my $gcov_file (<$_*.gcov>) {
- open FH, '<', "$gcov_file_path" or die "open(<$gcov_file_path): $!";
- my $fname;
- while (<FH>) {
- chomp;
- if (/^function:/) {
- next;
- }
- if (/^file:/) {
- $fname=realpath(-f $' ? $' : $root.$');
- next;
+ # now, read the generated file
+ if ($gcc_version <9){
+ for my $gcov_file (<$_*.gcov>) {
+ open FH, '<', "$gcov_file_path" or die "open(<$gcov_file_path): $!";
+ my $fname;
+ while (<FH>) {
+ chomp;
+ if (/^function:/) {
+ next;
+ }
+ if (/^file:/) {
+ $fname=realpath(-f $' ? $' : $root.$');
+ next;
+ }
+ next if /^lcount:\d+,-\d+/; # whatever that means
+ unless (/^lcount:(\d+),(\d+)/ and $fname) {
+ warn "unknown line '$_' in $gcov_file_path";
+ next;
+ }
+ $cov{$fname}->{$1}+=$2;
}
- next if /^lcount:\d+,-\d+/; # whatever that means
- unless (/^lcount:(\d+),(\d+)/ and $fname) {
- warn "unknown line '$_' in $gcov_file";
- next;
+ close(FH);
+ }
+ } else {
+ require IO::Uncompress::Gunzip;
+ require JSON::PP;
+ no warnings 'once';
+ my $gcov_file_json;
+ s/\.gcda$// if $gcc_version >= 11;
+ IO::Uncompress::Gunzip::gunzip("$_.gcov.json.gz", \$gcov_file_json)
+ or die "gunzip($_.gcov.json.gz): $IO::Uncompress::Gunzip::GunzipError";
+ my $obj= JSON::PP::decode_json $gcov_file_json;
+ for my $file (@{$obj->{files}}) {
+ for my $line (@{$file->{lines}}){
+ $cov{$file->{file}}->{$line->{line_number}}+= $line->{count};
}
- $cov{$fname}->{$1}+=$2;
}
- close(FH);
}
}
diff --git a/mysql-test/include/have_file_key_management.inc b/mysql-test/include/have_file_key_management.inc
index 06fbb510d6b..68ef49a42d9 100644
--- a/mysql-test/include/have_file_key_management.inc
+++ b/mysql-test/include/have_file_key_management.inc
@@ -2,3 +2,9 @@ if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'file
{
--skip Test requires file_key_management plugin
}
+
+#
+# This file is only included when using encryption. As all encryption test are
+# very slow with valgrind, lets disable these if not run with --big
+#
+--source include/no_valgrind_without_big.inc
diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc
index 5b603fbfdb3..9ed206b2c22 100644
--- a/mysql-test/include/master-slave.inc
+++ b/mysql-test/include/master-slave.inc
@@ -1,5 +1,3 @@
---source include/no_valgrind_without_big.inc
-
# ==== Purpose ====
#
# Configure two servers to be replication master and slave.
diff --git a/mysql-test/lib/My/Debugger.pm b/mysql-test/lib/My/Debugger.pm
index 86b84d97109..c2062c2eaba 100644
--- a/mysql-test/lib/My/Debugger.pm
+++ b/mysql-test/lib/My/Debugger.pm
@@ -147,7 +147,7 @@ sub do_args($$$$$) {
my $v = $debuggers{$k};
# on windows mtr args are quoted (for system), otherwise not (for exec)
- sub quote($) { $_[0] =~ /[; ]/ ? "\"$_[0]\"" : $_[0] }
+ sub quote($) { $_[0] =~ /[; >]/ ? "\"$_[0]\"" : $_[0] }
sub unquote($) { $_[0] =~ s/^"(.*)"$/$1/; $_[0] }
sub quote_from_mtr($) { IS_WINDOWS() ? $_[0] : quote($_[0]) }
sub unquote_for_mtr($) { IS_WINDOWS() ? $_[0] : unquote($_[0]) }
diff --git a/mysql-test/main/bad_startup_options.test b/mysql-test/main/bad_startup_options.test
index bd0b6283854..e758d786049 100644
--- a/mysql-test/main/bad_startup_options.test
+++ b/mysql-test/main/bad_startup_options.test
@@ -1,3 +1,6 @@
+# mysqld refuses to run as root normally.
+--source include/not_as_root.inc
+
--source include/not_embedded.inc
--source include/have_ssl_communication.inc
diff --git a/mysql-test/main/fix_priv_tables.result b/mysql-test/main/fix_priv_tables.result
index 3f1830aadbc..c39ebfb9227 100644
--- a/mysql-test/main/fix_priv_tables.result
+++ b/mysql-test/main/fix_priv_tables.result
@@ -17,7 +17,7 @@ GRANT SELECT(c1) on testdb.v1 to 'select_only_c1'@localhost;
SHOW GRANTS FOR 'select_only_c1'@'localhost';
Grants for select_only_c1@localhost
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
-GRANT SELECT (c1) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
+GRANT SELECT (`c1`) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
"after fix privs"
SHOW GRANTS FOR 'show_view_tbl'@'localhost';
@@ -28,7 +28,7 @@ GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO `show_view_tbl`@`localhost`
SHOW GRANTS FOR 'select_only_c1'@'localhost';
Grants for select_only_c1@localhost
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
-GRANT SELECT (c1) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
+GRANT SELECT (`c1`) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
DROP USER 'show_view_tbl'@'localhost';
DROP USER 'select_only_c1'@'localhost';
diff --git a/mysql-test/main/func_encrypt_ucs2.result b/mysql-test/main/func_encrypt_ucs2.result
index 9f29ca03a03..ab04c3b4621 100644
--- a/mysql-test/main/func_encrypt_ucs2.result
+++ b/mysql-test/main/func_encrypt_ucs2.result
@@ -12,13 +12,13 @@ CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED)
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Warning 1292 Truncated incorrect INTEGER value: '\xFFT\xDCiK\x92j\xE6\xFC'
-SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)));
-CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)))
+SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2))) as a;
+a
4
Warnings:
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED);
-CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED)
+SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED) as a;
+a
0
Warnings:
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
diff --git a/mysql-test/main/func_encrypt_ucs2.test b/mysql-test/main/func_encrypt_ucs2.test
index dc4fd309c07..aaf233fa031 100644
--- a/mysql-test/main/func_encrypt_ucs2.test
+++ b/mysql-test/main/func_encrypt_ucs2.test
@@ -10,8 +10,7 @@
SELECT CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)));
SELECT CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED);
-#enable after fix MDEV-28643, MDEV-27871
--disable_view_protocol
-SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)));
-SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED);
+SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2))) as a;
+SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED) as a;
--enable_view_protocol
diff --git a/mysql-test/main/gis-json.result b/mysql-test/main/gis-json.result
index ace9e9e9ae2..644684f5a73 100644
--- a/mysql-test/main/gis-json.result
+++ b/mysql-test/main/gis-json.result
@@ -58,6 +58,9 @@ Warning 4038 Syntax error in JSON text in argument 1 to function 'st_geomfromgeo
SELECT st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }'));
st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }'))
POINT(102 0.5)
+SELECT st_astext(st_geomfromgeojson('{ "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "type": "Feature" }'));
+st_astext(st_geomfromgeojson('{ "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "type": "Feature" }'))
+POINT(102 0.5)
SELECT st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}'));
st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}'))
GEOMETRYCOLLECTION(POINT(102 0.5))
diff --git a/mysql-test/main/gis-json.test b/mysql-test/main/gis-json.test
index 0e1b24a91b6..cda395acab5 100644
--- a/mysql-test/main/gis-json.test
+++ b/mysql-test/main/gis-json.test
@@ -26,6 +26,7 @@ SELECT st_astext(st_geomfromgeojson('{"type""point"}'));
#enable after fix MDEV-27871
--disable_view_protocol
SELECT st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }'));
+SELECT st_astext(st_geomfromgeojson('{ "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "type": "Feature" }'));
SELECT st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}'));
diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result
index 5e86ea3d810..585e927a0d4 100644
--- a/mysql-test/main/grant.result
+++ b/mysql-test/main/grant.result
@@ -248,7 +248,7 @@ GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@local
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
-GRANT SELECT, SELECT (a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost`
+GRANT SELECT, SELECT (`a`), INSERT, INSERT (`a`), UPDATE, UPDATE (`a`), REFERENCES (`a`) ON `test`.`t1` TO `mysqltest_1`@`localhost`
select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
table_priv column_priv
Select,Insert,Update Select,Insert,Update,References
@@ -256,12 +256,12 @@ REVOKE select (a), update on t1 from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
-GRANT SELECT, INSERT, INSERT (a), REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost`
+GRANT SELECT, INSERT, INSERT (`a`), REFERENCES (`a`) ON `test`.`t1` TO `mysqltest_1`@`localhost`
REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
-GRANT REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost`
+GRANT REFERENCES (`a`) ON `test`.`t1` TO `mysqltest_1`@`localhost`
GRANT select,references on t1 to mysqltest_1@localhost;
select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
table_priv column_priv
@@ -336,13 +336,13 @@ show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO `drop_user`@`localhost` WITH GRANT OPTION
GRANT ALL PRIVILEGES ON `test`.* TO `drop_user`@`localhost` WITH GRANT OPTION
-GRANT SELECT (a) ON `test`.`t1` TO `drop_user`@`localhost`
+GRANT SELECT (`a`) ON `test`.`t1` TO `drop_user`@`localhost`
set sql_mode=ansi_quotes;
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO "drop_user"@"localhost" WITH GRANT OPTION
GRANT ALL PRIVILEGES ON "test".* TO "drop_user"@"localhost" WITH GRANT OPTION
-GRANT SELECT (a) ON "test"."t1" TO "drop_user"@"localhost"
+GRANT SELECT ("a") ON "test"."t1" TO "drop_user"@"localhost"
set sql_mode=default;
set sql_quote_show_create=0;
show grants for drop_user@localhost;
@@ -361,13 +361,13 @@ show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO "drop_user"@"localhost" WITH GRANT OPTION
GRANT ALL PRIVILEGES ON "test".* TO "drop_user"@"localhost" WITH GRANT OPTION
-GRANT SELECT (a) ON "test"."t1" TO "drop_user"@"localhost"
+GRANT SELECT ("a") ON "test"."t1" TO "drop_user"@"localhost"
set sql_mode="";
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO `drop_user`@`localhost` WITH GRANT OPTION
GRANT ALL PRIVILEGES ON `test`.* TO `drop_user`@`localhost` WITH GRANT OPTION
-GRANT SELECT (a) ON `test`.`t1` TO `drop_user`@`localhost`
+GRANT SELECT (`a`) ON `test`.`t1` TO `drop_user`@`localhost`
revoke all privileges, grant option from drop_user@localhost;
show grants for drop_user@localhost;
Grants for drop_user@localhost
@@ -415,7 +415,7 @@ GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ TO ÀÚÅÒ@localhost;
SHOW GRANTS FOR ÀÚÅÒ@localhost;
Grants for ÀÚÅÒ@localhost
GRANT USAGE ON *.* TO `ÀÚÅÒ`@`localhost`
-GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO `ÀÚÅÒ`@`localhost`
+GRANT SELECT (`ËÏÌ`) ON `ÂÄ`.`ÔÁÂ` TO `ÀÚÅÒ`@`localhost`
REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ FROM ÀÚÅÒ@localhost;
DROP USER ÀÚÅÒ@localhost;
DROP DATABASE ÂÄ;
@@ -492,7 +492,7 @@ grant insert(b), insert(c), insert(d), insert(a) on t1 to grant_user@localhost;
show grants for grant_user@localhost;
Grants for grant_user@localhost
GRANT USAGE ON *.* TO `grant_user`@`localhost`
-GRANT INSERT (a, d, c, b) ON `test`.`t1` TO `grant_user`@`localhost`
+GRANT INSERT (`a`, `d`, `c`, `b`) ON `test`.`t1` TO `grant_user`@`localhost`
select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv order by Column_name;
Host Db User Table_name Column_name Column_priv
localhost test grant_user t1 a Insert
@@ -913,20 +913,20 @@ grant update (a) on t1 to mysqltest_8;
show grants for mysqltest_8@'';
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
-GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
+GRANT UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
-GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
+GRANT UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
flush privileges;
show grants for mysqltest_8@'';
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
-GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
+GRANT UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
-GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
+GRANT UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
select * from information_schema.column_privileges;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'mysqltest_8'@'%' def test t1 a UPDATE NO
@@ -1009,12 +1009,12 @@ show grants for mysqltest_8@'';
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
-GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
+GRANT UPDATE, UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
-GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
+GRANT UPDATE, UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
select * from information_schema.user_privileges
where grantee like "'mysqltest_8'%";
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
@@ -1030,12 +1030,12 @@ show grants for mysqltest_8@'';
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
-GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
+GRANT UPDATE, UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
-GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
+GRANT UPDATE, UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
drop user mysqltest_8@'';
show grants for mysqltest_8@'';
ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '%'
diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result
index 0faefa2dd2e..b0ad2998198 100644
--- a/mysql-test/main/grant2.result
+++ b/mysql-test/main/grant2.result
@@ -204,7 +204,7 @@ show grants for 'mysqltest_2';
Grants for mysqltest_2@%
GRANT SELECT ON *.* TO "mysqltest_2"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1'
GRANT INSERT ON "test".* TO "mysqltest_2"@"%"
-GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_2"@"%"
+GRANT UPDATE ("c2") ON "test"."t2" TO "mysqltest_2"@"%"
GRANT UPDATE ON "test"."t1" TO "mysqltest_2"@"%"
drop user 'mysqltest_1';
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
@@ -242,7 +242,7 @@ show grants for 'mysqltest_1';
Grants for mysqltest_1@%
GRANT SELECT ON *.* TO "mysqltest_1"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1'
GRANT INSERT ON "test".* TO "mysqltest_1"@"%"
-GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_1"@"%"
+GRANT UPDATE ("c2") ON "test"."t2" TO "mysqltest_1"@"%"
GRANT UPDATE ON "test"."t1" TO "mysqltest_1"@"%"
drop user 'mysqltest_1', 'mysqltest_3';
drop user 'mysqltest_1';
diff --git a/mysql-test/main/grant3.result b/mysql-test/main/grant3.result
index 160153b1674..3d0af8a4369 100644
--- a/mysql-test/main/grant3.result
+++ b/mysql-test/main/grant3.result
@@ -172,14 +172,14 @@ GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO 'user2'@'%';
SHOW GRANTS FOR 'user2'@'%';
Grants for user2@%
GRANT USAGE ON *.* TO `user2`@`%`
-GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO `user2`@`%`
+GRANT SELECT (`a`), INSERT (`b`) ON `temp`.`t1` TO `user2`@`%`
# Connect as the renamed user
connect conn1, localhost, user2,,;
connection conn1;
SHOW GRANTS;
Grants for user2@%
GRANT USAGE ON *.* TO `user2`@`%`
-GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO `user2`@`%`
+GRANT SELECT (`a`), INSERT (`b`) ON `temp`.`t1` TO `user2`@`%`
SELECT a FROM temp.t1;
a
1
diff --git a/mysql-test/main/grant5.result b/mysql-test/main/grant5.result
index ecb7c716b8a..6f50f530a3e 100644
--- a/mysql-test/main/grant5.result
+++ b/mysql-test/main/grant5.result
@@ -300,6 +300,30 @@ drop database db;
drop user foo@localhost;
drop user bar@localhost;
drop user buz@localhost;
+CREATE USER foo;
+CREATE DATABASE db;
+CREATE TABLE db.test_getcolpriv(col1 INT, col2 INT);
+GRANT SELECT (col1,col2) ON db.test_getcolpriv TO foo;
+GRANT INSERT (col1) ON db.test_getcolpriv TO foo;
+SHOW GRANTS FOR foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO `foo`@`%`
+GRANT SELECT (`col2`, `col1`), INSERT (`col1`) ON `db`.`test_getcolpriv` TO `foo`@`%`
+REVOKE SELECT (col1,col2) ON db.test_getcolpriv FROM foo;
+SHOW GRANTS FOR foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO `foo`@`%`
+GRANT INSERT (`col1`) ON `db`.`test_getcolpriv` TO `foo`@`%`
+REVOKE INSERT (col1) ON db.test_getcolpriv FROM foo;
+SHOW GRANTS FOR foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO `foo`@`%`
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO `foo`@`%`
+DROP USER foo;
+DROP DATABASE db;
# End of 10.3 tests
create user u1@h identified with 'mysql_native_password' using 'pwd';
ERROR HY000: Password hash should be a 41-digit hexadecimal number
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test
index 4c95b30f0ab..c4a302fca86 100644
--- a/mysql-test/main/grant5.test
+++ b/mysql-test/main/grant5.test
@@ -262,6 +262,25 @@ drop user foo@localhost;
drop user bar@localhost;
drop user buz@localhost;
+CREATE USER foo;
+CREATE DATABASE db;
+CREATE TABLE db.test_getcolpriv(col1 INT, col2 INT);
+
+GRANT SELECT (col1,col2) ON db.test_getcolpriv TO foo;
+GRANT INSERT (col1) ON db.test_getcolpriv TO foo;
+
+SHOW GRANTS FOR foo;
+REVOKE SELECT (col1,col2) ON db.test_getcolpriv FROM foo;
+SHOW GRANTS FOR foo;
+REVOKE INSERT (col1) ON db.test_getcolpriv FROM foo;
+
+SHOW GRANTS FOR foo;
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR foo;
+
+DROP USER foo;
+DROP DATABASE db;
+
--echo # End of 10.3 tests
#
diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result
index 88026081e89..ae1bf46c33b 100644
--- a/mysql-test/main/information_schema.result
+++ b/mysql-test/main/information_schema.result
@@ -1090,7 +1090,7 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
show grants;
Grants for user1@localhost
GRANT USAGE ON *.* TO `user1`@`localhost`
-GRANT SELECT (f1) ON `mysqltest`.`t1` TO `user1`@`localhost`
+GRANT SELECT (`f1`) ON `mysqltest`.`t1` TO `user1`@`localhost`
connection con2;
select * from information_schema.column_privileges order by grantee;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
diff --git a/mysql-test/main/kill.test b/mysql-test/main/kill.test
index b7c32ae098b..e89bdb22cd1 100644
--- a/mysql-test/main/kill.test
+++ b/mysql-test/main/kill.test
@@ -254,7 +254,7 @@ connection default;
--echo #
send SELECT SLEEP(1000);
connection con1;
-let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)';
+let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)' AND STATE='User sleep';
source include/wait_condition.inc;
KILL QUERY ID @id;
connection default;
@@ -272,7 +272,7 @@ CREATE USER u1@localhost;
send SELECT SLEEP(1000);
connection con1;
-let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)';
+let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)' AND STATE='User sleep';
source include/wait_condition.inc;
let $id= `SELECT @id`;
diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result
index dc64892ec44..f119937bf59 100644
--- a/mysql-test/main/mysql_upgrade.result
+++ b/mysql-test/main/mysql_upgrade.result
@@ -1945,7 +1945,168 @@ DROP USER 'user3'@'%';
update mysql.db set Delete_history_priv='Y' where db like 'test%';
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
-# End of 10.3 tests
+#
+# MDEV-16735 Upgrades only work if 'alter_algorithm' is 'DEFAULT'
+# or 'COPY'. Test that the session value 'DEFAULT' in mysql_upgrade
+# properly overrides the potentially incompatible global value.
+#
+SET GLOBAL alter_algorithm='INPLACE';
+SHOW GLOBAL VARIABLES LIKE 'alter_algorithm';
+Variable_name Value
+alter_algorithm INPLACE
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats OK
+mysql.innodb_table_stats OK
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry OK
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+sys.host_summary OK
+sys.host_summary_by_file_io OK
+sys.host_summary_by_file_io_type OK
+sys.host_summary_by_stages OK
+sys.host_summary_by_statement_latency OK
+sys.host_summary_by_statement_type OK
+sys.innodb_buffer_stats_by_schema OK
+sys.innodb_buffer_stats_by_table OK
+sys.innodb_lock_waits OK
+sys.io_by_thread_by_latency OK
+sys.io_global_by_file_by_bytes OK
+sys.io_global_by_file_by_latency OK
+sys.io_global_by_wait_by_bytes OK
+sys.io_global_by_wait_by_latency OK
+sys.latest_file_io OK
+sys.memory_by_host_by_current_bytes OK
+sys.memory_by_thread_by_current_bytes OK
+sys.memory_by_user_by_current_bytes OK
+sys.memory_global_by_current_bytes OK
+sys.memory_global_total OK
+sys.metrics OK
+sys.processlist OK
+sys.ps_check_lost_instrumentation OK
+sys.schema_auto_increment_columns OK
+sys.schema_index_statistics OK
+sys.schema_object_overview OK
+sys.schema_redundant_indexes OK
+sys.schema_table_lock_waits OK
+sys.schema_table_statistics OK
+sys.schema_table_statistics_with_buffer OK
+sys.schema_tables_with_full_table_scans OK
+sys.schema_unused_indexes OK
+sys.session OK
+sys.session_ssl_status OK
+sys.statement_analysis OK
+sys.statements_with_errors_or_warnings OK
+sys.statements_with_full_table_scans OK
+sys.statements_with_runtimes_in_95th_percentile OK
+sys.statements_with_sorting OK
+sys.statements_with_temp_tables OK
+sys.user_summary OK
+sys.user_summary_by_file_io OK
+sys.user_summary_by_file_io_type OK
+sys.user_summary_by_stages OK
+sys.user_summary_by_statement_latency OK
+sys.user_summary_by_statement_type OK
+sys.version OK
+sys.wait_classes_global_by_avg_latency OK
+sys.wait_classes_global_by_latency OK
+sys.waits_by_host_by_latency OK
+sys.waits_by_user_by_latency OK
+sys.waits_global_by_latency OK
+sys.x$host_summary OK
+sys.x$host_summary_by_file_io OK
+sys.x$host_summary_by_file_io_type OK
+sys.x$host_summary_by_stages OK
+sys.x$host_summary_by_statement_latency OK
+sys.x$host_summary_by_statement_type OK
+sys.x$innodb_buffer_stats_by_schema OK
+sys.x$innodb_buffer_stats_by_table OK
+sys.x$innodb_lock_waits OK
+sys.x$io_by_thread_by_latency OK
+sys.x$io_global_by_file_by_bytes OK
+sys.x$io_global_by_file_by_latency OK
+sys.x$io_global_by_wait_by_bytes OK
+sys.x$io_global_by_wait_by_latency OK
+sys.x$latest_file_io OK
+sys.x$memory_by_host_by_current_bytes OK
+sys.x$memory_by_thread_by_current_bytes OK
+sys.x$memory_by_user_by_current_bytes OK
+sys.x$memory_global_by_current_bytes OK
+sys.x$memory_global_total OK
+sys.x$processlist OK
+sys.x$ps_digest_95th_percentile_by_avg_us OK
+sys.x$ps_digest_avg_latency_distribution OK
+sys.x$ps_schema_table_statistics_io OK
+sys.x$schema_flattened_keys OK
+sys.x$schema_index_statistics OK
+sys.x$schema_table_lock_waits OK
+sys.x$schema_table_statistics OK
+sys.x$schema_table_statistics_with_buffer OK
+sys.x$schema_tables_with_full_table_scans OK
+sys.x$session OK
+sys.x$statement_analysis OK
+sys.x$statements_with_errors_or_warnings OK
+sys.x$statements_with_full_table_scans OK
+sys.x$statements_with_runtimes_in_95th_percentile OK
+sys.x$statements_with_sorting OK
+sys.x$statements_with_temp_tables OK
+sys.x$user_summary OK
+sys.x$user_summary_by_file_io OK
+sys.x$user_summary_by_file_io_type OK
+sys.x$user_summary_by_stages OK
+sys.x$user_summary_by_statement_latency OK
+sys.x$user_summary_by_statement_type OK
+sys.x$wait_classes_global_by_avg_latency OK
+sys.x$wait_classes_global_by_latency OK
+sys.x$waits_by_host_by_latency OK
+sys.x$waits_by_user_by_latency OK
+sys.x$waits_global_by_latency OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+sys
+sys.sys_config OK
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+SET GLOBAL alter_algorithm=DEFAULT;
+SHOW GLOBAL VARIABLES LIKE 'alter_algorithm';
+Variable_name Value
+alter_algorithm DEFAULT
+End of 10.3 tests
# switching from mysql.global_priv to mysql.user
drop view mysql.user_bak;
create user 'user3'@'localhost' identified with mysql_native_password as password('a_password');
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test
index 8bff2a87d98..b9ff05401f7 100644
--- a/mysql-test/main/mysql_upgrade.test
+++ b/mysql-test/main/mysql_upgrade.test
@@ -384,7 +384,20 @@ update mysql.db set Delete_history_priv='Y' where db like 'test%';
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
---echo # End of 10.3 tests
+--echo #
+--echo # MDEV-16735 Upgrades only work if 'alter_algorithm' is 'DEFAULT'
+--echo # or 'COPY'. Test that the session value 'DEFAULT' in mysql_upgrade
+--echo # properly overrides the potentially incompatible global value.
+--echo #
+
+SET GLOBAL alter_algorithm='INPLACE';
+SHOW GLOBAL VARIABLES LIKE 'alter_algorithm';
+--exec $MYSQL_UPGRADE --force 2>&1
+SET GLOBAL alter_algorithm=DEFAULT;
+SHOW GLOBAL VARIABLES LIKE 'alter_algorithm';
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo End of 10.3 tests
--source include/switch_to_mysql_user.inc
drop view mysql.user_bak;
diff --git a/mysql-test/main/mysql_upgrade_view.result b/mysql-test/main/mysql_upgrade_view.result
index a7f13c185a8..ca879b92559 100644
--- a/mysql-test/main/mysql_upgrade_view.result
+++ b/mysql-test/main/mysql_upgrade_view.result
@@ -1,3 +1,4 @@
+reset master;
set sql_log_bin=0;
drop table if exists t1,v1,v2,v3,v4,v1badcheck;
drop view if exists t1,v1,v2,v3,v4,v1badcheck;
diff --git a/mysql-test/main/mysql_upgrade_view.test b/mysql-test/main/mysql_upgrade_view.test
index 3de7284c40c..d3d955e7cae 100644
--- a/mysql-test/main/mysql_upgrade_view.test
+++ b/mysql-test/main/mysql_upgrade_view.test
@@ -1,6 +1,7 @@
-- source include/have_log_bin.inc
-- source include/have_perfschema.inc
+reset master; # clear binlogs
set sql_log_bin=0;
--disable_warnings
drop table if exists t1,v1,v2,v3,v4,v1badcheck;
diff --git a/mysql-test/main/partition_alter.result b/mysql-test/main/partition_alter.result
index 0134f4a8ebb..29e239aa087 100644
--- a/mysql-test/main/partition_alter.result
+++ b/mysql-test/main/partition_alter.result
@@ -211,6 +211,19 @@ Table Op Msg_type Msg_text
test.t check status OK
delete from t order by b limit 1;
drop table t;
+#
+# MDEV-30112 ASAN errors in Item_ident::print / generate_partition_syntax
+#
+create table t (a int) partition by hash(a);
+alter table t change a b int, drop a;
+ERROR 42S22: Unknown column 'a' in 't'
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`a`)
+drop table t;
# End of 10.3 tests
#
# Start of 10.4 tests
diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test
index 48d9657c7bd..827527695fa 100644
--- a/mysql-test/main/partition_alter.test
+++ b/mysql-test/main/partition_alter.test
@@ -196,6 +196,16 @@ delete from t order by b limit 1;
# cleanup
drop table t;
+--echo #
+--echo # MDEV-30112 ASAN errors in Item_ident::print / generate_partition_syntax
+--echo #
+create table t (a int) partition by hash(a);
+--error ER_BAD_FIELD_ERROR
+alter table t change a b int, drop a;
+show create table t;
+# Cleanup
+drop table t;
+
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/precedence_bugs.result b/mysql-test/main/precedence_bugs.result
index 4b13e820d7f..723ab823b48 100644
--- a/mysql-test/main/precedence_bugs.result
+++ b/mysql-test/main/precedence_bugs.result
@@ -58,3 +58,21 @@ Create View CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY D
character_set_client latin1
collation_connection latin1_swedish_ci
drop view v1;
+#
+# MDEV-30082 View definition losing brackets changes semantics of the query and causes wrong result
+#
+create table t1 (a varchar(1), b bool) engine=myisam;
+insert into t1 values ('u',1),('s',1);
+select * from t1 where t1.b in (t1.a <= all (select 'a'));
+a b
+create view v as select * from t1 where t1.b in (t1.a <= all (select 'a'));
+select * from v;
+a b
+show create view v;
+View Create View character_set_client collation_connection
+v CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where `t1`.`b` = (`t1`.`a` <= all (select 'a')) latin1 latin1_swedish_ci
+drop view v;
+drop table t1;
+#
+# End of 10.3 results
+#
diff --git a/mysql-test/main/precedence_bugs.test b/mysql-test/main/precedence_bugs.test
index 6e8e624c840..ae35ca91527 100644
--- a/mysql-test/main/precedence_bugs.test
+++ b/mysql-test/main/precedence_bugs.test
@@ -39,3 +39,19 @@ drop table t1;
create view v1 as select 1 like (now() between '2000-01-01' and '2012-12-12' );
query_vertical show create view v1;
drop view v1;
+
+--echo #
+--echo # MDEV-30082 View definition losing brackets changes semantics of the query and causes wrong result
+--echo #
+create table t1 (a varchar(1), b bool) engine=myisam;
+insert into t1 values ('u',1),('s',1);
+select * from t1 where t1.b in (t1.a <= all (select 'a'));
+create view v as select * from t1 where t1.b in (t1.a <= all (select 'a'));
+select * from v;
+show create view v;
+drop view v;
+drop table t1;
+
+--echo #
+--echo # End of 10.3 results
+--echo #
diff --git a/mysql-test/main/stat_tables_rbr.result b/mysql-test/main/stat_tables_rbr.result
index 130d1f6da9a..38f774412bd 100644
--- a/mysql-test/main/stat_tables_rbr.result
+++ b/mysql-test/main/stat_tables_rbr.result
@@ -1,3 +1,4 @@
+RESET MASTER;
#
# Bug mdev-463: assertion failure when running ANALYZE with RBR on
#
diff --git a/mysql-test/main/stat_tables_rbr.test b/mysql-test/main/stat_tables_rbr.test
index 1b6a9603743..efa54423dfa 100644
--- a/mysql-test/main/stat_tables_rbr.test
+++ b/mysql-test/main/stat_tables_rbr.test
@@ -1,7 +1,7 @@
--source include/have_binlog_format_row.inc
--source include/have_innodb.inc
--source include/have_partition.inc
-
+RESET MASTER; # clear up binlogs
--echo #
--echo # Bug mdev-463: assertion failure when running ANALYZE with RBR on
--echo #
diff --git a/mysql-test/main/type_float.result b/mysql-test/main/type_float.result
index 03a4d80b80a..ddb80bf24e8 100644
--- a/mysql-test/main/type_float.result
+++ b/mysql-test/main/type_float.result
@@ -961,6 +961,13 @@ id a
DELETE FROM t1 WHERE a=CAST(0.671437 AS FLOAT);
DROP TABLE t1;
#
+# MDEV-29473 UBSAN: Signed integer overflow: X * Y cannot be represented in type 'int' in strings/dtoa.c
+#
+CREATE TABLE t1 (c DOUBLE);
+INSERT INTO t1 VALUES ('1e4294967297');
+ERROR 22003: Out of range value for column 'c' at row 1
+DROP TABLE t1;
+#
# End of 10.3 tests
#
#
diff --git a/mysql-test/main/type_float.test b/mysql-test/main/type_float.test
index e48c82c1914..6a1636cf9b9 100644
--- a/mysql-test/main/type_float.test
+++ b/mysql-test/main/type_float.test
@@ -669,6 +669,16 @@ SELECT * FROM t1;
DELETE FROM t1 WHERE a=CAST(0.671437 AS FLOAT);
DROP TABLE t1;
+--echo #
+--echo # MDEV-29473 UBSAN: Signed integer overflow: X * Y cannot be represented in type 'int' in strings/dtoa.c
+--echo #
+
+# This test was failing with UBSAN builds
+
+CREATE TABLE t1 (c DOUBLE);
+--error ER_WARN_DATA_OUT_OF_RANGE
+INSERT INTO t1 VALUES ('1e4294967297');
+DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result
index dcd2f4389c2..aab13d191a4 100644
--- a/mysql-test/main/union.result
+++ b/mysql-test/main/union.result
@@ -1,4 +1,3 @@
-drop table if exists t1,t2,t3,t4,t5,t6;
CREATE TABLE t1 (a int not null, b char (10) not null);
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
CREATE TABLE t2 (a int not null, b char (10) not null);
@@ -1536,6 +1535,9 @@ DROP TABLE t1;
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 'into @var) union (select 1)' at line 1
(select 1) union (select 1 into @var);
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 'into @var)' at line 1
+select @var;
+@var
+NULL
(select 2) union (select 1 into @var);
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 'into @var)' at line 1
(select 1) union (select 1) into @var;
@@ -2764,5 +2766,20 @@ a b c d
3 4 2 197
drop table t1,t2;
#
+# MDEV-30066 (limit + offset) union all (...) limit = incorrect result
+#
+create table t1(id int primary key auto_increment, c1 int);
+insert into t1(c1) values(1),(2),(3);
+(select * from t1 where c1>=1 order by c1 desc limit 2,1) union all (select * from t1 where c1>1 order by c1 desc);
+id c1
+1 1
+2 2
+3 3
+(select * from t1 where c1>=1 order by c1 desc limit 2,1) union all (select * from t1 where c1>1 order by c1 desc) limit 2;
+id c1
+1 1
+2 2
+drop table t1;
+#
# End of 10.3 tests
#
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index e2d7cc09947..4cebdcff9bb 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -2,10 +2,6 @@
# Test of unions
#
---disable_warnings
-drop table if exists t1,t2,t3,t4,t5,t6;
---enable_warnings
-
CREATE TABLE t1 (a int not null, b char (10) not null);
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
CREATE TABLE t2 (a int not null, b char (10) not null);
@@ -23,7 +19,7 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g
(select a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 4;
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1);
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
---error 1250
+--error ER_TABLENAME_NOT_ALLOWED_HERE
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b;
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;
--disable_view_protocol
@@ -42,13 +38,13 @@ select found_rows();
explain select a,b from t1 union all select a,b from t2;
---error 1054
+--error ER_BAD_FIELD_ERROR
explain select xx from t1 union select 1;
---error 1222
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
explain select a,b from t1 union select 1;
---error 1222
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
explain select 1 union select a,b from t1 union select 1;
---error 1222
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
explain select a,b from t1 union select 1 limit 0;
--error ER_PARSE_ERROR
@@ -60,19 +56,19 @@ select a,b from t1 order by a union select a,b from t2;
--error ER_PARSE_ERROR
insert into t3 select a from t1 order by a union select a from t2;
---error 1222
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
create table t3 select a,b from t1 union select a from t2;
---error 1222
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
select a,b from t1 union select a from t2;
---error 1222
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
select * from t1 union select a from t2;
---error 1222
+--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
select a from t1 union select * from t2;
---error 1234
+--error ER_CANT_USE_OPTION_HERE
select * from t1 union select SQL_BUFFER_RESULT * from t2;
# Test CREATE, INSERT and REPLACE
@@ -86,13 +82,13 @@ drop table t1,t2,t3;
#
# Test some unions without tables
#
---error 1096
+--error ER_NO_TABLES_USED
select * union select 1;
select 1 as a,(select a union select a);
---error 1054
+--error ER_BAD_FIELD_ERROR
(select 1) union (select 2) order by 0;
SELECT @a:=1 UNION SELECT @a:=@a+1;
---error 1054
+--error ER_BAD_FIELD_ERROR
(SELECT 1) UNION (SELECT 2) ORDER BY (SELECT a);
--sorted_result
(SELECT 1,3) UNION (SELECT 2,1) ORDER BY (SELECT 2);
@@ -295,7 +291,7 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a desc LIMIT 1;
(SELECT * FROM t1 ORDER by a) UNION ALL (SELECT * FROM t2 ORDER BY a) ORDER BY A desc LIMIT 4;
# Wrong usage
---error 1234
+--error ER_CANT_USE_OPTION_HERE
(SELECT * FROM t1) UNION all (SELECT SQL_CALC_FOUND_ROWS * FROM t2) LIMIT 1;
create temporary table t1 select a from t1 union select a from t2;
@@ -478,7 +474,7 @@ create table t1 select 1 union select -1;
select * from t1;
show create table t1;
drop table t1;
--- error 1267
+-- error ER_CANT_AGGREGATE_2COLLATIONS
create table t1 select _latin1"test" union select _latin2"testt" ;
create table t1 select _latin2"test" union select _latin2"testt" ;
show create table t1;
@@ -586,7 +582,7 @@ set sql_select_limit=default;
#
CREATE TABLE t1 (i int(11) default NULL,c char(1) default NULL,KEY i (i));
CREATE TABLE t2 (i int(11) default NULL,c char(1) default NULL,KEY i (i));
---error 1054
+--error ER_BAD_FIELD_ERROR
explain (select * from t1) union (select * from t2) order by not_existing_column;
drop table t1, t2;
@@ -688,7 +684,7 @@ drop table t1;
create table t2 (
a char character set latin1 collate latin1_swedish_ci,
b char character set latin1 collate latin1_german1_ci);
---error 1271
+--error ER_CANT_AGGREGATE_NCOLLATIONS
create table t1 as
(select a from t2) union
(select b from t2);
@@ -985,7 +981,7 @@ CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (3),(1),(2),(4),(1);
SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a) AS test;
---error 1054
+--error ER_BAD_FIELD_ERROR
SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY c) AS test;
DROP TABLE t1;
@@ -998,6 +994,7 @@ DROP TABLE t1;
(select 1 into @var) union (select 1);
--error ER_PARSE_ERROR
(select 1) union (select 1 into @var);
+select @var;
--error ER_PARSE_ERROR
(select 2) union (select 1 into @var);
--enable_prepare_warnings
@@ -2002,5 +1999,14 @@ union (select 0 as a, 99 as b,
drop table t1,t2;
--echo #
+--echo # MDEV-30066 (limit + offset) union all (...) limit = incorrect result
+--echo #
+create table t1(id int primary key auto_increment, c1 int);
+insert into t1(c1) values(1),(2),(3);
+(select * from t1 where c1>=1 order by c1 desc limit 2,1) union all (select * from t1 where c1>1 order by c1 desc);
+(select * from t1 where c1>=1 order by c1 desc limit 2,1) union all (select * from t1 where c1>1 order by c1 desc) limit 2;
+drop table t1;
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/varbinary.test b/mysql-test/main/varbinary.test
index b35819b0fb3..19e0e88932e 100644
--- a/mysql-test/main/varbinary.test
+++ b/mysql-test/main/varbinary.test
@@ -149,12 +149,9 @@ select N'', length(N'');
select '', length('');
--enable_view_protocol
-#enable after fix MDEV-28696
---disable_view_protocol
select b'', 0+b'';
select x'', 0+x'';
---enable_view_protocol
--error ER_BAD_FIELD_ERROR
select 0x;
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index 27ae01a5b40..b653a5099f7 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -6912,6 +6912,14 @@ deallocate prepare stmt;
drop view v1;
drop table t1;
#
+# MDEV-28696 View created as "select b''; " references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+#
+CREATE VIEW v1 as select b'';
+SELECT * FROM v1;
+b''
+
+DROP VIEW v1;
+#
# End of 10.3 tests
#
#
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index 334b17611ce..f684f072eb3 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -6645,6 +6645,15 @@ drop view v1;
drop table t1;
--echo #
+--echo # MDEV-28696 View created as "select b''; " references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+--echo #
+
+CREATE VIEW v1 as select b'';
+SELECT * FROM v1;
+DROP VIEW v1;
+
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/windows_debug.result b/mysql-test/main/windows_debug.result
index e6816cdd99b..797056b00a1 100644
--- a/mysql-test/main/windows_debug.result
+++ b/mysql-test/main/windows_debug.result
@@ -1,4 +1,10 @@
# mdev-23741 sharing violation when renaming .frm file in ALTER
-CREATE TABLE t(i int);
-SET STATEMENT debug_dbug='+d,rename_sharing_violation' FOR ALTER TABLE t ADD PRIMARY KEY (i);
+SET @saved_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,file_sharing_violation';
+CREATE TABLE t(i int) ENGINE=ARIA;
+ALTER TABLE t ADD PRIMARY KEY (i);
+FLUSH TABLES t;
+SELECT * FROM t;
+i
DROP TABLE t;
+SET debug_dbug=@saved_dbug;
diff --git a/mysql-test/main/windows_debug.test b/mysql-test/main/windows_debug.test
index bb0880ddc55..32ea57552a7 100644
--- a/mysql-test/main/windows_debug.test
+++ b/mysql-test/main/windows_debug.test
@@ -4,8 +4,16 @@
--source include/windows.inc
--echo # mdev-23741 sharing violation when renaming .frm file in ALTER
-CREATE TABLE t(i int);
-SET STATEMENT debug_dbug='+d,rename_sharing_violation' FOR ALTER TABLE t ADD PRIMARY KEY (i);
+
+SET @saved_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,file_sharing_violation';
+
+CREATE TABLE t(i int) ENGINE=ARIA;
+ALTER TABLE t ADD PRIMARY KEY (i);
+FLUSH TABLES t;
+SELECT * FROM t;
DROP TABLE t;
+SET debug_dbug=@saved_dbug;
+
#End of 10.3 tests
diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl
index 48b1abf3c1d..27d62400fd5 100755
--- a/mysql-test/mariadb-test-run.pl
+++ b/mysql-test/mariadb-test-run.pl
@@ -4441,6 +4441,7 @@ sub extract_warning_lines ($$) {
qr|InnoDB: io_setup\(\) failed with EAGAIN|,
qr|io_uring_queue_init\(\) failed with|,
qr|InnoDB: liburing disabled|,
+ qr/InnoDB: Failed to set (O_DIRECT|DIRECTIO_ON) on file/,
qr|setrlimit could not change the size of core files to 'infinity';|,
qr|feedback plugin: failed to retrieve the MAC address|,
qr|Plugin 'FEEDBACK' init function returned error|,
diff --git a/mysql-test/std_data/mysql80/ibdata1_16384 b/mysql-test/std_data/mysql80/ibdata1_16384
new file mode 100644
index 00000000000..7eeea4fdaf1
--- /dev/null
+++ b/mysql-test/std_data/mysql80/ibdata1_16384
Binary files differ
diff --git a/mysql-test/std_data/mysql80/ibdata1_32768 b/mysql-test/std_data/mysql80/ibdata1_32768
new file mode 100644
index 00000000000..ebcaef08d39
--- /dev/null
+++ b/mysql-test/std_data/mysql80/ibdata1_32768
Binary files differ
diff --git a/mysql-test/std_data/mysql80/ibdata1_4096 b/mysql-test/std_data/mysql80/ibdata1_4096
new file mode 100644
index 00000000000..67834106f48
--- /dev/null
+++ b/mysql-test/std_data/mysql80/ibdata1_4096
Binary files differ
diff --git a/mysql-test/std_data/mysql80/ibdata1_65536 b/mysql-test/std_data/mysql80/ibdata1_65536
new file mode 100644
index 00000000000..3d3d3043b4c
--- /dev/null
+++ b/mysql-test/std_data/mysql80/ibdata1_65536
Binary files differ
diff --git a/mysql-test/std_data/mysql80/ibdata1_8192 b/mysql-test/std_data/mysql80/ibdata1_8192
new file mode 100644
index 00000000000..5082eff5ee2
--- /dev/null
+++ b/mysql-test/std_data/mysql80/ibdata1_8192
Binary files differ
diff --git a/mysql-test/std_data/mysql80/t1.ibd b/mysql-test/std_data/mysql80/t1.ibd
new file mode 100644
index 00000000000..5cfd9b54496
--- /dev/null
+++ b/mysql-test/std_data/mysql80/t1.ibd
Binary files differ
diff --git a/mysql-test/std_data/vcol_autoinc.MYI b/mysql-test/std_data/vcol_autoinc.MYI
index ddb3f2e0748..9b174844f9f 100644
--- a/mysql-test/std_data/vcol_autoinc.MYI
+++ b/mysql-test/std_data/vcol_autoinc.MYI
Binary files differ
diff --git a/mysql-test/std_data/vcol_autoinc.frm b/mysql-test/std_data/vcol_autoinc.frm
index bff7983735c..ee43f878856 100644
--- a/mysql-test/std_data/vcol_autoinc.frm
+++ b/mysql-test/std_data/vcol_autoinc.frm
Binary files differ
diff --git a/mysql-test/std_data/wsrep_notify.sh b/mysql-test/std_data/wsrep_notify.sh
index 80333b2eab8..828d5cf99da 100755
--- a/mysql-test/std_data/wsrep_notify.sh
+++ b/mysql-test/std_data/wsrep_notify.sh
@@ -6,30 +6,32 @@
#
# Edit parameters below to specify the address and login to server:
#
-USER=root
-PSWD=
+USER='root'
+PSWD=''
#
# If these parameters are not set, then the values
# passed by the server are taken:
#
-HOST=127.0.0.1
+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_cert=""
+ssl_key=""
+ssl_ca=""
+ssl_capath=""
+ssl_cipher=""
+ssl_crl=""
+ssl_crlpath=""
ssl_verify_server_cert=0
#
# Client executable path:
#
CLIENT="$EXE_MYSQL"
-
+#
+# Name of schema and tables:
+#
SCHEMA="mtr_wsrep_notify"
MEMB_TABLE="$SCHEMA.membership"
STATUS_TABLE="$SCHEMA.status"
@@ -65,9 +67,9 @@ configuration_change()
do
echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, "
# Don't forget to properly quote string values
- echo "'$NODE'" | sed s/\\//\',\'/g
+ echo "'$NODE'" | sed s/\\//\',\'/g
echo ");"
- idx=$(( $idx + 1 ))
+ idx=$(( $idx+1 ))
done
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
@@ -102,34 +104,35 @@ trim_string()
fi
}
-COM=status_update # not a configuration change by default
+COM='status_update' # not a configuration change by default
STATUS=""
CLUSTER_UUID=""
-PRIMARY="0"
+PRIMARY=0
INDEX=""
MEMBERS=""
while [ $# -gt 0 ]; do
case $1 in
- --status)
+ '--status')
STATUS=$(trim_string "$2")
shift
;;
- --uuid)
+ '--uuid')
CLUSTER_UUID=$(trim_string "$2")
shift
;;
- --primary)
- [ "$2" = "yes" ] && PRIMARY="1" || PRIMARY="0"
- COM=configuration_change
+ '--primary')
+ arg=$(trim_string "$2")
+ [ "$arg" = 'yes' ] && PRIMARY=1 || PRIMARY=0
+ COM='configuration_change'
shift
;;
- --index)
+ '--index')
INDEX=$(trim_string "$2")
shift
;;
- --members)
+ '--members')
MEMBERS=$(trim_string "$2")
shift
;;
@@ -168,9 +171,7 @@ 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" ]
+if [ -n "$ssl_key$ssl_cert$ssl_ca$ssl_capath$ssl_cipher$ssl_crl$ssl_crlpath" ]
then
SSL_PARAM=' --ssl'
[ -n "$ssl_key" ] && SSL_PARAM="$SSL_PARAM --ssl-key='$ssl_key'"
@@ -181,8 +182,10 @@ then
[ -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'
+ if [ "$ssl_verify_server_cert" != "0" -o \
+ "$ssl_verify_server_cert" = "on" ]
+ then
+ SSL_PARAM="$SSL_PARAM --ssl-verify-server-cert"
fi
fi
fi
diff --git a/mysql-test/std_data/wsrep_notify_ssl.sh b/mysql-test/std_data/wsrep_notify_ssl.sh
index 6c96db1a4e5..ce5e3f8c695 100755
--- a/mysql-test/std_data/wsrep_notify_ssl.sh
+++ b/mysql-test/std_data/wsrep_notify_ssl.sh
@@ -6,13 +6,13 @@
#
# Edit parameters below to specify the address and login to server:
#
-USER=root
-PSWD=
+USER='root'
+PSWD=''
#
# If these parameters are not set, then the values
# passed by the server are taken:
#
-HOST=127.0.0.1
+HOST="127.0.0.1"
PORT=$NODE_MYPORT_1
#
# Edit parameters below to specify SSL parameters:
@@ -20,16 +20,18 @@ PORT=$NODE_MYPORT_1
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_capath=""
+ssl_cipher=""
+ssl_crl=""
+ssl_crlpath=""
ssl_verify_server_cert=0
#
# Client executable path:
#
CLIENT="$EXE_MYSQL"
-
+#
+# Name of schema and tables:
+#
SCHEMA="mtr_wsrep_notify"
MEMB_TABLE="$SCHEMA.membership"
STATUS_TABLE="$SCHEMA.status"
@@ -65,9 +67,9 @@ configuration_change()
do
echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, "
# Don't forget to properly quote string values
- echo "'$NODE'" | sed s/\\//\',\'/g
+ echo "'$NODE'" | sed s/\\//\',\'/g
echo ");"
- idx=$(( $idx + 1 ))
+ idx=$(( $idx+1 ))
done
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
@@ -102,34 +104,35 @@ trim_string()
fi
}
-COM=status_update # not a configuration change by default
+COM='status_update' # not a configuration change by default
STATUS=""
CLUSTER_UUID=""
-PRIMARY="0"
+PRIMARY=0
INDEX=""
MEMBERS=""
while [ $# -gt 0 ]; do
case $1 in
- --status)
+ '--status')
STATUS=$(trim_string "$2")
shift
;;
- --uuid)
+ '--uuid')
CLUSTER_UUID=$(trim_string "$2")
shift
;;
- --primary)
- [ "$2" = "yes" ] && PRIMARY="1" || PRIMARY="0"
- COM=configuration_change
+ '--primary')
+ arg=$(trim_string "$2")
+ [ "$arg" = 'yes' ] && PRIMARY=1 || PRIMARY=0
+ COM='configuration_change'
shift
;;
- --index)
+ '--index')
INDEX=$(trim_string "$2")
shift
;;
- --members)
+ '--members')
MEMBERS=$(trim_string "$2")
shift
;;
@@ -168,9 +171,7 @@ 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" ]
+if [ -n "$ssl_key$ssl_cert$ssl_ca$ssl_capath$ssl_cipher$ssl_crl$ssl_crlpath" ]
then
SSL_PARAM=' --ssl'
[ -n "$ssl_key" ] && SSL_PARAM="$SSL_PARAM --ssl-key='$ssl_key'"
@@ -181,8 +182,10 @@ then
[ -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'
+ if [ "$ssl_verify_server_cert" != "0" -o \
+ "$ssl_verify_server_cert" = "on" ]
+ then
+ SSL_PARAM="$SSL_PARAM --ssl-verify-server-cert"
fi
fi
fi
diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
index f48b624ec21..546561bf522 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
@@ -1,3 +1,4 @@
+reset master;
create table t1 (a int, b int) engine=innodb;
begin;
insert into t1 values (1,2);
diff --git a/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result b/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result
index 0c3e72133b8..ade3e8acf10 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result
@@ -1,3 +1,4 @@
+reset master;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
diff --git a/mysql-test/suite/binlog/r/binlog_stm_do_db.result b/mysql-test/suite/binlog/r/binlog_stm_do_db.result
index 3d23594135d..c39404aef55 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_do_db.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_do_db.result
@@ -1,3 +1,4 @@
+RESET MASTER;
SET @old_isolation_level= @@session.tx_isolation;
SET @@session.tx_isolation= 'READ-COMMITTED';
CREATE DATABASE b42829;
diff --git a/mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result b/mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result
index d0132931968..021b5b9af43 100644
--- a/mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result
+++ b/mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result
@@ -1,3 +1,4 @@
+reset master;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
select @@innodb_autoinc_lock_mode;
@@innodb_autoinc_lock_mode
diff --git a/mysql-test/suite/binlog/t/binlog_stm_binlog.test b/mysql-test/suite/binlog/t/binlog_stm_binlog.test
index 2430e316577..045be97d3ae 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_binlog.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_binlog.test
@@ -3,6 +3,7 @@
let collation=utf8mb3_unicode_ci;
--source include/have_collation.inc
+reset master; # clear up binlogs
# REQUIREMENT
# replace_regex should replace output of SHOW BINLOG EVENTS
diff --git a/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test b/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test
index ae4cab62fec..d277db979fb 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test
@@ -1,6 +1,6 @@
--source include/not_embedded.inc
--source include/have_binlog_format_statement.inc
-
+reset master; # clear up binlogs
--exec $MYSQL_CLIENT_TEST test_datetime_ranges_mdev15289 > $MYSQLTEST_VARDIR/log/binlog_stm_datetime_ranges_mysql_client_test.out.log 2>&1
--let $binlog_file = LAST
diff --git a/mysql-test/suite/binlog/t/binlog_stm_do_db.test b/mysql-test/suite/binlog/t/binlog_stm_do_db.test
index 991fdef1bea..3ed1734f18d 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_do_db.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_do_db.test
@@ -37,7 +37,7 @@
-- source include/have_log_bin.inc
-- source include/have_innodb.inc
-- source include/have_binlog_format_statement.inc
-
+RESET MASTER; # clear up binlogs
SET @old_isolation_level= @@session.tx_isolation;
SET @@session.tx_isolation= 'READ-COMMITTED';
diff --git a/mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test b/mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test
index a7d43db4c1b..283862ec3be 100644
--- a/mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test
+++ b/mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
--source include/have_binlog_format_mixed.inc
-
+reset master; #clear up binlogs
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
select @@innodb_autoinc_lock_mode;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
index 7e59ad4aec3..3cda2bd537b 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
@@ -50,7 +50,6 @@ restore: t1 .ibd and .cfg files
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
ALTER TABLE t1 DISCARD TABLESPACE;
Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
Warning 1812 Tablespace is missing for table 'test/t1'
restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
diff --git a/mysql-test/suite/encryption/r/innodb_import.result b/mysql-test/suite/encryption/r/innodb_import.result
index 169af37f404..54b95ab26d4 100644
--- a/mysql-test/suite/encryption/r/innodb_import.result
+++ b/mysql-test/suite/encryption/r/innodb_import.result
@@ -11,9 +11,10 @@ UNLOCK TABLES;
ALTER TABLE t2 IMPORT TABLESPACE;
ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t2 when .cfg file is missing.
ALTER TABLE t2 DROP KEY idx;
-ALTER TABLE t2 IMPORT TABLESPACE;
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
SELECT * FROM t2;
f1 f2
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
index 051e0d1e125..c2f0bb4a2f0 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
@@ -391,7 +391,7 @@ connection no_privs_424d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg4d_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1d';
@@ -413,7 +413,7 @@ connection yes_privs_424d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg4d_2 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-2d';
@@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connection default;
@@ -633,7 +633,7 @@ connection no_privs_425d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg5d_1 before INSERT on t1 for each row
set @test_var= new.f1;
@@ -649,7 +649,7 @@ connection yes_privs_425d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg5d_2 before INSERT on t1 for each row
set @test_var= new.f1;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
index 6ec5240792c..457d98d572f 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
@@ -1541,8 +1541,8 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
-GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
@@ -1692,8 +1692,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
@@ -1735,8 +1735,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection no_privs;
select current_user;
current_user
diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result
index ae9820b2c70..3a8fbac9170 100644
--- a/mysql-test/suite/funcs_1/r/is_check_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result
@@ -134,7 +134,7 @@ GRANT SELECT (a) ON t1 TO foo;
SHOW GRANTS FOR foo;
Grants for foo@%
GRANT USAGE ON *.* TO `foo`@`%`
-GRANT SELECT (a) ON `db`.`t1` TO `foo`@`%`
+GRANT SELECT (`a`) ON `db`.`t1` TO `foo`@`%`
SELECT * FROM information_schema.check_constraints;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE
def db t1 CONSTRAINT_1 Table `b` > 0
diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges.result b/mysql-test/suite/funcs_1/r/is_column_privileges.result
index 797fc3537a5..3e64f217c74 100644
--- a/mysql-test/suite/funcs_1/r/is_column_privileges.result
+++ b/mysql-test/suite/funcs_1/r/is_column_privileges.result
@@ -219,7 +219,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
-GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
@@ -231,7 +231,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
-GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection default;
ALTER TABLE db_datadict.my_table DROP COLUMN f3;
GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost';
@@ -246,7 +246,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
-GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
@@ -259,7 +259,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
-GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
SELECT f1, f3 FROM db_datadict.my_table;
ERROR 42S22: Unknown column 'f3' in 'field list'
connection default;
@@ -275,7 +275,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
-GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
@@ -288,7 +288,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
-GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection default;
DROP TABLE db_datadict.my_table;
SELECT * FROM information_schema.column_privileges
@@ -302,7 +302,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
-GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
@@ -315,7 +315,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
-GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
+GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection default;
REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost';
SELECT * FROM information_schema.column_privileges
diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result
index c9f8f494ed6..4729ddf0d3a 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result
@@ -243,7 +243,7 @@ def db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
-GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
SHOW GRANTS FOR 'testuser2'@'localhost';
Grants for testuser2@localhost
@@ -262,7 +262,7 @@ def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
-GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
SHOW GRANTS FOR 'testuser2'@'localhost';
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql'
@@ -281,7 +281,7 @@ REVOKE SELECT,GRANT OPTION ON db_datadict.t1 FROM 'testuser1'@'localhost';
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
-GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.statistics
WHERE table_schema LIKE 'db_datadict%'
@@ -294,7 +294,7 @@ def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
-GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
connection default;
disconnect testuser1;
disconnect testuser2;
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result
index a41576629b6..ce052821ec8 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result
@@ -111,7 +111,7 @@ GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost';
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
-GRANT SELECT (f5) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
+GRANT SELECT (`f5`) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'db_datadict'
ORDER BY table_schema,table_name, constraint_name;
@@ -135,7 +135,7 @@ connect testuser1, localhost, testuser1, , db_datadict;
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
-GRANT SELECT (f5) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
+GRANT SELECT (`f5`) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'db_datadict'
ORDER BY table_schema,table_name, constraint_name;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result
index b76e7d01f59..18d55140d67 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result
@@ -391,7 +391,7 @@ connection no_privs_424d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg4d_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1d';
@@ -413,7 +413,7 @@ connection yes_privs_424d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg4d_2 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-2d';
@@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connection default;
@@ -633,7 +633,7 @@ connection no_privs_425d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg5d_1 before INSERT on t1 for each row
set @test_var= new.f1;
@@ -649,7 +649,7 @@ connection yes_privs_425d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg5d_2 before INSERT on t1 for each row
set @test_var= new.f1;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
index c40cbd0ab72..684685480c2 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
@@ -1480,8 +1480,8 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
-GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
@@ -1631,8 +1631,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
@@ -1674,8 +1674,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection no_privs;
select current_user;
current_user
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
index b76e7d01f59..18d55140d67 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
@@ -391,7 +391,7 @@ connection no_privs_424d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg4d_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1d';
@@ -413,7 +413,7 @@ connection yes_privs_424d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg4d_2 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-2d';
@@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connection default;
@@ -633,7 +633,7 @@ connection no_privs_425d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
+GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg5d_1 before INSERT on t1 for each row
set @test_var= new.f1;
@@ -649,7 +649,7 @@ connection yes_privs_425d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg5d_2 before INSERT on t1 for each row
set @test_var= new.f1;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
index 71cf064d201..b44cdb7a007 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
@@ -1480,8 +1480,8 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
-GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
@@ -1631,8 +1631,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
@@ -1674,8 +1674,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
-GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
-GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
+GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
+GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection no_privs;
select current_user;
current_user
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index feac559ff55..1847490c888 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -10,33 +10,14 @@
#
##############################################################################
-GCF-939 : MDEV-21520 galera.GCF-939
-MW-329 : MDEV-19962 Galera test failure on MW-329
galera_as_slave_ctas : MDEV-28378 timeout
-galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
-galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
-galera_bf_kill_debug : MDEV-24485 wsrep::client_state::do_acquire_ownership(): Assertion `state_ == s_idle || mode_ != m_local' failed
-galera_bf_lock_wait : MDEV-21597 wsrep::transaction::start_transaction(): Assertion `active() == false' failed
-galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
-galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
-galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
+galera_bf_abort_at_after_statement : Timeout in wait_condition.inc for SELECT COUNT(*) = 1 FROM t1 where id = 1 and val = 3
galera_pc_recovery : MDEV-25199 cluster fails to start up
-galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
-galera_sst_mysqldump : MDEV-26501 : galera.galera_sst_mysqldump MTR failed: galera SST with mysqldump failed
-galera_unicode_identifiers : MDEV-26500 : galera.galera_unicode_identifiers MTR failed: InnoDB: innodb_fatal_semaphore_wait_threshold was exceeded for dict_sys.mutex
-galera_var_dirty_reads : MDEV-25615 Galera test failure on galera_var_dirty_reads
-galera_var_ignore_apply_errors : MDEV-26770 galera_var_ignore_apply_errors fails Server did not transition to READY state
+galera_sst_encrypted : MDEV-29876 Galera test failure on galera_sst_encrypted
+MW-284 : MDEV-29861 Galera test case hangs
+galera_binlog_checksum : MDEV-29861 Galera test case hangs
+galera_var_notify_ssl_ipv6 : MDEV-29861 Galera test case hangs
galera_var_node_address : MDEV-20485 Galera test failure
-galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
-galera_var_notify_ssl_ipv6 : hangs after the merge of MDEV-27682
-galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
-galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons
-partition : MDEV-19958 Galera test failure on galera.partition
-pxc-421: wsrep_provider is read-only for security reasons
-query_cache: MDEV-15805 Test failure on galera.query_cache
-versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
-galera_bf_abort_at_after_statement : Unstable
-galera_bf_abort_shutdown : MDEV-29773 Assertion failure on sql/wsrep_mysqld.cc:2893 in wsrep_bf_abort_shutdown
-galera.MW-284 : MDEV-29861: Galera test case hangs
-galera.galera_binlog_checksum : MDEV-29861: Galera test case hangs
-galera_var_notify_ssl_ipv6 : MDEV-29861: Galera test case hangs
+MDEV-26575 : MDEV-29878 Galera test failure on MDEV-26575
+galera_bf_abort_shutdown : MDEV-29918 Assertion failure on galera_bf_abort_shutdown
+galera_wan : [ERROR] WSREP: /home/buildbot/buildbot/build/gcs/src/gcs_state_msg.cpp:gcs_state_msg_get_quorum():947: Failed to establish quorum.
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 5707b68e190..5233ea6c63c 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
@@ -10,4 +10,6 @@ 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;
connection node_1;
+connection node_2a;
+connection node_1;
DROP TABLE t1;
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 faa85126f03..63b16165970 100644
--- a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result
+++ b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result
@@ -94,6 +94,7 @@ 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;
@@ -130,9 +131,11 @@ 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("conflict state 7 after post commit");
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
include/assert_grep.inc [async IST sender starting to serve]
connection node_2;
+call mtr.add_suppression("Error in Log_event::read_log_event():.*");
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
include/assert_grep.inc [Recovering GCache ring buffer: found gapless sequence]
diff --git a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result
index 244623d52b7..87f61e2be62 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result
@@ -1,6 +1,22 @@
connection node_2;
connection node_1;
connection node_1;
+connection node_2;
+connection node_2;
+Shutting down server ...
+connection node_1;
+connection node_2;
+Cleaning grastate.dat file ...
+Starting server ...
+connection node_1;
+connection node_2;
+connection node_2;
+Shutting down server ...
+connection node_1;
+connection node_2;
+Cleaning grastate.dat file ...
+Starting server ...
+connection node_1;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE
Primary
@@ -38,3 +54,7 @@ VARIABLE_VALUE
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE
Synced
+Shutting down server ...
+Cleaning var directory ...
+Starting server ...
+connection node_1;
diff --git a/mysql-test/suite/galera/r/partition.result b/mysql-test/suite/galera/r/partition.result
index 2e16d06519c..9d649fcec69 100644
--- a/mysql-test/suite/galera/r/partition.result
+++ b/mysql-test/suite/galera/r/partition.result
@@ -57,7 +57,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
-) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1
+) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
PARTITION BY RANGE (`i`)
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION `p2` VALUES LESS THAN (20) ENGINE = InnoDB,
@@ -67,7 +67,7 @@ Table Create Table
p1 CREATE TABLE `p1` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
-) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT * FROM test.t1;
i
19
@@ -94,7 +94,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
PARTITION BY RANGE (`i`)
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION `pMax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
@@ -106,7 +106,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
PARTITION BY RANGE (`i`)
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION `pMax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
diff --git a/mysql-test/suite/galera/r/query_cache.result b/mysql-test/suite/galera/r/query_cache.result
deleted file mode 100644
index 5dabd38a982..00000000000
--- a/mysql-test/suite/galera/r/query_cache.result
+++ /dev/null
@@ -1,1758 +0,0 @@
-connection node_2;
-connection node_1;
-
-# Execute FLUSH/RESET commands.
-# On node-1
-connection node_1;
-SET @query_cache_size_saved=@@GLOBAL.query_cache_size;
-SET @query_cache_type_saved=@@GLOBAL.query_cache_type;
-set GLOBAL query_cache_size=1355776;
-flush query cache;
-reset query cache;
-flush status;
-# On node-2
-connection node_2;
-SET @query_cache_size_saved=@@GLOBAL.query_cache_size;
-SET @query_cache_type_saved=@@GLOBAL.query_cache_type;
-set GLOBAL query_cache_size=1355776;
-flush query cache;
-reset query cache;
-flush status;
-# On node-1
-connection node_1;
-create table t1 (a int not null) engine=innodb;
-insert into t1 values (1),(2),(3);
-select * from t1;
-a
-1
-2
-3
-select * from t1;
-a
-1
-2
-3
-select sql_no_cache * from t1;
-a
-1
-2
-3
-select length(now()) from t1;
-length(now())
-19
-19
-19
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-2
-connection node_2;
-select * from t1;
-a
-1
-2
-3
-select * from t1;
-a
-1
-2
-3
-select sql_no_cache * from t1;
-a
-1
-2
-3
-select length(now()) from t1;
-length(now())
-19
-19
-19
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-1
-connection node_1;
-delete from t1 where a=1;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-2
-connection node_2;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-1
-connection node_1;
-select * from t1;
-a
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-2
-connection node_2;
-select * from t1;
-a
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-1
-connection node_1;
-update t1 set a=1 where a=3;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-2
-connection node_2;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-1
-connection node_1;
-select * from t1;
-a
-2
-1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-2
-connection node_2;
-select * from t1;
-a
-2
-1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-1
-connection node_1;
-drop table t1;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-# On node-2
-connection node_2;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 1
-
-# On node-1
-connection node_1;
-create table t1 (a int not null) ENGINE=MyISAM;
-insert into t1 values (1),(2),(3);
-create table t2 (a int not null) ENGINE=MyISAM;
-insert into t2 values (4),(5),(6);
-create table t3 (a int not null) engine=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST;
-select * from t3;
-a
-1
-2
-3
-4
-5
-6
-select * from t3;
-a
-1
-2
-3
-4
-5
-6
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 2
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 2
-insert into t2 values (7);
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 2
-select * from t1;
-a
-1
-2
-3
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-insert into t3 values (8);
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-select * from t3;
-a
-1
-2
-3
-8
-4
-5
-6
-7
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-update t2 set a=9 where a=7;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-select * from t1;
-a
-1
-2
-3
-8
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-update t3 set a=10 where a=1;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-select * from t3;
-a
-10
-2
-3
-8
-4
-5
-6
-9
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-delete from t2 where a=9;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-select * from t1;
-a
-10
-2
-3
-8
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-delete from t3 where a=10;
-select * from t3;
-a
-2
-3
-8
-4
-5
-6
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-# On node-2
-connection node_2;
-select * from t3;
-a
-select * from t3;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 4
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 2
-drop table t1, t2, t3;
-# On node-1
-connection node_1;
-set query_cache_type=demand;
-create table t1 (a int not null) engine=innodb;
-insert into t1 values (1),(2),(3);
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-select sql_cache * from t1 union select * from t1;
-a
-1
-2
-3
-set query_cache_type=2;
-select sql_cache * from t1 union select * from t1;
-a
-1
-2
-3
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 4
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-set query_cache_type=on;
-# On node-2
-connection node_2;
-set query_cache_type=demand;
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 2
-select sql_cache * from t1 union select * from t1;
-a
-1
-2
-3
-set query_cache_type=2;
-select sql_cache * from t1 union select * from t1;
-a
-1
-2
-3
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-set query_cache_type=on;
-# On node-1
-connection node_1;
-select sql_no_cache * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 4
-# On node-2
-connection node_2;
-select sql_no_cache * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-drop table t1;
-# On node-1
-connection node_1;
-create table t1 (a text not null) engine=innodb;
-select CONNECTION_ID() from t1;
-CONNECTION_ID()
-select FOUND_ROWS();
-FOUND_ROWS()
-0
-select NOW() from t1;
-NOW()
-select CURDATE() from t1;
-CURDATE()
-select CURTIME() from t1;
-CURTIME()
-select DATABASE() from t1;
-DATABASE()
-select ENCRYPT("test") from t1;
-ENCRYPT("test")
-select LAST_INSERT_ID() from t1;
-LAST_INSERT_ID()
-select RAND() from t1;
-RAND()
-select UNIX_TIMESTAMP() from t1;
-UNIX_TIMESTAMP()
-select USER() from t1;
-USER()
-select CURRENT_USER() from t1;
-CURRENT_USER()
-select benchmark(1,1) from t1;
-benchmark(1,1)
-explain extended select benchmark(1,1) from t1;
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00
-Warnings:
-Note 1003 select benchmark(1,1) AS `benchmark(1,1)` from `test`.`t1`
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 4
-# On node-2
-connection node_2;
-select CONNECTION_ID() from t1;
-CONNECTION_ID()
-select FOUND_ROWS();
-FOUND_ROWS()
-0
-select NOW() from t1;
-NOW()
-select CURDATE() from t1;
-CURDATE()
-select CURTIME() from t1;
-CURTIME()
-select DATABASE() from t1;
-DATABASE()
-select ENCRYPT("test") from t1;
-ENCRYPT("test")
-select LAST_INSERT_ID() from t1;
-LAST_INSERT_ID()
-select RAND() from t1;
-RAND()
-select UNIX_TIMESTAMP() from t1;
-UNIX_TIMESTAMP()
-select USER() from t1;
-USER()
-select CURRENT_USER() from t1;
-CURRENT_USER()
-select benchmark(1,1) from t1;
-benchmark(1,1)
-explain extended select benchmark(1,1) from t1;
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00
-Warnings:
-Note 1003 select benchmark(1,1) AS `benchmark(1,1)` from `test`.`t1`
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-drop table t1;
-# On node-1
-connection node_1;
-create database mysqltest;
-create table mysqltest.t1 (i int not null auto_increment, a int, primary key
-(i)) engine=innodb;
-insert into mysqltest.t1 values (1, 1);
-select * from mysqltest.t1 where i is null;
-i a
-create table t1(a int) engine=innodb;
-select * from t1;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 4
-select * from mysqltest.t1;
-i a
-1 1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 3
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 4
-# On node-2
-connection node_2;
-select * from t1;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-select * from mysqltest.t1;
-i a
-1 1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-drop database mysqltest;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-drop table t1;
-# On node-1
-connection node_1;
-create table t1 (a char(1) not null collate koi8r_general_ci) engine=innodb;
-insert into t1 values(_koi8r 0xc3);
-set CHARACTER SET koi8r;
-select * from t1;
-a
-set CHARACTER SET cp1251_koi8;
-select * from t1;
-a
-set CHARACTER SET DEFAULT;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 4
-# On node-2
-connection node_2;
-set CHARACTER SET koi8r;
-select * from t1;
-a
-set CHARACTER SET cp1251_koi8;
-select * from t1;
-a
-set CHARACTER SET DEFAULT;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 3
-drop table t1;
-# On node-1
-connection node_1;
-create database if not exists mysqltest;
-create table mysqltest.t1 (i int not null) engine=innodb;
-create table t1 (i int not null) engine=innodb;
-insert into mysqltest.t1 (i) values (1);
-insert into t1 (i) values (2);
-select * from t1;
-i
-2
-use mysqltest;
-select * from t1;
-i
-1
-select * from t1;
-i
-1
-use test;
-select * from t1;
-i
-2
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 6
-# On node-2
-connection node_2;
-select * from t1;
-i
-2
-use mysqltest;
-select * from t1;
-i
-1
-select * from t1;
-i
-1
-use test;
-select * from t1;
-i
-2
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 5
-drop database mysqltest;
-drop table t1;
-# On node-1
-connection node_1;
-create table t1 (i int not null) engine=innodb;
-insert into t1 (i) values (1),(2),(3),(4);
-select SQL_CALC_FOUND_ROWS * from t1 limit 2;
-i
-1
-2
-select FOUND_ROWS();
-FOUND_ROWS()
-4
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 6
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-select * from t1 where i=1;
-i
-1
-select FOUND_ROWS();
-FOUND_ROWS()
-1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 6
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-select SQL_CALC_FOUND_ROWS * from t1 limit 2;
-i
-1
-2
-select FOUND_ROWS();
-FOUND_ROWS()
-4
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 7
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-select * from t1 where i=1;
-i
-1
-select FOUND_ROWS();
-FOUND_ROWS()
-1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 8
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-# On node-2
-connection node_2;
-select SQL_CALC_FOUND_ROWS * from t1 limit 2;
-i
-1
-2
-select FOUND_ROWS();
-FOUND_ROWS()
-4
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 5
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-select * from t1 where i=1;
-i
-1
-select FOUND_ROWS();
-FOUND_ROWS()
-1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 5
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-select SQL_CALC_FOUND_ROWS * from t1 limit 2;
-i
-1
-2
-select FOUND_ROWS();
-FOUND_ROWS()
-4
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 6
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-select * from t1 where i=1;
-i
-1
-select FOUND_ROWS();
-FOUND_ROWS()
-1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 7
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-drop table t1;
-# On node-2
-connection node_2;
-flush query cache;
-reset query cache;
-# On node-1
-connection node_1;
-flush query cache;
-reset query cache;
-create table t1 (a int not null) ENGINE=MYISAM;
-insert into t1 values (1),(2),(3);
-select * from t1;
-a
-1
-2
-3
-select * from t1;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 9
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 21
-insert delayed into t1 values (4);
-select a from t1;
-a
-1
-2
-3
-4
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 9
-# On node-2
-connection node_2;
-select * from t1;
-a
-select * from t1;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 8
-insert delayed into t1 values (4);
-select a from t1;
-a
-4
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 8
-drop table t1;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 8
-# On node-1
-connection node_1;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 9
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 22
-# On node-2
-connection node_2;
-show global variables like "query_cache_min_res_unit";
-Variable_name Value
-query_cache_min_res_unit 4096
-set GLOBAL query_cache_min_res_unit=1001;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_min_res_unit value: '1001'
-show global variables like "query_cache_min_res_unit";
-Variable_name Value
-query_cache_min_res_unit 1000
-# On node-1
-connection node_1;
-show global variables like "query_cache_min_res_unit";
-Variable_name Value
-query_cache_min_res_unit 4096
-set GLOBAL query_cache_min_res_unit=1001;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_min_res_unit value: '1001'
-show global variables like "query_cache_min_res_unit";
-Variable_name Value
-query_cache_min_res_unit 1000
-create table t1 (a int not null) engine=innodb;
-insert into t1 values (1),(2),(3);
-create table t2 (a int not null) engine=innodb;
-insert into t2 values (1),(2),(3);
-select * from t1;
-a
-1
-2
-3
-select * from t1;
-a
-1
-2
-3
-select * from t2;
-a
-1
-2
-3
-select * from t2;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 24
-# On node-2
-connection node_2;
-select * from t1;
-a
-1
-2
-3
-select * from t1;
-a
-1
-2
-3
-select * from t2;
-a
-1
-2
-3
-select * from t2;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 10
-drop table t1;
-select a from t2;
-a
-1
-2
-3
-select a from t2;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 18
-set GLOBAL query_cache_min_res_unit=default;
-show global variables like "query_cache_min_res_unit";
-Variable_name Value
-query_cache_min_res_unit 4096
-# On node-1
-connection node_1;
-select a from t2;
-a
-1
-2
-3
-select a from t2;
-a
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 25
-drop table t2;
-set GLOBAL query_cache_min_res_unit=default;
-show global variables like "query_cache_min_res_unit";
-Variable_name Value
-query_cache_min_res_unit 4096
-# On node-1
-connection node_1;
-create table t1 (a int not null) engine=innodb;
-insert into t1 values (1);
-select "aaa" from t1;
-aaa
-aaa
-select "AAA" from t1;
-AAA
-AAA
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 27
-# On node-2
-connection node_2;
-select "aaa" from t1;
-aaa
-aaa
-select "AAA" from t1;
-AAA
-AAA
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 20
-drop table t1;
-# On node-1
-connection node_1;
-create table t1 (a int) engine=innodb;
-set GLOBAL query_cache_size=1000;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '1000'
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=1024;
-Warnings:
-Warning 1282 Query cache failed to set size 1024; new query cache size is 0
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=10240;
-Warnings:
-Warning 1282 Query cache failed to set size 10240; new query cache size is 0
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=20480;
-Warnings:
-Warning 1282 Query cache failed to set size 20480; new query cache size is 0
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=40960;
-Warnings:
-Warning 1282 Query cache failed to set size 40960; new query cache size is 0
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=51200;
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 51200
-select * from t1;
-a
-set GLOBAL query_cache_size=61440;
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 61440
-select * from t1;
-a
-set GLOBAL query_cache_size=81920;
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 81920
-select * from t1;
-a
-set GLOBAL query_cache_size=102400;
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 102400
-select * from t1;
-a
-# On node-2
-connection node_2;
-set GLOBAL query_cache_size=1000;
-Warnings:
-Warning 1292 Truncated incorrect query_cache_size value: '1000'
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=1024;
-Warnings:
-Warning 1282 Query cache failed to set size 1024; new query cache size is 0
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=10240;
-Warnings:
-Warning 1282 Query cache failed to set size 10240; new query cache size is 0
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=20480;
-Warnings:
-Warning 1282 Query cache failed to set size 20480; new query cache size is 0
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=40960;
-Warnings:
-Warning 1282 Query cache failed to set size 40960; new query cache size is 0
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 0
-select * from t1;
-a
-set GLOBAL query_cache_size=51200;
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 51200
-select * from t1;
-a
-set GLOBAL query_cache_size=61440;
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 61440
-select * from t1;
-a
-set GLOBAL query_cache_size=81920;
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 81920
-select * from t1;
-a
-set GLOBAL query_cache_size=102400;
-show global variables like "query_cache_size";
-Variable_name Value
-query_cache_size 102400
-select * from t1;
-a
-drop table t1;
-# On node-1
-connection node_1;
-set GLOBAL query_cache_size=1048576;
-create table t1 (i int not null) engine=innodb;
-create table t2 (i int not null) engine=innodb;
-select * from t1;
-i
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-create temporary table t3 (i int not null);
-select * from t2;
-i
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-select * from t3;
-i
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-update t1 set i=(select distinct 1 from (select * from t2) a);
-drop table t3;
-# On node-2
-connection node_2;
-set GLOBAL query_cache_size=1048576;
-select * from t1;
-i
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-select * from t2;
-i
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-drop table t1, t2;
-# On node-1
-connection node_1;
-use mysql;
-select * from db;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-use test;
-select * from mysql.db;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-# On node-1
-connection node_1;
-create table t1(id int auto_increment primary key) engine=innodb;
-insert into t1 values (1), (2), (3);
-select * from t1;
-id
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-# On node-2
-connection node_2;
-select * from t1;
-id
-1
-2
-3
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-# On node-1
-connection node_1;
-alter table t1 rename to t2;
-select * from t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-# On node-2
-connection node_2;
-select * from t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-drop table t2;
-# On node-1
-connection node_1;
-create table t1 (word char(20) not null) engine=innodb;
-select * from t1;
-word
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-load data infile 'MYSQLTEST_VARDIR/std_data/words.dat' into table t1;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-# On node-2
-connection node_2;
-select count(*) from t1;
-count(*)
-70
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-load data infile 'MYSQLTEST_VARDIR/std_data/words.dat' into table t1;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-select count(*) from t1;
-count(*)
-140
-drop table t1;
-#
-# INTO OUTFILE/DUMPFILE test
-#
-# On node-1
-connection node_1;
-create table t1 (a int) engine=innodb;
-insert into t1 values (1),(2),(3);
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-select * from t1 into outfile "query_cache.out.file";
-Warnings:
-Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
-select * from t1 into outfile "query_cache.out.file";
-ERROR HY000: File 'query_cache.out.file' already exists
-select * from t1 limit 1 into dumpfile "query_cache.dump.file";
-Warnings:
-Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 36
-drop table t1;
-#
-# Test of SQL_SELECT_LIMIT
-#
-# On node-1
-connection node_1;
-create table t1 (a int) engine=innodb;
-insert into t1 values (1),(2);
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-select * from t1;
-a
-1
-2
-SET SQL_SELECT_LIMIT=1;
-select * from t1;
-a
-1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 38
-SET SQL_SELECT_LIMIT=DEFAULT;
-# On node-2
-connection node_2;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-select * from t1;
-a
-1
-2
-SET SQL_SELECT_LIMIT=1;
-select * from t1;
-a
-1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-SET SQL_SELECT_LIMIT=DEFAULT;
-drop table t1;
-#
-# WRITE LOCK & QC
-#
-# On node-1
-connection node_1;
-create table t1 (a int not null) engine=innodb;
-create table t2 (a int not null) engine=innodb;
-set query_cache_wlock_invalidate=1;
-create view v1 as select * from t1;
-select * from t1;
-a
-select * from t2;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 40
-lock table t1 write, t2 read;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-unlock table;
-select * from t1;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-lock table v1 write;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 41
-unlock table;
-drop view v1;
-set query_cache_wlock_invalidate=default;
-# On node-2
-connection node_2;
-set query_cache_wlock_invalidate=1;
-create view v1 as select * from t1;
-select * from t1;
-a
-select * from t2;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-lock table t1 write, t2 read;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-unlock table;
-select * from t1;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-lock table v1 write;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 35
-unlock table;
-drop view v1;
-set query_cache_wlock_invalidate=default;
-drop table t1,t2;
-#
-# Hiding real table stored in query cache by temporary table
-#
-# On node-1
-connection node_1;
-create table t1 (id int primary key) engine=innodb;
-insert into t1 values (1),(2),(3);
-select * from t1;
-id
-1
-2
-3
-create temporary table t1 (a int not null auto_increment primary key);
-select * from t1;
-a
-drop table t1;
-drop table t1;
-# On node-1
-connection node_1;
-SET NAMES koi8r;
-CREATE TABLE t1 (a char(1) character set koi8r) engine=innodb;
-INSERT INTO t1 VALUES (_koi8r 0xc3),(_koi8r 0xc3);
-SELECT a,'Â','â'='Â' FROM t1;
-a  'â'='Â'
-à Â 0
-à Â 0
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 43
-set collation_connection=koi8r_bin;
-SELECT a,'Â','â'='Â' FROM t1;
-a  'â'='Â'
-à Â 0
-à Â 0
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 44
-set character_set_client=cp1251;
-SELECT a,'Â','â'='Â' FROM t1;
-a ç? 'ç?'='ç?'
-Ã ç? 1
-Ã ç? 1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 3
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 45
-set character_set_results=cp1251;
-SELECT a,'Â','â'='Â' FROM t1;
-a � 'â'='Â'
-ö Ã? 1
-ö Ã? 1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 4
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 46
-SET NAMES default;
-# On node-2
-connection node_2;
-#
-# Run select
-#
-SELECT a,'Â','â'='Â' FROM t1;
-a  'â'='Â'
-? Â 0
-? Â 0
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-set collation_connection=koi8r_bin;
-SELECT a,'Â','â'='Â' FROM t1;
-a ?? 'â'='Â'
-? ?? 1
-? ?? 1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 2
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 37
-set character_set_client=cp1251;
-SELECT a,'Â','â'='Â' FROM t1;
-a ?? '??'='?‚'
-? ?? 1
-? ?? 1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 3
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 38
-set character_set_results=cp1251;
-SELECT a,'Â','â'='Â' FROM t1;
-a � 'â'='Â'
-ö Ã? 1
-ö Ã? 1
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 4
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-show status like "Qcache_inserts";
-Variable_name Value
-Qcache_inserts 39
-drop table t1;
-#
-# Comments before command
-#
-# On node-1
-connection node_1;
-create table t1 (a int) engine=innodb;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-/**/ select * from t1;
-a
-/**/ select * from t1;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 13
-# On node-2
-connection node_2;
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 11
-/**/ select * from t1;
-a
-/**/ select * from t1;
-a
-show status like "Qcache_queries_in_cache";
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 12
-drop table t1;
-#
-# Information schema & query cache test
-#
-# On node-1
-connection node_1;
-set session query_cache_type = 2;
-create table t1(a int) engine=innodb;
-select table_name from information_schema.tables
-where table_schema="test";
-table_name
-t1
-drop table t1;
-select table_name from information_schema.tables
-where table_schema="test";
-table_name
-set session query_cache_type = 1;
-set global query_cache_size=1024*1024;
-flush query cache;
-create table t1 ( a int ) engine=myisam;
-insert into t1 values (1);
-select a from t1;
-a
-1
-select a from t1;
-a
-1
-show status like 'qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 14
-repair table t1;
-Table Op Msg_type Msg_text
-test.t1 repair status OK
-show status like 'qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 14
-# On node-2
-connection node_2;
-select a from t1;
-a
-select a from t1;
-a
-show status like 'qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 1
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 13
-repair table t1;
-Table Op Msg_type Msg_text
-test.t1 repair status OK
-show status like 'qcache_queries_in_cache';
-Variable_name Value
-Qcache_queries_in_cache 0
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 13
-drop table t1;
-# Restore original settings.
-# On node-1
-connection node_1;
-SET GLOBAL query_cache_size=@query_cache_size_saved;
-SET GLOBAL query_cache_type=@query_cache_type_saved;
-
-# On node-2
-connection node_2;
-SET GLOBAL query_cache_size=@query_cache_size_saved;
-SET GLOBAL query_cache_type=@query_cache_type_saved;
-# End of test
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 42f85ecf7c2..6eb1cd9f4b2 100644
--- a/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test
+++ b/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test
@@ -23,12 +23,22 @@ SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue';
--send INSERT INTO t1 VALUES (1)
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
---source include/restart_mysqld.inc
+--source include/shutdown_mysqld.inc
+
+# On node_1, verify that the node has left the cluster.
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--connection node_2a
+--source include/start_mysqld.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
# Restore original auto_increment_offset values.
--let $node_2=node_2a
--source include/auto_increment_offset_restore.inc
---connection node_1
-
DROP TABLE t1;
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 08165f30f7d..d92288b7881 100644
--- a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test
+++ b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test
@@ -126,6 +126,7 @@ 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.
@@ -199,6 +200,7 @@ 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("conflict state 7 after post commit");
# Warning happens when the cluster is started for the first time
@@ -213,6 +215,7 @@ CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
--source include/assert_grep.inc
--connection node_2
+call mtr.add_suppression("Error in Log_event::read_log_event():.*");
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
# Confirm that gcache recovery took place
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
index ce121d20e03..db6f36605b7 100644
--- a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf
+++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf
@@ -7,14 +7,14 @@ 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_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port;repl.causal_read_timeout=PT90S;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
-wsrep_node_address=::1
+wsrep_node_address=[::1]:@mysqld.1.#galera_port
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_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port;repl.causal_read_timeout=PT90S;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
+wsrep_node_address=[::1]:@mysqld.2.#galera_port
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt b/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt
deleted file mode 100644
index c31150c46af..00000000000
--- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---wsrep-new-cluster
diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
index 84b6c032fc6..3fff51fa26d 100644
--- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
+++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
@@ -6,6 +6,62 @@
--source include/galera_cluster.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--connection node_2
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_2
+
+#
+# Delete grastate.dat with safe_to_bootstrap: 0
+#
+--echo Cleaning grastate.dat file ...
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+
+--echo Starting server ...
+--let $restart_noprint=2
+--let $start_mysqld_params="--wsrep-new-cluster"
+--source include/start_mysqld.inc
+--source include/wait_until_ready.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--connection node_2
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_2
+
+#
+# Delete grastate.dat with safe_to_bootstrap: 0
+#
+--echo Cleaning grastate.dat file ...
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+
+--echo Starting server ...
+--let $restart_noprint=2
+--let $start_mysqld_params="--wsrep-new-cluster"
+--source include/start_mysqld.inc
+--source include/wait_until_ready.inc
+
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
@@ -37,3 +93,29 @@ SELECT (VARIABLE_VALUE = 0 OR VARIABLE_VALUE = 1 ) FROM INFORMATION_SCHEMA.GLOBA
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+
+#
+# Force SST
+#
+--echo Cleaning var directory ...
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr
+--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema
+--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test
+--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mysql
+--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data
+
+--echo Starting server ...
+--let $start_mysqld_params=
+--source include/start_mysqld.inc
+--source include/wait_until_ready.inc
+
+--connection node_1
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/query_cache.cnf b/mysql-test/suite/galera/t/query_cache.cnf
deleted file mode 100644
index 4a82e9fa037..00000000000
--- a/mysql-test/suite/galera/t/query_cache.cnf
+++ /dev/null
@@ -1,9 +0,0 @@
-!include ../galera_2nodes.cnf
-
-[mysqld.1]
-query_cache_type=1
-
-[mysqld.2]
-query_cache_type=1
-
-
diff --git a/mysql-test/suite/galera/t/query_cache.test b/mysql-test/suite/galera/t/query_cache.test
deleted file mode 100644
index aeec67fb576..00000000000
--- a/mysql-test/suite/galera/t/query_cache.test
+++ /dev/null
@@ -1,1112 +0,0 @@
---source include/galera_cluster.inc
---source include/have_innodb.inc
---source include/have_query_cache.inc
-
---echo
---echo # Execute FLUSH/RESET commands.
---echo # On node-1
---connection node_1
-SET @query_cache_size_saved=@@GLOBAL.query_cache_size;
-SET @query_cache_type_saved=@@GLOBAL.query_cache_type;
-set GLOBAL query_cache_size=1355776;
-flush query cache; # This crashed in some versions
-reset query cache;
-flush status;
-
---echo # On node-2
---connection node_2
-SET @query_cache_size_saved=@@GLOBAL.query_cache_size;
-SET @query_cache_type_saved=@@GLOBAL.query_cache_type;
-set GLOBAL query_cache_size=1355776;
-flush query cache; # This crashed in some versions
-reset query cache;
-flush status;
-
-#
-# INSERT/UPDATE/DELETE/DROP/SELECT
-#
-
---echo # On node-1
---connection node_1
-create table t1 (a int not null) engine=innodb;
-insert into t1 values (1),(2),(3);
-select * from t1;
-select * from t1;
-select sql_no_cache * from t1;
-select length(now()) from t1;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-
-select * from t1;
-select * from t1;
-select sql_no_cache * from t1;
-select length(now()) from t1;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-# DELETE should invalidate cache on both the nodes.
---echo # On node-1
---connection node_1
-delete from t1 where a=1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-# Add a SELECT to the cache.
---echo # On node-1
---connection node_1
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-# UPDATE should invalidate cache on both the nodes.
---echo # On node-1
---connection node_1
-update t1 set a=1 where a=3;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-# Add a SELECT to the cache.
---echo # On node-1
---connection node_1
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-# DROP should invalidate cache on both the nodes.
---echo # On node-1
---connection node_1
-drop table t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# MERGE TABLES with INSERT/UPDATE and DELETE
-#
---echo
---echo # On node-1
---connection node_1
-create table t1 (a int not null) ENGINE=MyISAM;
-insert into t1 values (1),(2),(3);
-create table t2 (a int not null) ENGINE=MyISAM;
-insert into t2 values (4),(5),(6);
-create table t3 (a int not null) engine=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST;
-# insert
-select * from t3;
-select * from t3;
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-insert into t2 values (7);
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from t1;
-select * from t1;
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-insert into t3 values (8);
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-# update
-select * from t3;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-update t2 set a=9 where a=7;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-update t3 set a=10 where a=1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-#delete
-select * from t3;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-delete from t2 where a=9;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-delete from t3 where a=10;
-select * from t3;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-# MERGE table, expect no records.
-select * from t3;
-select * from t3;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-drop table t1, t2, t3;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# SELECT SQL_CACHE ...
-#
---echo # On node-1
---connection node_1
-set query_cache_type=demand;
-create table t1 (a int not null) engine=innodb;
-insert into t1 values (1),(2),(3);
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select sql_cache * from t1 union select * from t1;
-set query_cache_type=2;
-select sql_cache * from t1 union select * from t1;
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-set query_cache_type=on;
-
---echo # On node-2
---connection node_2
-set query_cache_type=demand;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select sql_cache * from t1 union select * from t1;
-set query_cache_type=2;
-select sql_cache * from t1 union select * from t1;
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-set query_cache_type=on;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# SELECT SQL_NO_CACHE
-#
---echo # On node-1
---connection node_1
-select sql_no_cache * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
---echo # On node-2
---connection node_2
-select sql_no_cache * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Check that queries that uses NOW(), LAST_INSERT_ID()... are not cached.
-#
---echo # On node-1
---connection node_1
-create table t1 (a text not null) engine=innodb;
-select CONNECTION_ID() from t1;
-select FOUND_ROWS();
-select NOW() from t1;
-select CURDATE() from t1;
-select CURTIME() from t1;
-select DATABASE() from t1;
-select ENCRYPT("test") from t1;
-select LAST_INSERT_ID() from t1;
-select RAND() from t1;
-select UNIX_TIMESTAMP() from t1;
-select USER() from t1;
-select CURRENT_USER() from t1;
-select benchmark(1,1) from t1;
-explain extended select benchmark(1,1) from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
---echo # On node-2
---connection node_2
-select CONNECTION_ID() from t1;
-select FOUND_ROWS();
-select NOW() from t1;
-select CURDATE() from t1;
-select CURTIME() from t1;
-select DATABASE() from t1;
-select ENCRYPT("test") from t1;
-select LAST_INSERT_ID() from t1;
-select RAND() from t1;
-select UNIX_TIMESTAMP() from t1;
-select USER() from t1;
-select CURRENT_USER() from t1;
-select benchmark(1,1) from t1;
-explain extended select benchmark(1,1) from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Non-cachable ODBC work around (and prepare cache for drop database)
-#
---echo # On node-1
---connection node_1
-create database mysqltest;
-create table mysqltest.t1 (i int not null auto_increment, a int, primary key
- (i)) engine=innodb;
-insert into mysqltest.t1 values (1, 1);
-select * from mysqltest.t1 where i is null;
-create table t1(a int) engine=innodb;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from mysqltest.t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from mysqltest.t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-#
-# drop db
-#
-drop database mysqltest;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Charset conversion (cp1251_koi8 always present)
-# Note: Queries using different default character sets are cached separately.
-#
---echo # On node-1
---connection node_1
-create table t1 (a char(1) not null collate koi8r_general_ci) engine=innodb;
-insert into t1 values(_koi8r 0xc3);
-set CHARACTER SET koi8r;
-select * from t1;
-set CHARACTER SET cp1251_koi8;
-select * from t1;
-set CHARACTER SET DEFAULT;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-set CHARACTER SET koi8r;
-select * from t1;
-set CHARACTER SET cp1251_koi8;
-select * from t1;
-set CHARACTER SET DEFAULT;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Same tables in different dbs
-#
---echo # On node-1
---connection node_1
-create database if not exists mysqltest;
-create table mysqltest.t1 (i int not null) engine=innodb;
-create table t1 (i int not null) engine=innodb;
-insert into mysqltest.t1 (i) values (1);
-insert into t1 (i) values (2);
-
-select * from t1;
-use mysqltest;
-select * from t1;
-select * from t1;
-use test;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-select * from t1;
-use mysqltest;
-select * from t1;
-select * from t1;
-use test;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-drop database mysqltest;
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# FOUND_ROWS()
-#
---echo # On node-1
---connection node_1
-create table t1 (i int not null) engine=innodb;
-insert into t1 (i) values (1),(2),(3),(4);
-
-select SQL_CALC_FOUND_ROWS * from t1 limit 2;
-select FOUND_ROWS();
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-
-select * from t1 where i=1;
-select FOUND_ROWS();
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-
-select SQL_CALC_FOUND_ROWS * from t1 limit 2;
-select FOUND_ROWS();
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-
-select * from t1 where i=1;
-select FOUND_ROWS();
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-
---echo # On node-2
---connection node_2
-select SQL_CALC_FOUND_ROWS * from t1 limit 2;
-select FOUND_ROWS();
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-
-select * from t1 where i=1;
-select FOUND_ROWS();
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-
-select SQL_CALC_FOUND_ROWS * from t1 limit 2;
-select FOUND_ROWS();
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-
-select * from t1 where i=1;
-select FOUND_ROWS();
-show status like "Qcache_hits";
-show status like "Qcache_queries_in_cache";
-
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Test insert delayed (MYISAM)
-#
-
---echo # On node-2
---connection node_2
-flush query cache;
-reset query cache;
-
---echo # On node-1
---connection node_1
-flush query cache;
-reset query cache;
-
-create table t1 (a int not null) ENGINE=MYISAM;
-insert into t1 values (1),(2),(3);
-select * from t1;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-insert delayed into t1 values (4);
---sleep 5 # Wait for insert delayed to be executed.
-select a from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-select * from t1;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-insert delayed into t1 values (4);
---sleep 5 # Wait for insert delayed to be executed.
-select a from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-drop table t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-1
---connection node_1
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-
-#
-# Test of min result data unit size changing
-#
---echo # On node-2
---connection node_2
-show global variables like "query_cache_min_res_unit";
-set GLOBAL query_cache_min_res_unit=1001;
-show global variables like "query_cache_min_res_unit";
-
---echo # On node-1
---connection node_1
-show global variables like "query_cache_min_res_unit";
-set GLOBAL query_cache_min_res_unit=1001;
-show global variables like "query_cache_min_res_unit";
-create table t1 (a int not null) engine=innodb;
-insert into t1 values (1),(2),(3);
-create table t2 (a int not null) engine=innodb;
-insert into t2 values (1),(2),(3);
-select * from t1;
-select * from t1;
-select * from t2;
-select * from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-
---echo # On node-2
---connection node_2
-select * from t1;
-select * from t1;
-select * from t2;
-select * from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-drop table t1;
-select a from t2;
-select a from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-set GLOBAL query_cache_min_res_unit=default;
-show global variables like "query_cache_min_res_unit";
-
---echo # On node-1
---connection node_1
-select a from t2;
-select a from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-drop table t2;
-set GLOBAL query_cache_min_res_unit=default;
-show global variables like "query_cache_min_res_unit";
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Case sensitive test
-#
---echo # On node-1
---connection node_1
-create table t1 (a int not null) engine=innodb;
-insert into t1 values (1);
-select "aaa" from t1;
-select "AAA" from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-
---echo # On node-2
---connection node_2
-select "aaa" from t1;
-select "AAA" from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Test of query cache resizing
-#
---echo # On node-1
---connection node_1
-create table t1 (a int) engine=innodb;
-set GLOBAL query_cache_size=1000;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=1024;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=10240;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=20480;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=40960;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=51200;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=61440;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=81920;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=102400;
-show global variables like "query_cache_size";
-select * from t1;
-
---echo # On node-2
---connection node_2
-set GLOBAL query_cache_size=1000;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=1024;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=10240;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=20480;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=40960;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=51200;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=61440;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=81920;
-show global variables like "query_cache_size";
-select * from t1;
-set GLOBAL query_cache_size=102400;
-show global variables like "query_cache_size";
-select * from t1;
-
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Temporary tables (ignored by Galera)
-#
---echo # On node-1
---connection node_1
-set GLOBAL query_cache_size=1048576;
-create table t1 (i int not null) engine=innodb;
-create table t2 (i int not null) engine=innodb;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-create temporary table t3 (i int not null);
-select * from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from t3;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-update t1 set i=(select distinct 1 from (select * from t2) a);
-drop table t3;
-
---echo # On node-2
---connection node_2
-set GLOBAL query_cache_size=1048576;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-drop table t1, t2;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# System databse test (no need to perform it on node_2)
-# Note: Queries on system tables are not cached.
-#
---echo # On node-1
---connection node_1
-use mysql;
-disable_result_log;
-select * from db;
-enable_result_log;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-use test;
-disable_result_log;
-select * from mysql.db;
-enable_result_log;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-#
-# Simple rename test
-#
---echo # On node-1
---connection node_1
-create table t1(id int auto_increment primary key) engine=innodb;
-insert into t1 values (1), (2), (3);
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-1
---connection node_1
-alter table t1 rename to t2;
---error ER_NO_SUCH_TABLE
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
---error ER_NO_SUCH_TABLE
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-drop table t2;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Load data invalidation test
-#
---echo # On node-1
---connection node_1
-create table t1 (word char(20) not null) engine=innodb;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval load data infile '$MYSQLTEST_VARDIR/std_data/words.dat' into table t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
---let $wait_condition = SELECT COUNT(*) = 70 FROM t1;
---source include/wait_condition.inc
-
---echo # On node-2
---connection node_2
---let $wait_condition = SELECT COUNT(*) = 70 FROM t1;
---source include/wait_condition.inc
-select count(*) from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval load data infile '$MYSQLTEST_VARDIR/std_data/words.dat' into table t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select count(*) from t1;
-
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
---echo #
---echo # INTO OUTFILE/DUMPFILE test
---echo #
---echo # On node-1
---connection node_1
-create table t1 (a int) engine=innodb;
-insert into t1 values (1),(2),(3);
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from t1 into outfile "query_cache.out.file";
---error ER_FILE_EXISTS_ERROR
-select * from t1 into outfile "query_cache.out.file";
-select * from t1 limit 1 into dumpfile "query_cache.dump.file";
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-drop table t1;
-let $datadir=`select @@datadir`;
---remove_file $datadir/test/query_cache.dump.file
---remove_file $datadir/test/query_cache.out.file
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
---echo #
---echo # Test of SQL_SELECT_LIMIT
---echo #
---echo # On node-1
---connection node_1
-create table t1 (a int) engine=innodb;
-insert into t1 values (1),(2);
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from t1;
-SET SQL_SELECT_LIMIT=1;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-SET SQL_SELECT_LIMIT=DEFAULT;
-
---echo # On node-2
---connection node_2
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-select * from t1;
-SET SQL_SELECT_LIMIT=1;
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-SET SQL_SELECT_LIMIT=DEFAULT;
-
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
---echo #
---echo # WRITE LOCK & QC
---echo #
---echo # On node-1
---connection node_1
-create table t1 (a int not null) engine=innodb;
-create table t2 (a int not null) engine=innodb;
-
-set query_cache_wlock_invalidate=1;
-create view v1 as select * from t1;
-select * from t1;
-select * from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-lock table t1 write, t2 read;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-unlock table;
-select * from t1;
-# Implicit locking of t1 does not invalidate QC
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-lock table v1 write;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-unlock table;
-drop view v1;
-set query_cache_wlock_invalidate=default;
-
---echo # On node-2
---connection node_2
-set query_cache_wlock_invalidate=1;
-create view v1 as select * from t1;
-select * from t1;
-select * from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-lock table t1 write, t2 read;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-unlock table;
-select * from t1;
-# Implicit locking of t1 does not invalidate QC
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-lock table v1 write;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-unlock table;
-drop view v1;
-set query_cache_wlock_invalidate=default;
-
-drop table t1,t2;
-
---echo #
---echo # Hiding real table stored in query cache by temporary table
---echo #
---echo # On node-1
---connection node_1
-create table t1 (id int primary key) engine=innodb;
-insert into t1 values (1),(2),(3);
-select * from t1;
-create temporary table t1 (a int not null auto_increment primary key);
-select * from t1;
-drop table t1;
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
-#
-# Test character set related variables:
-# character_set_result
-# character_set_client
-# charactet_set_connection/collation_connection
-# If at least one of the above variables has changed,
-# the cached query can't be reused. In the below test
-# absolutely the same query is used several times,
-# SELECT should fetch different results for every instance.
-# No hits should be produced.
-# New cache entry should appear for every SELECT.
-#
-
---echo # On node-1
---connection node_1
-SET NAMES koi8r;
-CREATE TABLE t1 (a char(1) character set koi8r) engine=innodb;
-INSERT INTO t1 VALUES (_koi8r 0xc3),(_koi8r 0xc3);
-#
-# Run select
-#
-SELECT a,'Â','â'='Â' FROM t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-#
-# Change collation_connection and run the same query again
-#
-set collation_connection=koi8r_bin;
-SELECT a,'Â','â'='Â' FROM t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-#
-# Now change character_set_client and run the same query again
-#
-set character_set_client=cp1251;
-SELECT a,'Â','â'='Â' FROM t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-#
-# And finally change character_set_results and run the same query again
-#
-set character_set_results=cp1251;
-SELECT a,'Â','â'='Â' FROM t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-SET NAMES default;
-
---echo # On node-2
---connection node_2
-
---echo #
---echo # Run select
---echo #
-
-SELECT a,'Â','â'='Â' FROM t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-#
-# Change collation_connection and run the same query again
-#
-set collation_connection=koi8r_bin;
-SELECT a,'Â','â'='Â' FROM t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-#
-# Now change character_set_client and run the same query again
-#
-set character_set_client=cp1251;
-SELECT a,'Â','â'='Â' FROM t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-#
-# And finally change character_set_results and run the same query again
-#
-set character_set_results=cp1251;
-SELECT a,'Â','â'='Â' FROM t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-show status like "Qcache_inserts";
-
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
---echo #
---echo # Comments before command
---echo #
-
---echo # On node-1
---connection node_1
-create table t1 (a int) engine=innodb;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-/**/ select * from t1;
-/**/ select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-/**/ select * from t1;
-/**/ select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
---echo #
---echo # Information schema & query cache test
---echo #
-
---echo # On node-1
---connection node_1
-set session query_cache_type = 2;
-create table t1(a int) engine=innodb;
-select table_name from information_schema.tables
-where table_schema="test";
-drop table t1;
-select table_name from information_schema.tables
-where table_schema="test";
-# Bug #8480: REPAIR TABLE needs to flush the table from the query cache
-set session query_cache_type = 1;
-set global query_cache_size=1024*1024;
-flush query cache;
-create table t1 ( a int ) engine=myisam; # myisam for repair tables
-insert into t1 values (1);
-select a from t1;
-select a from t1;
-show status like 'qcache_queries_in_cache';
-show status like "Qcache_hits";
-repair table t1;
-show status like 'qcache_queries_in_cache';
-show status like "Qcache_hits";
-
---echo # On node-2
---connection node_2
-select a from t1;
-select a from t1;
-show status like 'qcache_queries_in_cache';
-show status like "Qcache_hits";
-repair table t1;
-show status like 'qcache_queries_in_cache';
-show status like "Qcache_hits";
-drop table t1;
-
-#
-# RESET QUERY CACHE
-#
---source include/reset_query_cache.inc
-
---echo # Restore original settings.
---echo # On node-1
---connection node_1
-SET GLOBAL query_cache_size=@query_cache_size_saved;
-SET GLOBAL query_cache_type=@query_cache_type_saved;
---echo
---echo # On node-2
---connection node_2
-SET GLOBAL query_cache_size=@query_cache_size_saved;
-SET GLOBAL query_cache_type=@query_cache_type_saved;
-
---echo # End of test
diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def
index a83cc99c814..0794f4a386f 100644
--- a/mysql-test/suite/galera_3nodes/disabled.def
+++ b/mysql-test/suite/galera_3nodes/disabled.def
@@ -10,28 +10,13 @@
#
##############################################################################
-GAL-501 : MDEV-24645 galera_3nodes.GAL-501 MTR failed: failed to open gcomm backend connection: 110
-GCF-354 : MDEV-25614 Galera test failure on GCF-354
-galera_2_cluster : MDEV-22195 temporarily disabled due to issues to be fixed with MDEV-22195
-galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
-galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
-galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to server during query
-galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to server during query
+galera_2_cluster : MDEV-29877 Galera test failure on galera_2_cluster
+galera_gtid_2_cluster : MDEV-29877 Galera test failure on galera_2_cluster
galera_parallel_apply_3nodes : MDEV-29368 DEBUG_SYNC timeout
-galera_pc_bootstrap : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
-galera_safe_to_bootstrap : MDEV-24097 galera_3nodes.galera_safe_to_bootstrap MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
-galera_slave_options_do : MDEV-8798
-galera_slave_options_ignore : MDEV-8798
-galera_vote_rejoin_mysqldump : MDEV-24481: galera_3nodes.galera_vote_rejoin_mysqldump MTR failed: mysql_shutdown failed
-galera_ipv6_mysqldump : MDEV-26499: galera_3nodes.galera_ipv6_mysqldump MTR failed: mysql_shutdown failed
galera_ipv6_mariabackup : MDEV-24097
galera_ipv6_mariabackup_section : MDEV-24097, MDEV-22195
-galera_wsrep_schema : MDEV-26503 : galera_3nodes.galera_wsrep_schema MTR failed: mysql_shutdown failed
-galera_ipv6_mariabackup : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
-galera_ipv6_mariabackup_section : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
-galera_ipv6_rsync : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
-galera_ipv6_rsync_section : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
-galera_ssl_reload : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
-galera_toi_vote : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
-galera_wsrep_schema_init : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
galera_parallel_apply_3nodes : MDEV-29774 Galera test galera_parallel_apply_3nodes is unstable
+galera_vote_rejoin_mysqldump : MDEV-24481: galera_3nodes.galera_vote_rejoin_mysqldump MTR failed: mysql_shutdown failed
+galera_ssl_reload : MDEV-30172 At line 50: mysql_shutdown failed
+GCF-354 : mysqltest: At line 39: query 'DROP TABLE test.t1' failed: 1047: WSREP has not yet prepared node for application use
+GCF-354 : mysqltest: At line 30: query 'INSERT INTO test.t1 values (1)' failed: 1180: Got error 6 "No such device or address"
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 2138f48adda..5d4b1d43fd6 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
@@ -65,5 +65,5 @@ Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
PRIMARY KEY (`f1`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_slave_options_do.result b/mysql-test/suite/galera_3nodes/r/galera_slave_options_do.result
deleted file mode 100644
index 7185e92863d..00000000000
--- a/mysql-test/suite/galera_3nodes/r/galera_slave_options_do.result
+++ /dev/null
@@ -1,28 +0,0 @@
-CREATE DATABASE db1;
-CREATE DATABASE db2;
-CREATE TABLE db1.t1 (f1 INTEGER) ENGINE=InnoDB;
-CREATE TABLE db2.t2A (f1 INTEGER) ENGINE=InnoDB;
-CREATE TABLE db2.t2B (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO db1.t1 VALUES (1);
-INSERT INTO db2.t2A VALUES (2);
-INSERT INTO db2.t2B VALUES (3);
-SELECT COUNT(*) = 0 FROM db1.t1;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM db2.t2A;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 1 FROM db2.t2B;
-COUNT(*) = 1
-1
-SELECT COUNT(*) = 0 FROM db1.t1;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 1 FROM db2.t2A;
-COUNT(*) = 1
-1
-SELECT COUNT(*) = 1 FROM db2.t2B;
-COUNT(*) = 1
-1
-DROP SCHEMA db1;
-DROP SCHEMA db2;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_slave_options_ignore.result b/mysql-test/suite/galera_3nodes/r/galera_slave_options_ignore.result
deleted file mode 100644
index 7185e92863d..00000000000
--- a/mysql-test/suite/galera_3nodes/r/galera_slave_options_ignore.result
+++ /dev/null
@@ -1,28 +0,0 @@
-CREATE DATABASE db1;
-CREATE DATABASE db2;
-CREATE TABLE db1.t1 (f1 INTEGER) ENGINE=InnoDB;
-CREATE TABLE db2.t2A (f1 INTEGER) ENGINE=InnoDB;
-CREATE TABLE db2.t2B (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO db1.t1 VALUES (1);
-INSERT INTO db2.t2A VALUES (2);
-INSERT INTO db2.t2B VALUES (3);
-SELECT COUNT(*) = 0 FROM db1.t1;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM db2.t2A;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 1 FROM db2.t2B;
-COUNT(*) = 1
-1
-SELECT COUNT(*) = 0 FROM db1.t1;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 1 FROM db2.t2A;
-COUNT(*) = 1
-1
-SELECT COUNT(*) = 1 FROM db2.t2B;
-COUNT(*) = 1
-1
-DROP SCHEMA db1;
-DROP SCHEMA db2;
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 d43f31d4c87..e49a1714a3e 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
@@ -47,7 +47,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection node_2;
SET SESSION wsrep_on=OFF;
SET SESSION wsrep_on=ON;
@@ -56,7 +56,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT COUNT(*) AS expect_0 FROM t1;
expect_0
0
@@ -66,7 +66,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that column/key exists'");
connection node_1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result
index d9d3e817bed..862e14d0269 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result
@@ -14,7 +14,7 @@ wsrep_cluster CREATE TABLE `wsrep_cluster` (
`protocol_version` int(11) NOT NULL,
`capabilities` int(11) NOT NULL,
PRIMARY KEY (`cluster_uuid`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci STATS_PERSISTENT=0
SHOW CREATE TABLE mysql.wsrep_cluster_members;
Table Create Table
wsrep_cluster_members CREATE TABLE `wsrep_cluster_members` (
@@ -23,7 +23,7 @@ wsrep_cluster_members CREATE TABLE `wsrep_cluster_members` (
`node_name` char(32) NOT NULL,
`node_incoming_address` varchar(256) NOT NULL,
PRIMARY KEY (`node_uuid`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci STATS_PERSISTENT=0
SELECT @@sql_safe_updates;
@@sql_safe_updates
1
diff --git a/mysql-test/suite/galera_3nodes/t/galera_slave_options_do.cnf b/mysql-test/suite/galera_3nodes/t/galera_slave_options_do.cnf
deleted file mode 100644
index 1ebde6186c1..00000000000
--- a/mysql-test/suite/galera_3nodes/t/galera_slave_options_do.cnf
+++ /dev/null
@@ -1,7 +0,0 @@
-!include ../galera_3nodes.cnf
-
-[mysqld.1]
-binlog-do-db=db2
-
-[mysqld.2]
-replicate-wild-do-table=db2.t2B
diff --git a/mysql-test/suite/galera_3nodes/t/galera_slave_options_do.test b/mysql-test/suite/galera_3nodes/t/galera_slave_options_do.test
deleted file mode 100644
index 1437c90c670..00000000000
--- a/mysql-test/suite/galera_3nodes/t/galera_slave_options_do.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# This tests checks the operation of binlog-do-db , replicate-wild-do-table
-#
-
---source include/galera_cluster.inc
---source include/have_innodb.inc
-
---connection node_1
-CREATE DATABASE db1;
-CREATE DATABASE db2;
-
-CREATE TABLE db1.t1 (f1 INTEGER) ENGINE=InnoDB;
-CREATE TABLE db2.t2A (f1 INTEGER) ENGINE=InnoDB;
-CREATE TABLE db2.t2B (f1 INTEGER) ENGINE=InnoDB;
-
-INSERT INTO db1.t1 VALUES (1);
-INSERT INTO db2.t2A VALUES (2);
-INSERT INTO db2.t2B VALUES (3);
-
---connection node_2
-SELECT COUNT(*) = 0 FROM db1.t1;
-SELECT COUNT(*) = 0 FROM db2.t2A;
-SELECT COUNT(*) = 1 FROM db2.t2B;
-
-
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connection node_3
-SELECT COUNT(*) = 0 FROM db1.t1;
-SELECT COUNT(*) = 1 FROM db2.t2A;
-SELECT COUNT(*) = 1 FROM db2.t2B;
-
---connection node_1
-DROP SCHEMA db1;
-DROP SCHEMA db2;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.cnf b/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.cnf
deleted file mode 100644
index 9b78d47e254..00000000000
--- a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.cnf
+++ /dev/null
@@ -1,7 +0,0 @@
-!include ../galera_3nodes.cnf
-
-[mysqld.1]
-binlog-ignore-db=db1
-
-[mysqld.2]
-replicate-wild-ignore-table=db2.t2A
diff --git a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test b/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test
deleted file mode 100644
index 8e73dee70ae..00000000000
--- a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# This tests checks the operation of binlog-ignore-db , replicate-wild-ignore-table
-#
-
---source include/galera_cluster.inc
---source include/have_innodb.inc
-
---connection node_1
-CREATE DATABASE db1;
-CREATE DATABASE db2;
-
-CREATE TABLE db1.t1 (f1 INTEGER) ENGINE=InnoDB;
-CREATE TABLE db2.t2A (f1 INTEGER) ENGINE=InnoDB;
-CREATE TABLE db2.t2B (f1 INTEGER) ENGINE=InnoDB;
-
-INSERT INTO db1.t1 VALUES (1);
-INSERT INTO db2.t2A VALUES (2);
-INSERT INTO db2.t2B VALUES (3);
-
---connection node_2
-SELECT COUNT(*) = 0 FROM db1.t1;
-SELECT COUNT(*) = 0 FROM db2.t2A;
-SELECT COUNT(*) = 1 FROM db2.t2B;
-
-
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connection node_3
---source include/galera_wait_ready.inc
-SELECT COUNT(*) = 0 FROM db1.t1;
-SELECT COUNT(*) = 1 FROM db2.t2A;
-SELECT COUNT(*) = 1 FROM db2.t2B;
-
---connection node_1
-DROP SCHEMA db1;
-DROP SCHEMA db2;
diff --git a/mysql-test/suite/galera_3nodes_sr/disabled.def b/mysql-test/suite/galera_3nodes_sr/disabled.def
index f1ec92eee79..df2277fb8ad 100644
--- a/mysql-test/suite/galera_3nodes_sr/disabled.def
+++ b/mysql-test/suite/galera_3nodes_sr/disabled.def
@@ -1,5 +1,13 @@
-GCF-582 :
-GCF-810A :
-GCF-810B :
-GCF-810C :
-galera_sr_kill_slave_after_apply_rollback2 : \ No newline at end of file
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : MDEV-<xxxx> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+
+galera_sr_kill_slave_after_apply_rollback2 : MDEV-29892 Galera test failure on galera_sr_kill_slave_after_apply_rollback2 \ No newline at end of file
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result
index 9e2a4823973..94bc532e021 100644
--- a/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result
@@ -1,4 +1,15 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -7,17 +18,22 @@ INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
+connection node_2;
+# restart
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
5
+connection node_1;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
5
COMMIT;
SELECT COUNT(*) FROM t1;
COUNT(*)
-5
+0
+connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
-5
+0
DROP TABLE t1;
+disconnect node_1b;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result
index 775f7ee0412..a964537a8ae 100644
--- a/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result
@@ -1,5 +1,9 @@
connection node_2;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result
deleted file mode 100644
index 9a83ff3c041..00000000000
--- a/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result
+++ /dev/null
@@ -1,256 +0,0 @@
-SET GLOBAL debug="d,crash_last_fragment_commit_before_fragment_removal";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-crash_last_fragment_commit_before_fragment_removal
-COMMIT;
-Got one of the listed errors
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-COMMIT;
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug = '';
-SET GLOBAL debug="d,crash_last_fragment_commit_after_fragment_removal";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-crash_last_fragment_commit_after_fragment_removal
-COMMIT;
-Got one of the listed errors
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-COMMIT;
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug = '';
-SET GLOBAL debug="d,crash_replicate_fragment_success";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-crash_replicate_fragment_success
-COMMIT;
-Got one of the listed errors
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-COMMIT;
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug = '';
-SET GLOBAL debug="d,crash_replicate_fragment_after_certify";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-crash_replicate_fragment_after_certify
-COMMIT;
-Got one of the listed errors
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-COMMIT;
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug = '';
-SET GLOBAL debug="d,crash_replicate_fragment_before_certify";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-crash_replicate_fragment_before_certify
-COMMIT;
-Got one of the listed errors
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-COMMIT;
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug = '';
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result
deleted file mode 100644
index bbec3531a49..00000000000
--- a/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result
+++ /dev/null
@@ -1,100 +0,0 @@
-SET GLOBAL debug="d,crash_apply_cb_before_append_frag";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-COMMIT;
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-COMMIT;
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug = '';
-SET GLOBAL debug="d,crash_apply_cb_after_append_frag";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
-COMMIT;
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
-COUNT(DISTINCT node_uuid) = 1
-1
-COMMIT;
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug = '';
-CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member");
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result
deleted file mode 100644
index 1a6dcbfd392..00000000000
--- a/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result
+++ /dev/null
@@ -1,177 +0,0 @@
-SET GLOBAL debug="d,crash_commit_cb_last_fragment_commit_success";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-SET SESSION wsrep_trx_fragment_size=1;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary');
-SELECT 1 FROM t1;
-Got one of the listed errors
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug="d,crash_commit_cb_before_last_fragment_commit";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-SET SESSION wsrep_trx_fragment_size=1;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary');
-SELECT 1 FROM t1;
-Got one of the listed errors
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug="d,crash_apply_cb_after_fragment_removal";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-SET SESSION wsrep_trx_fragment_size=1;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary');
-SELECT 1 FROM t1;
-Got one of the listed errors
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SET GLOBAL debug="d,crash_apply_cb_before_fragment_removal";
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
-SET AUTOCOMMIT=OFF;
-SET SESSION wsrep_trx_fragment_size=1;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
-SET SESSION wsrep_trx_fragment_size=1;
-INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary');
-SELECT 1 FROM t1;
-Got one of the listed errors
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-SELECT * FROM mysql.wsrep_streaming_log;
-node_uuid trx_id seqno flags frag
-SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
-COUNT(*) > 0
-1
-SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result b/mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result
index 8de724c1576..9addd29b0ea 100644
--- a/mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result
+++ b/mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result
@@ -5,6 +5,9 @@ connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
connection node_2;
SET SESSION wsrep_trx_fragment_size=1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result
index bb4eb829abc..d38a2779c96 100644
--- a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result
@@ -1,5 +1,9 @@
connection node_2;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 1;
@@ -22,7 +26,7 @@ connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
connection node_2;
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
connection node_2;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result
index 21e301ed353..31413fbb80a 100644
--- a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result
@@ -1,3 +1,11 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -7,25 +15,33 @@ INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
+connection node_2;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
Killing server ...
+connection node_1;
INSERT INTO t1 VALUES (6);
ROLLBACK;
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
+connection node_2;
+# restart
+connection node_1;
+connection node_2;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+6
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
-COUNT(*) = 0
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
+connection node_1;
+disconnect node_1a;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test
index bf19ea84c87..20580c37298 100644
--- a/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test
@@ -1,6 +1,14 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--LET $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
@@ -11,6 +19,8 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -37,3 +47,6 @@ SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t1;
DROP TABLE t1;
+
+--disconnect node_1b
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test
index 6d49247ab5e..879c007e601 100644
--- a/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test
@@ -6,6 +6,13 @@
# The master transitions to a non-prim view and back to prim. Its ongoing
# should fail to commit.
#
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--LET $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
@@ -78,3 +85,4 @@ DROP TABLE t1;
--connection node_2
CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test
deleted file mode 100644
index fda16b7265c..00000000000
--- a/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test
+++ /dev/null
@@ -1,137 +0,0 @@
-#
-# Exercise the crash points which crash the server at various points important to SR
-#
-
---source include/big_test.inc
---source include/galera_cluster.inc
---source include/have_debug_sync.inc
-
---connect node_2_check, 127.0.0.1, root, , test, $NODE_MYPORT_2
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connect node_3_check, 127.0.0.1, root, , test, $NODE_MYPORT_3
-
-#
-# crash_last_fragment_commit_before_fragment_removal
-#
-
---connection node_2
---enable_reconnect
-SET GLOBAL debug_dbug="d,crash_last_fragment_commit_before_fragment_removal";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
-
---echo crash_last_fragment_commit_before_fragment_removal
-
---connection node_2
---error 2006,2013
-COMMIT;
-
---connection node_1
---let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_size'
---source include/wait_condition.inc
-
---connection node_2
---source include/start_mysqld.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
-
-#
-# crash_last_fragment_commit_after_fragment_removal
-#
-
---connection node_2
-SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
-
---echo crash_last_fragment_commit_after_fragment_removal
-
---connection node_2
---error 2006,2013
-COMMIT;
-
---connection node_1
---let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_size'
---source include/wait_condition.inc
-
---connection node_2
---source include/start_mysqld.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
-
-#
-# crash_last_fragment_commit_success
-#
-# Case crash_last_fragment_commit_success is commented out,
-# the changes will be visible on slave due to succesful commit,
-# so the galera_sr_crash_post_check will fail.
-#
-
-# --connection node_2
-# SET GLOBAL debug_dbug="d,crash_last_fragment_commit_success";
-# --source suite/galera_3nodes/include/galera_expect_node_crash.inc
-# --source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
-
-# --echo crash_last_fragment_commit_success
-
-# --connection node_2
-# --error 2006,2013
-# COMMIT;
-
-# --source include/start_mysqld.inc
-# --source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
-
-#
-# crash_replicate_fragment_success
-#
-
---connection node_2
-SET GLOBAL debug_dbug="d,crash_replicate_fragment_success";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
-
---echo crash_replicate_fragment_success
-
---connection node_2
---error 2006,2013
-COMMIT;
-
---source include/start_mysqld.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
-
-#
-# crash_replicate_fragment_after_certify
-#
-
---connection node_2
-SET GLOBAL debug_dbug="d,crash_replicate_fragment_after_certify";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
-
---echo crash_replicate_fragment_after_certify
-
---connection node_2
---error 2006,2013
-COMMIT;
-
---source include/start_mysqld.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
-
-#
-# crash_replicate_fragment_before_certify
-#
-
---connection node_2
-SET GLOBAL debug_dbug="d,crash_replicate_fragment_before_certify";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
-
---echo crash_replicate_fragment_before_certify
-
---connection node_2
---error 2006,2013
-COMMIT;
-
---source include/start_mysqld.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
-
-
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test
deleted file mode 100644
index cb41b2348de..00000000000
--- a/mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Exercise the crash points which crash the server at various points important to SR
-#
-
---source include/big_test.inc
---source include/galera_cluster.inc
---source include/have_debug_sync.inc
-
---connect node_2_check, 127.0.0.1, root, , test, $NODE_MYPORT_2
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connect node_3_check, 127.0.0.1, root, , test, $NODE_MYPORT_3
-
-#
-# crash_apply_cb_before_append_frag
-#
-
---connection node_3
-SET GLOBAL debug_dbug="d,crash_apply_cb_before_append_frag";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes2.inc
-
---connection node_3
---error 0,2006,2013
-COMMIT;
-
---source include/start_mysqld.inc
---sleep 5
---source suite/galera_3nodes/include/galera_sr_crash_post_check2.inc
-
-#
-# crash_apply_cb_after_append_frag
-#
-
---connection node_3
-SET GLOBAL debug_dbug="d,crash_apply_cb_after_append_frag";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes2.inc
-
---connection node_3
---error 0,2006,2013
-COMMIT;
-
---source include/start_mysqld.inc
---sleep 5
---source suite/galera_3nodes/include/galera_sr_crash_post_check2.inc
-
---connection node_1
-CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member");
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test
deleted file mode 100644
index 6c4da2cb5f0..00000000000
--- a/mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Exercise the crash points which crash the server at various points important to SR
-#
-
---source include/big_test.inc
---source include/galera_cluster.inc
---source include/have_debug_sync.inc
-
---connect node_2_check, 127.0.0.1, root, , test, $NODE_MYPORT_2
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---enable_reconnect
---connect node_3_check, 127.0.0.1, root, , test, $NODE_MYPORT_3
-
-#
-# crash_commit_cb_last_fragment_commit_success
-#
-
---connection node_3
-SET GLOBAL debug_dbug="d,crash_commit_cb_last_fragment_commit_success";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes3.inc
-
---source include/start_mysqld.inc
---sleep 5
---source include/galera_wait_ready.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check3.inc
-
-#
-# crash_commit_cb_before_last_fragment_commit
-#
-
---connection node_3
-SET GLOBAL debug_dbug="d,crash_commit_cb_before_last_fragment_commit";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes3.inc
-
---source include/start_mysqld.inc
---sleep 5
---source include/galera_wait_ready.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check3.inc
-
-#
-# crash_apply_cb_after_fragment_removal
-#
-
---connection node_3
-SET GLOBAL debug_dbug="d,crash_apply_cb_after_fragment_removal";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes3.inc
-
---source include/start_mysqld.inc
---sleep 5
---source include/galera_wait_ready.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check3.inc
-
-#
-# crash_apply_cb_before_fragment_removal
-#
-
---connection node_3
-SET GLOBAL debug_dbug="d,crash_apply_cb_before_fragment_removal";
---source suite/galera_3nodes/include/galera_expect_node_crash.inc
---source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes3.inc
-
---source include/start_mysqld.inc
---sleep 5
---source include/galera_wait_ready.inc
---source suite/galera_3nodes/include/galera_sr_crash_post_check3.inc
-
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test b/mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test
index 98c20cd14d5..a952b343d9f 100644
--- a/mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test
+++ b/mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test
@@ -24,6 +24,11 @@
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
@@ -166,3 +171,5 @@ SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_1
DROP TABLE t1;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test
index 30fd0192f26..27674148f46 100644
--- a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test
@@ -4,6 +4,12 @@
#
# Test the effect of gmcast.isolate on master during an SR transaction
#
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
@@ -41,7 +47,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
--source include/wait_condition.inc
--source include/galera_wait_ready.inc
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
--source include/galera_wait_ready.inc
@@ -125,3 +131,5 @@ SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
--connection node_1
CALL mtr.add_suppression("failed to send SR rollback for");
DROP TABLE t1;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test
index 83964769ef5..6ca2011d221 100644
--- a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test
@@ -7,8 +7,15 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---connection node_1
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
@@ -33,7 +40,7 @@ SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
INSERT INTO t1 VALUES (6);
ROLLBACK;
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
--connection node_2
--source include/start_mysqld.inc
@@ -42,15 +49,20 @@ SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
--source include/wait_until_connected_again.inc
--source include/galera_wait_ready.inc
---connection node_2
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
--connection node_2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-SELECT COUNT(*) = 0 FROM t1;
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
-SELECT COUNT(*) = 0 FROM t1;
-SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+--connection node_1
+--disconnect node_1a
DROP TABLE t1;
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test
index ea549a6bea2..08a59296e41 100644
--- a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test
@@ -7,7 +7,6 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
-
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
# Save original auto_increment_offset values.
--let $node_1=node_1
diff --git a/mysql-test/suite/galera_sr/disabled.def b/mysql-test/suite/galera_sr/disabled.def
index 54701b1eb11..5942cd9e814 100644
--- a/mysql-test/suite/galera_sr/disabled.def
+++ b/mysql-test/suite/galera_sr/disabled.def
@@ -11,4 +11,5 @@
##############################################################################
GCF-1060 : MDEV-26528 wrong usage of mutex LOCK_thd_kill and LOCK_thd_kill
+galera_sr_cc_master : MDEV-29882 Galera test failure on galera_sr_cc_master
diff --git a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
index 908864a2953..4cc107306ba 100644
--- a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
+++ b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
@@ -249,6 +249,10 @@ as (match(a) against ('' in boolean mode)) virtual;
drop table t1;
--echo #
+--echo # End of 10.3 tests
+--echo #
+
+--echo #
--echo # MDEV-29029 Index corruption and/or assertion failure upon using RANDOM_BYTES for indexed virtual column
--echo #
diff --git a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
index 646dc1abc7b..d4db5b5de76 100644
--- a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
+++ b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
@@ -49,18 +49,18 @@ alter table t1 add column (h int generated always as (a+1) virtual, i int as(5)
drop table t1;
--echo # DEFAULT
---error 1064
+--error ER_PARSE_ERROR
create table t1 (a int, b int generated always as (a+1) virtual default 0);
create table t1 (a int);
---error 1064
+--error ER_PARSE_ERROR
alter table t1 add column b int generated always as (a+1) virtual default 0;
drop table t1;
--echo # AUTO_INCREMENT
---error 1064
+--error ER_PARSE_ERROR
create table t1 (a int, b int generated always as (a+1) virtual AUTO_INCREMENT);
create table t1 (a int);
---error 1064
+--error ER_PARSE_ERROR
alter table t1 add column b int generated always as (a+1) virtual AUTO_INCREMENT;
drop table t1;
@@ -203,6 +203,13 @@ create table t1 (a int, b int generated always as(-b) virtual, c int generated a
create table t1 (a int, b int generated always as(-c) virtual, c int generated always as (b + 1) virtual);
--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) unique, col_int_key int);
+create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key), col_int_key int);
+show create table t1;
+insert t1 (col_int_key) values (10),(20),(30);
+select * from t1;
+drop table t1;
--echo # Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE
create table t1 (a int, b int generated always as(-a) virtual, c int generated always as (b + 1) stored);
diff --git a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
index f35d720f0af..a339e549b41 100644
--- a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
@@ -171,6 +171,9 @@ as (match(a) against ('' in boolean mode)) virtual;
ERROR HY000: Function or expression 'match ... against()' cannot be used in the GENERATED ALWAYS AS clause of `r`
drop table t1;
#
+# End of 10.3 tests
+#
+#
# MDEV-29029 Index corruption and/or assertion failure upon using RANDOM_BYTES for indexed virtual column
#
create table t1 (a int);
diff --git a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
index a34b9906d52..c6a4518bb87 100644
--- a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
@@ -173,6 +173,9 @@ as (match(a) against ('' in boolean mode)) virtual;
ERROR HY000: Function or expression 'match ... against()' cannot be used in the GENERATED ALWAYS AS clause of `r`
drop table t1;
#
+# End of 10.3 tests
+#
+#
# MDEV-29029 Index corruption and/or assertion failure upon using RANDOM_BYTES for indexed virtual column
#
create table t1 (a int);
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
index 9e8211e7160..8c1925c942a 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
@@ -264,6 +264,24 @@ create table t1 (a int, b int generated always as(-c) virtual, c int generated a
ERROR 01000: Expression for field `b` is referring to uninitialized field `c`
create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int);
ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk`
+create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) unique, col_int_key int);
+ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk`
+create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key), col_int_key int);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL AUTO_INCREMENT,
+ `col_int_nokey` int(11) GENERATED ALWAYS AS (`pk` + `col_int_key`) VIRTUAL,
+ `col_int_key` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+insert t1 (col_int_key) values (10),(20),(30);
+select * from t1;
+pk col_int_nokey col_int_key
+1 11 10
+2 22 20
+3 33 30
+drop table t1;
# Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE
create table t1 (a int, b int generated always as(-a) virtual, c int generated always as (b + 1) stored);
insert into t1(a) values(1),(2);
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
index f5f9c44b1e3..734e05bbcd3 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
@@ -264,6 +264,24 @@ create table t1 (a int, b int generated always as(-c) virtual, c int generated a
ERROR 01000: Expression for field `b` is referring to uninitialized field `c`
create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int);
ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk`
+create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) unique, col_int_key int);
+ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk`
+create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key), col_int_key int);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL AUTO_INCREMENT,
+ `col_int_nokey` int(11) GENERATED ALWAYS AS (`pk` + `col_int_key`) VIRTUAL,
+ `col_int_key` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+insert t1 (col_int_key) values (10),(20),(30);
+select * from t1;
+pk col_int_nokey col_int_key
+1 11 10
+2 22 20
+3 33 30
+drop table t1;
# Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE
create table t1 (a int, b int generated always as(-a) virtual, c int generated always as (b + 1) stored);
insert into t1(a) values(1),(2);
diff --git a/mysql-test/suite/innodb/r/deadlock_in_subqueries_join.result b/mysql-test/suite/innodb/r/deadlock_in_subqueries_join.result
new file mode 100644
index 00000000000..2e82b0662f8
--- /dev/null
+++ b/mysql-test/suite/innodb/r/deadlock_in_subqueries_join.result
@@ -0,0 +1,50 @@
+CREATE TABLE t1 (
+pkey int NOT NULL PRIMARY KEY,
+c int
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1,1);
+CREATE TABLE t2 (
+pkey int NOT NULL PRIMARY KEY,
+c int
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t2 VALUES (2, NULL);
+CREATE TABLE t3 (c int) engine = InnoDB;
+INSERT INTO t3 VALUES (10), (20), (30), (40), (50);
+connect con1, localhost,root,,;
+connection default;
+START TRANSACTION;
+UPDATE t3 SET c=c+1000;
+SELECT * FROM t1 FOR UPDATE;
+pkey c
+1 1
+connection con1;
+START TRANSACTION;
+DELETE FROM t2 WHERE c NOT IN (SELECT ref_0.pkey FROM t1 AS ref_0 INNER JOIN t1 AS ref_1 ON ref_0.c = ref_0.pkey);
+connection default;
+SELECT * FROM t2 FOR UPDATE;
+pkey c
+2 NULL
+COMMIT;
+connection con1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+connection default;
+START TRANSACTION;
+UPDATE t3 SET c=c+1000;
+SELECT * FROM t1 FOR UPDATE;
+pkey c
+1 1
+connection con1;
+START TRANSACTION;
+UPDATE t2 SET pkey=pkey+10 WHERE c NOT IN (SELECT ref_0.pkey FROM t1 AS ref_0 INNER JOIN t1 AS ref_1 ON ref_0.c = ref_0.pkey);
+connection default;
+SELECT * FROM t2 FOR UPDATE;
+pkey c
+2 NULL
+COMMIT;
+connection con1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+disconnect con1;
+connection default;
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/suite/innodb/r/full_crc32_import.result b/mysql-test/suite/innodb/r/full_crc32_import.result
index f08cc9a5e53..99f11548420 100644
--- a/mysql-test/suite/innodb/r/full_crc32_import.result
+++ b/mysql-test/suite/innodb/r/full_crc32_import.result
@@ -38,6 +38,8 @@ restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t1 when .cfg file is missing.
ALTER TABLE t1 DROP INDEX b;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
ALTER TABLE t1 IMPORT TABLESPACE;
SHOW CREATE TABLE t1;
Table Create Table
@@ -116,9 +118,10 @@ restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t1 when .cfg file is missing.
ALTER TABLE t1 DROP INDEX idx1;
-ALTER TABLE t1 IMPORT TABLESPACE;
Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
+ALTER TABLE t1 IMPORT TABLESPACE;
+Warnings:
Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/innodb/r/import_tablespace_race.result b/mysql-test/suite/innodb/r/import_tablespace_race.result
new file mode 100644
index 00000000000..6c8b2e3a26e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/import_tablespace_race.result
@@ -0,0 +1,27 @@
+#
+# MDEV-29144 ER_TABLE_SCHEMA_MISMATCH or crash on DISCARD/IMPORT
+#
+call mtr.add_suppression("InnoDB: Unknown index id");
+CREATE TABLE t (pk int PRIMARY KEY, c varchar(1024))
+ENGINE=InnoDB CHARSET latin1;
+INSERT INTO t SELECT seq, 'x' FROM seq_1_to_100;
+connect con1,localhost,root,,test;
+BEGIN NOT ATOMIC
+DECLARE a INT DEFAULT 0;
+REPEAT
+SET a= a+1;
+UPDATE t SET c = 'xx' WHERE pk = a;
+UNTIL a = 100
+END REPEAT;
+END
+$
+connection default;
+ALTER TABLE t NOWAIT ADD INDEX (c);
+connection con1;
+connection default;
+FLUSH TABLE t FOR EXPORT;
+UNLOCK TABLES;
+DROP TABLE t;
+ALTER TABLE t DISCARD TABLESPACE;
+ALTER TABLE t IMPORT TABLESPACE;
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
index 6d551210eef..1a68c54095a 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
@@ -141,6 +141,8 @@ CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
ALTER TABLE t DISCARD TABLESPACE;
SET sql_mode='NO_ZERO_DATE';
ALTER TABLE t ADD c DATE NOT NULL;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t`
SET sql_mode=DEFAULT;
DROP TABLE t;
# End of 10.3 tests
diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result
index b4e347b2600..5a8b3d24d75 100644
--- a/mysql-test/suite/innodb/r/innodb-table-online.result
+++ b/mysql-test/suite/innodb/r/innodb-table-online.result
@@ -452,10 +452,26 @@ SET DEBUG_SYNC = 'now WAIT_FOR created';
UPDATE t1 SET f = REPEAT('a', 20000);
SET DEBUG_SYNC = 'now SIGNAL updated';
connection con1;
-disconnect con1;
connection default;
DROP TABLE t1;
-SET DEBUG_SYNC = 'RESET';
+#
+# MDEV-29977 Memory leak in row_log_table_apply_update
+#
+CREATE TABLE t1(f1 longtext, f2 int, KEY(f1(1024)), KEY(f2, f1(20))) ENGINE=InnoDB;
+INSERT INTO t1 VALUES('a', 1);
+connection con1;
+set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con_default WAIT_FOR con1_signal";
+ALTER TABLE t1 FORCE;
+connection default;
+SET DEBUG_SYNC="now WAIT_FOR con_default";
+UPDATE t1 SET f1 = NULL;
+UPDATE t1 SET f1 = REPEAT('b', 9000);
+SET DEBUG_SYNC="now SIGNAL con1_signal";
+connection con1;
+DROP TABLE t1;
+connection default;
+SET DEBUG_SYNC=RESET;
+disconnect con1;
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-1.result b/mysql-test/suite/innodb/r/innodb-wl5522-1.result
index 55557a8fb99..204d6bc8b78 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-1.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-1.result
@@ -795,3 +795,19 @@ DROP DATABASE testdb_wl5522;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
+#
+# MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message
+#
+#
+CREATE TABLE `t1` (`i` int(11) NOT NULL, PRIMARY KEY (`i`) ) ENGINE=InnoDB;
+FLUSH TABLES t1 FOR EXPORT;
+backup: t1
+UNLOCK TABLES;
+ALTER TABLE t1 DISCARD TABLESPACE;
+call mtr.add_suppression("InnoDB: unsupported MySQL tablespace");
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR 42000: Table 't1' uses an extension that doesn't exist in this MariaDB version
+DROP TABLE t1;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index 5d75692a89f..e7af2d9469e 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -451,7 +451,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Too many concurrent transactions
+ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Too many concurrent transactions
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug=@saved_debug_dbug;
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
@@ -854,7 +854,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption
+ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Data structure corruption
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
@@ -902,6 +902,8 @@ ALTER TABLE t1 DISCARD TABLESPACE;
SELECT COUNT(*) FROM t1;
ERROR HY000: Tablespace has been discarded for table `t1`
ALTER TABLE t1 ADD INDEX idx(c1);
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
DROP TABLE t1;
unlink: t1.ibd
unlink: t1.cfg
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result
index 485378988df..7bcc57c5bd5 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522.result
@@ -252,13 +252,15 @@ ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.)
select count(*) from t1;
ERROR HY000: Tablespace has been discarded for table `t1`
ALTER TABLE t1 DROP INDEX x;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
ALTER TABLE t1 DROP INDEX x, ALGORITHM=copy;
ERROR 42000: Can't DROP INDEX `x`; check that it exists
ALTER TABLE t1 ADD INDEX idx(c2);
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result
index db98a6a5fcf..f56938550ac 100644
--- a/mysql-test/suite/innodb/r/instant_alter_bugs.result
+++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result
@@ -193,8 +193,6 @@ Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/innodb/r/instant_alter_import.result b/mysql-test/suite/innodb/r/instant_alter_import.result
index c65ffb3ad4c..3e7ee35fdc1 100644
--- a/mysql-test/suite/innodb/r/instant_alter_import.result
+++ b/mysql-test/suite/innodb/r/instant_alter_import.result
@@ -150,8 +150,6 @@ INSERT INTO t1 VALUES(1);
FLUSH TABLE t1 FOR EXPORT;
unlock tables;
ALTER TABLE t IMPORT tablespace;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t`
check table t;
Table Op Msg_type Msg_text
test.t check status OK
diff --git a/mysql-test/suite/innodb/r/restart.result b/mysql-test/suite/innodb/r/restart.result
index aba08a9ae99..95d79a0ab14 100644
--- a/mysql-test/suite/innodb/r/restart.result
+++ b/mysql-test/suite/innodb/r/restart.result
@@ -3,6 +3,8 @@
#
# FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files
# of tables with .isl file or DATA DIRECTORY attribute.
+call mtr.add_suppression("\\[ERROR\\] InnoDB: MySQL-8\\.0 tablespace in ");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Restart in MySQL for migration/recovery\\.");
# FIXME: This is much more noisy than MariaDB 10.1!
call mtr.add_suppression("\\[ERROR\\] InnoDB: Tablespace flags are invalid in datafile: .*test.t[rcd]\\.ibd");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number .* in a file operation\\.");
@@ -40,3 +42,11 @@ Warning 1210 innodb_buffer_pool_size must be at least MIN_VAL for innodb_page_si
Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE'
EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size);
SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig;
+#
+# MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message
+#
+FOUND 1 /InnoDB: MySQL-8\.0 tablespace in \./ibdata1/ in attempted_start.err
+# restart
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/suite/innodb/t/create_isl_with_direct.test b/mysql-test/suite/innodb/t/create_isl_with_direct.test
index 2092d03b72f..45d7fbf4ea5 100644
--- a/mysql-test/suite/innodb/t/create_isl_with_direct.test
+++ b/mysql-test/suite/innodb/t/create_isl_with_direct.test
@@ -2,13 +2,6 @@
--source include/have_innodb.inc
--source include/have_symlink.inc
---disable_query_log
-CALL mtr.add_suppression(".*Failed to set O_DIRECT on file.*");
-
-# The below mtr suppression to avoid failure in solaris platform.
-CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to set DIRECTIO_ON on file.*");
---enable_query_log
-
SHOW VARIABLES LIKE 'innodb_flush_method';
let MYSQLD_DATADIR=`SELECT @@datadir`;
diff --git a/mysql-test/suite/innodb/t/deadlock_in_subqueries_join.test b/mysql-test/suite/innodb/t/deadlock_in_subqueries_join.test
new file mode 100644
index 00000000000..b3adfb3b02d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/deadlock_in_subqueries_join.test
@@ -0,0 +1,81 @@
+--source include/have_innodb.inc
+--source include/count_sessions.inc
+
+CREATE TABLE t1 (
+ pkey int NOT NULL PRIMARY KEY,
+ c int
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES(1,1);
+
+CREATE TABLE t2 (
+ pkey int NOT NULL PRIMARY KEY,
+ c int
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+INSERT INTO t2 VALUES (2, NULL);
+
+# The following table is to increase tansaction weight on deadlock resolution
+CREATE TABLE t3 (c int) engine = InnoDB;
+INSERT INTO t3 VALUES (10), (20), (30), (40), (50);
+
+--let $i= 2
+--let $delete= 2
+--let $update= 1
+--connect(con1, localhost,root,,)
+
+while($i) {
+--connection default
+START TRANSACTION; # trx 1
+# The following update is necessary to increase the transaction weight, which is
+# calculated as the number of locks + the number of undo records during deadlock
+# report. Victim's transaction should have minimum weight. We need trx 2 to be
+# choosen as victim, that's why we need to increase the current transaction
+# weight.
+UPDATE t3 SET c=c+1000;
+SELECT * FROM t1 FOR UPDATE;
+
+--connection con1
+START TRANSACTION; # trx 2
+# 1) read record from t2, lock it
+# 2) check if the read record should be deleted, i.e. read record from t1,
+# as the record from t1 is locked by trx 1, the subselect will be suspended.
+# see 'while' loop in mysql_delete() or mysql_update() and
+# select->skip_record(thd) call for details.
+if ($i == $delete) {
+--send DELETE FROM t2 WHERE c NOT IN (SELECT ref_0.pkey FROM t1 AS ref_0 INNER JOIN t1 AS ref_1 ON ref_0.c = ref_0.pkey)
+}
+if ($i == $update) {
+--send UPDATE t2 SET pkey=pkey+10 WHERE c NOT IN (SELECT ref_0.pkey FROM t1 AS ref_0 INNER JOIN t1 AS ref_1 ON ref_0.c = ref_0.pkey)
+}
+
+--connection default
+let $wait_condition=
+ SELECT count(*) = 1 FROM information_schema.processlist
+ WHERE (state = 'Sending data' OR state = "Updating")
+ AND (info LIKE 'delete from t2 where%' OR
+ info LIKE 'UPDATE t2 SET pkey=pkey+10 WHERE%');
+--source include/wait_condition.inc
+
+# The record from t2 is locked by the previous delete, so trx 2 is waiting for
+# trx 1, and trx 1 will be blocked by trx 2 with the following SELECT. So we
+# have deadlock here. And trx 2 is chosen as deadlock victim as trx 1 has
+# greater weight.
+SELECT * FROM t2 FOR UPDATE;
+COMMIT;
+
+--connection con1
+# If the bug is not fixed, there will be assertion failure as
+# mysql_delete()/mysql_update() will continue execution despite its subselect
+# got deadlock error
+--error ER_LOCK_DEADLOCK
+--reap
+COMMIT;
+--dec $i
+}
+
+--disconnect con1
+
+--connection default
+DROP TABLE t1,t2,t3;
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb/t/import_tablespace_race.test b/mysql-test/suite/innodb/t/import_tablespace_race.test
new file mode 100644
index 00000000000..10ffe061ed1
--- /dev/null
+++ b/mysql-test/suite/innodb/t/import_tablespace_race.test
@@ -0,0 +1,55 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+
+--echo #
+--echo # MDEV-29144 ER_TABLE_SCHEMA_MISMATCH or crash on DISCARD/IMPORT
+--echo #
+
+call mtr.add_suppression("InnoDB: Unknown index id");
+CREATE TABLE t (pk int PRIMARY KEY, c varchar(1024))
+ENGINE=InnoDB CHARSET latin1;
+INSERT INTO t SELECT seq, 'x' FROM seq_1_to_100;
+
+--connect (con1,localhost,root,,test)
+--delimiter $
+--send
+ BEGIN NOT ATOMIC
+ DECLARE a INT DEFAULT 0;
+ REPEAT
+ SET a= a+1;
+ UPDATE t SET c = 'xx' WHERE pk = a;
+ UNTIL a = 100
+ END REPEAT;
+ END
+$
+--delimiter ;
+
+--connection default
+--error 0,ER_LOCK_WAIT_TIMEOUT
+ALTER TABLE t NOWAIT ADD INDEX (c);
+
+--connection con1
+--reap
+
+--connection default
+
+--let $datadir= `select @@datadir`
+
+FLUSH TABLE t FOR EXPORT;
+--let $create= query_get_value(SHOW CREATE TABLE t, Create Table, 1)
+--copy_file $datadir/test/t.cfg $MYSQL_TMP_DIR/t.cfg
+--copy_file $datadir/test/t.ibd $MYSQL_TMP_DIR/t.ibd
+UNLOCK TABLES;
+
+DROP TABLE t;
+--disable_query_log
+eval $create;
+--enable_query_log
+
+ALTER TABLE t DISCARD TABLESPACE;
+--move_file $MYSQL_TMP_DIR/t.cfg $datadir/test/t.cfg
+--move_file $MYSQL_TMP_DIR/t.ibd $datadir/test/t.ibd
+ALTER TABLE t IMPORT TABLESPACE;
+
+# Cleanup
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test
index 170ba5072f5..45b1bc1ec8e 100644
--- a/mysql-test/suite/innodb/t/innodb-table-online.test
+++ b/mysql-test/suite/innodb/t/innodb-table-online.test
@@ -420,11 +420,28 @@ SET DEBUG_SYNC = 'now SIGNAL updated';
connection con1;
reap;
-disconnect con1;
connection default;
DROP TABLE t1;
-SET DEBUG_SYNC = 'RESET';
+--echo #
+--echo # MDEV-29977 Memory leak in row_log_table_apply_update
+--echo #
+CREATE TABLE t1(f1 longtext, f2 int, KEY(f1(1024)), KEY(f2, f1(20))) ENGINE=InnoDB;
+INSERT INTO t1 VALUES('a', 1);
+connection con1;
+set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con_default WAIT_FOR con1_signal";
+send ALTER TABLE t1 FORCE;
+connection default;
+SET DEBUG_SYNC="now WAIT_FOR con_default";
+UPDATE t1 SET f1 = NULL;
+UPDATE t1 SET f1 = REPEAT('b', 9000);
+SET DEBUG_SYNC="now SIGNAL con1_signal";
+connection con1;
+reap;
+DROP TABLE t1;
+connection default;
+SET DEBUG_SYNC=RESET;
+disconnect con1;
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-1.test b/mysql-test/suite/innodb/t/innodb-wl5522-1.test
index 0d59df11c44..dbd58835ec6 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-1.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-1.test
@@ -932,3 +932,34 @@ call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tabl
--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd
--remove_file $MYSQLTEST_VARDIR/tmp/t1_fk.cfg
--remove_file $MYSQLTEST_VARDIR/tmp/t1_fk.ibd
+
+--echo #
+--echo # MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message
+--echo #
+--echo #
+
+CREATE TABLE `t1` (`i` int(11) NOT NULL, PRIMARY KEY (`i`) ) ENGINE=InnoDB;
+FLUSH TABLES t1 FOR EXPORT;
+
+# We use the cfg file of ours.
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
+EOF
+
+UNLOCK TABLES;
+ALTER TABLE t1 DISCARD TABLESPACE;
+
+--move_file $MYSQLTEST_VARDIR/tmp/t1.cfg $MYSQLD_DATADIR/test/t1.cfg
+--copy_file std_data/mysql80/t1.ibd $MYSQLD_DATADIR/test/t1.ibd
+
+call mtr.add_suppression("InnoDB: unsupported MySQL tablespace");
+--error ER_UNSUPPORTED_EXTENSION
+ALTER TABLE t1 IMPORT TABLESPACE;
+
+DROP TABLE t1;
+--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/suite/innodb/t/restart.test b/mysql-test/suite/innodb/t/restart.test
index bb3d08a8779..5be076c6198 100644
--- a/mysql-test/suite/innodb/t/restart.test
+++ b/mysql-test/suite/innodb/t/restart.test
@@ -15,6 +15,9 @@ let page_size= `select @@innodb_page_size`;
--echo # FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files
--echo # of tables with .isl file or DATA DIRECTORY attribute.
+call mtr.add_suppression("\\[ERROR\\] InnoDB: MySQL-8\\.0 tablespace in ");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Restart in MySQL for migration/recovery\\.");
+
--echo # FIXME: This is much more noisy than MariaDB 10.1!
call mtr.add_suppression("\\[ERROR\\] InnoDB: Tablespace flags are invalid in datafile: .*test.t[rcd]\\.ibd");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number .* in a file operation\\.");
@@ -46,7 +49,7 @@ die unless open OUT, ">", "$ENV{datadir}/test/tc.ibd";
print OUT "bar " x $ENV{page_size};
close OUT or die;
die unless open OUT, ">", "$ENV{MYSQL_TMP_DIR}/test/td.ibd";
-print OUT "xyz " x $ENV{page_size};
+print OUT "Xyz " x $ENV{page_size};
close OUT or die;
die unless open ISL, "+<", "$ENV{datadir}/test/td.isl";
$_=<ISL>;
@@ -109,3 +112,60 @@ EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size
--source include/wait_condition.inc
SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig;
+
+--echo #
+--echo # MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message
+--echo #
+
+--let MYSQLD_DATADIR= `SELECT @@datadir`
+--let SERVER_ID= `SELECT @@server_id`
+--let EXPECT_FILE_NAME= $MYSQLTEST_VARDIR/tmp/mysqld.$SERVER_ID.expect
+
+--source include/shutdown_mysqld.inc
+
+--move_file $MYSQLD_DATADIR/ibdata1 $MYSQLD_DATADIR/ibdata1.bak
+--copy_file std_data/mysql80/ibdata1_$page_size $MYSQLD_DATADIR/ibdata1
+
+perl;
+use IO::Handle;
+my $size = 9 * 1048576;
+if ($ENV{MTR_COMBINATION_32K}) {
+ $size *= 2;
+}
+if ($ENV{MTR_COMBINATION_64K}) {
+ $size *= 4;
+}
+$size -= $ENV{page_size};
+die unless open(FILE, ">>", "$ENV{MYSQLD_DATADIR}/ibdata1");
+binmode FILE;
+
+print FILE chr(0) x $size;
+close(FILE);
+EOF
+
+--let ibdata_size='9M'
+if ($MTR_COMBINATION_32K)
+{
+--let ibdata_size='18M'
+}
+if ($MTR_COMBINATION_64K)
+{
+--let ibdata_size='36M'
+}
+
+--error 1
+exec $MYSQLD --no-defaults --skip-networking --innodb_data_file_path=ibdata1:$ibdata_size --innodb-page-size=$page_size --datadir=$MYSQLD_DATADIR --log-error=$MYSQL_TMP_DIR/attempted_start.err;
+
+let SEARCH_FILE= $MYSQL_TMP_DIR/attempted_start.err;
+let SEARCH_PATTERN= InnoDB: MySQL-8\.0 tablespace in \./ibdata1;
+source include/search_pattern_in_file.inc;
+
+--remove_file $MYSQL_TMP_DIR/attempted_start.err
+--remove_file $MYSQLD_DATADIR/ibdata1
+--move_file $MYSQLD_DATADIR/ibdata1.bak $MYSQLD_DATADIR/ibdata1
+
+--source include/start_mysqld.inc
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/suite/innodb_fts/r/fulltext2.result b/mysql-test/suite/innodb_fts/r/fulltext2.result
index 7ec2df8ee46..10fee848849 100644
--- a/mysql-test/suite/innodb_fts/r/fulltext2.result
+++ b/mysql-test/suite/innodb_fts/r/fulltext2.result
@@ -279,3 +279,20 @@ ALTER TABLE t1 ADD d INT NULL;
ALTER TABLE t1 ADD FULLTEXT(b);
ERROR HY000: Index 'FTS_DOC_ID_INDEX' is of wrong type for an InnoDB FULLTEXT index
DROP TABLE t1;
+#
+# MDEV-29169 Using MATCH returns NULL for Virtual Column
+#
+CREATE TABLE t (a TEXT DEFAULT NULL,
+b TEXT AS (a),
+c TEXT AS (concat(a, '1')),
+d int AS (111) VIRTUAL,
+FULLTEXT KEY `a` (`a`)
+) ENGINE=InnoDB;
+INSERT INTO t (a) VALUES ('test');
+SELECT * FROM t;
+a b c d
+test test test1 111
+SELECT * FROM t WHERE MATCH(a) AGAINST('test');
+a b c d
+test test test1 111
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb_fts/t/fulltext2.test b/mysql-test/suite/innodb_fts/t/fulltext2.test
index 1e3894644a0..25a4d5b24f9 100644
--- a/mysql-test/suite/innodb_fts/t/fulltext2.test
+++ b/mysql-test/suite/innodb_fts/t/fulltext2.test
@@ -268,3 +268,19 @@ ALTER TABLE t1 ADD d INT NULL;
--error ER_INNODB_FT_WRONG_DOCID_INDEX
ALTER TABLE t1 ADD FULLTEXT(b);
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-29169 Using MATCH returns NULL for Virtual Column
+--echo #
+CREATE TABLE t (a TEXT DEFAULT NULL,
+ b TEXT AS (a),
+ c TEXT AS (concat(a, '1')),
+ d int AS (111) VIRTUAL,
+ FULLTEXT KEY `a` (`a`)
+) ENGINE=InnoDB;
+
+INSERT INTO t (a) VALUES ('test');
+SELECT * FROM t;
+SELECT * FROM t WHERE MATCH(a) AGAINST('test');
+
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
index 6c754d143c3..62a28a981cd 100644
--- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
+++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
@@ -86,7 +86,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Too many concurrent transactions
+ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Too many concurrent transactions
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug=@saved_debug_dbug;
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
@@ -316,7 +316,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption
+ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Data structure corruption
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
@@ -365,6 +365,8 @@ SELECT COUNT(*) FROM t1;
ERROR HY000: Tablespace has been discarded for table `t1`
SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
ALTER TABLE t1 ADD INDEX idx(c1);
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
diff --git a/mysql-test/suite/innodb_zip/r/wl5522_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_zip.result
index 352c824ed87..1b044d68680 100644
--- a/mysql-test/suite/innodb_zip/r/wl5522_zip.result
+++ b/mysql-test/suite/innodb_zip/r/wl5522_zip.result
@@ -232,13 +232,13 @@ restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.)
ALTER TABLE t1 DROP INDEX x;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
ALTER TABLE t1 ADD INDEX idx(c2);
Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc
index b19a8cd7749..567733edab0 100644
--- a/mysql-test/suite/parts/inc/partition_auto_increment.inc
+++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc
@@ -886,6 +886,19 @@ eval CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=$
INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+--echo # failed in ha_partition::set_auto_increment_if_higher upon REPLACE
+--echo # with partition pruning
+--echo #
+eval CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE=$engine
+PARTITION BY RANGE (a) (
+ PARTITION p0 VALUES LESS THAN (10),
+ PARTITION pn VALUES LESS THAN MAXVALUE
+);
+REPLACE INTO t1 PARTITION (p0) SELECT 1;
+DROP TABLE t1;
}
if (!$skip_delete)
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
index 94e4a64ab6a..8c82541b988 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
@@ -704,6 +704,18 @@ INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
#
+# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# failed in ha_partition::set_auto_increment_if_higher upon REPLACE
+# with partition pruning
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='Blackhole'
+PARTITION BY RANGE (a) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION pn VALUES LESS THAN MAXVALUE
+);
+REPLACE INTO t1 PARTITION (p0) SELECT 1;
+DROP TABLE t1;
+#
# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
# ha_partition::set_auto_increment_if_higher
#
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
index 63e6443120f..ab237b595b5 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
@@ -1126,6 +1126,18 @@ INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
#
+# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# failed in ha_partition::set_auto_increment_if_higher upon REPLACE
+# with partition pruning
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='InnoDB'
+PARTITION BY RANGE (a) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION pn VALUES LESS THAN MAXVALUE
+);
+REPLACE INTO t1 PARTITION (p0) SELECT 1;
+DROP TABLE t1;
+#
# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
# ha_partition::set_auto_increment_if_higher
#
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_maria.result b/mysql-test/suite/parts/r/partition_auto_increment_maria.result
index d9bc3b77ed5..3767a278503 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_maria.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_maria.result
@@ -1158,6 +1158,18 @@ INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
#
+# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# failed in ha_partition::set_auto_increment_if_higher upon REPLACE
+# with partition pruning
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='Aria'
+PARTITION BY RANGE (a) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION pn VALUES LESS THAN MAXVALUE
+);
+REPLACE INTO t1 PARTITION (p0) SELECT 1;
+DROP TABLE t1;
+#
# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
# ha_partition::set_auto_increment_if_higher
#
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_memory.result b/mysql-test/suite/parts/r/partition_auto_increment_memory.result
index c265ffeeed6..936e3e9e1cb 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result
@@ -1139,6 +1139,18 @@ INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
#
+# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# failed in ha_partition::set_auto_increment_if_higher upon REPLACE
+# with partition pruning
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='Memory'
+PARTITION BY RANGE (a) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION pn VALUES LESS THAN MAXVALUE
+);
+REPLACE INTO t1 PARTITION (p0) SELECT 1;
+DROP TABLE t1;
+#
# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
# ha_partition::set_auto_increment_if_higher
#
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
index a0befe8ef2c..475533ceb76 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
@@ -1158,6 +1158,18 @@ INSERT INTO t1 VALUES (1,1),(2,2);
UPDATE t1 SET pk = 0;
DROP TABLE t1;
#
+# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
+# failed in ha_partition::set_auto_increment_if_higher upon REPLACE
+# with partition pruning
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='MyISAM'
+PARTITION BY RANGE (a) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION pn VALUES LESS THAN MAXVALUE
+);
+REPLACE INTO t1 PARTITION (p0) SELECT 1;
+DROP TABLE t1;
+#
# MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()'
# ha_partition::set_auto_increment_if_higher
#
diff --git a/mysql-test/suite/parts/t/partition_special_myisam.test b/mysql-test/suite/parts/t/partition_special_myisam.test
index 5a573259373..b6f25484f3a 100644
--- a/mysql-test/suite/parts/t/partition_special_myisam.test
+++ b/mysql-test/suite/parts/t/partition_special_myisam.test
@@ -74,6 +74,7 @@ COMMIT;
--connection con3
--reap
+--remove_file $MYSQLD_DATADIR/test/load.in
DROP TABLE t1;
--disconnect con3
diff --git a/mysql-test/suite/roles/recursive.result b/mysql-test/suite/roles/recursive.result
index 05f28745f02..daacd2ed250 100644
--- a/mysql-test/suite/roles/recursive.result
+++ b/mysql-test/suite/roles/recursive.result
@@ -202,7 +202,7 @@ count(concat(User))
22
show grants;
Grants for foo@localhost
-GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1`
+GRANT SELECT (`User`) ON `mysql`.`roles_mapping` TO `role1`
GRANT USAGE ON *.* TO `foo`@`localhost`
GRANT USAGE ON *.* TO `role10`
GRANT USAGE ON *.* TO `role1`
@@ -236,8 +236,8 @@ count(concat(User,Host))
22
show grants;
Grants for foo@localhost
-GRANT SELECT (Host) ON `mysql`.`roles_mapping` TO `role3`
-GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1`
+GRANT SELECT (`Host`) ON `mysql`.`roles_mapping` TO `role3`
+GRANT SELECT (`User`) ON `mysql`.`roles_mapping` TO `role1`
GRANT USAGE ON *.* TO `foo`@`localhost`
GRANT USAGE ON *.* TO `role10`
GRANT USAGE ON *.* TO `role1`
diff --git a/mysql-test/suite/roles/recursive_dbug.result b/mysql-test/suite/roles/recursive_dbug.result
index 55bbad51c09..b94f55ae6fb 100644
--- a/mysql-test/suite/roles/recursive_dbug.result
+++ b/mysql-test/suite/roles/recursive_dbug.result
@@ -246,7 +246,7 @@ count(concat(User))
22
show grants;
Grants for foo@localhost
-GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1`
+GRANT SELECT (`User`) ON `mysql`.`roles_mapping` TO `role1`
GRANT USAGE ON *.* TO `foo`@`localhost`
GRANT USAGE ON *.* TO `role10`
GRANT USAGE ON *.* TO `role1`
@@ -285,8 +285,8 @@ count(concat(User,Host))
22
show grants;
Grants for foo@localhost
-GRANT SELECT (Host) ON `mysql`.`roles_mapping` TO `role3`
-GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1`
+GRANT SELECT (`Host`) ON `mysql`.`roles_mapping` TO `role3`
+GRANT SELECT (`User`) ON `mysql`.`roles_mapping` TO `role1`
GRANT USAGE ON *.* TO `foo`@`localhost`
GRANT USAGE ON *.* TO `role10`
GRANT USAGE ON *.* TO `role1`
diff --git a/mysql-test/suite/roles/set_role-table-column-priv.result b/mysql-test/suite/roles/set_role-table-column-priv.result
index e0e8732e7a5..a680e3ff8c4 100644
--- a/mysql-test/suite/roles/set_role-table-column-priv.result
+++ b/mysql-test/suite/roles/set_role-table-column-priv.result
@@ -31,7 +31,7 @@ current_user() current_role()
test_user@localhost test_role1
show grants;
Grants for test_user@localhost
-GRANT SELECT (Role) ON `mysql`.`roles_mapping` TO `test_role2`
+GRANT SELECT (`Role`) ON `mysql`.`roles_mapping` TO `test_role2`
GRANT USAGE ON *.* TO `test_role1`
GRANT USAGE ON *.* TO `test_role2`
GRANT USAGE ON *.* TO `test_user`@`localhost`
@@ -47,7 +47,7 @@ test_role2
test_role2
show grants;
Grants for test_user@localhost
-GRANT SELECT (Role) ON `mysql`.`roles_mapping` TO `test_role2`
+GRANT SELECT (`Role`) ON `mysql`.`roles_mapping` TO `test_role2`
GRANT USAGE ON *.* TO `test_role1`
GRANT USAGE ON *.* TO `test_role2`
GRANT USAGE ON *.* TO `test_user`@`localhost`
diff --git a/mysql-test/suite/rpl/include/rpl_ssl.inc b/mysql-test/suite/rpl/include/rpl_ssl.inc
index bd77f213ae1..59a2af9f137 100644
--- a/mysql-test/suite/rpl/include/rpl_ssl.inc
+++ b/mysql-test/suite/rpl/include/rpl_ssl.inc
@@ -6,6 +6,7 @@
source include/have_ssl_communication.inc;
source include/master-slave.inc;
+source include/no_valgrind_without_big.inc;
# create a user for replication that requires ssl encryption
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result
index 3e6cdac820e..b7447a19582 100644
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result
@@ -48,7 +48,7 @@ GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO `mysqltest2`@`localho
GRANT USAGE ON *.* TO `mysqltest2`@`localhost`
show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
-GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost`
+GRANT SELECT (`a`), INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`) ON `test`.`t4` TO `mysqltest3`@`localhost`
GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
@@ -73,7 +73,7 @@ GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost`
GRANT USAGE ON *.* TO `mysqltest2`@`localhost`
show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
-GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost`
+GRANT SELECT (`a`), INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`) ON `test`.`t4` TO `mysqltest3`@`localhost`
GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
@@ -100,7 +100,7 @@ Grants for mysqltest1@localhost
GRANT USAGE ON *.* TO `mysqltest1`@`localhost`
show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
-GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost`
+GRANT INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`) ON `test`.`t4` TO `mysqltest3`@`localhost`
GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
@@ -114,7 +114,7 @@ show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
-GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost`
+GRANT INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`) ON `test`.`t4` TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
index 4d96fd694ec..7a7e1c1e074 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test
@@ -1,6 +1,7 @@
source include/not_embedded.inc;
source include/have_innodb.inc;
source include/master-slave.inc;
+source include/no_valgrind_without_big.inc;
let $engine_type= InnoDB;
diff --git a/mysql-test/suite/vcol/r/not_supported.result b/mysql-test/suite/vcol/r/not_supported.result
index d8703f755da..37ce4865dcc 100644
--- a/mysql-test/suite/vcol/r/not_supported.result
+++ b/mysql-test/suite/vcol/r/not_supported.result
@@ -42,3 +42,16 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
#
# End of 10.2 tests
#
+create table t1 (a int, b real as (rand()), c real as (b) stored);
+ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c`
+create table t1 (a int, b real as (rand()), c real as (b) unique);
+ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c`
+create table t1 (a int auto_increment primary key,
+b int as (a+1), c int as (b+1) stored);
+ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c`
+create table t1 (a int auto_increment primary key,
+b int as (a+1), c int as (b+1) unique);
+ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c`
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/suite/vcol/r/upgrade.result b/mysql-test/suite/vcol/r/upgrade.result
index fea6588a5f3..5393a3543dc 100644
--- a/mysql-test/suite/vcol/r/upgrade.result
+++ b/mysql-test/suite/vcol/r/upgrade.result
@@ -6,7 +6,7 @@ show create table vcol_autoinc;
Table Create Table
vcol_autoinc CREATE TABLE `vcol_autoinc` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
- `v3` int(11) GENERATED ALWAYS AS (`pk`) VIRTUAL,
+ `v3` int(11) GENERATED ALWAYS AS (`pk`) STORED,
PRIMARY KEY (`pk`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
select * from vcol_autoinc;
diff --git a/mysql-test/suite/vcol/t/not_supported.test b/mysql-test/suite/vcol/t/not_supported.test
index 2b5baf4ff4b..d58b207a7eb 100644
--- a/mysql-test/suite/vcol/t/not_supported.test
+++ b/mysql-test/suite/vcol/t/not_supported.test
@@ -49,3 +49,18 @@ create table t1 (a int, b serial as (a+1));
--echo #
--echo # End of 10.2 tests
--echo #
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int, b real as (rand()), c real as (b) stored);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int, b real as (rand()), c real as (b) unique);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int auto_increment primary key,
+ b int as (a+1), c int as (b+1) stored);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int auto_increment primary key,
+ b int as (a+1), c int as (b+1) unique);
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysys/my_delete.c b/mysys/my_delete.c
index 25c0f4657af..6854033f84b 100644
--- a/mysys/my_delete.c
+++ b/mysys/my_delete.c
@@ -82,6 +82,7 @@ int my_delete(const char *name, myf MyFlags)
Symbolic link are deleted without renaming. Directories are not deleted.
*/
#include <my_rdtsc.h>
+
static int my_win_unlink(const char *name)
{
HANDLE handle= INVALID_HANDLE_VALUE;
@@ -89,99 +90,113 @@ static int my_win_unlink(const char *name)
uint last_error;
char unique_filename[MAX_PATH + 35];
unsigned long long tsc; /* time stamp counter, for unique filename*/
-
+ int retries;
DBUG_ENTER("my_win_unlink");
- attributes= GetFileAttributes(name);
- if (attributes == INVALID_FILE_ATTRIBUTES)
- {
- last_error= GetLastError();
- DBUG_PRINT("error",("GetFileAttributes(%s) failed with %u\n", name, last_error));
- goto error;
- }
- if (attributes & FILE_ATTRIBUTE_DIRECTORY)
- {
- DBUG_PRINT("error",("can't remove %s - it is a directory\n", name));
- errno= EINVAL;
- DBUG_RETURN(-1);
- }
-
- if (attributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ DBUG_INJECT_FILE_SHARING_VIOLATION(name);
+
+ for (retries= FILE_SHARING_VIOLATION_RETRIES; ; retries--)
{
- /* Symbolic link. Delete link, the not target */
- if (!DeleteFile(name))
+ attributes= GetFileAttributes(name);
+ if (attributes == INVALID_FILE_ATTRIBUTES)
{
- last_error= GetLastError();
- DBUG_PRINT("error",("DeleteFile(%s) failed with %u\n", name,last_error));
- goto error;
+ last_error= GetLastError();
+ DBUG_PRINT("error",
+ ("GetFileAttributes(%s) failed with %u\n", name, last_error));
+ goto error;
}
- DBUG_RETURN(0);
- }
- /*
- Try Windows 10 method, delete with "posix semantics" (file is not visible, and creating
- a file with the same name won't fail, even if it the fiile was open)
- */
- struct
- {
- DWORD _Flags;
- } disp={0x3};
- /* 0x3 = FILE_DISPOSITION_FLAG_DELETE | FILE_DISPOSITION_FLAG_POSIX_SEMANTICS */
+ if (attributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ DBUG_PRINT("error", ("can't remove %s - it is a directory\n", name));
+ errno= EINVAL;
+ DBUG_RETURN(-1);
+ }
- handle= CreateFile(name, DELETE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL, OPEN_EXISTING, 0, NULL);
- if (handle != INVALID_HANDLE_VALUE)
- {
- BOOL ok= SetFileInformationByHandle(handle,
- (FILE_INFO_BY_HANDLE_CLASS) 21, &disp, sizeof(disp));
- CloseHandle(handle);
- if (ok)
+ if (attributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ {
+ /* Symbolic link. Delete link, the not target */
+ if (!DeleteFile(name))
+ {
+ last_error= GetLastError();
+ DBUG_PRINT("error",
+ ("DeleteFile(%s) failed with %u\n", name, last_error));
+ goto error;
+ }
DBUG_RETURN(0);
- }
+ }
- handle= CreateFile(name, DELETE, 0, NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, NULL);
- if (handle != INVALID_HANDLE_VALUE)
- {
/*
- We opened file without sharing flags (exclusive), no one else has this file
- opened, thus it is save to close handle to remove it. No renaming is
- necessary.
+ Try Windows 10 method, delete with "posix semantics" (file is not
+ visible, and creating a file with the same name won't fail, even if it
+ the file was open)
*/
- CloseHandle(handle);
- DBUG_RETURN(0);
- }
+ handle= CreateFile(name, DELETE,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ NULL, OPEN_EXISTING, 0, NULL);
+ if (handle != INVALID_HANDLE_VALUE)
+ {
+ /* 0x3 = FILE_DISPOSITION_FLAG_DELETE | FILE_DISPOSITION_FLAG_POSIX_SEMANTICS */
+ struct {DWORD _Flags;} disp= {0x3};
+ BOOL ok= SetFileInformationByHandle(
+ handle, (FILE_INFO_BY_HANDLE_CLASS) 21, &disp, sizeof(disp));
+ CloseHandle(handle);
+ if (ok)
+ DBUG_RETURN(0);
+ }
- /*
- Can't open file exclusively, hence the file must be already opened by
- someone else. Open it for delete (with all FILE_SHARE flags set),
- rename to unique name, close.
- */
- handle= CreateFile(name, DELETE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, NULL);
- if (handle == INVALID_HANDLE_VALUE)
- {
- last_error= GetLastError();
- DBUG_PRINT("error",
- ("CreateFile(%s) with FILE_FLAG_DELETE_ON_CLOSE failed with %u\n",
- name,last_error));
- goto error;
- }
+ handle= CreateFile(name, DELETE, 0, NULL, OPEN_EXISTING,
+ FILE_FLAG_DELETE_ON_CLOSE, NULL);
+ if (handle != INVALID_HANDLE_VALUE)
+ {
+ /*
+ We opened file without sharing flags (exclusive), no one else has this
+ file opened, thus it is safe to close handle to remove it. No renaming
+ is necessary.
+ */
+ CloseHandle(handle);
+ DBUG_RETURN(0);
+ }
- tsc= my_timer_cycles();
- my_snprintf(unique_filename,sizeof(unique_filename),"%s.%llx.deleted",
- name, tsc);
- if (!MoveFile(name, unique_filename))
- {
- DBUG_PRINT("warning", ("moving %s to unique filename failed, error %lu\n",
- name,GetLastError()));
- }
+ /*
+ Can't open file exclusively, hence the file must be already opened by
+ someone else. Open it for delete (with all FILE_SHARE flags set),
+ rename to unique name, close.
+ */
+ handle= CreateFile(name, DELETE,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, NULL);
+ if (handle == INVALID_HANDLE_VALUE)
+ {
+ last_error= GetLastError();
+ DBUG_PRINT(
+ "error",
+ ("CreateFile(%s) with FILE_FLAG_DELETE_ON_CLOSE failed with %u\n",
+ name, last_error));
+ goto error;
+ }
+
+ tsc= my_timer_cycles();
+ my_snprintf(unique_filename, sizeof(unique_filename), "%s.%llx.deleted",
+ name, tsc);
+ if (!MoveFile(name, unique_filename))
+ {
+ DBUG_PRINT("warning",
+ ("moving %s to unique filename failed, error %lu\n", name,
+ GetLastError()));
+ }
+ CloseHandle(handle);
+ DBUG_RETURN(0);
- CloseHandle(handle);
- DBUG_RETURN(0);
-
error:
- my_osmaperr(last_error);
- DBUG_RETURN(-1);
+ if (last_error != ERROR_SHARING_VIOLATION || retries == 0)
+ {
+ my_osmaperr(last_error);
+ DBUG_RETURN(-1);
+ }
+ DBUG_CLEAR_FILE_SHARING_VIOLATION();
+ Sleep(FILE_SHARING_VIOLATION_DELAY_MS);
+ }
}
#endif
diff --git a/mysys/my_rename.c b/mysys/my_rename.c
index 73fc2fbe47c..cc3ed727168 100644
--- a/mysys/my_rename.c
+++ b/mysys/my_rename.c
@@ -34,41 +34,24 @@
*/
static BOOL win_rename_with_retries(const char *from, const char *to)
{
-#ifndef DBUG_OFF
- FILE *fp = NULL;
- DBUG_EXECUTE_IF("rename_sharing_violation",
- {
- fp= fopen(from, "r");
- DBUG_ASSERT(fp);
- }
- );
-#endif
+ DBUG_INJECT_FILE_SHARING_VIOLATION(from);
- for (int retry= RENAME_MAX_RETRIES; retry--;)
+ for (int retry= FILE_SHARING_VIOLATION_RETRIES; retry--;)
{
BOOL ret= MoveFileEx(from, to,
MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING);
+ DBUG_CLEAR_FILE_SHARING_VIOLATION();
+
if (ret)
return ret;
DWORD last_error= GetLastError();
+
if (last_error == ERROR_SHARING_VIOLATION ||
last_error == ERROR_ACCESS_DENIED)
{
-#ifndef DBUG_OFF
- /*
- If error was injected in via DBUG_EXECUTE_IF, close the file
- that is causing ERROR_SHARING_VIOLATION, so that retry succeeds.
- */
- if (fp)
- {
- fclose(fp);
- fp= NULL;
- }
-#endif
-
- Sleep(10);
+ Sleep(FILE_SHARING_VIOLATION_DELAY_MS);
}
else
return ret;
diff --git a/mysys/my_winfile.c b/mysys/my_winfile.c
index b4c32ade906..35bc6b35399 100644
--- a/mysys/my_winfile.c
+++ b/mysys/my_winfile.c
@@ -102,6 +102,42 @@ static int my_get_open_flags(File fd)
DBUG_RETURN(my_file_info[fd].oflag);
}
+/*
+ CreateFile with retry logic.
+
+ Uses retries, to avoid or reduce CreateFile errors
+ with ERROR_SHARING_VIOLATION, in case the file is opened
+ by another process, which used incompatible sharing
+ flags when opening.
+
+ See Windows' CreateFile() documentation for details.
+*/
+static HANDLE my_create_file_with_retries(
+ LPCSTR lpFileName, DWORD dwDesiredAccess,
+ DWORD dwShareMode,
+ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
+ DWORD dwCreationDisposition,
+ DWORD dwFlagsAndAttributes,
+ HANDLE hTemplateFile)
+{
+ int retries;
+ DBUG_INJECT_FILE_SHARING_VIOLATION(lpFileName);
+
+ for (retries = FILE_SHARING_VIOLATION_RETRIES;;)
+ {
+ HANDLE h= CreateFile(lpFileName, dwDesiredAccess, dwShareMode,
+ lpSecurityAttributes, dwCreationDisposition,
+ dwFlagsAndAttributes, hTemplateFile);
+ DBUG_CLEAR_FILE_SHARING_VIOLATION();
+
+ if (h != INVALID_HANDLE_VALUE ||
+ GetLastError() != ERROR_SHARING_VIOLATION || --retries == 0)
+ return h;
+
+ Sleep(FILE_SHARING_VIOLATION_DELAY_MS);
+ }
+ return INVALID_HANDLE_VALUE;
+}
/*
Default security attributes for files and directories
@@ -262,7 +298,7 @@ File my_win_sopen(const char *path, int oflag, int shflag, int pmode)
fileattrib|= FILE_FLAG_RANDOM_ACCESS;
/* try to open/create the file */
- if ((osfh= CreateFile(path, fileaccess, fileshare,my_win_file_secattr(),
+ if ((osfh= my_create_file_with_retries(path, fileaccess, fileshare,my_win_file_secattr(),
filecreate, fileattrib, NULL)) == INVALID_HANDLE_VALUE)
{
DWORD last_error= GetLastError();
diff --git a/mysys/mysys_priv.h b/mysys/mysys_priv.h
index c5e05ec7955..e795dbe2f5f 100644
--- a/mysys/mysys_priv.h
+++ b/mysys/mysys_priv.h
@@ -205,6 +205,45 @@ extern int my_win_fsync(File fd);
extern File my_win_dup(File fd);
extern File my_win_sopen(const char *path, int oflag, int shflag, int perm);
extern File my_open_osfhandle(HANDLE handle, int oflag);
+
+
+/*
+ The following constants are related to retries when file operation fails with
+ ERROR_FILE_SHARING_VIOLATION
+*/
+#define FILE_SHARING_VIOLATION_RETRIES 50
+#define FILE_SHARING_VIOLATION_DELAY_MS 10
+
+
+/* DBUG injecting of ERROR_FILE_SHARING_VIOLATION */
+#ifndef DBUG_OFF
+/* Open file, without sharing. if specific DBUG keyword is set */
+#define DBUG_INJECT_FILE_SHARING_VIOLATION(filename) \
+ FILE *fp= NULL; \
+ do \
+ { \
+ DBUG_EXECUTE_IF("file_sharing_violation", \
+ fp= _fsopen(filename, "r", _SH_DENYRW);); \
+ } while (0)
+
+/* Close the file that causes ERROR_FILE_SHARING_VIOLATION.*/
+#define DBUG_CLEAR_FILE_SHARING_VIOLATION() \
+ do \
+ { \
+ if (fp) \
+ { \
+ DWORD tmp_err= GetLastError(); \
+ fclose(fp); \
+ SetLastError(tmp_err); \
+ fp= NULL; \
+ } \
+ } while (0)
+
+#else
+#define DBUG_INJECT_FILE_SHARING_VIOLATION(filename) do {} while (0)
+#define DBUG_CLEAR_FILE_SHARING_VIOLATION() do {} while (0)
+#endif
+
#endif
C_MODE_END
diff --git a/plugin/handler_socket/handlersocket/handlersocket.cpp b/plugin/handler_socket/handlersocket/handlersocket.cpp
index 8133497044c..45c9e13b2ca 100644
--- a/plugin/handler_socket/handlersocket/handlersocket.cpp
+++ b/plugin/handler_socket/handlersocket/handlersocket.cpp
@@ -185,7 +185,9 @@ static SHOW_VAR hs_status_variables[] = {
{NullS, NullS, SHOW_LONG}
};
-static int show_hs_vars(THD *thd, SHOW_VAR *var, char *buff)
+static int show_hs_vars(THD *thd, SHOW_VAR *var, void *buff,
+ struct system_status_var *status_var,
+ enum enum_var_type var_type)
{
var->type= SHOW_ARRAY;
var->value= (char *) &hs_status_variables;
@@ -193,7 +195,7 @@ static int show_hs_vars(THD *thd, SHOW_VAR *var, char *buff)
}
static SHOW_VAR daemon_handlersocket_status_variables[] = {
- {"Hs", (char*) show_hs_vars, SHOW_FUNC},
+ SHOW_FUNC_ENTRY("Hs", &show_hs_vars),
{NullS, NullS, SHOW_LONG}
};
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index f7d6d508b7c..0381927d70f 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -27,7 +27,7 @@
set sql_mode='';
set default_storage_engine=Aria;
set enforce_storage_engine=NULL;
-set alter_algorithm=DEFAULT;
+set alter_algorithm='DEFAULT';
--
diff --git a/sql/derived_handler.cc b/sql/derived_handler.cc
index 70cc04bf9c7..adb04e08c63 100644
--- a/sql/derived_handler.cc
+++ b/sql/derived_handler.cc
@@ -52,7 +52,7 @@ int Pushdown_derived::execute()
TABLE *table= handler->table;
TMP_TABLE_PARAM *tmp_table_param= handler->tmp_table_param;
- DBUG_ENTER("Pushdown_query::execute");
+ DBUG_ENTER("Pushdown_derived::execute");
if ((err= handler->init_scan()))
goto error;
diff --git a/sql/field.cc b/sql/field.cc
index 9daf3e2bfc0..c1ba05f5fad 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -10519,8 +10519,8 @@ bool check_expression(Virtual_column_info *vcol, const LEX_CSTRING *name,
uint filter= VCOL_IMPOSSIBLE;
if (type != VCOL_GENERATED_VIRTUAL && type != VCOL_DEFAULT)
filter|= VCOL_NOT_STRICTLY_DETERMINISTIC;
- if (type == VCOL_GENERATED_VIRTUAL)
- filter|= VCOL_NOT_VIRTUAL;
+ if (type != VCOL_DEFAULT)
+ filter|= VCOL_NEXTVAL;
if (unlikely(ret || (res.errors & filter)))
{
@@ -10856,6 +10856,7 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
Field *orig_field)
:Column_definition_attributes(old_field)
{
+ srid= 0;
on_update= NULL;
field_name= old_field->field_name;
flags= old_field->flags;
diff --git a/sql/field.h b/sql/field.h
index eac5ed58a0e..3d9c8406df1 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -519,6 +519,8 @@ enum enum_vcol_info_type
VCOL_DEFAULT, VCOL_CHECK_FIELD, VCOL_CHECK_TABLE,
VCOL_USING_HASH,
/* Additional types should be added here */
+
+ VCOL_GENERATED_VIRTUAL_INDEXED, // this is never written in .frm
/* Following is the highest value last */
VCOL_TYPE_NONE = 127 // Since the 0 value is already in use
};
@@ -528,6 +530,7 @@ static inline const char *vcol_type_name(enum_vcol_info_type type)
switch (type)
{
case VCOL_GENERATED_VIRTUAL:
+ case VCOL_GENERATED_VIRTUAL_INDEXED:
case VCOL_GENERATED_STORED:
return "GENERATED ALWAYS AS";
case VCOL_DEFAULT:
@@ -551,10 +554,10 @@ static inline const char *vcol_type_name(enum_vcol_info_type type)
#define VCOL_FIELD_REF 1
#define VCOL_NON_DETERMINISTIC 2
#define VCOL_SESSION_FUNC 4 /* uses session data, e.g. USER or DAYNAME */
-#define VCOL_TIME_FUNC 8
+#define VCOL_TIME_FUNC 8 /* safe for SBR */
#define VCOL_AUTO_INC 16
#define VCOL_IMPOSSIBLE 32
-#define VCOL_NOT_VIRTUAL 64 /* Function can't be virtual */
+#define VCOL_NEXTVAL 64 /* NEXTVAL is not implemented for vcols */
#define VCOL_CHECK_CONSTRAINT_IF_NOT_EXISTS 128
#define VCOL_NOT_STRICTLY_DETERMINISTIC \
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index f7874db5821..37529073391 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -1415,7 +1415,8 @@ private:
if (!part_share->auto_inc_initialized &&
(ha_thd()->lex->sql_command == SQLCOM_INSERT ||
ha_thd()->lex->sql_command == SQLCOM_INSERT_SELECT ||
- ha_thd()->lex->sql_command == SQLCOM_REPLACE) &&
+ ha_thd()->lex->sql_command == SQLCOM_REPLACE ||
+ ha_thd()->lex->sql_command == SQLCOM_REPLACE_SELECT) &&
table->found_next_number_field)
bitmap_set_all(&m_part_info->read_partitions);
}
diff --git a/sql/item.cc b/sql/item.cc
index bb6657ab416..10a8127d06f 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1586,12 +1586,14 @@ bool Item_field::check_vcol_func_processor(void *arg)
}
}
}
- if (field && (field->unireg_check == Field::NEXT_NUMBER))
- {
- // Auto increment fields are unsupported
- return mark_unsupported_function(field_name.str, arg, VCOL_FIELD_REF | VCOL_AUTO_INC);
- }
- return mark_unsupported_function(field_name.str, arg, VCOL_FIELD_REF);
+
+ uint r= VCOL_FIELD_REF;
+ if (field && field->unireg_check == Field::NEXT_NUMBER)
+ r|= VCOL_AUTO_INC;
+ if (field && field->vcol_info &&
+ field->vcol_info->flags & (VCOL_NOT_STRICTLY_DETERMINISTIC | VCOL_AUTO_INC))
+ r|= VCOL_NON_DETERMINISTIC;
+ return mark_unsupported_function(field_name.str, arg, r);
}
@@ -7245,6 +7247,25 @@ Item_bin_string::Item_bin_string(THD *thd, const char *str, size_t str_length):
}
+void Item_bin_string::print(String *str, enum_query_type query_type)
+{
+ if (!str_value.length())
+ {
+ /*
+ Historically a bit string such as b'01100001'
+ prints itself in the hex hybrid notation: 0x61
+ In case of an empty bit string b'', the hex hybrid
+ notation would result in a bad syntax: 0x
+ So let's print empty bit strings using bit string notation: b''
+ */
+ static const LEX_CSTRING empty_bit_string= {STRING_WITH_LEN("b''")};
+ str->append(empty_bit_string);
+ }
+ else
+ Item_hex_hybrid::print(str, query_type);
+}
+
+
void Item_date_literal::print(String *str, enum_query_type query_type)
{
str->append(STRING_WITH_LEN("DATE'"));
diff --git a/sql/item.h b/sql/item.h
index 0df20641edc..2d598546b91 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -4996,6 +4996,7 @@ class Item_bin_string: public Item_hex_hybrid
{
public:
Item_bin_string(THD *thd, const char *str, size_t str_length);
+ void print(String *str, enum_query_type query_type) override;
};
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 262f08815a2..b5a09664cda 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -1,7 +1,7 @@
#ifndef ITEM_CMPFUNC_INCLUDED
#define ITEM_CMPFUNC_INCLUDED
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2020, MariaDB
+ Copyright (c) 2009, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -721,6 +721,8 @@ public:
static LEX_CSTRING name= {STRING_WITH_LEN("<not>") };
return name;
}
+ enum precedence precedence() const override
+ { return show ? Item_func::precedence() : args[0]->precedence(); }
bool fix_fields(THD *thd, Item **ref) override
{ return Item_func::fix_fields(thd, ref);}
void print(String *str, enum_query_type query_type) override;
diff --git a/sql/item_func.h b/sql/item_func.h
index 549ac3b60d2..520dbdc90c7 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -4163,9 +4163,7 @@ public:
void print(String *str, enum_query_type query_type) override;
bool check_vcol_func_processor(void *arg) override
{
- return mark_unsupported_function(func_name(), "()", arg,
- (VCOL_NON_DETERMINISTIC |
- VCOL_NOT_VIRTUAL));
+ return mark_unsupported_function(func_name(), "()", arg, VCOL_NEXTVAL);
}
};
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 2938895efa7..30e363e9428 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -400,7 +400,7 @@ public:
bool check_vcol_func_processor(void *arg) override
{
return mark_unsupported_function(func_name(), "()", arg,
- VCOL_NON_DETERMINISTIC | VCOL_NOT_VIRTUAL);
+ VCOL_NON_DETERMINISTIC | VCOL_NEXTVAL);
}
Item *get_copy(THD *thd) override
{
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 4b672243ee0..fdd0333adfd 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -800,6 +800,7 @@ public:
bool select_transformer(JOIN *join);
void create_comp_func(bool invert) { func= func_creator(invert); }
void print(String *str, enum_query_type query_type);
+ enum precedence precedence() const { return CMP_PRECEDENCE; }
bool is_maxmin_applicable(JOIN *join);
bool transform_into_max_min(JOIN *join);
void no_rows_in_result();
diff --git a/sql/log.cc b/sql/log.cc
index b032bcf4963..4572b9cca82 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -11842,7 +11842,7 @@ static int show_binlog_vars(THD *thd, SHOW_VAR *var, void *,
}
static SHOW_VAR binlog_status_vars_top[]= {
- {"Binlog", (char *) &show_binlog_vars, SHOW_FUNC},
+ SHOW_FUNC_ENTRY("Binlog", &show_binlog_vars),
{NullS, NullS, SHOW_LONG}
};
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index c2d2198a891..9eea34a28ab 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -7054,7 +7054,9 @@ static int show_ssl_get_cipher_list(THD *thd, SHOW_VAR *var, char *buff,
rpl_semi_sync_master_show_##name
#define DEF_SHOW_FUNC(name, show_type) \
- static int SHOW_FNAME(name)(MYSQL_THD thd, SHOW_VAR *var, char *buff) \
+ static int SHOW_FNAME(name)(MYSQL_THD thd, SHOW_VAR *var, void *buff, \
+ system_status_var *status_var, \
+ enum_var_type var_type) \
{ \
repl_semisync_master.set_export_stats(); \
var->type= show_type; \
@@ -7331,7 +7333,7 @@ SHOW_VAR status_vars[]= {
{"Created_tmp_files", (char*) &my_tmp_file_created, SHOW_LONG},
{"Created_tmp_tables", (char*) offsetof(STATUS_VAR, created_tmp_tables_), SHOW_LONG_STATUS},
#ifndef DBUG_OFF
- {"Debug", (char*) &debug_status_func, SHOW_FUNC},
+ SHOW_FUNC_ENTRY("Debug", &debug_status_func),
#endif
{"Delayed_errors", (char*) &delayed_insert_errors, SHOW_LONG},
{"Delayed_insert_threads", (char*) &delayed_insert_threads, SHOW_LONG_NOFLUSH},
@@ -7384,7 +7386,7 @@ SHOW_VAR status_vars[]= {
{"Handler_tmp_write", (char*) offsetof(STATUS_VAR, ha_tmp_write_count), SHOW_LONG_STATUS},
{"Handler_update", (char*) offsetof(STATUS_VAR, ha_update_count), SHOW_LONG_STATUS},
{"Handler_write", (char*) offsetof(STATUS_VAR, ha_write_count), SHOW_LONG_STATUS},
- {"Key", (char*) &show_default_keycache, SHOW_FUNC},
+ SHOW_FUNC_ENTRY("Key", &show_default_keycache),
{"optimizer_join_prefixes_check_calls", (char*) offsetof(STATUS_VAR, optimizer_join_prefixes_check_calls), SHOW_LONG_STATUS},
{"Last_query_cost", (char*) offsetof(STATUS_VAR, last_query_cost), SHOW_DOUBLE_STATUS},
#ifndef DBUG_OFF
@@ -7413,20 +7415,20 @@ SHOW_VAR status_vars[]= {
{"Rows_read", (char*) offsetof(STATUS_VAR, rows_read), SHOW_LONGLONG_STATUS},
{"Rows_tmp_read", (char*) offsetof(STATUS_VAR, rows_tmp_read), SHOW_LONGLONG_STATUS},
#ifdef HAVE_REPLICATION
- {"Rpl_semi_sync_master_status", (char*) &SHOW_FNAME(status), SHOW_FUNC},
- {"Rpl_semi_sync_master_clients", (char*) &SHOW_FNAME(clients), SHOW_FUNC},
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_status", &SHOW_FNAME(status)),
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_clients", &SHOW_FNAME(clients)),
{"Rpl_semi_sync_master_yes_tx", (char*) &rpl_semi_sync_master_yes_transactions, SHOW_LONG},
{"Rpl_semi_sync_master_no_tx", (char*) &rpl_semi_sync_master_no_transactions, SHOW_LONG},
- {"Rpl_semi_sync_master_wait_sessions", (char*) &SHOW_FNAME(wait_sessions), SHOW_FUNC},
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_wait_sessions", &SHOW_FNAME(wait_sessions)),
{"Rpl_semi_sync_master_no_times", (char*) &rpl_semi_sync_master_off_times, SHOW_LONG},
{"Rpl_semi_sync_master_timefunc_failures", (char*) &rpl_semi_sync_master_timefunc_fails, SHOW_LONG},
{"Rpl_semi_sync_master_wait_pos_backtraverse", (char*) &rpl_semi_sync_master_wait_pos_backtraverse, SHOW_LONG},
- {"Rpl_semi_sync_master_tx_wait_time", (char*) &SHOW_FNAME(trx_wait_time), SHOW_FUNC},
- {"Rpl_semi_sync_master_tx_waits", (char*) &SHOW_FNAME(trx_wait_num), SHOW_FUNC},
- {"Rpl_semi_sync_master_tx_avg_wait_time", (char*) &SHOW_FNAME(avg_trx_wait_time), SHOW_FUNC},
- {"Rpl_semi_sync_master_net_wait_time", (char*) &SHOW_FNAME(net_wait_time), SHOW_FUNC},
- {"Rpl_semi_sync_master_net_waits", (char*) &SHOW_FNAME(net_wait_num), SHOW_FUNC},
- {"Rpl_semi_sync_master_net_avg_wait_time", (char*) &SHOW_FNAME(avg_net_wait_time), SHOW_FUNC},
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_tx_wait_time", &SHOW_FNAME(trx_wait_time)),
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_tx_waits", &SHOW_FNAME(trx_wait_num)),
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_tx_avg_wait_time", &SHOW_FNAME(avg_trx_wait_time)),
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_net_wait_time", &SHOW_FNAME(net_wait_time)),
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_net_waits", &SHOW_FNAME(net_wait_num)),
+ SHOW_FUNC_ENTRY("Rpl_semi_sync_master_net_avg_wait_time", &SHOW_FNAME(avg_net_wait_time)),
{"Rpl_semi_sync_master_request_ack", (char*) &rpl_semi_sync_master_request_ack, SHOW_LONGLONG},
{"Rpl_semi_sync_master_get_ack", (char*)&rpl_semi_sync_master_get_ack, SHOW_LONGLONG},
{"Rpl_semi_sync_slave_status", (char*) &rpl_semi_sync_slave_status, SHOW_BOOL},
@@ -7550,7 +7552,7 @@ SHOW_VAR status_vars[]= {
{"wsrep_applier_thread_count", (char*) &wsrep_running_applier_threads, SHOW_LONG_NOFLUSH},
{"wsrep_rollbacker_thread_count", (char *) &wsrep_running_rollbacker_threads, SHOW_LONG_NOFLUSH},
{"wsrep_cluster_capabilities", (char*) &wsrep_cluster_capabilities, SHOW_CHAR_PTR},
- {"wsrep", (char*) &wsrep_show_status, SHOW_FUNC},
+ SHOW_FUNC_ENTRY("wsrep", &wsrep_show_status),
#endif
{NullS, NullS, SHOW_LONG}
};
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 3c7d63098b9..79cf7c41bf4 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -286,27 +286,6 @@ bool partition_info::set_partition_bitmaps(List<String> *partition_names)
}
-/**
- Set read/lock_partitions bitmap over non pruned partitions
-
- @param table_list Possible TABLE_LIST which can contain
- list of partition names to query
-
- @return Operation status
- @retval FALSE OK
- @retval TRUE Failed to allocate memory for bitmap or list of partitions
- did not match
-
- @note OK to call multiple times without the need for free_bitmaps.
-*/
-bool partition_info::set_partition_bitmaps_from_table(TABLE_LIST *table_list)
-{
- List<String> *partition_names= table_list ?
- NULL : table_list->partition_names;
- return set_partition_bitmaps(partition_names);
-}
-
-
/*
Create a memory area where default partition names are stored and fill it
up with the names.
diff --git a/sql/partition_info.h b/sql/partition_info.h
index d5f71be33fc..971ba92d776 100644
--- a/sql/partition_info.h
+++ b/sql/partition_info.h
@@ -348,7 +348,6 @@ public:
partition_info *get_clone(THD *thd, bool empty_data_and_index_file= FALSE);
bool set_named_partition_bitmap(const char *part_name, size_t length);
bool set_partition_bitmaps(List<String> *partition_names);
- bool set_partition_bitmaps_from_table(TABLE_LIST *table_list);
/* Answers the question if subpartitioning is used for a certain table */
bool is_sub_partitioned()
{
diff --git a/sql/spatial.cc b/sql/spatial.cc
index ec8279daa7a..9bf6110c991 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -635,7 +635,8 @@ Geometry *Geometry::create_from_json(Geometry_buffer *buffer,
if (feature_type_found)
goto handle_geometry_key;
}
- goto err_return;
+ else
+ goto err_return;
}
else
{
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 90776566458..e15e8d6e93d 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -5733,8 +5733,11 @@ static int replace_column_table(GRANT_TABLE *g_t,
error= 0;
grant_column= column_hash_search(g_t, column->column.ptr(),
column->column.length());
- if (grant_column) // Should always be true
- grant_column->rights= privileges; // Update hash
+ if (grant_column) // Should always be true
+ {
+ grant_column->rights= privileges; // Update hash
+ grant_column->init_rights= privileges;
+ }
}
else // new grant
{
@@ -9844,9 +9847,8 @@ static bool show_table_and_column_privileges(THD *thd, const char *username,
}
else
global.append(STRING_WITH_LEN(", "));
- global.append(grant_column->column,
- grant_column->key_length,
- system_charset_info);
+ append_identifier(thd, &global, grant_column->column,
+ grant_column->key_length);
}
}
if (found_col)
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 0ccd695788f..5369d8d73b1 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -7399,8 +7399,13 @@ inline int handler::ha_ft_read(uchar *buf)
{
int error= ft_read(buf);
if (!error)
+ {
update_rows_read();
+ if (table->vfield && buf == table->record[0])
+ table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ);
+ }
+
table->status=error ? STATUS_NOT_FOUND: 0;
return error;
}
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index c2d94d47f5c..234f0b688ac 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1270,7 +1270,8 @@ void prepare_new_connection_state(THD* thd)
and the main Diagnostics Area contains an error condition.
*/
if (packet_length != packet_error)
- my_error(ER_NEW_ABORTING_CONNECTION, MYF(0),
+ my_error(ER_NEW_ABORTING_CONNECTION,
+ (thd->db.str || sctx->user) ? MYF(0) : MYF(ME_WARNING),
thd->thread_id,
thd->db.str ? thd->db.str : "unconnected",
sctx->user ? sctx->user : "unauthenticated",
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 9ead04e902a..1f48118dd10 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -14092,6 +14092,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
uint jcl= tab->used_join_cache_level;
tab->read_record.table= table;
tab->read_record.unlock_row= rr_unlock_row;
+ tab->read_record.print_error= true;
tab->sorted= sorted;
sorted= 0; // only first must be sorted
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 8a89e3089b7..0c212dee625 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -5645,6 +5645,9 @@ int mysql_discard_or_import_tablespace(THD *thd,
if (unlikely(error))
goto err;
+ if (discard)
+ table_list->table->s->tdc->flush(thd, true);
+
/*
The 0 in the call below means 'not in a transaction', which means
immediate invalidation; that is probably what we wish here
@@ -8311,6 +8314,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
} /* if (def->change.str) */
} /* while (def) */
} /* if (part_field_list || subpart_field_list) */
+ // Force reopen because new column name is on thd->mem_root
+ table->mark_table_for_reopen();
} /* if (part_info) */
#endif
// Force reopen because new column name is on thd->mem_root
diff --git a/sql/table.cc b/sql/table.cc
index 1f1925db93a..d0b3d99c373 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2440,11 +2440,11 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
comment_pos+= comment_length;
}
- if ((uchar) strpos[13] == (uchar) MYSQL_TYPE_VIRTUAL
- && likely(share->mysql_version >= 100000))
+ if (strpos[13] == MYSQL_TYPE_VIRTUAL &&
+ (share->mysql_version < 50600 || share->mysql_version >= 100000))
{
/*
- MariaDB version 10.0 version.
+ MariaDB 5.5 or 10.0 version.
The interval_id byte in the .frm file stores the length of the
expression statement for a virtual column.
*/
@@ -3255,6 +3255,8 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
share->stored_fields--;
if (reg_field->flags & BLOB_FLAG)
share->virtual_not_stored_blob_fields++;
+ if (reg_field->flags & PART_KEY_FLAG)
+ vcol_info->set_vcol_type(VCOL_GENERATED_VIRTUAL_INDEXED);
/* Correct stored_rec_length as non stored fields are last */
recpos= (uint) (reg_field->ptr - record);
if (share->stored_rec_length >= recpos)
@@ -3819,7 +3821,7 @@ bool Virtual_column_info::fix_and_check_expr(THD *thd, TABLE *table)
get_vcol_type_name(), name.str);
DBUG_RETURN(1);
}
- else if (unlikely(res.errors & VCOL_AUTO_INC))
+ else if (res.errors & VCOL_AUTO_INC && vcol_type != VCOL_GENERATED_VIRTUAL)
{
/*
An auto_increment field may not be used in an expression for
@@ -3830,11 +3832,18 @@ bool Virtual_column_info::fix_and_check_expr(THD *thd, TABLE *table)
pointer at that time
*/
myf warn= table->s->frm_version < FRM_VER_EXPRESSSIONS ? ME_WARNING : 0;
- my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(warn),
+ my_error(ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(warn),
"AUTO_INCREMENT", get_vcol_type_name(), res.name);
if (!warn)
DBUG_RETURN(1);
}
+ else if (vcol_type != VCOL_GENERATED_VIRTUAL && vcol_type != VCOL_DEFAULT &&
+ res.errors & VCOL_NOT_STRICTLY_DETERMINISTIC)
+ {
+ my_error(ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(0),
+ res.name, get_vcol_type_name(), name.str);
+ DBUG_RETURN(1);
+ }
flags= res.errors;
if (!table->s->tmp_table && need_refix())
@@ -9730,15 +9739,16 @@ bool TABLE_LIST::change_refs_to_fields()
List_iterator<Item> li(used_items);
Item_direct_ref *ref;
Field_iterator_view field_it;
+ Name_resolution_context *ctx;
THD *thd= table->in_use;
+ Item **materialized_items;
DBUG_ASSERT(is_merged_derived());
if (!used_items.elements)
return FALSE;
- Item **materialized_items=
- (Item **)thd->calloc(sizeof(void *) * table->s->fields);
- Name_resolution_context *ctx= new Name_resolution_context(this);
+ materialized_items= (Item **)thd->calloc(sizeof(void *) * table->s->fields);
+ ctx= new (thd->mem_root) Name_resolution_context(this);
if (!materialized_items || !ctx)
return TRUE;
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 5b6af042f68..23d3c7c1058 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -1614,15 +1614,10 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf)
pcf->Scale= 0;
pcf->Opt= (fop) ? (int)fop->opt : 0;
-// if (fp->field_length >= 0) {
+ if (fp->field_length >= 0)
pcf->Length= fp->field_length;
-
- // length is bytes for Connect, not characters
- if (!strnicmp(chset, "utf8", 4))
- pcf->Length /= 3;
-
-// } else
-// pcf->Length= 256; // BLOB?
+ else
+ pcf->Length= 256; // BLOB?
pcf->Precision= pcf->Length;
diff --git a/storage/connect/mysql-test/connect/r/index.result b/storage/connect/mysql-test/connect/r/index.result
index c156e10749e..baebf1f1ebe 100644
--- a/storage/connect/mysql-test/connect/r/index.result
+++ b/storage/connect/mysql-test/connect/r/index.result
@@ -140,6 +140,42 @@ DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
#
+# MDEV-28299: Server crashes in
+# XINDXS::Range/CntIndexRange (Connect engine)
+#
+CREATE TABLE t1 ( a int not null, KEY (a))engine=CONNECT;
+Warnings:
+Warning 1105 No table_type. Will be set to DOS
+Warning 1105 No file name. Table will use t1.dos
+SELECT * FROM t1 WHERE a=1;
+a
+INSERT INTO t1 values (1),(2),(1);
+SELECT * FROM t1 WHERE a=1;
+a
+1
+1
+DROP TABLE t1;
+CREATE TABLE t1 (a int, b int, pk int, PRIMARY KEY (pk)) engine=CONNECT;
+Warnings:
+Warning 1105 No table_type. Will be set to DOS
+Warning 1105 No file name. Table will use t1.dos
+SELECT x.a
+FROM t1 AS x JOIN t1 AS y ON (x.a = y.b)
+WHERE x.pk > 3;
+a
+INSERT INTO t1 values (1,2,1),(2,1,2),(1,2,3),(3,4,4);
+SELECT x.a
+FROM t1 AS x JOIN t1 AS y ON (x.a = y.b)
+WHERE x.pk > 3;
+a
+INSERT INTO t1 values (1,2,5);
+SELECT x.a
+FROM t1 AS x JOIN t1 AS y ON (x.a = y.b)
+WHERE x.pk > 3;
+a
+1
+DROP TABLE t1;
+#
# MDEV-27591 Connect tables (FIX/DOS) don't work with DESC keys - wrong results
#
CREATE TABLE t1 (
diff --git a/storage/connect/mysql-test/connect/r/mysql.result b/storage/connect/mysql-test/connect/r/mysql.result
index 918256ac395..d3c244b277a 100644
--- a/storage/connect/mysql-test/connect/r/mysql.result
+++ b/storage/connect/mysql-test/connect/r/mysql.result
@@ -326,5 +326,43 @@ id
DROP TABLE t1;
DROP TABLE t2;
#
+# MDEV-28489 / MDEV-26722 UTF8 bytes calculated incorrectly
+#
+CREATE TABLE t1 (name varchar(20)) CHARSET=utf8;
+INSERT INTO t1 (name) VALUES ('Иванова'), ('Ivanova');
+CREATE TABLE t2 (name varchar(1)) ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=PORT' CHARSET=utf8;
+SELECT hex(name) from t1;
+hex(name)
+C390CB9CC390C2B2C390C2B0C390C2BDC390C2BEC390C2B2C390C2B0
+4976616E6F7661
+SELECT hex(name) from t2;
+hex(name)
+C390
+49
+Warnings:
+Warning 1105 Out of range value for column name at row 1
+Warning 1265 Data truncated for column 'name' at row 1
+Warning 1105 Out of range value Ð? for column 'name' at row 1
+Warning 1105 Out of range value for column name at row 2
+Warning 1265 Data truncated for column 'name' at row 2
+Warning 1105 Out of range value Iva for column 'name' at row 2
+DROP TABLE t2;
+DROP TABLE t1;
+CREATE TABLE t1 (col char(5)) CHARSET=utf8;
+INSERT INTO t1 (col) VALUES ('glace'), ('glacé');
+Warnings:
+Warning 1406 Data too long for column 'col' at row 2
+CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=PORT' CHARSET=utf8;
+SELECT hex(col) from t1;
+hex(col)
+676C616365
+676C6163C383
+SELECT hex(col) from t2;
+hex(col)
+676C616365
+676C6163C383
+DROP TABLE t2;
+DROP TABLE t1;
+#
# End of 10.3 tests
#
diff --git a/storage/connect/mysql-test/connect/t/index.test b/storage/connect/mysql-test/connect/t/index.test
index b631236832d..47bfbae7680 100644
--- a/storage/connect/mysql-test/connect/t/index.test
+++ b/storage/connect/mysql-test/connect/t/index.test
@@ -79,6 +79,32 @@ DROP TABLE t2;
DROP TABLE t3;
--echo #
+--echo # MDEV-28299: Server crashes in
+--echo # XINDXS::Range/CntIndexRange (Connect engine)
+--echo #
+
+CREATE TABLE t1 ( a int not null, KEY (a))engine=CONNECT;
+SELECT * FROM t1 WHERE a=1;
+
+INSERT INTO t1 values (1),(2),(1);
+SELECT * FROM t1 WHERE a=1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a int, b int, pk int, PRIMARY KEY (pk)) engine=CONNECT;
+SELECT x.a
+FROM t1 AS x JOIN t1 AS y ON (x.a = y.b)
+WHERE x.pk > 3;
+INSERT INTO t1 values (1,2,1),(2,1,2),(1,2,3),(3,4,4);
+SELECT x.a
+FROM t1 AS x JOIN t1 AS y ON (x.a = y.b)
+WHERE x.pk > 3;
+INSERT INTO t1 values (1,2,5);
+SELECT x.a
+FROM t1 AS x JOIN t1 AS y ON (x.a = y.b)
+WHERE x.pk > 3;
+DROP TABLE t1;
+
+--echo #
--echo # MDEV-27591 Connect tables (FIX/DOS) don't work with DESC keys - wrong results
--echo #
--error ER_UNKNOWN_ERROR
diff --git a/storage/connect/mysql-test/connect/t/mysql.test b/storage/connect/mysql-test/connect/t/mysql.test
index ce76a4665d5..a50db4a6457 100644
--- a/storage/connect/mysql-test/connect/t/mysql.test
+++ b/storage/connect/mysql-test/connect/t/mysql.test
@@ -504,5 +504,35 @@ DROP TABLE t1;
DROP TABLE t2;
--echo #
+--echo # MDEV-28489 / MDEV-26722 UTF8 bytes calculated incorrectly
+--echo #
+
+CREATE TABLE t1 (name varchar(20)) CHARSET=utf8;
+INSERT INTO t1 (name) VALUES ('Иванова'), ('Ivanova');
+
+--replace_result $PORT PORT
+--eval CREATE TABLE t2 (name varchar(1)) ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=$PORT' CHARSET=utf8
+
+SELECT hex(name) from t1;
+# This will warn as we are truncating data
+SELECT hex(name) from t2;
+
+DROP TABLE t2;
+DROP TABLE t1;
+
+CREATE TABLE t1 (col char(5)) CHARSET=utf8;
+INSERT INTO t1 (col) VALUES ('glace'), ('glacé');
+
+--replace_result $PORT PORT
+--eval CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=$PORT' CHARSET=utf8
+
+SELECT hex(col) from t1;
+SELECT hex(col) from t2;
+
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp
index 7f0efb727a2..4bcbbfd4235 100644
--- a/storage/connect/xindex.cpp
+++ b/storage/connect/xindex.cpp
@@ -2029,6 +2029,10 @@ int XINDXS::Range(PGLOBAL g, int limit, bool incl)
PXCOL kp = To_KeyCol;
OPVAL op = Op;
+// In case single column index doesn't exist return
+ if (!kp)
+ return 0;
+
switch (limit) {
case 1: Op = (incl) ? OP_GE : OP_GT; break;
case 2: Op = (incl) ? OP_GT : OP_GE; break;
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index 51632c79761..73d88596743 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -833,7 +833,7 @@ static void btr_free_root(buf_block_t *block, const fil_space_t &space,
MTR_MEMO_PAGE_SX_FIX));
ut_ad(mtr->is_named_space(&space));
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
if (btr_root_fseg_validate(PAGE_HEADER + PAGE_BTR_SEG_TOP, *block, space))
{
@@ -1107,7 +1107,7 @@ dberr_t dict_index_t::clear(que_thr_t *thr)
#ifdef BTR_CUR_HASH_ADAPT
if (root_block->index)
- btr_search_drop_page_hash_index(root_block);
+ btr_search_drop_page_hash_index(root_block, false);
ut_ad(n_ahi_pages() == 0);
#endif
mtr.memset(root_block, PAGE_HEADER + PAGE_BTR_SEG_LEAF,
@@ -1287,7 +1287,7 @@ static dberr_t btr_page_reorganize_low(page_cur_t *cursor, mtr_t *mtr)
if (UNIV_UNLIKELY(pos == ULINT_UNDEFINED))
return DB_CORRUPTION;
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
buf_block_t *old= buf_block_alloc();
/* Copy the old page to temporary space */
@@ -1617,7 +1617,7 @@ btr_page_empty(
|| page_zip_validate(page_zip, block->page.frame, index));
#endif /* UNIV_ZIP_DEBUG */
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
/* Recreate the page: note that global data on page (possible
segment headers, next page-field, etc.) is preserved intact */
@@ -3423,7 +3423,7 @@ btr_lift_page_up(
mem_heap_free(heap);
}
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
/* Make the father empty */
btr_page_empty(father_block, father_page_zip, index, page_level, mtr);
@@ -3744,7 +3744,7 @@ cannot_merge:
goto err_exit;
}
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
/* Remove the page from the level list */
err = btr_level_list_remove(*block, *index, mtr);
@@ -3847,7 +3847,7 @@ cannot_merge:
goto err_exit;
}
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
if (merge_page_zip && left_page_no == FIL_NULL) {
@@ -4047,7 +4047,7 @@ btr_discard_only_page_on_level(
ut_ad(fil_page_index_page_check(page));
ut_ad(block->page.id().space() == index->table->space->id);
ut_ad(mtr->memo_contains_flagged(block, MTR_MEMO_PAGE_X_FIX));
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
cursor.page_cur.index = index;
cursor.page_cur.block = block;
@@ -4231,7 +4231,7 @@ btr_discard_page(
return DB_CORRUPTION;
}
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
if (dict_index_is_spatial(index)) {
rtr_node_ptr_delete(&parent_cursor, mtr);
diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc
index 3009f04021f..76b173359da 100644
--- a/storage/innobase/btr/btr0defragment.cc
+++ b/storage/innobase/btr/btr0defragment.cc
@@ -415,7 +415,7 @@ btr_defragment_merge_pages(
free it. */
lock_update_merge_left(*to_block, orig_pred,
from_block->page.id());
- btr_search_drop_page_hash_index(from_block);
+ btr_search_drop_page_hash_index(from_block, false);
if (btr_level_list_remove(*from_block, *index, mtr)
!= DB_SUCCESS
|| btr_cur_node_ptr_delete(&parent, mtr) != DB_SUCCESS
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index 49a5d0ae85a..c61cdd9f604 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -706,7 +706,7 @@ btr_search_update_hash_ref(
if (index != cursor->index()) {
ut_ad(index->id == cursor->index()->id);
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
return;
}
@@ -1425,7 +1425,7 @@ void btr_search_drop_page_hash_when_freed(const page_id_t page_id)
dropping the table (preventing eviction). */
DBUG_ASSERT(block->index->table->get_ref_count()
|| dict_sys.locked());
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
}
mtr_commit(&mtr);
@@ -1493,7 +1493,7 @@ btr_search_build_page_hash_index(
}
if (rebuild) {
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
}
/* Check that the values for hash index build are sensible */
@@ -1717,7 +1717,7 @@ btr_search_move_or_delete_hash_entries(
if (new_block->index) {
drop_exit:
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
return;
}
@@ -1791,7 +1791,7 @@ void btr_search_update_hash_on_delete(btr_cur_t *cursor)
ut_ad(!cursor->index()->table->is_temporary());
if (index != cursor->index()) {
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
return;
}
@@ -1866,7 +1866,7 @@ void btr_search_update_hash_node_on_insert(btr_cur_t *cursor,
if (index != cursor->index()) {
ut_ad(index->id == cursor->index()->id);
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
return;
}
@@ -1959,7 +1959,7 @@ void btr_search_update_hash_on_insert(btr_cur_t *cursor,
if (index != cursor->index()) {
ut_ad(index->id == cursor->index()->id);
drop:
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
return;
}
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index a4b644fab68..9b8e843eab7 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -2114,7 +2114,7 @@ void buf_page_free(fil_space_t *space, uint32_t page, mtr_t *mtr)
block->page.lock.x_lock();
#ifdef BTR_CUR_HASH_ADAPT
if (block->index)
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
#endif /* BTR_CUR_HASH_ADAPT */
block->page.set_freed(block->page.state());
mtr->memo_push(block, MTR_MEMO_PAGE_X_MODIFY);
@@ -3208,7 +3208,8 @@ retry:
#ifdef BTR_CUR_HASH_ADAPT
if (drop_hash_entry)
- btr_search_drop_page_hash_index(reinterpret_cast<buf_block_t*>(bpage));
+ btr_search_drop_page_hash_index(reinterpret_cast<buf_block_t*>(bpage),
+ false);
#endif /* BTR_CUR_HASH_ADAPT */
if (ibuf_exist && !recv_recovery_is_on())
diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc
index 23e870e528b..20f7544466f 100644
--- a/storage/innobase/buf/buf0lru.cc
+++ b/storage/innobase/buf/buf0lru.cc
@@ -952,7 +952,7 @@ func_exit:
order to avoid bogus Valgrind or MSAN warnings.*/
MEM_MAKE_DEFINED(block->page.frame, srv_page_size);
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
MEM_UNDEFINED(block->page.frame, srv_page_size);
mysql_mutex_lock(&buf_pool.mutex);
}
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index 8c6d6022e11..06d30515229 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -339,6 +339,8 @@ dict_table_schema_check(
const dict_table_t* table= dict_sys.load_table(req_schema->table_name);
if (!table) {
+ if (opt_bootstrap)
+ return DB_TABLE_NOT_FOUND;
if (req_schema == &table_stats_schema) {
if (innodb_table_stats_not_found_reported) {
return DB_STATS_DO_NOT_EXIST;
@@ -4130,7 +4132,8 @@ dict_stats_update(
or is corrupted, calculate the transient stats */
if (innodb_table_stats_not_found == false &&
- table->stats_error_printed == false) {
+ table->stats_error_printed == false &&
+ !opt_bootstrap) {
ib::error() << "Fetch of persistent statistics"
" requested for table "
<< table->name
diff --git a/storage/innobase/fsp/fsp0file.cc b/storage/innobase/fsp/fsp0file.cc
index 27cdd80a8c4..0a4119587f8 100644
--- a/storage/innobase/fsp/fsp0file.cc
+++ b/storage/innobase/fsp/fsp0file.cc
@@ -29,6 +29,7 @@ Created 2013-7-26 by Kevin Lewis
#include "os0file.h"
#include "page0page.h"
#include "srv0start.h"
+#include "log.h"
/** Release the resources. */
void
@@ -305,10 +306,23 @@ Datafile::read_first_page(bool read_only_mode)
if (!fil_space_t::is_valid_flags(m_flags, m_space_id)) {
uint32_t cflags = fsp_flags_convert_from_101(m_flags);
if (cflags == UINT32_MAX) {
- ib::error()
- << "Invalid flags " << ib::hex(m_flags)
- << " in " << m_filepath;
- return(DB_CORRUPTION);
+ switch (fsp_flags_is_incompatible_mysql(m_flags)) {
+ case 0:
+ sql_print_error("InnoDB: Invalid flags 0x%" PRIx32 " in %s",
+ m_flags, m_filepath);
+ return DB_CORRUPTION;
+ case 3:
+ case 2:
+ sql_print_error("InnoDB: MySQL-8.0 tablespace in %s",
+ m_filepath);
+ break;
+ case 1:
+ sql_print_error("InnoDB: MySQL Encrypted tablespace in %s",
+ m_filepath);
+ break;
+ }
+ sql_print_error("InnoDB: Restart in MySQL for migration/recovery.");
+ return DB_UNSUPPORTED;
} else {
m_flags = cflags;
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 62906dcd1dd..8c33d18af74 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -5919,11 +5919,6 @@ ha_innobase::open(const char* name, int, uint)
MONITOR_INC(MONITOR_TABLE_OPEN);
if ((ib_table->flags2 & DICT_TF2_DISCARDED)) {
-
- ib_senderrf(thd,
- IB_LOG_LEVEL_WARN, ER_TABLESPACE_DISCARDED,
- table->s->table_name.str);
-
/* Allow an open because a proper DISCARD should have set
all the flags and index root page numbers to FIL_NULL that
should prevent any DML from running but it should allow DDL
@@ -13779,6 +13774,10 @@ int ha_innobase::truncate()
mem_heap_t *heap= mem_heap_create(1000);
+ if (!ib_table->space)
+ ib_senderrf(m_user_thd, IB_LOG_LEVEL_WARN, ER_TABLESPACE_DISCARDED,
+ table->s->table_name.str);
+
dict_get_and_save_data_dir_path(ib_table);
info.data_file_name= ib_table->data_dir_path;
const char *temp_name=
@@ -18101,7 +18100,9 @@ innodb_enable_monitor_at_startup(
/****************************************************************//**
Callback function for accessing the InnoDB variables from MySQL:
SHOW VARIABLES. */
-static int show_innodb_vars(THD*, SHOW_VAR* var, char*)
+static int show_innodb_vars(THD*, SHOW_VAR* var, void *,
+ struct system_status_var *status_var,
+ enum enum_var_type var_type)
{
innodb_export_status();
var->type = SHOW_ARRAY;
@@ -18504,7 +18505,7 @@ innodb_encrypt_tables_update(THD*, st_mysql_sys_var*, void*, const void* save)
}
static SHOW_VAR innodb_status_variables_export[]= {
- {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC},
+ SHOW_FUNC_ENTRY("Innodb", &show_innodb_vars),
{NullS, NullS, SHOW_LONG}
};
@@ -19987,17 +19988,13 @@ static TABLE* innodb_find_table_for_vc(THD* thd, dict_table_t* table)
return mysql_table;
}
-/** Get the computed value by supplying the base column values.
-@param[in,out] table table whose virtual column
- template to be built */
+/** Only used by the purge thread
+@param[in,out] table table whose virtual column template to be built */
TABLE* innobase_init_vc_templ(dict_table_t* table)
{
- if (table->vc_templ != NULL) {
- return NULL;
- }
DBUG_ENTER("innobase_init_vc_templ");
- table->vc_templ = UT_NEW_NOKEY(dict_vcol_templ_t());
+ ut_ad(table->vc_templ == NULL);
TABLE *mysql_table= innodb_find_table_for_vc(current_thd, table);
@@ -20006,8 +20003,12 @@ TABLE* innobase_init_vc_templ(dict_table_t* table)
DBUG_RETURN(NULL);
}
- innobase_build_v_templ(mysql_table, table, table->vc_templ, NULL,
- false);
+ dict_vcol_templ_t* vc_templ = UT_NEW_NOKEY(dict_vcol_templ_t());
+
+ dict_sys.lock(SRW_LOCK_CALL);
+ table->vc_templ = vc_templ;
+ innobase_build_v_templ(mysql_table, table, vc_templ, nullptr, true);
+ dict_sys.unlock();
DBUG_RETURN(mysql_table);
}
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 9e01cb6500b..42b7afd0256 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -2239,6 +2239,12 @@ ha_innobase::check_if_supported_inplace_alter(
update_thd();
+ if (!m_prebuilt->table->space) {
+ ib_senderrf(m_user_thd, IB_LOG_LEVEL_WARN,
+ ER_TABLESPACE_DISCARDED,
+ table->s->table_name.str);
+ }
+
if (is_read_only(!high_level_read_only
&& (ha_alter_info->handler_flags & ALTER_OPTIONS)
&& ha_alter_info->create_info->key_block_size == 0
@@ -5862,7 +5868,16 @@ static bool innobase_instant_try(
const dict_col_t* old_cols = user_table->cols;
DBUG_ASSERT(user_table->n_cols == ctx->old_n_cols);
+#ifdef BTR_CUR_HASH_ADAPT
+ /* Acquire the ahi latch to avoid a race condition
+ between ahi access and instant alter table */
+ srw_spin_lock* ahi_latch = btr_search_sys.get_latch(*index);
+ ahi_latch->wr_lock(SRW_LOCK_CALL);
+#endif /* BTR_CUR_HASH_ADAPT */
const bool metadata_changed = ctx->instant_column();
+#ifdef BTR_CUR_HASH_ADAPT
+ ahi_latch->wr_unlock();
+#endif /* BTR_CUR_HASH_ADAPT */
DBUG_ASSERT(index->n_fields >= n_old_fields);
/* The table may have been emptied and may have lost its
diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h
index 2b8c6c252e9..48e4fadab9b 100644
--- a/storage/innobase/include/btr0sea.h
+++ b/storage/innobase/include/btr0sea.h
@@ -97,7 +97,7 @@ btr_search_move_or_delete_hash_entries(
@param[in] garbage_collect drop ahi only if the index is marked
as freed */
void btr_search_drop_page_hash_index(buf_block_t* block,
- bool garbage_collect= false);
+ bool garbage_collect);
/** Drop possible adaptive hash index entries when a page is evicted
from the buffer pool or freed in a file, or the index is being dropped.
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index 52334056353..26261554f9b 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -706,6 +706,20 @@ inline bool fsp_flags_match(uint32_t expected, uint32_t actual)
return actual == expected || fsp_flags_convert_from_101(actual) == expected;
}
+/** Determine if FSP_SPACE_FLAGS are from an incompatible MySQL format.
+@param flags the contents of FSP_SPACE_FLAGS
+@return MySQL flags shifted.
+@retval 0, if not a MySQL incompatible format. */
+MY_ATTRIBUTE((warn_unused_result, const))
+inline uint32_t fsp_flags_is_incompatible_mysql(uint32_t flags)
+{
+ /*
+ MySQL-8.0 SDI flag (bit 14),
+ or MySQL 5.7 Encyption flag (bit 13)
+ */
+ return flags >> 13 & 3;
+}
+
/** Determine the descriptor index within a descriptor page.
@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] offset page offset
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
index d2569517c49..3eacd3ab7e1 100644
--- a/storage/innobase/mtr/mtr0mtr.cc
+++ b/storage/innobase/mtr/mtr0mtr.cc
@@ -665,15 +665,15 @@ bool mtr_t::commit_file(fil_space_t &space, const char *name)
if (name)
{
+ char *new_name= mem_strdup(name);
+ mysql_mutex_lock(&fil_system.mutex);
success= os_file_rename(innodb_data_file_key, old_name, name);
-
if (success)
- {
- mysql_mutex_lock(&fil_system.mutex);
- space.chain.start->name= mem_strdup(name);
- mysql_mutex_unlock(&fil_system.mutex);
- ut_free(old_name);
- }
+ space.chain.start->name= new_name;
+ else
+ old_name= new_name;
+ mysql_mutex_unlock(&fil_system.mutex);
+ ut_free(old_name);
}
else
{
@@ -1644,7 +1644,7 @@ void mtr_t::free(const fil_space_t &space, uint32_t offset)
slot.type= MTR_MEMO_PAGE_X_MODIFY;
#ifdef BTR_CUR_HASH_ADAPT
if (block->index)
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
#endif /* BTR_CUR_HASH_ADAPT */
block->page.set_freed(block->page.state());
}
diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc
index 8be0b17b5a8..56b58dd87d0 100644
--- a/storage/innobase/page/page0zip.cc
+++ b/storage/innobase/page/page0zip.cc
@@ -4409,7 +4409,7 @@ page_zip_reorganize(
mtr_log_t log_mode = mtr_set_log_mode(mtr, MTR_LOG_NONE);
temp_block = buf_block_alloc();
- btr_search_drop_page_hash_index(block);
+ btr_search_drop_page_hash_index(block, false);
temp_page = temp_block->page.frame;
/* Copy the old page to temporary space */
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc
index d7bbfa6b07e..c4ee55e79b3 100644
--- a/storage/innobase/row/row0import.cc
+++ b/storage/innobase/row/row0import.cc
@@ -43,6 +43,7 @@ Created 2012-02-08 by Sunny Bains.
#include "lock0lock.h"
#include "lzo/lzo1x.h"
#include "snappy-c.h"
+#include "log.h"
#include "scope.h"
@@ -583,6 +584,18 @@ protected:
uint32_t m_space_flags;
};
+ATTRIBUTE_COLD static dberr_t invalid_space_flags(uint32_t flags)
+{
+ if (fsp_flags_is_incompatible_mysql(flags))
+ {
+ sql_print_error("InnoDB: unsupported MySQL tablespace");
+ return DB_UNSUPPORTED;
+ }
+
+ sql_print_error("InnoDB: Invalid FSP_SPACE_FLAGS=0x%" PRIx32, flags);
+ return DB_CORRUPTION;
+}
+
/** Determine the page size to use for traversing the tablespace
@param file_size size of the tablespace file in bytes
@param block contents of the first page in the tablespace file.
@@ -598,7 +611,7 @@ AbstractCallback::init(
if (!fil_space_t::is_valid_flags(m_space_flags, true)) {
uint32_t cflags = fsp_flags_convert_from_101(m_space_flags);
if (cflags == UINT32_MAX) {
- return(DB_CORRUPTION);
+ return DB_CORRUPTION;
}
m_space_flags = cflags;
}
@@ -3078,7 +3091,7 @@ static dberr_t handle_instant_metadata(dict_table_t *table,
if (!success)
return DB_IO_ERROR;
- if (os_file_get_size(file) < srv_page_size * 4)
+ if (os_file_get_size(file) < srv_page_size)
return DB_CORRUPTION;
SCOPE_EXIT([&file]() { os_file_close(file); });
@@ -3097,10 +3110,7 @@ static dberr_t handle_instant_metadata(dict_table_t *table,
{
auto cflags= fsp_flags_convert_from_101(space_flags);
if (cflags == UINT32_MAX)
- {
- ib::error() << "Invalid FSP_SPACE_FLAGS=" << ib::hex(space_flags);
- return DB_CORRUPTION;
- }
+ return invalid_space_flags(space_flags);
space_flags= static_cast<decltype(space_flags)>(cflags);
}
@@ -4394,7 +4404,7 @@ row_import_for_mysql(
ib_errf(thd, IB_LOG_LEVEL_ERROR,
ER_INTERNAL_ERROR,
- "Cannot reset LSNs in table %s : %s",
+ "Error importing tablespace for table %s : %s",
table_name, ut_strerr(err));
}
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 827d31eee2f..be67d629569 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -899,11 +899,7 @@ row_ins_foreign_fill_virtual(
&ext, update->heap);
n_diff = update->n_fields;
- if (index->table->vc_templ == NULL) {
- /** This can occur when there is a cascading
- delete or update after restart. */
- innobase_init_vc_templ(index->table);
- }
+ ut_ad(index->table->vc_templ != NULL);
ib_vcol_row vc(NULL);
uchar *record = vc.record(thd, index, &mysql_table);
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index c5f18b650dc..64b4d02fa18 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -2093,6 +2093,9 @@ func_exit_committed:
index->set_modified(mtr);
pcur.btr_cur.page_cur.index = index;
+ ut_free(pcur.old_rec_buf);
+ pcur.old_rec_buf = nullptr;
+
if (ROW_FOUND != row_search_index_entry(
entry, BTR_MODIFY_TREE, &pcur, &mtr)) {
ut_ad(0);
diff --git a/storage/innobase/row/row0quiesce.cc b/storage/innobase/row/row0quiesce.cc
index 0d941feb0a1..a4d634f2d14 100644
--- a/storage/innobase/row/row0quiesce.cc
+++ b/storage/innobase/row/row0quiesce.cc
@@ -105,11 +105,17 @@ row_quiesce_write_indexes(
FILE* file, /*!< in: file to write to */
THD* thd) /*!< in/out: session */
{
+ ulint n_indexes = 0;
+ for (const dict_index_t* index = UT_LIST_GET_FIRST(table->indexes);
+ index; index = UT_LIST_GET_NEXT(indexes, index)) {
+ n_indexes += index->is_committed();
+ }
+
{
byte row[sizeof(ib_uint32_t)];
/* Write the number of indexes in the table. */
- mach_write_to_4(row, UT_LIST_GET_LEN(table->indexes));
+ mach_write_to_4(row, n_indexes);
DBUG_EXECUTE_IF("ib_export_io_write_failure_11",
close(fileno(file)););
@@ -131,6 +137,12 @@ row_quiesce_write_indexes(
index != 0 && err == DB_SUCCESS;
index = UT_LIST_GET_NEXT(indexes, index)) {
+ if (!index->is_committed()) {
+ continue;
+ }
+
+ ut_ad(n_indexes); ut_d(n_indexes--);
+
byte* ptr;
byte row[sizeof(index_id_t)
+ sizeof(ib_uint32_t) * 8];
@@ -201,6 +213,7 @@ row_quiesce_write_indexes(
err = row_quiesce_write_index_fields(index, file, thd);
}
+ ut_ad(!n_indexes);
return(err);
}
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index feff9c50232..21d9a00b94e 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -1489,6 +1489,7 @@ int ha_maria::repair(THD * thd, HA_CHECK_OPT *check_opt)
{
param->db_name= table->s->db.str;
param->table_name= table->alias.c_ptr();
+ param->testflag= check_opt->flags;
_ma_check_print_info(param, "Running zerofill on moved table");
return zerofill(thd, check_opt);
}
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 8a125e3d57d..9024e825862 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -13152,7 +13152,9 @@ bool ha_rocksdb::commit_inplace_alter_table(
#define SHOW_FNAME(name) rocksdb_show_##name
#define DEF_SHOW_FUNC(name, key) \
- static int SHOW_FNAME(name)(MYSQL_THD thd, SHOW_VAR * var, char *buff) { \
+ static int SHOW_FNAME(name)(MYSQL_THD thd, SHOW_VAR * var, void *buff, \
+ struct system_status_var *status_var, \
+ enum enum_var_type var_type) { \
rocksdb_status_counters.name = \
rocksdb_stats->getTickerCount(rocksdb::key); \
var->type = SHOW_LONGLONG; \
@@ -13161,7 +13163,7 @@ bool ha_rocksdb::commit_inplace_alter_table(
}
#define DEF_STATUS_VAR(name) \
- { "rocksdb_" #name, (char *)&SHOW_FNAME(name), SHOW_FUNC }
+ SHOW_FUNC_ENTRY( "rocksdb_" #name, &SHOW_FNAME(name))
#define DEF_STATUS_VAR_PTR(name, ptr, option) \
{ "rocksdb_" name, (char *)ptr, option }
@@ -13389,11 +13391,14 @@ static SHOW_VAR myrocks_status_variables[] = {
{NullS, NullS, SHOW_LONG}};
-static void show_myrocks_vars(THD *thd, SHOW_VAR *var, char *buff) {
+static int show_myrocks_vars(THD *thd, SHOW_VAR *var, void *buff,
+ struct system_status_var *,
+ enum enum_var_type) {
myrocks_update_status();
myrocks_update_memory_status();
var->type = SHOW_ARRAY;
var->value = reinterpret_cast<char *>(&myrocks_status_variables);
+ return 0;
}
static ulonglong io_stall_prop_value(
@@ -13474,10 +13479,13 @@ static SHOW_VAR rocksdb_stall_status_variables[] = {
// end of the array marker
{NullS, NullS, SHOW_LONG}};
-static void show_rocksdb_stall_vars(THD *thd, SHOW_VAR *var, char *buff) {
+static int show_rocksdb_stall_vars(THD *thd, SHOW_VAR *var, void *buff,
+ struct system_status_var *,
+ enum enum_var_type) {
update_rocksdb_stall_status();
var->type = SHOW_ARRAY;
var->value = reinterpret_cast<char *>(&rocksdb_stall_status_variables);
+ return 0;
}
static SHOW_VAR rocksdb_status_vars[] = {
@@ -13582,9 +13590,8 @@ static SHOW_VAR rocksdb_status_vars[] = {
// the variables generated by SHOW_FUNC are sorted only by prefix (first
// arg in the tuple below), so make sure it is unique to make sorting
// deterministic as quick sort is not stable
- {"rocksdb", reinterpret_cast<char *>(&show_myrocks_vars), SHOW_FUNC},
- {"rocksdb_stall", reinterpret_cast<char *>(&show_rocksdb_stall_vars),
- SHOW_FUNC},
+ SHOW_FUNC_ENTRY("rocksdb", &show_myrocks_vars),
+ SHOW_FUNC_ENTRY("rocksdb_stall", &show_rocksdb_stall_vars),
{NullS, NullS, SHOW_LONG}};
/*
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_28996.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_28996.result
new file mode 100644
index 00000000000..f805e7ef3ad
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_28996.result
@@ -0,0 +1,34 @@
+#
+# MDEV-28996 ASAN errors in String::q_append / spider_string::q_append / spider_db_mbase_util::open_item_func
+#
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection child2_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (
+a CHAR(8)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO tbl_a VALUES ('foo'),('bar');
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+CREATE TABLE tbl_a (
+a CHAR(8)
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"';
+SELECT MAX(BINARY a) FROM tbl_a;
+MAX(BINARY a)
+foo
+DROP DATABASE auto_test_local;
+connection child2_1;
+DROP DATABASE auto_test_remote;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.test
new file mode 100644
index 00000000000..8097fe7e607
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_28996.test
@@ -0,0 +1,40 @@
+--echo #
+--echo # MDEV-28996 ASAN errors in String::q_append / spider_string::q_append / spider_db_mbase_util::open_item_func
+--echo #
+
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_query_log
+--enable_result_log
+
+--connection child2_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+eval CREATE TABLE tbl_a (
+ a CHAR(8)
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+INSERT INTO tbl_a VALUES ('foo'),('bar');
+
+--connection master_1
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+eval CREATE TABLE tbl_a (
+ a CHAR(8)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a", srv "s_2_1"';
+
+SELECT MAX(BINARY a) FROM tbl_a;
+
+DROP DATABASE auto_test_local;
+
+--connection child2_1
+DROP DATABASE auto_test_remote;
+
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_query_log
+--enable_result_log
diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc
index f5393ae9eab..78236243bf2 100644
--- a/storage/spider/spd_db_mysql.cc
+++ b/storage/spider/spd_db_mysql.cc
@@ -5493,6 +5493,7 @@ int spider_db_mbase_util::open_item_func(
int error_num;
Item *item, **item_list = item_func->arguments();
Field *field;
+ spider_string tmp_str;
uint roop_count, item_count = item_func->argument_count(), start_item = 0;
LEX_CSTRING org_func_name= {SPIDER_SQL_NULL_CHAR_STR,
SPIDER_SQL_NULL_CHAR_LEN};
@@ -5951,10 +5952,11 @@ int spider_db_mbase_util::open_item_func(
if (str)
{
- char tmp_buf[MAX_FIELD_WIDTH], *tmp_ptr, *tmp_ptr2;
- spider_string tmp_str(tmp_buf, MAX_FIELD_WIDTH, str->charset());
+ char *tmp_ptr, *tmp_ptr2;
+ DBUG_ASSERT(tmp_str.length() == 0);
+ tmp_str.set_charset(str->charset());
tmp_str.init_calc_mem(123);
- tmp_str.length(0);
+ tmp_str.reserve(MAX_FIELD_WIDTH);
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
if (!merge_func)
{
@@ -6084,10 +6086,11 @@ int spider_db_mbase_util::open_item_func(
if (str)
{
- char tmp_buf[MAX_FIELD_WIDTH], *tmp_ptr, *tmp_ptr2;
- spider_string tmp_str(tmp_buf, MAX_FIELD_WIDTH, str->charset());
+ char *tmp_ptr, *tmp_ptr2;
+ DBUG_ASSERT(tmp_str.length() == 0);
+ tmp_str.set_charset(str->charset());
tmp_str.init_calc_mem(124);
- tmp_str.length(0);
+ tmp_str.reserve(MAX_FIELD_WIDTH);
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
if (!merge_func)
{
@@ -6236,10 +6239,11 @@ int spider_db_mbase_util::open_item_func(
if (str)
{
- char tmp_buf[MAX_FIELD_WIDTH], *tmp_ptr, *tmp_ptr2;
- spider_string tmp_str(tmp_buf, MAX_FIELD_WIDTH, str->charset());
+ char *tmp_ptr, *tmp_ptr2;
+ DBUG_ASSERT(tmp_str.length() == 0);
+ tmp_str.set_charset(str->charset());
tmp_str.init_calc_mem(125);
- tmp_str.length(0);
+ tmp_str.reserve(MAX_FIELD_WIDTH);
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
if (!merge_func)
{
diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc
index 333532bb107..429c8fa9ae7 100644
--- a/storage/spider/spd_direct_sql.cc
+++ b/storage/spider/spd_direct_sql.cc
@@ -1635,17 +1635,6 @@ long long spider_direct_sql_body(
goto error;
}
TABLE_LIST *tables = &direct_sql->table_list[roop_count];
-#ifdef SPIDER_use_LEX_CSTRING_for_database_tablename_alias
- table_list.init_one_table(
- &table_list.db, &table_list.table_name, 0, TL_WRITE);
-#else
- tables->init_one_table(
- SPIDER_TABLE_LIST_db_str(&table_list),
- SPIDER_TABLE_LIST_db_length(&table_list),
- SPIDER_TABLE_LIST_table_name_str(&table_list),
- SPIDER_TABLE_LIST_table_name_length(&table_list),
- SPIDER_TABLE_LIST_table_name_str(&table_list), TL_WRITE);
-#endif
MDL_REQUEST_INIT(&tables->mdl_request, MDL_key::TABLE,
SPIDER_TABLE_LIST_db_str(&table_list),
SPIDER_TABLE_LIST_table_name_str(&table_list),
diff --git a/strings/dtoa.c b/strings/dtoa.c
index af2409b9195..9bdeeacf574 100644
--- a/strings/dtoa.c
+++ b/strings/dtoa.c
@@ -1478,7 +1478,10 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
L= c - '0';
s1= s;
while (++s < end && (c= *s) >= '0' && c <= '9')
- L= 10*L + c - '0';
+ {
+ if (L < 19999)
+ L= 10*L + c - '0';
+ }
if (s - s1 > 8 || L > 19999)
/* Avoid confusion from exponents
* so large that e might overflow.
diff --git a/support-files/wsrep_notify.sh b/support-files/wsrep_notify.sh
index fd1a7546b71..4070ec920f8 100755
--- a/support-files/wsrep_notify.sh
+++ b/support-files/wsrep_notify.sh
@@ -6,30 +6,32 @@
#
# Edit parameters below to specify the address and login to server:
#
-USER=root
-PSWD=rootpass
+USER='root'
+PSWD='rootpass'
#
# If these parameters are not set, then the values
# passed by the server are taken:
#
-HOST=127.0.0.1
+HOST="127.0.0.1"
PORT=3306
#
# Edit parameters below to specify SSL parameters:
#
-ssl_key=
-ssl_cert=
-ssl_ca=
-ssl_capath=
-ssl_cipher=
-ssl_crl=
-ssl_crlpath=
+ssl_cert=""
+ssl_key=""
+ssl_ca=""
+ssl_capath=""
+ssl_cipher=""
+ssl_crl=""
+ssl_crlpath=""
ssl_verify_server_cert=0
#
# Client executable path:
#
CLIENT="mysql"
-
+#
+# Name of schema and tables:
+#
SCHEMA="wsrep"
MEMB_TABLE="$SCHEMA.membership"
STATUS_TABLE="$SCHEMA.status"
@@ -37,15 +39,14 @@ STATUS_TABLE="$SCHEMA.status"
WSREP_ON='SET wsrep_on=ON'
WSREP_OFF='SET wsrep_on=OFF'
-BEGIN="$WSREP_OFF;
-DROP SCHEMA IF EXISTS $SCHEMA; CREATE SCHEMA $SCHEMA;
-CREATE TABLE $MEMB_TABLE (
+BEGIN="CREATE SCHEMA IF NOT EXISTS $SCHEMA;
+CREATE TABLE IF NOT EXISTS $MEMB_TABLE (
idx INT UNIQUE PRIMARY KEY,
uuid CHAR(40) UNIQUE, /* node UUID */
name VARCHAR(32), /* node name */
addr VARCHAR(256) /* node address */
) ENGINE=MEMORY;
-CREATE TABLE $STATUS_TABLE (
+CREATE TABLE IF NOT EXISTS $STATUS_TABLE (
size INT, /* component size */
idx INT, /* this node index */
status CHAR(16), /* this node status */
@@ -57,7 +58,7 @@ END="COMMIT; $WSREP_ON"
configuration_change()
{
- echo "$BEGIN;"
+ echo "$WSREP_OFF; DROP SCHEMA IF EXISTS $SCHEMA; $BEGIN;"
local idx=0
@@ -67,7 +68,7 @@ configuration_change()
# Don't forget to properly quote string values
echo "'$NODE'" | sed s/\\//\',\'/g
echo ");"
- idx=$(( $idx + 1 ))
+ idx=$(( $idx+1 ))
done
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
@@ -77,7 +78,7 @@ configuration_change()
status_update()
{
- echo "$WSREP_OFF; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;"
+ echo "$WSREP_OFF; $BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;"
}
trim_string()
@@ -102,34 +103,35 @@ trim_string()
fi
}
-COM=status_update # not a configuration change by default
+COM='status_update' # not a configuration change by default
STATUS=""
CLUSTER_UUID=""
-PRIMARY="0"
+PRIMARY=0
INDEX=""
MEMBERS=""
while [ $# -gt 0 ]; do
case $1 in
- --status)
+ '--status')
STATUS=$(trim_string "$2")
shift
;;
- --uuid)
+ '--uuid')
CLUSTER_UUID=$(trim_string "$2")
shift
;;
- --primary)
- [ "$2" = "yes" ] && PRIMARY="1" || PRIMARY="0"
- COM=configuration_change
+ '--primary')
+ arg=$(trim_string "$2")
+ [ "$arg" = 'yes' ] && PRIMARY=1 || PRIMARY=0
+ COM='configuration_change'
shift
;;
- --index)
+ '--index')
INDEX=$(trim_string "$2")
shift
;;
- --members)
+ '--members')
MEMBERS=$(trim_string "$2")
shift
;;
@@ -168,9 +170,7 @@ 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" ]
+if [ -n "$ssl_key$ssl_cert$ssl_ca$ssl_capath$ssl_cipher$ssl_crl$ssl_crlpath" ]
then
SSL_PARAM=' --ssl'
[ -n "$ssl_key" ] && SSL_PARAM="$SSL_PARAM --ssl-key='$ssl_key'"
@@ -181,8 +181,10 @@ then
[ -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'
+ if [ "$ssl_verify_server_cert" != "0" -o \
+ "$ssl_verify_server_cert" = "on" ]
+ then
+ SSL_PARAM="$SSL_PARAM --ssl-verify-server-cert"
fi
fi
fi