revision-id: 5f46670bd09babbee75a24ac82eb4ade0706da66 (mariadb-10.3.6-96-g5f46670) parent(s): 8d5a11122c32f4d9eb87536886c6e893377bdd07 3ea7de9a78a1410a9b79362774247e9e44b201b3 author: Igor Babaev committer: Igor Babaev timestamp: 2018-11-10 14:52:57 -0800 message: Merge branch '10.4' into 10.4-mdev16188 .gitignore | 2 +- .travis.yml | 4 +- CMakeLists.txt | 34 +- CREDITS | 4 +- README.md | 16 +- VERSION | 2 +- client/CMakeLists.txt | 1 + client/client_priv.h | 2 +- client/mysql.cc | 23 +- client/mysql_upgrade.c | 8 +- client/mysqladmin.cc | 17 +- client/mysqlbinlog.cc | 18 +- client/mysqlcheck.c | 13 +- client/mysqldump.c | 22 +- client/mysqlimport.c | 18 +- client/mysqlshow.c | 19 +- client/mysqlslap.c | 19 +- client/mysqltest.cc | 45 +- cmake/CPackRPM.cmake | 34 +- cmake/FindZSTD.cmake | 18 - cmake/Findzstd.cmake | 25 + cmake/cpack_rpm.cmake | 6 + cmake/create_initial_db.cmake | 76 + cmake/create_initial_db.cmake.in | 84 - cmake/dtrace.cmake | 4 + cmake/for_clients.cmake | 3 - cmake/install_macros.cmake | 48 +- cmake/libutils.cmake | 62 +- cmake/make_dist.cmake.in | 2 +- cmake/merge_archives_unix.cmake | 56 + cmake/merge_archives_unix.cmake.in | 63 - cmake/mysql_add_executable.cmake | 3 + cmake/os/Windows.cmake | 24 +- cmake/package_name.cmake | 5 +- cmake/plugin.cmake | 7 +- cmake/ssl.cmake | 4 +- cmake/submodules.cmake | 6 + cmake/systemd.cmake | 10 +- cmake/zlib.cmake | 18 +- config.h.cmake | 8 +- configure.cmake | 11 +- debian/additions/innotop/changelog.innotop | 2 +- debian/additions/innotop/innotop | 14 +- debian/additions/innotop/innotop.1 | 6 +- debian/autobake-deb.sh | 2 +- debian/mariadb-plugin-tokudb.install | 2 +- debian/rules | 1 + extra/mariabackup/backup_copy.cc | 91 +- extra/mariabackup/backup_mysql.cc | 71 +- extra/mariabackup/crc/crc-intel-pclmul.c | 2 +- extra/mariabackup/datasink.c | 3 + extra/mariabackup/encryption_plugin.cc | 50 +- extra/mariabackup/fil_cur.cc | 104 +- extra/mariabackup/fil_cur.h | 5 +- extra/mariabackup/innobackupex.cc | 4 +- extra/mariabackup/wsrep.cc | 3 +- extra/mariabackup/xtrabackup.cc | 744 +- extra/my_print_defaults.c | 29 +- extra/perror.c | 8 + extra/resolveip.c | 17 +- extra/yassl/CMakeLists.txt | 3 - include/big_endian.h | 2 +- include/byte_order_generic.h | 2 +- include/byte_order_generic_x86.h | 2 +- include/byte_order_generic_x86_64.h | 2 +- include/json_lib.h | 6 + include/little_endian.h | 2 +- include/m_ctype.h | 37 +- include/m_string.h | 2 +- include/my_bit.h | 10 +- include/my_cpu.h | 2 +- include/my_global.h | 16 +- include/my_pthread.h | 2 +- include/my_service_manager.h | 2 + include/my_sys.h | 1 + include/my_time.h | 31 +- include/myisamchk.h | 3 +- include/mysql/plugin_auth.h | 46 +- include/mysql/plugin_auth.h.pp | 4 + include/mysql/plugin_password_validation.h | 4 +- include/mysql/plugin_password_validation.h.pp | 4 +- include/mysql/psi/mysql_socket.h | 4 +- include/mysql/service_kill_statement.h | 4 +- include/mysql/service_wsrep.h | 3 + include/mysql_embed.h | 1 - include/service_versions.h | 2 +- include/sql_common.h | 4 +- include/ssl_compat.h | 4 +- include/violite.h | 22 +- include/wsrep.h | 18 +- libmariadb | 2 +- libmysqld/CMakeLists.txt | 5 +- man/CMakeLists.txt | 7 +- man/mariabackup.1 | 16 + man/mbstream.1 | 16 + man/my_print_defaults.1 | 7 +- man/mysql_embedded.1 | 1 + man/mysql_ldb.1 | 16 + man/tokuft_logdump.1 | 16 - man/tokuft_logprint.1 | 16 + man/wsrep_sst_mariabackup.1 | 16 + man/wsrep_sst_rsync.1 | 4 +- man/wsrep_sst_rsync_wan.1 | 16 + mysql-test/collections/10.0-compatible.list | 595 + mysql-test/dgcov.pl | 2 +- mysql-test/include/check-testcase.test | 12 + mysql-test/include/ctype_mdev13118.inc | 15 + mysql-test/include/diff_tables.inc | 2 +- mysql-test/include/have_32bit.inc | 9 + mysql-test/include/have_64bit.inc | 9 + mysql-test/include/maria_empty_logs.inc | 12 + mysql-test/include/maria_verify_recovery.inc | 12 + mysql-test/include/mtr_check.sql | 1 - mysql-test/include/mtr_warnings.sql | 2 +- mysql-test/include/search_pattern_in_file.inc | 16 +- mysql-test/include/system_db_struct.inc | 1 - mysql-test/lib/My/Config.pm | 6 +- mysql-test/lib/My/ConfigFactory.pm | 21 - mysql-test/lib/My/Platform.pm | 2 + mysql-test/lib/v1/mysql-test-run.pl | 2 +- mysql-test/main/1st.result | 1 - mysql-test/main/alter_table.result | 53 + mysql-test/main/alter_table.test | 50 + mysql-test/main/alter_user.result | 35 +- mysql-test/main/alter_user.test | 8 +- .../main/auto_increment_ranges_innodb.result | 14 + mysql-test/main/auto_increment_ranges_innodb.test | 13 + mysql-test/main/bootstrap.result | 9 +- mysql-test/main/bootstrap.test | 27 +- mysql-test/main/brackets.result | 24 + mysql-test/main/brackets.test | 18 + mysql-test/main/case.result | 27 + mysql-test/main/case.test | 22 + mysql-test/main/cast.result | 2 +- mysql-test/main/connect.result | 19 +- mysql-test/main/connect.test | 19 +- mysql-test/main/constraints.result | 37 + mysql-test/main/constraints.test | 25 + mysql-test/main/contributors.result | 4 +- mysql-test/main/create_drop_user.result | 24 +- mysql-test/main/create_drop_user.test | 8 +- mysql-test/main/create_or_replace.result | 23 +- mysql-test/main/create_or_replace.test | 29 +- mysql-test/main/create_user.result | 24 +- mysql-test/main/cte_nonrecursive.result | 147 + mysql-test/main/cte_nonrecursive.test | 111 + mysql-test/main/cte_recursive.result | 303 +- mysql-test/main/cte_recursive.test | 176 +- mysql-test/main/ctype_binary.result | 23 + mysql-test/main/ctype_binary.test | 3 + mysql-test/main/ctype_eucjpms.result | 23 + mysql-test/main/ctype_eucjpms.test | 2 + mysql-test/main/ctype_euckr.result | 29 + mysql-test/main/ctype_euckr.test | 10 + mysql-test/main/ctype_gbk.result | 23 + mysql-test/main/ctype_gbk.test | 3 + mysql-test/main/ctype_latin1.result | 32 + mysql-test/main/ctype_latin1.test | 15 + mysql-test/main/ctype_uca.result | 21 + mysql-test/main/ctype_uca.test | 18 + mysql-test/main/ctype_ucs.result | 23 + mysql-test/main/ctype_ucs.test | 4 + mysql-test/main/ctype_ujis.result | 23 + mysql-test/main/ctype_ujis.test | 4 + mysql-test/main/ctype_upgrade.result | 2 - mysql-test/main/ctype_utf16.result | 23 + mysql-test/main/ctype_utf16.test | 5 + mysql-test/main/ctype_utf16le.result | 29 + mysql-test/main/ctype_utf16le.test | 13 + mysql-test/main/ctype_utf32.result | 23 + mysql-test/main/ctype_utf32.test | 8 + mysql-test/main/ctype_utf8.result | 23 + mysql-test/main/ctype_utf8.test | 7 + mysql-test/main/ctype_utf8mb4.result | 23 + mysql-test/main/ctype_utf8mb4.test | 8 + mysql-test/main/date_formats.result | 2 +- mysql-test/main/delayed.result | 3 +- mysql-test/main/derived.result | 33 + mysql-test/main/derived.test | 21 + mysql-test/main/derived_cond_pushdown.result | 12269 +++---- mysql-test/main/derived_cond_pushdown.test | 3378 +- mysql-test/main/derived_opt.result | 38 +- mysql-test/main/derived_opt.test | 43 + mysql-test/main/derived_split_innodb.result | 101 + mysql-test/main/derived_split_innodb.test | 96 + mysql-test/main/drop.test | 20 +- mysql-test/main/dyncol.result | 4 +- mysql-test/main/failed_auth_3909.result | 8 +- mysql-test/main/failed_auth_3909.test | 8 +- mysql-test/main/failed_auth_unixsocket.result | 11 +- mysql-test/main/failed_auth_unixsocket.test | 20 +- mysql-test/main/flush.result | 23 + mysql-test/main/flush.test | 31 + mysql-test/main/func_concat.result | 20 + mysql-test/main/func_concat.test | 22 + mysql-test/main/func_hybrid_type.result | 190 + mysql-test/main/func_hybrid_type.test | 105 + mysql-test/main/func_in.result | 2 +- mysql-test/main/func_isnull.result | 20 + mysql-test/main/func_isnull.test | 16 + mysql-test/main/func_json.result | 50 + mysql-test/main/func_json.test | 44 + mysql-test/main/func_like.result | 117 + mysql-test/main/func_like.test | 50 + mysql-test/main/func_sapdb.result | 6 +- mysql-test/main/func_time.result | 2691 +- mysql-test/main/func_time.test | 933 + mysql-test/main/gis-precise.result | 3 + mysql-test/main/gis-precise.test | 4 + mysql-test/main/gis.result | 16 + mysql-test/main/gis.test | 15 + mysql-test/main/grant.result | 42 +- mysql-test/main/grant.test | 25 + mysql-test/main/grant2.result | 89 +- mysql-test/main/grant2.test | 62 +- mysql-test/main/grant4.result | 16 +- mysql-test/main/grant5.result | 81 + mysql-test/main/grant5.test | 60 + mysql-test/main/grant_lowercase.result | 6 - mysql-test/main/grant_lowercase.test | 4 - mysql-test/main/group_min_max.result | 45 + mysql-test/main/group_min_max.test | 44 + mysql-test/main/help.result | 8 +- mysql-test/main/help.test | 8 +- mysql-test/main/in_subq_cond_pushdown.result | 32 + mysql-test/main/in_subq_cond_pushdown.test | 39 + mysql-test/main/index_merge_myisam.result | 50 + mysql-test/main/index_merge_myisam.test | 35 + mysql-test/main/information_schema-big.result | 2 + mysql-test/main/information_schema.result | 3 +- .../main/information_schema_all_engines.result | 10 +- mysql-test/main/init_file_set_password-7656.result | 6 +- mysql-test/main/init_file_set_password-7656.test | 2 +- mysql-test/main/innodb_mrr_cpk.result | 2 +- mysql-test/main/invisible_field_debug.result | 5 + mysql-test/main/invisible_field_debug.test | 6 + mysql-test/main/join.result | 42 + mysql-test/main/join.test | 54 + mysql-test/main/join_cache.result | 33 + mysql-test/main/join_cache.test | 32 +- mysql-test/main/join_nested_jcl6.result | 2 +- mysql-test/main/join_outer.result | 118 + mysql-test/main/join_outer.test | 108 + mysql-test/main/join_outer_jcl6.result | 118 + mysql-test/main/lock.result | 4 +- mysql-test/main/lock.test | 4 +- mysql-test/main/lock_multi.result | 17 +- mysql-test/main/lock_multi.test | 18 +- mysql-test/main/log_tables_upgrade.result | 1 - mysql-test/main/lowercase_fs_off.result | 68 + mysql-test/main/lowercase_fs_off.test | 15 + mysql-test/main/multi_update.result | 4 +- mysql-test/main/myisam.result | 2 +- mysql-test/main/myisam_recover.result | 4 +- mysql-test/main/mysql.result | 2 - mysql-test/main/mysql.test | 5 +- mysql-test/main/mysql_not_windows.result | 2 + mysql-test/main/mysql_not_windows.test | 7 + mysql-test/main/mysql_protocols.result | 5 +- mysql-test/main/mysql_upgrade-6984.result | 1 - mysql-test/main/mysql_upgrade.result | 10 - mysql-test/main/mysql_upgrade_no_innodb.result | 1 - mysql-test/main/mysql_upgrade_noengine.result | 3 - mysql-test/main/mysql_upgrade_ssl.result | 1 - mysql-test/main/mysql_upgrade_view.result | 3 - mysql-test/main/mysqlbinlog_row_compressed.result | 16 +- mysql-test/main/mysqlbinlog_row_minimal.result | 16 +- mysql-test/main/mysqlcheck.result | 5 - mysql-test/main/mysqld--help,win.rdiff | 45 +- mysql-test/main/mysqld--help.result | 11 + mysql-test/main/mysqldump-max.result | 4 +- mysql-test/main/mysqldump-max.test | 2 + mysql-test/main/mysqldump-utf8mb4.result | 86 + mysql-test/main/mysqldump-utf8mb4.test | 49 + mysql-test/main/mysqldump.result | 82 +- mysql-test/main/mysqldump.test | 4 +- mysql-test/main/mysqldump_restore.result | 20 - .../main/no_password_column-mdev-11170.result | 2 +- mysql-test/main/null.result | 16 +- mysql-test/main/openssl_1.result | 6 +- mysql-test/main/openssl_1.test | 3 + mysql-test/main/opt_tvc.result | 95 +- mysql-test/main/opt_tvc.test | 42 +- mysql-test/main/order_by_zerolength-4285.result | 20 + mysql-test/main/order_by_zerolength-4285.test | 14 + mysql-test/main/parser.result | 21 + mysql-test/main/parser.test | 17 + mysql-test/main/partition_error.result | 9 + mysql-test/main/partition_error.test | 18 + mysql-test/main/partition_explicit_prune.result | 19 + mysql-test/main/partition_explicit_prune.test | 19 + mysql-test/main/partition_pruning.result | 33 + mysql-test/main/partition_pruning.test | 31 + mysql-test/main/plugin.result | 45 + mysql-test/main/plugin.test | 40 + mysql-test/main/plugin_auth.result | 2 +- mysql-test/main/plugin_auth_qa.result | 32 +- mysql-test/main/plugin_auth_qa_1.result | 42 +- mysql-test/main/plugin_auth_qa_1.test | 2 +- mysql-test/main/plugin_auth_qa_2.result | 22 +- mysql-test/main/plugin_innodb.result | 2 +- mysql-test/main/plugin_innodb.test | 2 +- mysql-test/main/ps.result | 67 +- mysql-test/main/ps.test | 54 +- mysql-test/main/query_cache.result | 12 +- mysql-test/main/query_cache_innodb.result | 2 +- mysql-test/main/range.result | 73 +- mysql-test/main/range.test | 57 +- mysql-test/main/range_debug.result | 24 + mysql-test/main/range_debug.test | 30 + mysql-test/main/range_mrr_icp.result | 73 +- mysql-test/main/rename.result | 4 + mysql-test/main/rename.test | 7 + mysql-test/main/repair.result | 2 +- mysql-test/main/select.result | 32 +- mysql-test/main/select_jcl6.result | 32 +- mysql-test/main/select_pkeycache.result | 32 +- mysql-test/main/selectivity.result | 48 +- mysql-test/main/selectivity.test | 36 + mysql-test/main/selectivity_innodb.result | 48 +- mysql-test/main/session_tracker_last_gtid.result | 6 + mysql-test/main/set_password.result | 8 +- mysql-test/main/shm-master.opt | 1 - mysql-test/main/shm.result | 2170 -- mysql-test/main/shm.test | 47 - mysql-test/main/show_create_user.result | 4 +- mysql-test/main/show_create_user.test | 2 +- .../main/show_grants_with_plugin-7985.result | 4 +- mysql-test/main/sp-destruct.test | 28 +- mysql-test/main/sp-security.result | 36 +- mysql-test/main/sp-security.test | 23 +- mysql-test/main/sp.result | 17 + mysql-test/main/sp.test | 21 + mysql-test/main/sp_notembedded.result | 4 +- mysql-test/main/sp_notembedded.test | 2 +- mysql-test/main/sql_safe_updates.opt | 1 + mysql-test/main/sql_safe_updates.result | 3 + mysql-test/main/sql_safe_updates.test | 4 + mysql-test/main/stat_tables.result | 89 + mysql-test/main/stat_tables.test | 83 +- mysql-test/main/stat_tables_innodb.result | 89 + mysql-test/main/str_to_datetime_457.result | 6 +- mysql-test/main/subselect.result | 22 +- mysql-test/main/subselect.test | 22 +- mysql-test/main/subselect_extra_no_semijoin.result | 22 + mysql-test/main/subselect_extra_no_semijoin.test | 31 +- mysql-test/main/subselect_mat.result | 99 +- mysql-test/main/subselect_mat_cost_bugs.result | 2 +- mysql-test/main/subselect_no_exists_to_in.result | 22 +- mysql-test/main/subselect_no_mat.result | 22 +- mysql-test/main/subselect_no_opts.result | 22 +- mysql-test/main/subselect_no_scache.result | 22 +- mysql-test/main/subselect_no_semijoin.result | 22 +- mysql-test/main/subselect_sj2_mat.result | 51 + mysql-test/main/subselect_sj2_mat.test | 49 + mysql-test/main/subselect_sj_mat.result | 99 +- mysql-test/main/subselect_sj_mat.test | 79 + mysql-test/main/system_mysql_db.result | 50 +- mysql-test/main/system_mysql_db_fix40123.result | 49 +- mysql-test/main/system_mysql_db_fix50030.result | 49 +- mysql-test/main/system_mysql_db_fix50117.result | 49 +- mysql-test/main/system_mysql_db_refs.result | 16 +- mysql-test/main/system_mysql_db_refs.test | 11 - mysql-test/main/table_value_constr.result | 92 + mysql-test/main/table_value_constr.test | 48 + mysql-test/main/temp_table.result | 24 + mysql-test/main/temp_table.test | 26 + mysql-test/main/timezone2.result | 23 + mysql-test/main/timezone2.test | 19 + mysql-test/main/type_date.result | 38 +- mysql-test/main/type_date.test | 31 + mysql-test/main/type_datetime.result | 76 +- mysql-test/main/type_datetime.test | 39 +- mysql-test/main/type_decimal.result | 14 + mysql-test/main/type_decimal.test | 11 + mysql-test/main/type_float.result | 40 + mysql-test/main/type_float.test | 30 + mysql-test/main/type_newdecimal.result | 44 +- mysql-test/main/type_newdecimal.test | 45 +- mysql-test/main/type_temporal_innodb.result | 36 +- mysql-test/main/type_time.result | 120 +- mysql-test/main/type_time.test | 70 + mysql-test/main/type_timestamp.result | 19 +- mysql-test/main/type_timestamp.test | 22 + mysql-test/main/type_year.result | 24 +- mysql-test/main/type_year.test | 22 +- mysql-test/main/union.result | 16 + mysql-test/main/union.test | 15 + mysql-test/main/win.result | 417 +- mysql-test/main/win.test | 59 +- mysql-test/main/win_big.result | 12 - mysql-test/main/win_first_last_value.result | 20 +- mysql-test/main/win_lead_lag.result | 11 + mysql-test/main/win_lead_lag.test | 13 + mysql-test/main/win_percent_cume.result | 72 +- mysql-test/main/win_percent_cume.test | 6 +- mysql-test/main/win_percentile.result | 78 +- mysql-test/main/win_percentile.test | 19 + mysql-test/main/win_rank.result | 81 +- mysql-test/main/win_rank.test | 17 +- mysql-test/main/win_std.test | 4 + mysql-test/mysql-test-run.pl | 206 +- mysql-test/suite.pm | 6 +- mysql-test/suite/binlog/include/binlog.test | 1 - .../suite/binlog/include/check_binlog_size.inc | 31 + .../r/binlog_flush_binlogs_delete_domain.result | 12 + .../suite/binlog/r/binlog_tmp_table_row.result | 7 + .../t/binlog_flush_binlogs_delete_domain.test | 19 + .../suite/binlog/t/binlog_tmp_table_row.test | 30 + .../suite/binlog_encryption/rpl_corruption.result | 4 - .../suite/binlog_encryption/rpl_loadfile.result | 4 - .../rpl_mixed_binlog_max_cache_size.result | 28 - .../binlog_encryption/rpl_special_charset.result | 4 - .../rpl_stm_relay_ign_space.result | 4 - .../rpl_switch_stm_row_mixed.result | 2 +- mysql-test/suite/binlog_encryption/rpl_sync.result | 8 - .../suite/binlog_encryption/rpl_typeconv.result | 44 + mysql-test/suite/compat/oracle/r/events.result | 16 + .../suite/compat/oracle/r/func_concat.result | 69 + .../compat/oracle/r/sp-package-mysqldump.result | 2 +- .../compat/oracle/r/table_value_constr.result | 84 + mysql-test/suite/compat/oracle/t/events.test | 29 + mysql-test/suite/compat/oracle/t/func_concat.test | 36 + .../compat/oracle/t/sp-package-mysqldump.test | 1 + .../suite/compat/oracle/t/table_value_constr.test | 44 + .../suite/encryption/r/debug_key_management.result | 9 + .../encryption/r/innodb-encryption-alter.result | 37 + .../r/innodb_encrypt_log_corruption.result | 4 +- .../suite/encryption/t/debug_key_management.test | 18 +- .../encryption/t/innodb-encryption-alter.test | 24 + mysql-test/suite/funcs_1/r/innodb_func_view.result | 84 +- .../suite/funcs_1/r/is_check_constraints.result | 144 + mysql-test/suite/funcs_1/r/is_columns_is.result | 10 + .../suite/funcs_1/r/is_columns_is_embedded.result | 10 + mysql-test/suite/funcs_1/r/is_columns_mysql.result | 48 +- .../funcs_1/r/is_columns_mysql_embedded.result | 40 - .../suite/funcs_1/r/is_key_column_usage.result | 2 - .../funcs_1/r/is_key_column_usage_embedded.result | 2 - .../suite/funcs_1/r/is_routines_embedded.result | 12 +- mysql-test/suite/funcs_1/r/is_statistics.result | 2 - .../suite/funcs_1/r/is_statistics_mysql.result | 2 - .../funcs_1/r/is_statistics_mysql_embedded.result | 4 - .../suite/funcs_1/r/is_table_constraints.result | 1 - .../funcs_1/r/is_table_constraints_mysql.result | 1 - .../r/is_table_constraints_mysql_embedded.result | 2 - mysql-test/suite/funcs_1/r/is_tables_is.result | 50 + .../suite/funcs_1/r/is_tables_is_embedded.result | 50 + mysql-test/suite/funcs_1/r/is_tables_mysql.result | 57 +- .../funcs_1/r/is_tables_mysql_embedded.result | 114 +- .../suite/funcs_1/r/is_user_privileges.result | 66 +- mysql-test/suite/funcs_1/r/memory_func_view.result | 84 +- mysql-test/suite/funcs_1/r/myisam_func_view.result | 84 +- .../suite/funcs_1/t/is_check_constraints.test | 69 + mysql-test/suite/galera/disabled.def | 27 +- .../suite/galera/include/reset_query_cache.inc | 11 + mysql-test/suite/galera/r/MW-286.result | 6 +- mysql-test/suite/galera/r/MW-336.result | 131 +- mysql-test/suite/galera/r/MW-44.result | 32 +- mysql-test/suite/galera/r/galera#505.result | 8 + .../r/galera_bf_background_statistics.result | 33 + .../galera/r/galera_binlog_stmt_autoinc.result | 147 + mysql-test/suite/galera/r/galera_defaults.result | 68 - .../suite/galera/r/galera_drop_database.result | 17 + mysql-test/suite/galera/r/galera_enum.result | 37 +- .../r/galera_ist_innodb_flush_logs,debug.rdiff | 103 + .../galera/r/galera_ist_innodb_flush_logs.result | 96 - .../galera/r/galera_ist_mysqldump,debug.rdiff | 106 + .../suite/galera/r/galera_ist_mysqldump.result | 109 +- .../suite/galera/r/galera_ist_rsync,debug.rdiff | 114 + mysql-test/suite/galera/r/galera_ist_rsync.result | 108 - .../galera/r/galera_ist_xtrabackup-v2,debug.rdiff | 103 + .../suite/galera/r/galera_ist_xtrabackup-v2.result | 96 - mysql-test/suite/galera/r/galera_kill_ddl.result | 1 + .../suite/galera/r/galera_kill_largechanges.result | 1 + .../suite/galera/r/galera_kill_smallchanges.result | 1 + .../suite/galera/r/galera_pc_ignore_sb.result | 7 +- .../galera/r/galera_sst_mysqldump_with_key.result | 215 +- .../suite/galera/r/galera_sst_rsync2,debug.rdiff | 114 + mysql-test/suite/galera/r/galera_sst_rsync2.result | 288 + .../galera/r/galera_sst_rsync_data_dir,debug.rdiff | 114 + .../galera/r/galera_sst_rsync_data_dir.result | 288 + .../r/galera_sst_xtrabackup-v2_data_dir.result | 262 + .../suite/galera/r/galera_suspend_slave.result | 2 + .../suite/galera/r/galera_toi_truncate.result | 2 + .../galera/r/galera_unicode_identifiers.result | 6 +- .../suite/galera/r/galera_var_desync_on.result | 2 - .../suite/galera/r/galera_var_node_address.result | 2 +- .../suite/galera/r/galera_var_slave_threads.result | 67 +- mysql-test/suite/galera/r/galera_wan.result | 6 +- mysql-test/suite/galera/r/mysql-wsrep#332.result | 111 + mysql-test/suite/galera/r/query_cache.result | 47 +- mysql-test/suite/galera/r/versioning_trx_id.result | 52 + mysql-test/suite/galera/suite.pm | 2 + mysql-test/suite/galera/t/MW-286.test | 6 +- mysql-test/suite/galera/t/MW-328A.test | 1 + mysql-test/suite/galera/t/MW-328B.test | 1 + mysql-test/suite/galera/t/MW-328C.test | 1 + mysql-test/suite/galera/t/MW-336.test | 65 +- mysql-test/suite/galera/t/MW-44-master.opt | 1 + mysql-test/suite/galera/t/MW-44.test | 25 +- mysql-test/suite/galera/t/galera#505.test | 26 + .../galera/t/galera_bf_background_statistics.opt | 1 + .../galera/t/galera_bf_background_statistics.test | 49 + .../suite/galera/t/galera_binlog_stmt_autoinc.test | 230 + mysql-test/suite/galera/t/galera_defaults.test | 13 +- .../suite/galera/t/galera_drop_database.test | 65 + mysql-test/suite/galera/t/galera_enum.test | 18 +- .../suite/galera/t/galera_ist_mysqldump.test | 2 + .../suite/galera/t/galera_ist_xtrabackup-v2.test | 5 + mysql-test/suite/galera/t/galera_kill_ddl.test | 2 + .../suite/galera/t/galera_kill_largechanges.test | 2 + .../suite/galera/t/galera_kill_smallchanges.test | 2 + mysql-test/suite/galera/t/galera_pc_ignore_sb.test | 21 +- .../galera/t/galera_sst_mysqldump_with_key.test | 7 +- mysql-test/suite/galera/t/galera_sst_rsync2.cnf | 15 + mysql-test/suite/galera/t/galera_sst_rsync2.test | 12 + .../suite/galera/t/galera_sst_rsync_data_dir.cnf | 11 + .../suite/galera/t/galera_sst_rsync_data_dir.test | 16 + .../galera/t/galera_sst_xtrabackup-v2_data_dir.cnf | 16 + .../t/galera_sst_xtrabackup-v2_data_dir.test | 23 + .../suite/galera/t/galera_suspend_slave.test | 3 + mysql-test/suite/galera/t/galera_toi_truncate.test | 16 +- .../suite/galera/t/galera_unicode_identifiers.test | 12 +- .../suite/galera/t/galera_var_desync_on.test | 7 +- .../suite/galera/t/galera_var_node_address.test | 8 +- .../suite/galera/t/galera_var_slave_threads.test | 10 + mysql-test/suite/galera/t/galera_wan.test | 14 +- mysql-test/suite/galera/t/mysql-wsrep#332.test | 113 + mysql-test/suite/galera/t/query_cache.test | 123 +- mysql-test/suite/galera/t/versioning_trx_id.cnf | 1 + mysql-test/suite/galera/t/versioning_trx_id.test | 28 + .../r/galera_certification_double_failure.result | 2 +- .../suite/galera_3nodes/r/galera_pc_weight.result | 31 +- .../suite/galera_3nodes/t/galera_pc_weight.test | 55 +- mysql-test/suite/gcol/r/gcol_bug20746926.result | 8 +- .../suite/gcol/r/gcol_partition_innodb.result | 17 + .../suite/gcol/r/innodb_virtual_debug_purge.result | 6 +- .../suite/gcol/r/innodb_virtual_index.result | 32 + .../suite/gcol/r/innodb_virtual_rebuild.result | 16 +- mysql-test/suite/gcol/t/gcol_partition_innodb.test | 20 + .../suite/gcol/t/innodb_virtual_debug_purge.test | 6 - mysql-test/suite/gcol/t/innodb_virtual_index.test | 31 + .../suite/gcol/t/innodb_virtual_rebuild.test | 5 +- mysql-test/suite/heap/heap_btree.result | 4 + mysql-test/suite/heap/heap_btree.test | 9 + mysql-test/suite/innodb/include/alter_nocopy.inc | 33 - .../suite/innodb/include/alter_nocopy_fail.inc | 51 - mysql-test/suite/innodb/include/alter_not_null.inc | 94 - .../include/have_undo_tablespaces.combinations | 2 + .../suite/innodb/include/have_undo_tablespaces.inc | 4 + .../innodb/include/innodb_binlog.combinations | 3 + mysql-test/suite/innodb/include/innodb_binlog.inc | 3 + .../suite/innodb/include/innodb_wl6501_crash.inc | 416 - .../innodb/include/innodb_wl6501_crash_temp.inc | 98 - .../suite/innodb/r/alter_algorithm,COPY.rdiff | 92 - .../suite/innodb/r/alter_algorithm,INPLACE.rdiff | 128 +- .../suite/innodb/r/alter_algorithm,INSTANT.rdiff | 124 +- .../suite/innodb/r/alter_algorithm,NOCOPY.rdiff | 145 + mysql-test/suite/innodb/r/alter_algorithm.result | 103 +- .../suite/innodb/r/alter_inplace_perfschema.result | 20 + mysql-test/suite/innodb/r/alter_instant,COPY.rdiff | 61 - .../suite/innodb/r/alter_instant,INPLACE.rdiff | 11 - .../suite/innodb/r/alter_instant,INSTANT.rdiff | 11 - mysql-test/suite/innodb/r/alter_instant.result | 50 - mysql-test/suite/innodb/r/alter_kill.result | 2 + mysql-test/suite/innodb/r/alter_table.result | 15 + .../innodb/r/auto_increment_dup,skip-log-bin.rdiff | 51 + .../suite/innodb/r/auto_increment_dup.result | 22 +- .../r/default_row_format_compatibility.result | 2 +- mysql-test/suite/innodb/r/foreign-keys.result | 73 + mysql-test/suite/innodb/r/foreign_key.result | 76 +- .../suite/innodb/r/innodb-alter-debug.result | 18 +- mysql-test/suite/innodb/r/innodb-alter.result | 142 +- mysql-test/suite/innodb/r/innodb-index,debug.rdiff | 10 + mysql-test/suite/innodb/r/innodb-lock.result | 47 +- .../innodb/r/innodb-page_compression_bzip2.result | 8 +- .../innodb/r/innodb-page_compression_lz4.result | 7 +- .../innodb/r/innodb-page_compression_lzma.result | 8 +- .../innodb/r/innodb-page_compression_lzo.result | 8 +- .../innodb/r/innodb-page_compression_tables.result | 8 +- .../innodb/r/innodb-page_compression_zip.result | 7 +- mysql-test/suite/innodb/r/innodb-wl5522.result | 264 +- mysql-test/suite/innodb/r/innodb_mysql.result | 2 +- mysql-test/suite/innodb/r/instant_alter.result | 245 +- .../suite/innodb/r/instant_alter_crash.result | 62 +- .../suite/innodb/r/instant_alter_debug.result | 83 +- .../suite/innodb/r/instant_alter_limit.result | 35 + .../suite/innodb/r/instant_alter_rollback.result | 108 +- mysql-test/suite/innodb/r/instant_drop.result | 190 + mysql-test/suite/innodb/r/log_corruption.result | 2 +- mysql-test/suite/innodb/r/log_file_size.result | 2 +- .../suite/innodb/r/row_format_redundant.result | 2 +- mysql-test/suite/innodb/r/system_tables.result | 2 +- .../suite/innodb/r/table_flags,32k,debug.rdiff | 132 + .../suite/innodb/r/table_flags,32k,release.rdiff | 20 + mysql-test/suite/innodb/r/table_flags,32k.rdiff | 20 - .../suite/innodb/r/table_flags,64k,debug.rdiff | 132 + .../suite/innodb/r/table_flags,64k,release.rdiff | 20 + mysql-test/suite/innodb/r/table_flags,64k.rdiff | 20 - mysql-test/suite/innodb/r/table_flags,debug.rdiff | 122 + mysql-test/suite/innodb/r/temporary_table.result | 13 + mysql-test/suite/innodb/r/truncate.result | 8 + mysql-test/suite/innodb/r/truncate_crash.result | 14 + mysql-test/suite/innodb/r/truncate_debug.result | 88 - mysql-test/suite/innodb/r/truncate_foreign.result | 58 + mysql-test/suite/innodb/r/truncate_inject.result | 114 - mysql-test/suite/innodb/r/truncate_missing.result | 17 + .../suite/innodb/r/truncate_purge_debug.result | 29 - mysql-test/suite/innodb/r/truncate_restart.result | 12 - mysql-test/suite/innodb/r/undo_truncate.result | 60 + .../suite/innodb/r/undo_truncate_recover.result | 15 + mysql-test/suite/innodb/t/alter_algorithm.test | 129 +- .../suite/innodb/t/alter_inplace_perfschema.opt | 2 + .../suite/innodb/t/alter_inplace_perfschema.test | 40 + mysql-test/suite/innodb/t/alter_instant.test | 45 - mysql-test/suite/innodb/t/alter_kill.test | 9 +- mysql-test/suite/innodb/t/alter_not_null.test | 94 +- mysql-test/suite/innodb/t/alter_table.test | 12 + mysql-test/suite/innodb/t/auto_increment_dup.test | 40 +- mysql-test/suite/innodb/t/foreign-keys.test | 87 + mysql-test/suite/innodb/t/foreign_key.test | 112 +- mysql-test/suite/innodb/t/innodb-alter-debug.test | 25 +- mysql-test/suite/innodb/t/innodb-alter.test | 105 +- mysql-test/suite/innodb/t/innodb-index.test | 4 + mysql-test/suite/innodb/t/innodb-lock.test | 74 +- .../innodb/t/innodb-page_compression_bzip2.test | 15 +- .../innodb/t/innodb-page_compression_lz4.test | 14 +- .../innodb/t/innodb-page_compression_lzma.test | 15 +- .../innodb/t/innodb-page_compression_lzo.test | 15 +- .../innodb/t/innodb-page_compression_tables.test | 8 +- .../innodb/t/innodb-page_compression_zip.test | 14 +- mysql-test/suite/innodb/t/innodb-wl5522.test | 254 +- .../t/innodb_default_row_format.combinations | 2 + mysql-test/suite/innodb/t/instant_alter.test | 78 + mysql-test/suite/innodb/t/instant_alter_crash.test | 70 +- mysql-test/suite/innodb/t/instant_alter_debug.test | 99 +- mysql-test/suite/innodb/t/instant_alter_limit.test | 42 + .../suite/innodb/t/instant_alter_rollback.test | 80 +- mysql-test/suite/innodb/t/instant_drop.test | 98 + mysql-test/suite/innodb/t/log_file_size.test | 2 +- mysql-test/suite/innodb/t/system_tables.test | 2 +- mysql-test/suite/innodb/t/table_flags.test | 5 +- mysql-test/suite/innodb/t/temporary_table.test | 17 + mysql-test/suite/innodb/t/truncate.test | 17 + mysql-test/suite/innodb/t/truncate_crash.test | 23 + mysql-test/suite/innodb/t/truncate_debug.test | 128 - mysql-test/suite/innodb/t/truncate_foreign.test | 68 + mysql-test/suite/innodb/t/truncate_inject.test | 97 - mysql-test/suite/innodb/t/truncate_missing.test | 22 + mysql-test/suite/innodb/t/truncate_purge_debug.opt | 3 - .../suite/innodb/t/truncate_purge_debug.test | 49 - mysql-test/suite/innodb/t/truncate_restart.test | 16 - mysql-test/suite/innodb/t/undo_truncate.test | 122 + .../suite/innodb/t/undo_truncate_recover.test | 50 + .../suite/innodb_fts/r/crash_recovery.result | 1 + .../suite/innodb_fts/r/fts_kill_query.result | 9 + mysql-test/suite/innodb_fts/r/sync_ddl.result | 105 + mysql-test/suite/innodb_fts/r/truncate.result | 31 - mysql-test/suite/innodb_fts/t/crash_recovery.test | 1 + mysql-test/suite/innodb_fts/t/fts_kill_query.test | 30 + .../innodb_fts/t/innodb_fts_multiple_index.test | 2 +- mysql-test/suite/innodb_fts/t/sync_ddl.test | 177 + mysql-test/suite/innodb_fts/t/truncate.opt | 1 - mysql-test/suite/innodb_fts/t/truncate.test | 50 - .../suite/innodb_gis/r/alter_spatial_index.result | 2 +- .../suite/innodb_gis/r/create_spatial_index.result | 2 +- .../innodb_gis/r/rtree_concurrent_srch.result | 4 +- .../suite/innodb_gis/t/alter_spatial_index.test | 3 +- .../suite/innodb_gis/t/create_spatial_index.test | 2 +- .../suite/innodb_gis/t/rtree_concurrent_srch.test | 2 +- .../include/have_undo_tablespaces.combinations | 2 - .../innodb_undo/include/have_undo_tablespaces.inc | 4 - .../suite/innodb_undo/include/truncate_recover.inc | 8 - mysql-test/suite/innodb_undo/r/truncate.result | 11 - .../innodb_undo/r/truncate_multi_client.result | 51 - .../suite/innodb_undo/r/truncate_recover.result | 15 - mysql-test/suite/innodb_undo/t/truncate.test | 72 - .../suite/innodb_undo/t/truncate_multi_client.test | 77 - .../suite/innodb_undo/t/truncate_recover.test | 50 - .../innodb_zip/include/innodb_wl6501_scale.inc | 110 - .../suite/innodb_zip/r/index_large_prefix.result | 2 +- mysql-test/suite/innodb_zip/r/restart.result | 24 +- mysql-test/suite/innodb_zip/r/wl6501_1.result | 1202 - .../suite/innodb_zip/r/wl6501_crash_3.result | 462 - .../suite/innodb_zip/r/wl6501_crash_4.result | 519 - .../suite/innodb_zip/r/wl6501_crash_5.result | 462 - .../suite/innodb_zip/r/wl6501_scale_1.result | 336 - mysql-test/suite/innodb_zip/t/wl6501_1.test | 451 - mysql-test/suite/innodb_zip/t/wl6501_crash_3.test | 25 - mysql-test/suite/innodb_zip/t/wl6501_crash_4.test | 27 - mysql-test/suite/innodb_zip/t/wl6501_crash_5.test | 25 - mysql-test/suite/innodb_zip/t/wl6501_scale_1.test | 37 - mysql-test/suite/maria/concurrent.result | 33 + mysql-test/suite/maria/concurrent.test | 28 + mysql-test/suite/maria/create.result | 33 + mysql-test/suite/maria/create.test | 42 + mysql-test/suite/maria/disabled.def | 13 + mysql-test/suite/maria/fulltext2.result | 86 + mysql-test/suite/maria/fulltext2.test | 77 + mysql-test/suite/maria/maria-recover.result | 2 +- mysql-test/suite/maria/maria-recover.test | 12 + mysql-test/suite/maria/maria-ucs2.result | 2 +- mysql-test/suite/maria/maria.result | 12 +- mysql-test/suite/maria/maria.test | 10 + mysql-test/suite/maria/maria3.result | 2 +- mysql-test/suite/maria/system_tables.result | 13 + mysql-test/suite/maria/system_tables.test | 27 + .../suite/mariabackup/absolute_ibdata_paths.opt | 2 +- .../suite/mariabackup/create_during_backup.result | 10 + .../suite/mariabackup/create_during_backup.test | 26 + ...create_with_data_directory_during_backup.result | 10 + .../create_with_data_directory_during_backup.test | 24 + mysql-test/suite/mariabackup/disabled.def | 1 - .../mariabackup/drop_table_during_backup.result | 13 + .../mariabackup/drop_table_during_backup.test | 24 + .../incremental_ddl_during_backup.result | 22 + .../mariabackup/incremental_ddl_during_backup.test | 52 + .../mariabackup/innodb_log_optimize_ddl.result | 37 + .../suite/mariabackup/innodb_log_optimize_ddl.test | 47 + .../suite/mariabackup/mlog_index_load.result | 15 + mysql-test/suite/mariabackup/mlog_index_load.test | 27 + .../nolock_ddl_during_backup_end.result | 2 + .../mariabackup/nolock_ddl_during_backup_end.test | 14 + .../recreate_table_during_backup.result | 23 + .../mariabackup/recreate_table_during_backup.test | 37 + .../suite/mariabackup/rename_during_backup.result | 53 + .../suite/mariabackup/rename_during_backup.test | 86 + .../mariabackup/rename_during_mdl_lock.result | 10 +- .../suite/mariabackup/rename_during_mdl_lock.test | 20 +- mysql-test/suite/mariabackup/skip_innodb.opt | 1 + mysql-test/suite/mariabackup/skip_innodb.result | 10 + mysql-test/suite/mariabackup/skip_innodb.test | 12 + mysql-test/suite/mariabackup/suite.opt | 2 +- .../mariabackup/truncate_during_backup.result | 4 + .../suite/mariabackup/truncate_during_backup.test | 18 + mysql-test/suite/mariabackup/undo_space_id.opt | 1 + .../suite/mariabackup/unsupported_redo.result | 2 +- mysql-test/suite/mariabackup/unsupported_redo.test | 35 +- .../suite/mariabackup/xb_aws_key_management.result | 2 + .../multi_source/gtid_ignore_duplicates.result | 8 +- .../suite/multi_source/gtid_ignore_duplicates.test | 8 +- .../suite/parts/r/partition_recover_myisam.result | 12 +- mysql-test/suite/parts/r/rpl_partition.result | 12 + mysql-test/suite/parts/r/show_create.result | 8 + mysql-test/suite/parts/r/truncate_locked.result | 7 + mysql-test/suite/parts/r/update_and_cache.result | 7 + mysql-test/suite/parts/t/show_create.test | 11 + mysql-test/suite/parts/t/truncate_locked.test | 10 + mysql-test/suite/parts/t/update_and_cache.test | 12 + mysql-test/suite/perfschema/r/bad_option_1.result | 1 + mysql-test/suite/perfschema/r/bad_option_2.result | 1 + mysql-test/suite/perfschema/r/bad_option_3.result | 1 + mysql-test/suite/perfschema/r/bad_option_4.result | 1 + mysql-test/suite/perfschema/r/bad_option_5.result | 1 + .../suite/perfschema/r/privilege_table_io.result | 2 - mysql-test/suite/perfschema/t/bad_option_1.test | 5 + mysql-test/suite/perfschema/t/bad_option_2.test | 5 + mysql-test/suite/perfschema/t/bad_option_3.test | 5 + mysql-test/suite/perfschema/t/bad_option_4.test | 5 + mysql-test/suite/perfschema/t/bad_option_5.test | 5 + .../suite/perfschema/t/privilege_table_io.test | 1 - mysql-test/suite/plugins/r/audit_null_debug.result | 4 + mysql-test/suite/plugins/r/auth_ed25519.result | 25 +- .../suite/plugins/r/simple_password_check.result | 5 +- mysql-test/suite/plugins/t/audit_null_debug.test | 4 +- mysql-test/suite/plugins/t/auth_ed25519.test | 9 + .../suite/plugins/t/simple_password_check.test | 6 +- mysql-test/suite/rpl/include/check_type.inc | 8 + mysql-test/suite/rpl/include/rpl_foreign_key.test | 60 - .../rpl/include/rpl_lower_case_table_names.test | 141 + mysql-test/suite/rpl/include/rpl_mixed_dml.inc | 1 - mysql-test/suite/rpl/include/rpl_row_001.test | 4 +- mysql-test/suite/rpl/include/type_conversions.test | 91 + mysql-test/suite/rpl/r/rpl_15919.result | 19 + mysql-test/suite/rpl/r/rpl_auto_increment.result | 16 - .../rpl/r/rpl_auto_increment_update_failure.result | 112 - mysql-test/suite/rpl/r/rpl_binlog_index.result | 4 - mysql-test/suite/rpl/r/rpl_checksum_cache.result | 24 - .../suite/rpl/r/rpl_conditional_comments.result | 12 - mysql-test/suite/rpl/r/rpl_corruption.result | 4 - mysql-test/suite/rpl/r/rpl_create_drop_user.result | 44 +- mysql-test/suite/rpl/r/rpl_current_user.result | 78 - mysql-test/suite/rpl/r/rpl_do_grant.result | 1 + .../suite/rpl/r/rpl_foreign_key_innodb.result | 3 +- mysql-test/suite/rpl/r/rpl_gtid_ignored.result | 2 +- mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result | 2 +- mysql-test/suite/rpl/r/rpl_gtid_stop_start.result | 2 +- mysql-test/suite/rpl/r/rpl_innodb_bug28430.result | 12 + mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result | 15 +- mysql-test/suite/rpl/r/rpl_insert_ignore.result | 8 - .../rpl/r/rpl_lcase_tblnames_rewrite_db.result | 38 + mysql-test/suite/rpl/r/rpl_loaddata.result | 4 - mysql-test/suite/rpl/r/rpl_loadfile.result | 4 - .../suite/rpl/r/rpl_lost_events_on_rotate.result | 4 - mysql-test/suite/rpl/r/rpl_mdev10863.result | 2 +- mysql-test/suite/rpl/r/rpl_mdev12179.result | 12 +- .../rpl/r/rpl_mixed_binlog_max_cache_size.result | 28 - .../rpl/r/rpl_mixed_implicit_commit_binlog.result | 4 - .../rpl/r/rpl_nondeterministic_functions.result | 4 - mysql-test/suite/rpl/r/rpl_not_null_innodb.result | 16 - mysql-test/suite/rpl/r/rpl_not_null_myisam.result | 16 - mysql-test/suite/rpl/r/rpl_old_master.result | 3 + .../suite/rpl/r/rpl_parallel_optimistic.result | 8 + mysql-test/suite/rpl/r/rpl_reset_slave_fail.result | 4 - mysql-test/suite/rpl/r/rpl_row_001.result | 4 +- .../suite/rpl/r/rpl_row_basic_2myisam.result | 32 - .../suite/rpl/r/rpl_row_basic_3innodb.result | 32 - mysql-test/suite/rpl/r/rpl_row_find_row.result | 4 - mysql-test/suite/rpl/r/rpl_row_img_blobs.result | 2016 -- mysql-test/suite/rpl/r/rpl_row_img_eng_min.result | 1152 - .../suite/rpl/r/rpl_row_img_eng_noblob.result | 1152 - .../rpl/r/rpl_row_implicit_commit_binlog.result | 4 - .../suite/rpl/r/rpl_row_lcase_tblnames.result | 60 + .../suite/rpl/r/rpl_row_loaddata_concurrent.result | 4 - mysql-test/suite/rpl/r/rpl_row_merge_engine.result | 16 - .../suite/rpl/r/rpl_row_rec_comp_innodb.result | 12 - .../suite/rpl/r/rpl_row_rec_comp_myisam.result | 16 - mysql-test/suite/rpl/r/rpl_row_spatial.result | 16 + mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result | 44 - mysql-test/suite/rpl/r/rpl_row_utf16.result | 4 - .../rpl/r/rpl_semi_sync_master_shutdown.result | 33 + mysql-test/suite/rpl/r/rpl_set_null_innodb.result | 16 - mysql-test/suite/rpl/r/rpl_set_null_myisam.result | 16 - mysql-test/suite/rpl/r/rpl_slave_load_in.result | 8 - mysql-test/suite/rpl/r/rpl_special_charset.result | 4 - mysql-test/suite/rpl/r/rpl_stm_000001.result | 7 +- .../rpl/r/rpl_stm_binlog_max_cache_size.result | 28 - .../rpl/r/rpl_stm_implicit_commit_binlog.result | 4 - .../suite/rpl/r/rpl_stm_lcase_tblnames.result | 57 + .../suite/rpl/r/rpl_stm_loaddata_concurrent.result | 4 - .../suite/rpl/r/rpl_stm_relay_ign_space.result | 4 - .../suite/rpl/r/rpl_stm_user_variables.result | 4 - mysql-test/suite/rpl/r/rpl_stop_slave.result | 8 - .../suite/rpl/r/rpl_switch_stm_row_mixed.result | 2 +- mysql-test/suite/rpl/r/rpl_sync.result | 8 - .../suite/rpl/r/rpl_temp_table_mix_row.result | 4 - mysql-test/suite/rpl/r/rpl_test_framework.result | 126 - mysql-test/suite/rpl/r/rpl_trigger.result | 8 - mysql-test/suite/rpl/r/rpl_truncate_2myisam.result | 16 - mysql-test/suite/rpl/r/rpl_truncate_3innodb.result | 16 - mysql-test/suite/rpl/r/rpl_typeconv.result | 44 + mysql-test/suite/rpl/r/rpl_typeconv_innodb.result | 4 - .../suite/rpl/r/rpl_unsafe_statements.result | 24 - mysql-test/suite/rpl/r/rpl_variables.result | 20 - mysql-test/suite/rpl/r/rpl_variables_stm.result | 20 - mysql-test/suite/rpl/t/rpl_15919-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_15919.test | 18 + mysql-test/suite/rpl/t/rpl_create_drop_user.test | 18 +- mysql-test/suite/rpl/t/rpl_do_grant.test | 1 + mysql-test/suite/rpl/t/rpl_drop_db.test | 8 +- mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test | 62 +- mysql-test/suite/rpl/t/rpl_gtid_ignored.test | 2 +- mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test | 2 +- mysql-test/suite/rpl/t/rpl_gtid_stop_start.test | 2 +- .../rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt | 1 + .../suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test | 60 + mysql-test/suite/rpl/t/rpl_mdev10863.test | 2 +- mysql-test/suite/rpl/t/rpl_mdev12179.test | 4 +- mysql-test/suite/rpl/t/rpl_mdev382.test | 1 + mysql-test/suite/rpl/t/rpl_old_master.test | 8 + .../suite/rpl/t/rpl_parallel_optimistic.test | 24 + .../rpl/t/rpl_parallel_optimistic_nobinlog.cnf | 1 + .../suite/rpl/t/rpl_row_lcase_tblnames-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test | 12 + mysql-test/suite/rpl/t/rpl_row_spatial.test | 17 + .../suite/rpl/t/rpl_semi_sync_master_shutdown.test | 60 + mysql-test/suite/rpl/t/rpl_stm_000001.test | 5 +- .../suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test | 12 + .../suite/sql_sequence/auto_increment.result | 30 + mysql-test/suite/sql_sequence/auto_increment.test | 30 + mysql-test/suite/sql_sequence/create.result | 9 + mysql-test/suite/sql_sequence/create.test | 11 + mysql-test/suite/sql_sequence/next.result | 15 + mysql-test/suite/sql_sequence/next.test | 11 + .../sys_vars/r/delayed_insert_limit_func.result | 4 +- .../r/innodb_ft_result_cache_limit_32.result | 7 + .../r/innodb_ft_result_cache_limit_64.result | 5 + .../innodb_ft_result_cache_limit_basic,32bit.rdiff | 13 + .../r/innodb_ft_result_cache_limit_basic.result | 7 +- .../r/innodb_log_optimize_ddl_basic.result | 39 + .../r/shared_memory_base_name_basic.result | 21 - .../suite/sys_vars/r/shared_memory_basic.result | 21 - .../r/sql_low_priority_updates_func.result | 4 +- .../suite/sys_vars/r/sysvars_innodb,32bit.rdiff | 118 +- mysql-test/suite/sys_vars/r/sysvars_innodb.result | 16 +- .../sys_vars/r/sysvars_server_embedded.result | 30 +- .../sys_vars/r/sysvars_server_notembedded.result | 30 +- .../suite/sys_vars/r/thread_pool_size_high.result | 1 + .../sys_vars/r/wsrep_start_position_basic.result | 10 +- .../sys_vars/t/delayed_insert_limit_func.test | 20 +- .../t/innodb_ft_result_cache_limit_32.test | 9 + .../t/innodb_ft_result_cache_limit_64.test | 9 + .../t/innodb_ft_result_cache_limit_basic.test | 5 +- .../sys_vars/t/innodb_log_optimize_ddl_basic.test | 65 + .../sys_vars/t/shared_memory_base_name_basic.test | 25 - .../suite/sys_vars/t/shared_memory_basic.test | 20 - .../sys_vars/t/sql_low_priority_updates_func.test | 4 +- .../suite/sys_vars/t/thread_pool_size_high.test | 1 + .../sys_vars/t/wsrep_start_position_basic.test | 6 +- mysql-test/suite/vcol/r/index.result | 10 + mysql-test/suite/vcol/r/races.result | 16 + mysql-test/suite/vcol/r/wrong_arena.result | 28 +- mysql-test/suite/vcol/t/index.test | 16 + mysql-test/suite/vcol/t/races.test | 22 + mysql-test/suite/versioning/innodb.combinations | 5 + mysql-test/suite/versioning/innodb.inc | 1 + mysql-test/suite/versioning/r/alter.result | 2 +- mysql-test/suite/versioning/r/online.result | 134 +- mysql-test/suite/versioning/r/partition.result | 8 +- mysql-test/suite/versioning/r/truncate.result | 6 + mysql-test/suite/versioning/r/trx_id.result | 3 + .../trx_id_versioning_attribute_persistence.result | 86 - mysql-test/suite/versioning/t/online.test | 148 +- mysql-test/suite/versioning/t/truncate.test | 10 + mysql-test/suite/versioning/t/trx_id.test | 2 + .../t/trx_id_versioning_attribute_persistence.test | 87 - .../suite/wsrep/include/check_galera_version.inc | 20 +- mysql-test/suite/wsrep/r/variables.result | 4 + mysql-test/suite/wsrep/t/variables.test | 11 +- mysql-test/unstable-tests | 479 +- mysql-test/valgrind.supp | 13 + mysys/CMakeLists.txt | 1 + mysys/mf_iocache.c | 20 +- mysys/mf_iocache2.c | 4 +- mysys/my_alloc.c | 14 +- mysys/my_pread.c | 26 +- mysys/my_rename.c | 5 +- mysys/my_static.c | 2 +- mysys/ptr_cmp.c | 7 + mysys_ssl/openssl.c | 3 +- pcre/CMakeLists.txt | 63 +- pcre/pcre_grep_test.sh | 13 + pcre/pcre_test.bat | 9 + pcre/pcre_test.sh | 11 + plugin/auth_ed25519/ed25519-t.c | 2 +- plugin/auth_ed25519/server_ed25519.c | 47 +- plugin/auth_examples/dialog_examples.c | 6 +- plugin/auth_examples/qa_auth_interface.c | 3 +- plugin/auth_examples/qa_auth_server.c | 3 +- plugin/auth_examples/test_plugin.c | 6 +- .../auth_gssapi/mysql-test/auth_gssapi/basic.test | 1 + plugin/auth_gssapi/sspi_server.cc | 9 +- plugin/auth_pam/auth_pam_common.c | 3 +- plugin/auth_pam/mapper/pam_user_map.c | 6 +- plugin/auth_socket/auth_socket.c | 3 +- plugin/aws_key_management/CMakeLists.txt | 8 +- .../aws_key_management_plugin.cc | 29 +- .../cracklib_password_check.c | 3 +- plugin/handler_socket/CMakeLists.txt | 9 +- .../simple_password_check/simple_password_check.c | 4 +- plugin/user_variables/user_variables.cc | 2 +- scripts/CMakeLists.txt | 2 + scripts/fill_help_tables.sql | 2 + scripts/galera_new_cluster.sh | 7 +- scripts/galera_recovery.sh | 3 +- scripts/mysql_install_db.sh | 9 +- scripts/mysql_system_tables.sql | 71 +- scripts/mysql_system_tables_fix.sql | 147 +- scripts/mysqld_multi.sh | 21 +- scripts/wsrep_sst_common.sh | 32 +- scripts/wsrep_sst_mariabackup.sh | 32 +- scripts/wsrep_sst_rsync.sh | 153 +- scripts/wsrep_sst_xtrabackup-v2.sh | 51 +- sql-common/client.c | 321 +- sql-common/my_time.c | 420 +- sql/CMakeLists.txt | 37 +- sql/compat56.cc | 3 + sql/contributors.h | 4 +- sql/event_data_objects.cc | 12 +- sql/event_parse_data.cc | 8 +- sql/events.cc | 22 +- sql/field.cc | 329 +- sql/field.h | 111 +- sql/field_conv.cc | 4 +- sql/filesort.cc | 6 +- sql/gcalc_slicescan.cc | 11 + sql/gcalc_slicescan.h | 7 + sql/gcalc_tools.cc | 11 + sql/gcalc_tools.h | 1 + sql/ha_partition.cc | 157 +- sql/ha_partition.h | 11 +- sql/handle_connections_win.cc | 555 + sql/handle_connections_win.h | 20 + sql/handler.cc | 51 +- sql/handler.h | 64 +- sql/init.h | 2 +- sql/item.cc | 422 +- sql/item.h | 317 +- sql/item_cmpfunc.cc | 121 +- sql/item_cmpfunc.h | 51 +- sql/item_create.cc | 21 +- sql/item_func.cc | 79 +- sql/item_func.h | 130 +- sql/item_jsonfunc.cc | 47 +- sql/item_jsonfunc.h | 2 +- sql/item_row.h | 2 +- sql/item_strfunc.cc | 136 +- sql/item_strfunc.h | 12 +- sql/item_subselect.cc | 9 +- sql/item_subselect.h | 6 +- sql/item_sum.cc | 28 +- sql/item_sum.h | 20 +- sql/item_timefunc.cc | 427 +- sql/item_timefunc.h | 283 +- sql/item_vers.cc | 7 +- sql/item_vers.h | 2 +- sql/item_windowfunc.cc | 21 +- sql/item_windowfunc.h | 9 +- sql/key.cc | 3 +- sql/lock.cc | 16 - sql/lock.h | 1 - sql/log.cc | 21 +- sql/log_event.cc | 60 +- sql/multi_range_read.cc | 13 + sql/my_decimal.h | 4 +- sql/mysql_install_db.cc | 88 +- sql/mysqld.cc | 901 +- sql/mysqld.h | 10 +- sql/net_serv.cc | 2 +- sql/opt_range.cc | 66 +- sql/opt_range.h | 5 +- sql/opt_range_mrr.cc | 54 +- sql/opt_split.cc | 12 +- sql/opt_subselect.cc | 119 +- sql/partition_info.h | 5 +- sql/procedure.h | 4 +- sql/protocol.cc | 8 +- sql/rpl_gtid.cc | 72 +- sql/rpl_gtid.h | 2 +- sql/rpl_parallel.cc | 32 +- sql/rpl_rli.cc | 79 + sql/rpl_rli.h | 11 + sql/rpl_utility.cc | 34 +- sql/semisync_master_ack_receiver.cc | 3 +- sql/semisync_slave.cc | 3 +- sql/share/CMakeLists.txt | 12 +- sql/share/errmsg-utf8.txt | 4 +- sql/slave.cc | 13 + sql/sql_acl.cc | 1452 +- sql/sql_admin.cc | 9 + sql/sql_alter.cc | 19 +- sql/sql_alter.h | 2 +- sql/sql_base.cc | 203 +- sql/sql_base.h | 6 +- sql/sql_basic_types.h | 83 + sql/sql_class.cc | 15 +- sql/sql_class.h | 42 +- sql/sql_const.h | 2 +- sql/sql_cte.cc | 36 +- sql/sql_cte.h | 19 +- sql/sql_delete.cc | 17 +- sql/sql_derived.cc | 5 +- sql/sql_error.h | 73 +- sql/sql_get_diagnostics.cc | 2 +- sql/sql_get_diagnostics.h | 2 +- sql/sql_insert.cc | 3 +- sql/sql_lex.cc | 26 +- sql/sql_lex.h | 11 +- sql/sql_list.h | 5 +- sql/sql_parse.cc | 47 +- sql/sql_partition.cc | 20 +- sql/sql_partition.h | 4 + sql/sql_partition_admin.cc | 4 +- sql/sql_plist.h | 7 +- sql/sql_plugin.cc | 74 +- sql/sql_plugin_services.ic | 3 +- sql/sql_prepare.cc | 29 +- sql/sql_reload.cc | 14 +- sql/sql_select.cc | 296 +- sql/sql_select.h | 8 +- sql/sql_sequence.cc | 5 +- sql/sql_show.cc | 56 +- sql/sql_statistics.cc | 38 +- sql/sql_statistics.h | 34 +- sql/sql_string.cc | 23 +- sql/sql_string.h | 1 + sql/sql_table.cc | 132 +- sql/sql_time.cc | 222 +- sql/sql_time.h | 50 +- sql/sql_trigger.cc | 26 +- sql/sql_truncate.cc | 7 +- sql/sql_tvc.cc | 19 +- sql/sql_tvc.h | 2 + sql/sql_type.cc | 756 +- sql/sql_type.h | 954 +- sql/sql_type_int.h | 82 + sql/sql_union.cc | 36 +- sql/sql_update.cc | 4 +- sql/sql_view.cc | 12 +- sql/sql_window.cc | 36 +- sql/sql_window.h | 6 +- sql/sql_yacc.yy | 153 +- sql/sql_yacc_ora.yy | 130 +- sql/structs.h | 7 +- sql/sys_vars.cc | 27 +- sql/sys_vars.ic | 4 +- sql/table.cc | 73 +- sql/table.h | 28 +- sql/table_cache.cc | 19 +- sql/temporary_tables.cc | 30 + sql/threadpool_win.cc | 94 +- sql/tztime.cc | 2 +- sql/wsrep_applier.cc | 1 + sql/wsrep_binlog.cc | 52 +- sql/wsrep_dummy.cc | 3 + sql/wsrep_hton.cc | 9 +- sql/wsrep_mysqld.cc | 326 +- sql/wsrep_mysqld.h | 4 +- sql/wsrep_sst.cc | 121 +- sql/wsrep_sst.h | 1 + sql/wsrep_var.cc | 11 +- sql/wsrep_xid.cc | 5 +- storage/cassandra/CMakeLists.txt | 1 - storage/connect/CMakeLists.txt | 19 +- storage/connect/connect.cc | 2 +- storage/connect/filamdbf.cpp | 4 +- storage/connect/filamtxt.cpp | 4 +- storage/connect/filamvct.cpp | 11 +- storage/connect/global.h | 4 +- storage/connect/ha_connect.cc | 124 +- storage/connect/ha_connect.h | 6 +- storage/connect/inihandl.cpp | 2 +- storage/connect/javaconn.cpp | 43 +- storage/connect/javaconn.h | 1 + storage/connect/jdbconn.cpp | 38 +- storage/connect/jmgoconn.cpp | 6 +- storage/connect/jsonudf.cpp | 2 +- storage/connect/mysql-test/connect/disabled.def | 23 +- storage/connect/mysql-test/connect/r/jdbc.result | 4 +- .../mysql-test/connect/r/json_java_2.result | 1 - .../mysql-test/connect/r/json_java_3.result | 1 - .../mysql-test/connect/r/mongo_java_2.result | 1 - .../mysql-test/connect/r/mongo_java_3.result | 1 - .../connect/mysql-test/connect/r/mysql_exec.result | 6 + .../mysql-test/connect/r/odbc_postgresql.result | 18 +- storage/connect/mysql-test/connect/r/xml2.result | 31 - .../connect/mysql-test/connect/r/xml2_mult.result | 8 +- .../connect/mysql-test/connect/r/xml_mult.result | 8 +- .../connect/mysql-test/connect/t/json_java_2.test | 2 + .../connect/mysql-test/connect/t/json_java_3.test | 2 + .../connect/mysql-test/connect/t/mongo_java_2.test | 2 + .../connect/mysql-test/connect/t/mongo_java_3.test | 2 + storage/connect/mysql-test/connect/t/xml2.test | 36 +- storage/connect/odbconn.cpp | 10 +- storage/connect/tabext.cpp | 6 + storage/connect/tabjdbc.cpp | 9 +- storage/connect/tabjmg.cpp | 11 +- storage/connect/tabmysql.cpp | 11 +- storage/connect/tabodbc.cpp | 13 +- storage/connect/tabpivot.cpp | 166 +- storage/connect/tabutil.cpp | 2 +- storage/connect/tabxml.cpp | 2 +- storage/heap/hp_create.c | 22 +- storage/innobase/CMakeLists.txt | 2 - storage/innobase/btr/btr0btr.cc | 282 +- storage/innobase/btr/btr0bulk.cc | 242 +- storage/innobase/btr/btr0cur.cc | 625 +- storage/innobase/btr/btr0pcur.cc | 11 +- storage/innobase/btr/btr0sea.cc | 12 +- storage/innobase/buf/buf0buddy.cc | 2 +- storage/innobase/buf/buf0buf.cc | 62 +- storage/innobase/buf/buf0dblwr.cc | 10 +- storage/innobase/buf/buf0dump.cc | 6 +- storage/innobase/buf/buf0flu.cc | 14 +- storage/innobase/buf/buf0lru.cc | 31 +- storage/innobase/buf/buf0rea.cc | 64 +- storage/innobase/data/data0data.cc | 66 +- storage/innobase/dict/dict0boot.cc | 10 +- storage/innobase/dict/dict0crea.cc | 228 +- storage/innobase/dict/dict0defrag_bg.cc | 47 +- storage/innobase/dict/dict0dict.cc | 155 +- storage/innobase/dict/dict0mem.cc | 356 +- storage/innobase/dict/dict0stats.cc | 10 +- storage/innobase/dict/dict0stats_bg.cc | 100 +- storage/innobase/fil/fil0crypt.cc | 6 +- storage/innobase/fil/fil0fil.cc | 371 +- storage/innobase/fsp/fsp0fsp.cc | 65 +- storage/innobase/fts/fts0ast.cc | 9 +- storage/innobase/fts/fts0fts.cc | 94 +- storage/innobase/fts/fts0opt.cc | 171 +- storage/innobase/fts/fts0pars.cc | 16 +- storage/innobase/fts/fts0pars.y | 16 +- storage/innobase/fts/fts0que.cc | 23 +- storage/innobase/fut/fut0lst.cc | 4 +- storage/innobase/gis/gis0rtree.cc | 6 +- storage/innobase/gis/gis0sea.cc | 7 +- storage/innobase/handler/ha_innodb.cc | 919 +- storage/innobase/handler/ha_innodb.h | 81 +- storage/innobase/handler/handler0alter.cc | 2329 +- storage/innobase/handler/i_s.cc | 8 +- storage/innobase/ibuf/ibuf0ibuf.cc | 35 +- storage/innobase/include/btr0btr.h | 25 +- storage/innobase/include/btr0btr.ic | 4 +- storage/innobase/include/btr0bulk.h | 67 +- storage/innobase/include/btr0cur.h | 22 +- storage/innobase/include/btr0pcur.h | 12 + storage/innobase/include/btr0sea.h | 2 +- storage/innobase/include/btr0types.h | 32 +- storage/innobase/include/buf0buf.h | 114 +- storage/innobase/include/buf0buf.ic | 26 +- storage/innobase/include/buf0flu.h | 7 +- storage/innobase/include/buf0lru.h | 6 +- storage/innobase/include/buf0rea.h | 8 +- storage/innobase/include/data0data.h | 32 +- storage/innobase/include/data0type.h | 44 + storage/innobase/include/db0err.h | 2 - storage/innobase/include/dict0defrag_bg.h | 19 + storage/innobase/include/dict0dict.h | 35 +- storage/innobase/include/dict0dict.ic | 3 +- storage/innobase/include/dict0mem.h | 279 +- storage/innobase/include/dict0stats.h | 18 +- storage/innobase/include/fil0fil.h | 117 +- storage/innobase/include/fsp0fsp.h | 40 +- storage/innobase/include/fsp0fsp.ic | 2 +- storage/innobase/include/fts0ast.h | 5 +- storage/innobase/include/fts0fts.h | 12 +- storage/innobase/include/fts0priv.h | 11 +- storage/innobase/include/fts0types.h | 4 +- storage/innobase/include/fut0lst.h | 49 +- storage/innobase/include/fut0lst.ic | 22 +- storage/innobase/include/ha_prototypes.h | 3 + storage/innobase/include/ibuf0ibuf.h | 12 +- storage/innobase/include/ibuf0ibuf.ic | 2 +- storage/innobase/include/lock0lock.h | 63 - storage/innobase/include/lock0priv.h | 139 +- storage/innobase/include/lock0priv.ic | 12 +- storage/innobase/include/lock0types.h | 192 +- storage/innobase/include/log0crypt.h | 19 +- storage/innobase/include/log0log.h | 93 +- storage/innobase/include/log0log.ic | 6 +- storage/innobase/include/log0recv.h | 54 +- storage/innobase/include/mtr0log.h | 20 +- storage/innobase/include/mtr0mtr.h | 35 +- storage/innobase/include/mtr0types.h | 8 +- storage/innobase/include/os0file.h | 7 +- storage/innobase/include/page0cur.h | 14 + storage/innobase/include/page0cur.ic | 1 + storage/innobase/include/page0page.h | 27 +- storage/innobase/include/page0page.ic | 18 - storage/innobase/include/page0size.h | 2 +- storage/innobase/include/page0types.h | 12 - storage/innobase/include/page0zip.h | 6 +- storage/innobase/include/page0zip.ic | 2 +- storage/innobase/include/rem0rec.h | 193 +- storage/innobase/include/rem0rec.ic | 54 +- storage/innobase/include/row0ftsort.h | 10 + storage/innobase/include/row0ins.h | 10 - storage/innobase/include/row0mysql.h | 62 +- storage/innobase/include/row0row.h | 29 +- storage/innobase/include/row0row.ic | 4 +- storage/innobase/include/row0trunc.h | 427 - storage/innobase/include/row0upd.h | 9 +- storage/innobase/include/srv0srv.h | 25 +- storage/innobase/include/sync0arr.ic | 3 +- storage/innobase/include/trx0purge.h | 245 +- storage/innobase/include/trx0rec.h | 9 +- storage/innobase/include/trx0sys.h | 11 +- storage/innobase/include/trx0trx.h | 30 +- storage/innobase/include/trx0undo.h | 21 +- storage/innobase/include/trx0undo.ic | 4 +- storage/innobase/include/univ.i | 3 +- storage/innobase/include/ut0counter.h | 119 +- storage/innobase/include/ut0pool.h | 20 +- storage/innobase/lock/lock0lock.cc | 158 +- storage/innobase/log/log0crypt.cc | 147 +- storage/innobase/log/log0log.cc | 74 +- storage/innobase/log/log0recv.cc | 411 +- storage/innobase/mtr/mtr0log.cc | 123 +- storage/innobase/mtr/mtr0mtr.cc | 31 +- storage/innobase/os/os0file.cc | 49 +- storage/innobase/page/page0cur.cc | 39 +- storage/innobase/page/page0page.cc | 42 +- storage/innobase/page/page0zip.cc | 92 +- storage/innobase/que/que0que.cc | 3 +- storage/innobase/rem/rem0rec.cc | 556 +- storage/innobase/row/row0ftsort.cc | 9 +- storage/innobase/row/row0import.cc | 105 +- storage/innobase/row/row0ins.cc | 127 +- storage/innobase/row/row0log.cc | 120 +- storage/innobase/row/row0merge.cc | 75 +- storage/innobase/row/row0mysql.cc | 347 +- storage/innobase/row/row0purge.cc | 51 +- storage/innobase/row/row0quiesce.cc | 7 +- storage/innobase/row/row0row.cc | 638 +- storage/innobase/row/row0sel.cc | 29 +- storage/innobase/row/row0trunc.cc | 3217 -- storage/innobase/row/row0uins.cc | 57 +- storage/innobase/row/row0umod.cc | 117 +- storage/innobase/row/row0undo.cc | 8 +- storage/innobase/row/row0upd.cc | 129 +- storage/innobase/row/row0vers.cc | 3 + storage/innobase/srv/srv0srv.cc | 78 +- storage/innobase/srv/srv0start.cc | 271 +- storage/innobase/sync/sync0rw.cc | 107 +- storage/innobase/trx/trx0purge.cc | 758 +- storage/innobase/trx/trx0rec.cc | 191 +- storage/innobase/trx/trx0roll.cc | 2 +- storage/innobase/trx/trx0rseg.cc | 40 +- storage/innobase/trx/trx0sys.cc | 7 +- storage/innobase/trx/trx0trx.cc | 109 +- storage/innobase/trx/trx0undo.cc | 86 +- storage/innobase/ut/ut0new.cc | 1 - storage/innobase/ut/ut0ut.cc | 2 - storage/maria/CMakeLists.txt | 3 +- storage/maria/ha_maria.cc | 91 +- storage/maria/ma_blockrec.c | 21 +- storage/maria/ma_check.c | 20 +- storage/maria/ma_commit.c | 2 +- storage/maria/ma_control_file.c | 4 +- storage/maria/ma_control_file.h | 2 +- storage/maria/ma_create.c | 22 +- storage/maria/ma_ft_boolean_search.c | 2 +- storage/maria/ma_info.c | 6 +- storage/maria/ma_key_recover.c | 2 - storage/maria/ma_locking.c | 3 +- storage/maria/ma_norec.c | 4 +- storage/maria/ma_open.c | 35 +- storage/maria/ma_page.c | 3 +- storage/maria/ma_recovery.c | 25 +- storage/maria/ma_state.c | 25 +- storage/maria/ma_test2.c | 5 + storage/maria/ma_trnman.h | 36 +- storage/maria/ma_write.c | 15 +- storage/maria/maria_chk.c | 52 +- storage/maria/maria_def.h | 5 +- storage/maria/maria_read_log.c | 6 +- storage/maria/trnman.c | 3 + storage/maria/unittest/ma_test_all-t | 7 +- storage/maria/unittest/ma_test_recovery.expected | 192 +- storage/maria/unittest/ma_test_recovery.pl | 4 +- storage/mroonga/CMakeLists.txt | 3 +- storage/mroonga/ha_mroonga.cpp | 35 +- storage/mroonga/ha_mroonga.hpp | 6 +- storage/mroonga/lib/mrn_condition_converter.cpp | 4 +- .../mroonga/lib/mrn_multiple_column_key_codec.cpp | 7 +- storage/mroonga/mrn_table.hpp | 3 + storage/mroonga/vendor/groonga/config.h.cmake | 1 + storage/mroonga/vendor/groonga/lib/expr.c | 2 +- .../mroonga/vendor/groonga/lib/ts/ts_expr_node.c | 2 +- storage/myisam/ha_myisam.cc | 52 +- storage/myisam/mi_check.c | 16 +- storage/myisam/mi_locking.c | 6 +- .../mysql-test/storage_engine/disabled.def | 1 + storage/oqgraph/CMakeLists.txt | 1 - storage/perfschema/unittest/pfs-t.cc | 5 +- storage/rocksdb/CMakeLists.txt | 10 +- storage/rocksdb/build_rocksdb.cmake | 42 +- storage/rocksdb/event_listener.cc | 2 +- storage/rocksdb/event_listener.h | 2 +- storage/rocksdb/ha_rocksdb.cc | 1256 +- storage/rocksdb/ha_rocksdb.h | 55 +- storage/rocksdb/ha_rocksdb_proto.h | 9 +- storage/rocksdb/logger.h | 2 +- storage/rocksdb/mysql-test/rocksdb/combinations | 6 + .../rocksdb/include/have_write_committed.inc | 3 + .../mysql-test/rocksdb/r/2pc_group_commit.result | 30 +- .../mysql-test/rocksdb/r/add_index_inplace.result | 24 + .../r/add_index_inplace_sstfilewriter.result | 2 +- .../mysql-test/rocksdb/r/autoinc_debug.result | 40 +- .../mysql-test/rocksdb/r/autoinc_vars.result | 26 + .../rocksdb/r/bloomfilter_bulk_load.result | 15 + .../mysql-test/rocksdb/r/bulk_load_sk.result | 229 + .../mysql-test/rocksdb/r/cardinality.result | 17 +- .../rocksdb/mysql-test/rocksdb/r/collation.result | 20 +- .../rocksdb/mysql-test/rocksdb/r/com_rpc_tx.result | 21 + .../rocksdb/r/create_no_primary_key_table.result | 38 + .../mysql-test/rocksdb/r/ddl_high_priority.result | 71 +- .../mysql-test/rocksdb/r/deadlock_tracking.result | 57 + .../rocksdb/mysql-test/rocksdb/r/drop_table.result | 19 + .../mysql-test/rocksdb/r/explicit_snapshot.result | 265 + .../mysql-test/rocksdb/r/i_s_deadlock.result | 55 +- .../mysql-test/rocksdb/r/index_file_map.result | 3 + .../rocksdb/r/index_merge_rocksdb2.result | 52 +- .../mysql-test/rocksdb/r/information_schema.result | 1 + .../rocksdb/mysql-test/rocksdb/r/issue255.result | 14 +- storage/rocksdb/mysql-test/rocksdb/r/lock.result | 15 + .../mysql-test/rocksdb/r/mariadb_port_fixes.result | 1 + storage/rocksdb/mysql-test/rocksdb/r/misc.result | 2 - .../rocksdb/mysql-test/rocksdb/r/mysqldump.result | 5 +- .../r/percona_nonflushing_analyze_debug.result | 19 + .../rocksdb/r/prefix_extractor_override.result | 7 +- .../rocksdb/mysql-test/rocksdb/r/rocksdb.result | 24 +- .../mysql-test/rocksdb/r/rocksdb_checksums.result | 27 +- .../rocksdb/r/rocksdb_deadlock_detect_rc.result | 23 +- .../rocksdb/r/rocksdb_deadlock_detect_rr.result | 23 +- .../mysql-test/rocksdb/r/rocksdb_range2.result | 17 + .../rocksdb/r/secondary_key_update_lock.result | 18 + .../mysql-test/rocksdb/r/show_engine.result | 53 + .../mysql-test/rocksdb/r/transaction.result | 17 + .../mysql-test/rocksdb/r/trx_info_rpl.result | 2 +- storage/rocksdb/mysql-test/rocksdb/r/update.result | 8 + .../mysql-test/rocksdb/r/use_direct_reads.result | 18 + .../mysql-test/rocksdb/r/validate_datadic.result | 5 +- .../mysql-test/rocksdb/t/2pc_group_commit.test | 24 +- .../mysql-test/rocksdb/t/add_index_inplace.test | 18 + .../rocksdb/t/add_index_inplace_crash.test | 1 + .../rocksdb/t/add_index_inplace_sstfilewriter.test | 2 +- .../t/allow_to_start_after_corruption-master.opt | 1 + .../mysql-test/rocksdb/t/autoinc_debug-master.opt | 2 +- .../mysql-test/rocksdb/t/autoinc_debug.test | 17 +- .../rocksdb/mysql-test/rocksdb/t/autoinc_vars.test | 33 + .../mysql-test/rocksdb/t/bloomfilter5-master.opt | 4 +- .../rocksdb/t/bloomfilter_bulk_load-master.opt | 2 + .../rocksdb/t/bloomfilter_bulk_load.test | 35 + .../mysql-test/rocksdb/t/bulk_load_errors.test | 7 + .../rocksdb/mysql-test/rocksdb/t/bulk_load_sk.test | 119 + .../rocksdb/mysql-test/rocksdb/t/cardinality.test | 21 +- .../rocksdb/t/check_ignore_unknown_options.test | 6 +- .../rocksdb/mysql-test/rocksdb/t/collation.test | 36 +- .../rocksdb/mysql-test/rocksdb/t/com_rpc_tx.cnf | 4 + .../rocksdb/mysql-test/rocksdb/t/com_rpc_tx.test | 87 + .../t/create_no_primary_key_table-master.opt | 1 + .../rocksdb/t/create_no_primary_key_table.test | 44 + .../mysql-test/rocksdb/t/deadlock_tracking.test | 76 +- storage/rocksdb/mysql-test/rocksdb/t/disabled.def | 12 +- .../rocksdb/mysql-test/rocksdb/t/drop_table.test | 27 + .../rocksdb/t/explicit_snapshot-master.opt | 1 + .../mysql-test/rocksdb/t/explicit_snapshot.test | 263 + .../rocksdb/mysql-test/rocksdb/t/i_s_deadlock.test | 14 +- .../mysql-test/rocksdb/t/index_file_map.test | 3 + .../rocksdb/t/index_merge_rocksdb2-master.opt | 2 +- .../mysql-test/rocksdb/t/information_schema.test | 1 + .../rocksdb/t/insert_optimized_config-master.opt | 8 - .../rocksdb/t/insert_optimized_config.test | 10 + storage/rocksdb/mysql-test/rocksdb/t/issue255.test | 16 +- storage/rocksdb/mysql-test/rocksdb/t/lock.test | 22 + .../t/percona_nonflushing_analyze_debug.test | 11 + .../rocksdb/t/prefix_extractor_override.test | 14 +- storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test | 3 +- .../mysql-test/rocksdb/t/rocksdb_checksums.test | 23 +- .../rocksdb/t/rocksdb_deadlock_detect.inc | 35 +- .../mysql-test/rocksdb/t/rocksdb_range2.test | 12 + .../rocksdb/t/secondary_key_update_lock.test | 26 + .../mysql-test/rocksdb/t/set_checkpoint.inc | 2 +- .../rocksdb/mysql-test/rocksdb/t/show_engine.test | 13 + .../rocksdb/mysql-test/rocksdb/t/transaction.test | 23 + .../rocksdb/mysql-test/rocksdb/t/trx_info_rpl.test | 4 +- storage/rocksdb/mysql-test/rocksdb/t/update.test | 10 + .../mysql-test/rocksdb/t/use_direct_reads.test | 37 + .../mysql-test/rocksdb/t/validate_datadic.test | 25 +- .../rocksdb/mysql-test/rocksdb_rpl/combinations | 8 +- .../r/rpl_missing_columns_sk_update.result | 62 + .../rpl_mts_dependency_unique_key_conflicts.result | 44 + .../rocksdb_rpl/r/rpl_rocksdb_snapshot.result | 4 +- .../rocksdb/mysql-test/rocksdb_rpl/t/disabled.def | 2 + .../t/rpl_gtid_crash_safe_wal_corrupt.inc | 2 +- .../t/rpl_missing_columns_sk_update.cnf | 13 + .../t/rpl_missing_columns_sk_update.test | 69 + .../t/rpl_mts_dependency_unique_key_conflicts.test | 64 + .../t/rpl_rocksdb_2pc_crash_recover.test | 1 + .../rocksdb/mysql-test/rocksdb_stress/combinations | 5 + .../r/rocksdb_block_cache_size_basic.result | 84 +- .../r/rocksdb_bulk_load_allow_sk_basic.result | 100 + ...sdb_commit_time_batch_for_recovery_basic.result | 121 + .../r/rocksdb_create_checkpoint_basic.result | 2 +- ...ksdb_debug_manual_compaction_delay_basic.result | 46 + ...ksdb_error_on_suboptimal_collation_basic.result | 7 + .../rocksdb_manual_compaction_threads_basic.result | 93 + .../r/rocksdb_max_manifest_file_size_basic.result | 2 +- .../r/rocksdb_max_manual_compactions_basic.result | 57 + .../r/rocksdb_max_row_locks_basic.result | 21 + .../r/rocksdb_stats_recalc_rate_basic.result | 53 + .../r/rocksdb_write_batch_max_bytes_basic.result | 4 +- .../r/rocksdb_write_policy_basic.result | 15 + .../t/rocksdb_block_cache_size_basic.test | 16 +- .../t/rocksdb_bulk_load_allow_sk_basic.test | 18 + ...cksdb_commit_time_batch_for_recovery_basic.test | 20 + .../t/rocksdb_create_checkpoint_basic.test | 2 +- ...ocksdb_debug_manual_compaction_delay_basic.test | 16 + ...ocksdb_error_on_suboptimal_collation_basic.test | 6 + .../t/rocksdb_manual_compaction_threads_basic.test | 17 + .../t/rocksdb_max_manual_compactions_basic.test | 17 + .../t/rocksdb_max_row_locks_basic.test | 1 + .../t/rocksdb_stats_recalc_rate_basic.test | 17 + .../t/rocksdb_write_batch_max_bytes_basic.test | 4 +- .../t/rocksdb_write_policy_basic.test | 17 + .../rocksdb/mysql-test/storage_engine/disabled.def | 1 + storage/rocksdb/properties_collector.cc | 63 +- storage/rocksdb/properties_collector.h | 5 +- storage/rocksdb/rdb_buff.h | 2 +- storage/rocksdb/rdb_cf_manager.cc | 2 +- storage/rocksdb/rdb_cf_manager.h | 2 +- storage/rocksdb/rdb_cf_options.cc | 4 +- storage/rocksdb/rdb_cf_options.h | 2 +- storage/rocksdb/rdb_compact_filter.h | 2 +- storage/rocksdb/rdb_comparator.h | 48 +- storage/rocksdb/rdb_datadic.cc | 8 +- storage/rocksdb/rdb_datadic.h | 7 +- storage/rocksdb/rdb_i_s.cc | 169 +- storage/rocksdb/rdb_i_s.h | 3 +- storage/rocksdb/rdb_index_merge.cc | 7 +- storage/rocksdb/rdb_index_merge.h | 2 +- storage/rocksdb/rdb_io_watchdog.cc | 2 +- storage/rocksdb/rdb_io_watchdog.h | 2 +- storage/rocksdb/rdb_mutex_wrapper.cc | 2 +- storage/rocksdb/rdb_mutex_wrapper.h | 2 +- storage/rocksdb/rdb_perf_context.cc | 4 +- storage/rocksdb/rdb_perf_context.h | 2 +- storage/rocksdb/rdb_psi.cc | 17 +- storage/rocksdb/rdb_psi.h | 10 +- storage/rocksdb/rdb_sst_info.cc | 6 +- storage/rocksdb/rdb_sst_info.h | 2 +- storage/rocksdb/rdb_threads.cc | 2 +- storage/rocksdb/rdb_threads.h | 33 +- storage/rocksdb/rdb_utils.cc | 25 +- storage/rocksdb/rdb_utils.h | 2 +- storage/rocksdb/rocksdb | 2 +- .../rocksdb/unittest/test_properties_collector.cc | 2 +- storage/sphinx/ha_sphinx.cc | 2 +- .../mysql-test/spider/include/direct_join_init.inc | 40 + .../mysql-test/spider/include/init_child2_1.inc | 14 + .../mysql-test/spider/include/init_master_1.inc | 4 + .../mysql-test/spider/include/init_spider.inc | 54 +- .../mysql-test/spider/r/auto_increment.result | 2 +- .../spider/mysql-test/spider/r/direct_join.result | 92 + .../mysql-test/spider/r/show_system_tables.result | 37 + .../mysql-test/spider/r/spider_fixes_part.result | 49 + .../spider/mysql-test/spider/r/timestamp.result | 101 +- .../spider/mysql-test/spider/t/direct_join.test | 146 + .../mysql-test/spider/t/show_system_tables.test | 26 + .../mysql-test/spider/t/spider_fixes_part.test | 110 + storage/spider/mysql-test/spider/t/timestamp.test | 85 +- .../spider/mysql-test/spider/t/timestamp_init.inc | 29 +- storage/spider/scripts/install_spider.sql | 65 + storage/spider/spd_db_include.h | 1 + storage/spider/spd_db_mysql.cc | 18 +- storage/spider/spd_direct_sql.cc | 2 +- storage/spider/spd_group_by_handler.cc | 36 + storage/spider/spd_sys_table.cc | 6 +- storage/spider/spd_table.cc | 23 +- storage/tokudb/CMakeLists.txt | 13 +- storage/tokudb/PerconaFT/CMakeLists.txt | 8 +- .../PerconaFT/cmake_modules/TokuMergeLibs.cmake | 16 +- .../cmake_modules/TokuSetupCompiler.cmake | 11 +- .../tokudb/PerconaFT/ft/cachetable/cachetable.cc | 21 +- .../tokudb/PerconaFT/ft/cachetable/cachetable.h | 8 +- .../tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc | 3 - storage/tokudb/PerconaFT/ft/ft-test-helpers.cc | 3 - storage/tokudb/PerconaFT/ft/ft.h | 3 + storage/tokudb/PerconaFT/ft/node.cc | 2 + .../PerconaFT/ft/serialize/block_allocator.cc | 2 +- .../tokudb/PerconaFT/ft/tests/cachetable-4357.cc | 4 - .../tokudb/PerconaFT/ft/tests/cachetable-4365.cc | 4 - .../tokudb/PerconaFT/ft/tests/cachetable-5097.cc | 6 +- .../tokudb/PerconaFT/ft/tests/cachetable-5978-2.cc | 7 +- .../tokudb/PerconaFT/ft/tests/cachetable-5978.cc | 13 +- .../PerconaFT/ft/tests/cachetable-all-write.cc | 5 +- .../ft/tests/cachetable-checkpoint-pending.cc | 8 +- .../ft/tests/cachetable-checkpoint-pinned-nodes.cc | 6 +- .../ft/tests/cachetable-cleaner-checkpoint.cc | 5 +- .../ft/tests/cachetable-cleaner-checkpoint2.cc | 5 +- .../cachetable-cleaner-thread-attrs-accumulate.cc | 8 +- .../cachetable-cleaner-thread-everything-pinned.cc | 5 +- ...etable-cleaner-thread-nothing-needs-flushing.cc | 5 +- .../cachetable-cleaner-thread-same-fullhash.cc | 7 +- .../ft/tests/cachetable-cleaner-thread-simple.cc | 7 +- .../ft/tests/cachetable-clock-eviction.cc | 9 +- .../ft/tests/cachetable-clock-eviction2.cc | 9 +- .../ft/tests/cachetable-clock-eviction3.cc | 9 +- .../ft/tests/cachetable-clock-eviction4.cc | 9 +- .../ft/tests/cachetable-clone-checkpoint.cc | 5 +- .../cachetable-clone-partial-fetch-pinned-node.cc | 7 +- .../ft/tests/cachetable-clone-partial-fetch.cc | 7 +- .../ft/tests/cachetable-clone-pin-nonblocking.cc | 7 +- .../ft/tests/cachetable-clone-unpin-remove.cc | 5 +- .../ft/tests/cachetable-eviction-close-test.cc | 4 - .../ft/tests/cachetable-eviction-close-test2.cc | 4 - .../ft/tests/cachetable-eviction-getandpin-test.cc | 14 +- .../tests/cachetable-eviction-getandpin-test2.cc | 12 +- .../ft/tests/cachetable-fetch-inducing-evictor.cc | 15 +- .../ft/tests/cachetable-flush-during-cleaner.cc | 3 +- .../ft/tests/cachetable-getandpin-test.cc | 8 +- .../cachetable-kibbutz_and_flush_cachefile.cc | 3 +- .../PerconaFT/ft/tests/cachetable-partial-fetch.cc | 18 +- .../ft/tests/cachetable-pin-checkpoint.cc | 6 - .../cachetable-pin-nonblocking-checkpoint-clean.cc | 9 +- .../ft/tests/cachetable-prefetch-close-test.cc | 2 - .../ft/tests/cachetable-prefetch-getandpin-test.cc | 12 +- .../ft/tests/cachetable-put-checkpoint.cc | 9 - .../PerconaFT/ft/tests/cachetable-simple-clone.cc | 7 +- .../PerconaFT/ft/tests/cachetable-simple-clone2.cc | 5 +- .../PerconaFT/ft/tests/cachetable-simple-close.cc | 20 +- .../ft/tests/cachetable-simple-maybe-get-pin.cc | 3 +- .../ft/tests/cachetable-simple-pin-cheap.cc | 9 +- .../ft/tests/cachetable-simple-pin-dep-nodes.cc | 8 +- .../cachetable-simple-pin-nonblocking-cheap.cc | 19 +- .../ft/tests/cachetable-simple-pin-nonblocking.cc | 13 +- .../PerconaFT/ft/tests/cachetable-simple-pin.cc | 11 +- .../ft/tests/cachetable-simple-put-dep-nodes.cc | 6 +- .../cachetable-simple-read-pin-nonblocking.cc | 13 +- .../ft/tests/cachetable-simple-read-pin.cc | 13 +- .../cachetable-simple-unpin-remove-checkpoint.cc | 7 +- .../PerconaFT/ft/tests/cachetable-simple-verify.cc | 5 +- .../tokudb/PerconaFT/ft/tests/cachetable-test.cc | 22 +- .../ft/tests/cachetable-unpin-and-remove-test.cc | 4 +- .../cachetable-unpin-remove-and-checkpoint.cc | 6 +- .../PerconaFT/ft/tests/cachetable-unpin-test.cc | 2 - storage/tokudb/PerconaFT/ft/tests/test-TDB2-pe.cc | 178 + storage/tokudb/PerconaFT/ft/tests/test-TDB89.cc | 208 + storage/tokudb/PerconaFT/ft/txn/rollback-apply.cc | 2 + storage/tokudb/PerconaFT/ft/txn/rollback.cc | 2 +- storage/tokudb/PerconaFT/ftcxx/malloc_utils.cpp | 2 +- storage/tokudb/PerconaFT/ftcxx/malloc_utils.hpp | 2 +- storage/tokudb/PerconaFT/portability/toku_assert.h | 2 +- storage/tokudb/PerconaFT/portability/toku_crash.cc | 2 +- .../tokudb/PerconaFT/portability/toku_debug_sync.h | 3 +- .../PerconaFT/portability/toku_instr_mysql.cc | 6 +- .../PerconaFT/portability/toku_instrumentation.h | 6 +- .../tokudb/PerconaFT/portability/toku_race_tools.h | 2 +- storage/tokudb/PerconaFT/src/tests/get_last_key.cc | 32 +- storage/tokudb/PerconaFT/src/ydb.cc | 3 + storage/tokudb/PerconaFT/src/ydb_lib.cc | 2 +- storage/tokudb/PerconaFT/util/dmt.cc | 4 +- storage/tokudb/PerconaFT/util/minicron.cc | 3 +- storage/tokudb/PerconaFT/util/scoped_malloc.cc | 2 +- .../util/tests/minicron-change-period-data-race.cc | 66 + storage/tokudb/ha_tokudb.cc | 337 +- storage/tokudb/ha_tokudb.h | 94 +- storage/tokudb/ha_tokudb_admin.cc | 8 +- storage/tokudb/ha_tokudb_alter_55.cc | 4 + storage/tokudb/ha_tokudb_alter_56.cc | 265 +- storage/tokudb/ha_tokudb_alter_common.cc | 6 +- storage/tokudb/ha_tokudb_update.cc | 96 +- storage/tokudb/hatoku_cmp.cc | 33 +- storage/tokudb/hatoku_cmp.h | 14 +- storage/tokudb/hatoku_defines.h | 65 +- storage/tokudb/hatoku_hton.cc | 183 +- storage/tokudb/hatoku_hton.h | 25 +- storage/tokudb/mysql-test/rpl/disabled.def | 1 + .../mysql-test/rpl/r/rpl_mixed_replace_into.result | 23 + .../mysql-test/rpl/r/rpl_not_null_tokudb.result | 16 - .../rpl/r/rpl_parallel_tokudb_delete_pk.result | 13 - ...pl_parallel_tokudb_update_pk_uc0_lookup0.result | 13 - .../rpl/r/rpl_parallel_tokudb_write_pk.result | 6 - .../mysql-test/rpl/r/rpl_row_basic_3tokudb.result | 32 - .../rpl/r/rpl_row_rec_comp_tokudb.result | 12 - .../mysql-test/rpl/r/rpl_row_replace_into.result | 23 + .../mysql-test/rpl/r/rpl_set_null_tokudb.result | 16 - .../mysql-test/rpl/r/rpl_stmt_replace_into.result | 23 + .../mysql-test/rpl/r/rpl_tokudb_mixed_dml.result | 15 +- .../mysql-test/rpl/r/rpl_truncate_3tokudb.result | 16 - .../mysql-test/rpl/r/rpl_typeconv_tokudb.result | 4 - .../mysql-test/rpl/r/rpl_xa_interleave.result | 78 + .../mysql-test/rpl/r/tokudb_innodb_xa_crash.result | 8 - .../mysql-test/rpl/t/rpl_mixed_replace_into.test | 25 + .../mysql-test/rpl/t/rpl_row_replace_into.test | 25 + .../mysql-test/rpl/t/rpl_stmt_replace_into.test | 25 + .../tokudb/mysql-test/rpl/t/rpl_xa_interleave.test | 103 + .../tokudb/include/fast_update_gen_footer.inc | 2 + .../include/fast_update_gen_footer_silent.inc | 9 + .../tokudb/include/fast_update_gen_header.inc | 6 + .../mysql-test/tokudb/include/fast_update_int.inc | 48 + .../tokudb/include/fast_upsert_gen_header.inc | 6 + .../mysql-test/tokudb/include/fast_upsert_int.inc | 19 + .../tokudb/mysql-test/tokudb/include/have_mrr.inc | 0 .../tokudb/include/setup_fast_update_upsert.inc | 8 + .../tokudb/r/change_column_bin_descriptor.result | 4 - .../tokudb/r/change_column_bin_rename.result | 64 - .../tokudb/r/change_column_blob_data.result | 72 - .../tokudb/r/change_column_char_descriptor.result | 4 - .../tokudb/r/change_column_char_rename.result | 64 - .../mysql-test/tokudb/r/change_column_int.result | 120 - .../tokudb/r/change_column_int_descriptor.result | 4 - .../tokudb/r/change_column_int_rename.result | 40 - .../tokudb/r/change_column_text_data.result | 72 - .../r/change_column_varbin_descriptor.result | 4 - .../r/change_column_varchar_descriptor.result | 4 - .../tokudb/mysql-test/tokudb/r/compressions.result | 11 + .../tokudb/r/fast_update_binlog_mixed.result | 225 +- .../tokudb/r/fast_update_binlog_row.result | 19 +- .../tokudb/r/fast_update_binlog_statement.result | 222 +- .../mysql-test/tokudb/r/fast_update_blobs.result | 18253 +--------- .../r/fast_update_blobs_fixed_varchar.result | 33026 ------------------ .../tokudb/r/fast_update_blobs_with_varchar.result | 32771 +----------------- .../mysql-test/tokudb/r/fast_update_char.result | 60 +- .../tokudb/r/fast_update_deadlock.result | 19 +- .../tokudb/r/fast_update_decr_floor.result | 314 +- .../r/fast_update_disable_slow_update.result | 7 - .../mysql-test/tokudb/r/fast_update_error.result | 12 +- .../mysql-test/tokudb/r/fast_update_int.result | 562 +- .../tokudb/r/fast_update_int_bounds.result | 52 +- .../mysql-test/tokudb/r/fast_update_key.result | 54 +- .../mysql-test/tokudb/r/fast_update_sqlmode.result | 21 +- .../tokudb/r/fast_update_uint_bounds.result | 36 +- .../mysql-test/tokudb/r/fast_update_varchar.result | 13575 +------- .../mysql-test/tokudb/r/fast_upsert_bin_pad.result | Bin 659 -> 738 bytes .../mysql-test/tokudb/r/fast_upsert_char.result | 24 +- .../tokudb/r/fast_upsert_deadlock.result | 19 +- .../mysql-test/tokudb/r/fast_upsert_int.result | 428 +- .../mysql-test/tokudb/r/fast_upsert_key.result | 43 +- .../mysql-test/tokudb/r/fast_upsert_sqlmode.result | 23 +- .../mysql-test/tokudb/r/fast_upsert_values.result | 18 +- .../tokudb/mysql-test/tokudb/r/tokudb_mrr.result | 334 + .../mysql-test/tokudb/r/type_datetime.result | 10 +- storage/tokudb/mysql-test/tokudb/suite.pm | 6 + .../tokudb/mysql-test/tokudb/t/compressions.test | 68 + storage/tokudb/mysql-test/tokudb/t/disabled.def | 24 - .../tokudb/t/fast_update_binlog_mixed-master.opt | 2 + .../tokudb/t/fast_update_binlog_mixed.test | 15 +- .../tokudb/t/fast_update_binlog_row-master.opt | 2 + .../tokudb/t/fast_update_binlog_row.test | 19 +- .../t/fast_update_binlog_statement-master.opt | 2 + .../tokudb/t/fast_update_binlog_statement.test | 15 +- .../mysql-test/tokudb/t/fast_update_blobs.py | 57 - .../mysql-test/tokudb/t/fast_update_blobs.test | 18575 +---------- .../tokudb/t/fast_update_blobs_fixed_varchar.py | 63 - .../tokudb/t/fast_update_blobs_fixed_varchar.test | 33287 ------------------- .../tokudb/t/fast_update_blobs_with_varchar.py | 62 - .../tokudb/t/fast_update_blobs_with_varchar.test | 33115 +----------------- .../mysql-test/tokudb/t/fast_update_char.test | 66 +- .../mysql-test/tokudb/t/fast_update_deadlock.test | 21 +- .../mysql-test/tokudb/t/fast_update_decr_floor.py | 58 - .../tokudb/t/fast_update_decr_floor.test | 409 +- .../tokudb/t/fast_update_disable_slow_update.test | 17 - .../mysql-test/tokudb/t/fast_update_error.test | 16 +- .../tokudb/mysql-test/tokudb/t/fast_update_int.py | 77 - .../mysql-test/tokudb/t/fast_update_int.test | 682 +- .../tokudb/t/fast_update_int_bounds.test | 55 +- .../mysql-test/tokudb/t/fast_update_key.test | 63 +- .../mysql-test/tokudb/t/fast_update_sqlmode.test | 25 +- .../tokudb/t/fast_update_uint_bounds.test | 42 +- .../mysql-test/tokudb/t/fast_update_varchar.py | 63 - .../mysql-test/tokudb/t/fast_update_varchar.test | 7390 +--- .../mysql-test/tokudb/t/fast_upsert_bin_pad.test | 19 +- .../mysql-test/tokudb/t/fast_upsert_char.test | 27 +- .../mysql-test/tokudb/t/fast_upsert_deadlock.test | 22 +- .../tokudb/mysql-test/tokudb/t/fast_upsert_int.py | 50 - .../mysql-test/tokudb/t/fast_upsert_int.test | 486 +- .../mysql-test/tokudb/t/fast_upsert_key.test | 46 +- .../mysql-test/tokudb/t/fast_upsert_sqlmode.test | 27 +- .../mysql-test/tokudb/t/fast_upsert_values.test | 21 +- storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test | 73 + .../tokudb_alter_table/r/hcad_all_add.result | 1736 - .../tokudb_alter_table/r/hcad_all_add2.result | 1736 - .../tokudb_alter_table/r/hcad_all_add3.result | 1736 - .../tokudb_alter_table/r/hcad_all_blob_add.result | 1736 - .../tokudb_alter_table/r/hcad_all_blob_drop.result | 160 - .../tokudb_alter_table/r/hcad_all_drop.result | 1232 - .../tokudb_alter_table/r/hcad_all_fixed_add.result | 1736 - .../r/hcad_all_fixed_drop.result | 160 - .../tokudb_alter_table/r/hcad_all_var_add.result | 1736 - .../tokudb_alter_table/r/hcad_all_var_drop.result | 160 - .../tokudb_alter_table/r/hcad_clustering.result | 32 - .../tokudb_alter_table/r/hcad_clustering2.result | 32 - .../r/hcad_diff_num_offset_bytes.result | 84 - .../tokudb_alter_table/r/hcad_fixedblob_add.result | 1736 - .../r/hcad_fixedblob_add2.result | 1736 - .../r/hcad_fixedblob_drop.result | 560 - .../tokudb_alter_table/r/hcad_fixedvar_add.result | 1736 - .../tokudb_alter_table/r/hcad_fixedvar_add2.result | 1736 - .../tokudb_alter_table/r/hcad_fixedvar_drop.result | 560 - .../tokudb_alter_table/r/hcad_null_bits.result | 68 - .../mysql-test/tokudb_alter_table/r/hcad_pk.result | 32 - .../tokudb_alter_table/r/hcad_pk2.result | 32 - .../tokudb_alter_table/r/hcad_varblob_add.result | 1736 - .../tokudb_alter_table/r/hcad_varblob_add2.result | 1736 - .../tokudb_alter_table/r/hcad_varblob_drop.result | 560 - .../tokudb_alter_table/r/other_alter2.result | 72 - .../tokudb/mysql-test/tokudb_bugs/r/PS-3773.result | 8 + .../tokudb_bugs/r/alter_part_tokudb_bug_155.result | 4 - .../r/alter_table_comment_rebuild_data.result | 177 + .../tokudb/mysql-test/tokudb_bugs/r/db743.result | 4 - .../mysql-test/tokudb_bugs/r/mdev5932.result | 4 - .../tokudb_bugs/r/rpl_mixed_replace_into.result | 23 - .../tokudb_bugs/r/rpl_row_replace_into.result | 23 - .../tokudb_bugs/r/rpl_stmt_replace_into.result | 23 - .../tokudb/mysql-test/tokudb_bugs/t/PS-3773.test | 26 + .../t/alter_table_comment_rebuild_data.test | 188 + .../tokudb_bugs/t/rpl_mixed_replace_into.test | 25 - .../tokudb_bugs/t/rpl_row_replace_into.test | 25 - .../tokudb_bugs/t/rpl_stmt_replace_into.test | 25 - storage/tokudb/tokudb_debug.h | 5 - storage/tokudb/tokudb_dir_cmd.h | 6 +- storage/tokudb/tokudb_information_schema.cc | 74 +- storage/tokudb/tokudb_sysvars.cc | 120 +- storage/tokudb/tokudb_sysvars.h | 16 +- storage/tokudb/tokudb_thread.h | 26 +- storage/tokudb/tokudb_update_fun.cc | 230 +- strings/ctype-bin.c | 8 +- strings/ctype-euc_kr.c | 4 +- strings/ctype-mb.c | 100 +- strings/ctype-simple.c | 26 +- strings/ctype-uca.c | 1560 +- strings/ctype-uca.ic | 839 + strings/ctype-ucs2.c | 223 +- strings/ctype-ucs2.h | 32 + strings/ctype-ujis.c | 8 +- strings/ctype-unidata.h | 31 + strings/ctype-utf16.h | 80 + strings/ctype-utf32.h | 33 + strings/ctype-utf8.c | 430 +- strings/ctype-utf8.h | 190 + strings/decimal.c | 35 +- strings/json_lib.c | 23 + strings/strcoll.ic | 267 +- support-files/mariadb.service.in | 1 - support-files/mariadb@.service.in | 1 - support-files/mysql.server.sh | 31 +- support-files/mysqld_multi.server.sh | 19 +- support-files/rpm/plugin-postin.sh | 3 + support-files/rpm/server-posttrans.sh | 11 + support-files/rpm/server-postun.sh | 9 +- tests/mysql_client_fw.c | 12 - tests/mysql_client_test.c | 15 + unittest/sql/mf_iocache-t.cc | 88 +- vio/CMakeLists.txt | 2 +- vio/vio.c | 61 +- vio/vio_priv.h | 8 - vio/viopipe.c | 1 - vio/vioshm.c | 217 - vio/viosocket.c | 14 +- vio/viossl.c | 12 +- win/packaging/CMakeLists.txt | 95 +- win/packaging/CPackWixConfig.cmake | 2 +- win/packaging/CPackZIPConfig.cmake | 11 + win/packaging/CPackZIPDebugInfoConfig.cmake | 6 + win/packaging/ca/CMakeLists.txt | 7 +- win/packaging/create_msi.cmake | 411 + win/packaging/create_msi.cmake.in | 437 - win/packaging/extra.wxs.in | 16 +- win/packaging/heidisql.cmake | 10 +- win/packaging/mysql_server.wxs.in | 2 +- win/upgrade_wizard/CMakeLists.txt | 21 +- zlib/CMakeLists.txt | 156 +- zlib/ChangeLog | 666 +- zlib/FAQ | 267 +- zlib/INDEX | 41 +- zlib/README | 94 +- zlib/README.MySQL | 16 - zlib/adler32.c | 113 +- zlib/algorithm.txt | 209 - zlib/amiga/Makefile.pup | 69 + zlib/amiga/Makefile.sas | 68 + zlib/compress.c | 45 +- zlib/crc32.c | 149 +- zlib/crc32.h | 2 +- zlib/deflate.c | 1269 +- zlib/deflate.h | 78 +- zlib/gzclose.c | 25 + zlib/gzguts.h | 218 + zlib/gzio.c | 1031 - zlib/gzlib.c | 637 + zlib/gzread.c | 654 + zlib/gzwrite.c | 665 + zlib/infback.c | 107 +- zlib/inffast.c | 159 +- zlib/inffast.h | 4 +- zlib/inffixed.h | 6 +- zlib/inflate.c | 507 +- zlib/inflate.h | 38 +- zlib/inftrees.c | 109 +- zlib/inftrees.h | 27 +- zlib/make_vms.com | 867 + zlib/msdos/Makefile.bor | 115 + zlib/msdos/Makefile.dj2 | 104 + zlib/msdos/Makefile.emx | 69 + zlib/msdos/Makefile.msc | 112 + zlib/msdos/Makefile.tc | 100 + zlib/nintendods/README | 5 + zlib/old/Makefile.emx | 69 + zlib/old/Makefile.riscos | 151 + zlib/old/README | 3 + zlib/old/descrip.mms | 48 + zlib/old/os2/Makefile.os2 | 136 + zlib/old/os2/zlib.def | 51 + zlib/old/visual-basic.txt | 160 + zlib/os400/README400 | 48 + zlib/os400/bndsrc | 119 + zlib/os400/make.sh | 366 + zlib/os400/zlib.inc | 527 + zlib/qnx/package.qpg | 141 + zlib/test/example.c | 602 + zlib/test/infcover.c | 671 + zlib/test/minigzip.c | 651 + zlib/treebuild.xml | 116 + zlib/trees.c | 246 +- zlib/trees.h | 4 +- zlib/uncompr.c | 100 +- zlib/watcom/watcom_f.mak | 43 + zlib/watcom/watcom_l.mak | 43 + zlib/win32/DLL_FAQ.txt | 397 + zlib/win32/Makefile.bor | 110 + zlib/win32/Makefile.gcc | 182 + zlib/win32/Makefile.msc | 163 + zlib/win32/README-WIN32.txt | 103 + zlib/win32/VisualC.txt | 3 + zlib/win32/zlib.def | 94 + zlib/win32/zlib1.rc | 40 + zlib/zconf.h | 336 - zlib/zconf.h.cmakein | 536 + zlib/zconf.h.in | 534 + zlib/zlib.3 | 122 +- zlib/zlib.h | 1639 +- zlib/zlib.pc.cmakein | 13 + zlib/zlib.pc.in | 13 + zlib/zlib2ansi | 152 + zlib/zutil.c | 101 +- zlib/zutil.h | 192 +- 1899 files changed, 76236 insertions(+), 268338 deletions(-) diff --cc sql/sql_select.cc index 616fea0,7ae4e7a..8f55497 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@@ -7310,15 -7388,12 +7404,20 @@@ best_access_path(JOIN *join tmp+= (s->records - rnd_records)/(double) TIME_FOR_COMPARE; } } + + double best_records= rnd_records; - tmp += s->startup_cost; + /* Splitting technique cannot be used with join cache */ + if (s->table->is_splittable()) + tmp+= s->table->get_materialization_cost(); + else + tmp+= s->startup_cost; + + filter= s->table->best_filter_for_current_join_order(MAX_KEY, + rnd_records, + record_count); + if (filter && (filter->get_filter_gain(record_count*rnd_records) < tmp)) + tmp= tmp - filter->get_filter_gain(record_count*rnd_records); + /* We estimate the cost of evaluating WHERE clause for found records as record_count * rnd_records / TIME_FOR_COMPARE. This cost plus diff --cc sql/table.h index 14bc928,2b3fe1c..3c782c3 --- a/sql/table.h +++ b/sql/table.h @@@ -1492,23 -1491,9 +1494,24 @@@ public bool is_splittable() { return spl_opt_info != NULL; } void set_spl_opt_info(SplM_opt_info *spl_info); void deny_splitting(); + double get_materialization_cost(); // Now used only if is_splittable()==true void add_splitting_info_for_key_field(struct KEY_FIELD *key_field); + + /** + Range filter info + */ + /* Minimum possible #T value to apply filter*/ + uint best_filter_count; + uint range_filter_cost_info_elements; + Range_filter_cost_info *range_filter_cost_info; + Range_filter_cost_info + *best_filter_for_current_join_order(uint ref_key_no, + double record_count, + double records); + void sort_range_filter_cost_info_array(); + void prune_range_filters(); + void select_usable_range_filters(THD *thd); /** System Versioning support */